summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarsten Thoms2016-02-02 16:33:54 -0500
committerKarsten Thoms2016-02-02 16:33:54 -0500
commit97308e37a12d7b2ce4291bf2fc376bdb89dceae4 (patch)
tree8e653a0ab2e5c356d2b89ee50f87601261381445
parentb7ec87274b4db9d5c234fa10d6d5e64f268cd833 (diff)
downloadorg.eclipse.xpand-97308e37a12d7b2ce4291bf2fc376bdb89dceae4.zip
org.eclipse.xpand-97308e37a12d7b2ce4291bf2fc376bdb89dceae4.tar.gz
org.eclipse.xpand-97308e37a12d7b2ce4291bf2fc376bdb89dceae4.tar.xz
[480679] Show let variables in Variables view
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/ast/LetExpression.java6
-rw-r--r--plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/debug/ExpressionElementAdapter.java7
2 files changed, 9 insertions, 4 deletions
diff --git a/plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/ast/LetExpression.java b/plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/ast/LetExpression.java
index c1e085c..2334f7c 100644
--- a/plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/ast/LetExpression.java
+++ b/plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/ast/LetExpression.java
@@ -54,7 +54,11 @@ public class LetExpression extends Expression {
ExecutionContext _ctx = ctx;
final Object o = varExpression.evaluate(_ctx);
_ctx = _ctx.cloneWithVariable(new Variable(varName.toString(), o));
- return targetExpression.evaluate(_ctx);
+
+ _ctx.preTask(this);
+ Object result = targetExpression.evaluate(_ctx);
+ _ctx.postTask(this);
+ return result;
}
@Override
diff --git a/plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/debug/ExpressionElementAdapter.java b/plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/debug/ExpressionElementAdapter.java
index d0866cb..e0663fd 100644
--- a/plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/debug/ExpressionElementAdapter.java
+++ b/plugins/org.eclipse.xtend/src/org/eclipse/internal/xtend/expression/debug/ExpressionElementAdapter.java
@@ -28,11 +28,11 @@ import org.eclipse.internal.xtend.expression.ast.ChainExpression;
import org.eclipse.internal.xtend.expression.ast.Expression;
import org.eclipse.internal.xtend.expression.ast.FeatureCall;
import org.eclipse.internal.xtend.expression.ast.ISyntaxElement;
+import org.eclipse.internal.xtend.expression.ast.LetExpression;
import org.eclipse.internal.xtend.expression.ast.Literal;
import org.eclipse.internal.xtend.expression.ast.OperationCall;
import org.eclipse.internal.xtend.type.baseimpl.PolymorphicResolver;
-import org.eclipse.internal.xtend.xtend.ast.CreateExtensionStatement;
-import org.eclipse.internal.xtend.xtend.ast.ExpressionExtensionStatement;
+import org.eclipse.internal.xtend.xtend.ast.AbstractExtensionDefinition;
import org.eclipse.xtend.expression.ExecutionContext;
import org.eclipse.xtend.expression.Variable;
import org.eclipse.xtend.typesystem.AbstractTypeImpl;
@@ -189,7 +189,8 @@ public class ExpressionElementAdapter implements ElementAdapter {
return result;
}
- if(element instanceof CreateExtensionStatement || element instanceof ExpressionExtensionStatement) {
+
+ if(element instanceof AbstractExtensionDefinition || element instanceof LetExpression) {
final Type type = context.getType(element);
List<NameValuePair> props = getAllPropertiesFor(type, element);
for (Entry<String, Variable> entry : context.getVisibleVariables().entrySet()) {