|
From: <caw...@us...> - 2007-08-23 20:01:21
|
Revision: 3064
http://rubyeclipse.svn.sourceforge.net/rubyeclipse/?rev=3064&view=rev
Author: cawilliams
Date: 2007-08-23 13:01:19 -0700 (Thu, 23 Aug 2007)
Log Message:
-----------
modify icons to be ruby-like, make RubyEvaluationResult implement getErrorMessages() and hasErrors() properly. Set exception on result in RubyDebuggerProxy
Modified Paths:
--------------
trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/RubyDebuggerProxy.java
trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/model/RubyEvaluationResult.java
Modified: trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/RubyDebuggerProxy.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/RubyDebuggerProxy.java 2007-08-23 19:43:29 UTC (rev 3063)
+++ trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/RubyDebuggerProxy.java 2007-08-23 20:01:19 UTC (rev 3064)
@@ -5,6 +5,9 @@
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IMarkerDelta;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.core.DebugException;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.model.IBreakpoint;
import org.rubypeople.rdt.debug.core.RubyLineBreakpoint;
@@ -243,7 +246,7 @@
}
}
- public IEvaluationResult evaluate(RubyStackFrame frame, String expression) throws RubyProcessingException {
+ public IEvaluationResult evaluate(RubyStackFrame frame, String expression) {
expression = expression.replaceAll("\\r\\n", "\n");
expression = expression.replaceAll("\\n", "; ");
expression = expression.trim();
@@ -255,9 +258,11 @@
result.setValue(variables[0].getValue());
}
} catch (IOException ioex) {
- // TODO Set DebugException
- ioex.printStackTrace();
- throw new RuntimeException(ioex.getMessage());
+ DebugException ex = new DebugException(new Status(IStatus.ERROR, RdtDebugCorePlugin.PLUGIN_ID, DebugException.INTERNAL_ERROR, ioex.getMessage(), ioex));
+ result.setException(ex);
+ } catch (RubyProcessingException e) {
+ DebugException ex = new DebugException(new Status(IStatus.ERROR, RdtDebugCorePlugin.PLUGIN_ID, DebugException.TARGET_REQUEST_FAILED, e.getMessage(), e));
+ result.setException(ex);
}
return result;
}
Modified: trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/model/RubyEvaluationResult.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/model/RubyEvaluationResult.java 2007-08-23 19:43:29 UTC (rev 3063)
+++ trunk/org.rubypeople.rdt.debug.core/src/org/rubypeople/rdt/internal/debug/core/model/RubyEvaluationResult.java 2007-08-23 20:01:19 UTC (rev 3064)
@@ -18,7 +18,7 @@
public String[] getErrorMessages() {
// TODO Auto-generated method stub
- return null;
+ return new String[0];
}
public DebugException getException() {
@@ -46,7 +46,7 @@
}
public boolean hasErrors() {
- return false;
+ return getErrorMessages().length > 0 || getException() != null;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|