aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Besedin2012-02-24 11:25:06 (EST)
committerOleg Besedin2012-02-24 11:25:31 (EST)
commitabae1c384aa6ae6f2eba2bb44f5860fd8841bf7e (patch)
tree8465d218a77dc13eeac6cba95b83f27708975e3a
parent54a02ed6b491f28b25831d516268bffa99b4f657 (diff)
downloadeclipse.platform.ui-abae1c384aa6ae6f2eba2bb44f5860fd8841bf7e.zip
eclipse.platform.ui-abae1c384aa6ae6f2eba2bb44f5860fd8841bf7e.tar.gz
eclipse.platform.ui-abae1c384aa6ae6f2eba2bb44f5860fd8841bf7e.tar.bz2
Bug 371289 - Add "active" context variablesv20120224-1625
-rw-r--r--bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/workbench/modeling/ExpressionContext.java4
-rw-r--r--bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/EvaluationService.java2
2 files changed, 3 insertions, 3 deletions
diff --git a/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/workbench/modeling/ExpressionContext.java b/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/workbench/modeling/ExpressionContext.java
index eb35736..3f48db2 100644
--- a/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/workbench/modeling/ExpressionContext.java
+++ b/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/workbench/modeling/ExpressionContext.java
@@ -82,7 +82,7 @@ public class ExpressionContext implements IEvaluationContext {
* @see org.eclipse.core.expressions.IEvaluationContext#getDefaultVariable()
*/
public Object getDefaultVariable() {
- Object sel = eclipseContext.getActiveLeaf().get(IServiceConstants.ACTIVE_SELECTION);
+ Object sel = eclipseContext.getActive(IServiceConstants.ACTIVE_SELECTION);
return sel == null ? Collections.EMPTY_LIST : sel;
}
@@ -113,7 +113,7 @@ public class ExpressionContext implements IEvaluationContext {
* @see org.eclipse.core.expressions.IEvaluationContext#getVariable(java.lang.String)
*/
public Object getVariable(String name) {
- Object obj = eclipseContext.getActiveLeaf().get(name);
+ Object obj = eclipseContext.getActive(name);
return obj == null ? IEvaluationContext.UNDEFINED_VARIABLE : obj;
}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/EvaluationService.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/EvaluationService.java
index 3d8a55e..7229ca6 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/EvaluationService.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/EvaluationService.java
@@ -60,7 +60,7 @@ public final class EvaluationService implements IEvaluationService {
context.get(RE_EVAL);
String[] vars = ratVariables.toArray(new String[ratVariables.size()]);
for (String var : vars) {
- Object value = context.getActiveLeaf().get(var);
+ Object value = context.getActive(var);
if (value == null) {
ratContext.remove(var);
} else {