Community
Participate
Working Groups
+++ This bug was initially created as a clone of Bug #296728 +++ If I use the enablement node with the expression "WITH", no variable was found because no real context is given. example : <extension point="org.eclipse.ui.navigator.navigatorContent"> <commonWizard type="new" wizardId="com.mywizard"> <enablement> <with variable="activeWorkbenchWindow.activePerspective"> <equals value="com.myperpective"> </equals> </with> </enablement> </commonWizard> make this error : org.eclipse.core.runtime.CoreException: The variable activeWorkbenchWindow.activePerspective is not defined at org.eclipse.core.internal.expressions.WithExpression.evaluate(WithExpression.java:65) at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:53) at org.eclipse.core.internal.expressions.EnablementExpression.evaluate(EnablementExpression.java:53) at org.eclipse.ui.internal.navigator.wizards.CommonWizardDescriptor.isEnabledFor(CommonWizardDescriptor.java:145) at org.eclipse.ui.internal.navigator.wizards.CommonWizardDescriptorManager.getEnabledCommonWizardDescriptors(CommonWizardDescriptorManager.java:158) at org.eclipse.ui.navigator.WizardActionGroup.setContext(WizardActionGroup.java:193) at org.eclipse.ui.internal.navigator.resources.actions.NewActionProvider.fillContextMenu(NewActionProvider.java:107) You could do use the currentState of the IEvaluationService. (see WorkbenchWindow line 3035)
There was a request to patch this back to 3.4.2+ PW
Created attachment 182158 [details] Use the IEvaluationService to provide a context Francis, could you please have a look at my port to 3.4.2? With one minor change, it was the same as the 3.5.2 patch. PW
Boris, can I get a +1 for 3.4.2+? pW
(In reply to comment #2) > Created an attachment (id=182158) [details] > Francis, could you please have a look at my port to 3.4.2? With one minor > change, it was the same as the 3.5.2 patch. +1 for 3.4.2, this looks identical except that it does not have the test changes which is fine of course.
(In reply to comment #3) > Boris, can I get a +1 for 3.4.2+? > pW Do we have someone who can test that the changes are actually fixing a problem? If we can get them to say here that the patch does work as intended, +1 from me. (If it's an IBM team, relayed through Paul is good enough.)
(In reply to comment #5) > > Do we have someone who can test that the changes are actually fixing a problem? > If we can get them to say here that the patch does work as intended, +1 from > me. (If it's an IBM team, relayed through Paul is good enough.) I got the requesters to test this and it definitely solves their problem. PW
(In reply to comment #6) > I got the requesters to test this and it definitely solves their problem. > > PW Great, thanks! +1 for 3.4.2+
Released to R3_4_maintenance. PW