|
From: <caw...@us...> - 2007-08-15 17:36:03
|
Revision: 2983
http://rubyeclipse.svn.sourceforge.net/rubyeclipse/?rev=2983&view=rev
Author: cawilliams
Date: 2007-08-15 10:36:01 -0700 (Wed, 15 Aug 2007)
Log Message:
-----------
massage the value strings for RubyValues
Modified Paths:
--------------
trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/model/RubyValue.java
trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/model/RubyVariable.java
Modified: trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/model/RubyValue.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/model/RubyValue.java 2007-08-15 17:18:56 UTC (rev 2982)
+++ trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/model/RubyValue.java 2007-08-15 17:36:01 UTC (rev 2983)
@@ -31,10 +31,18 @@
}
public RubyValue(RubyVariable owner, String valueString, String type, boolean hasChildren) {
- this.valueString = valueString ;
- this.owner = owner ;
- this.hasChildren = hasChildren ;
- this.referenceTypeName = type ;
+ this.valueString = valueString;
+ if (type != null && type.equals("String")) {
+ this.valueString = '"' + this.valueString + '"';
+ } else if (this.valueString.startsWith("Empty ")) {
+ this.valueString = this.valueString.substring(6) + "[0]";
+ } else if (this.valueString.endsWith("element(s))")) {
+ int index = this.valueString.substring(0, this.valueString.length() - 11).lastIndexOf("(");
+ this.valueString = this.valueString.substring(0, index).trim() + "[" + this.valueString.substring(index + 1, this.valueString.length() - 11).trim() + "]";
+ }
+ this.owner = owner;
+ this.hasChildren = hasChildren;
+ this.referenceTypeName = type;
}
Modified: trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/model/RubyVariable.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/model/RubyVariable.java 2007-08-15 17:18:56 UTC (rev 2982)
+++ trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/model/RubyVariable.java 2007-08-15 17:36:01 UTC (rev 2983)
@@ -113,7 +113,7 @@
* @see org.eclipse.debug.core.model.IValueModification#setValue(IValue)
*/
public void setValue(IValue value) throws DebugException {
- value.getValueString();
+ setValue(value.getValueString());
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|