[jboss-svn-commits] JBL Code SVN: r26293 - labs/jbossrules/trunk/drools-eclipse/org.drools.eclipse/src/main/java/org/drools/eclipse/debug/core.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Apr 28 20:44:10 EDT 2009
Author: KrisVerlaenen
Date: 2009-04-28 20:44:10 -0400 (Tue, 28 Apr 2009)
New Revision: 26293
Modified:
labs/jbossrules/trunk/drools-eclipse/org.drools.eclipse/src/main/java/org/drools/eclipse/debug/core/MVELStackFrame.java
Log:
- fixed error in case variables cannot be found (MVEL debug mode error)
Modified: labs/jbossrules/trunk/drools-eclipse/org.drools.eclipse/src/main/java/org/drools/eclipse/debug/core/MVELStackFrame.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.drools.eclipse/src/main/java/org/drools/eclipse/debug/core/MVELStackFrame.java 2009-04-28 19:01:45 UTC (rev 26292)
+++ labs/jbossrules/trunk/drools-eclipse/org.drools.eclipse/src/main/java/org/drools/eclipse/debug/core/MVELStackFrame.java 2009-04-29 00:44:10 UTC (rev 26293)
@@ -149,7 +149,7 @@
public IVariable[] getVariables() throws DebugException {
if ( !isSuspended() ) {
- return null;
+ return new IVariable[0];
}
if ( cacheVariables != null ) {
@@ -173,12 +173,6 @@
IValue knownVars = DebugUtil.getValueByExpression( "return getFactory().getKnownVariables().toArray(new String[0]);",
frameLocal.getValue() );
- IValue factory = DebugUtil.getValueByExpression( "return getFactory();",
- frameLocal.getValue() );
-
- IValue vars2 = DebugUtil.getValueByExpression( "return getFactory().getKnownVariables();",
- frameLocal.getValue() );
-
JDIObjectValue vvv = (JDIObjectValue) knownVars;
if ( vvv != null && ((ArrayReference) vvv.getUnderlyingObject()).length() > 0 ) {
@@ -189,8 +183,8 @@
while ( varIter.hasNext() ) {
final String varName = ((StringReference) varIter.next()).value();
- IJavaValue val = (IJavaValue) DebugUtil.getValueByExpression( "return getVariableResolver(\"" + varName + "\").getValue();",
- factory );
+ IJavaValue val = (IJavaValue) DebugUtil.getValueByExpression( "return getFactory().getVariableResolver(\"" + varName + "\").getValue();",
+ frameLocal.getValue() );
if ( val != null ) {
final ObjectReference valRef = ((JDIObjectValue) val).getUnderlyingObject();
VariableWrapper local = new VariableWrapper( varName,
More information about the jboss-svn-commits
mailing list