aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Besedin2012-04-26 15:36:53 (EDT)
committerOleg Besedin2012-04-26 15:37:53 (EDT)
commitb02661368d6e68ac34cede3e613263240f733138 (patch)
treec7169304769c2157a66cdcb28e01a3dd49e0da24
parentcd036a0642b3c41f59e7b72d688b46a23cd86f75 (diff)
downloadeclipse.platform.ui-b02661368d6e68ac34cede3e613263240f733138.zip
eclipse.platform.ui-b02661368d6e68ac34cede3e613263240f733138.tar.gz
eclipse.platform.ui-b02661368d6e68ac34cede3e613263240f733138.tar.bz2
Bug 376441 - [Compatibility] IEvaluationService.requestEvaluation() doesv20120426-1937
not call property tester as it used to
-rw-r--r--bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/ContributionsAnalyzer.java7
-rw-r--r--bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/EvaluationService.java5
2 files changed, 12 insertions, 0 deletions
diff --git a/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/ContributionsAnalyzer.java b/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/ContributionsAnalyzer.java
index b1a86db..9d3291e 100644
--- a/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/ContributionsAnalyzer.java
+++ b/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/ContributionsAnalyzer.java
@@ -238,6 +238,13 @@ public final class ContributionsAnalyzer {
exp.setCoreExpression(ref);
}
try {
+ // Creates dependency on a predefined value that can be "poked" by the evaluation
+ // service
+ ExpressionInfo info = ref.computeExpressionInfo();
+ String[] names = info.getAccessedPropertyNames();
+ for (String name : names) {
+ eContext.getVariable(name + ".evaluationServiceLink"); //$NON-NLS-1$
+ }
return ref.evaluate(eContext) != EvaluationResult.FALSE;
} catch (CoreException e) {
trace("isVisible exception", e); //$NON-NLS-1$
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 e3d818b..eb13a1c 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
@@ -285,6 +285,11 @@ public final class EvaluationService implements IEvaluationService {
* @see org.eclipse.ui.services.IEvaluationService#requestEvaluation(java.lang.String)
*/
public void requestEvaluation(String propertyName) {
+ // Trigger evaluation of properties via context
+ String pokeVar = propertyName + ".evaluationServiceLink"; //$NON-NLS-1$
+ context.remove(pokeVar);
+ context.set(pokeVar, "link"); //$NON-NLS-1$
+
String[] sourceNames = new String[] { propertyName };
startSourceChange(sourceNames);
for (EvaluationReference ref : refs) {