| Summary: | "New" wizard shortcut does not check with activity manager | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Vivian Kong <vivkong> |
| Component: | UI | Assignee: | Platform-UI-Inbox <Platform-UI-Inbox> |
| Status: | RESOLVED INVALID | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | daniel_megert, pwebster, remy.suen |
| Version: | 3.6.2 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Vivian Kong
Actually I think the "New" wizard shortcut does check with the activity manager since once I switched between views (or launched the NewWizardSelectionPage), my wizard is now hidden. My wizard is being hidden on condition (with the click of a button). I'm seeing that WorkbenchActivityHelper.filterItem(object) is not returning the expected result. If I switched between views then I get the correct result. Maybe the activity calculation is not being updated somehow? And the calculation is triggered when I switched between views? (In reply to comment #1) > Actually I think the "New" wizard shortcut does check with the activity manager > since once I switched between views (or launched the > NewWizardSelectionPage), my wizard is now hidden. Yes, the filtering should be happening. See org.eclipse.ui.actions.BaseNewWizardMenu.addShortcuts(List). > If I switched between views then I get the correct result. > Maybe the activity calculation is not being updated somehow? And the > calculation is triggered when I switched between views? What do you mean by "switched between views"? If your view is already up and activated on workbench startup, does your wizard show up? What kind of condition are you using? You mean an activity with an enabledWhen? If so, what does it look like? PW (In reply to comment #2) > What do you mean by "switched between views"? If your view is already up and > activated on workbench startup, does your wizard show up? I had the project explorer view and the RSE remote systems view beside each other. After I clicked my button, I brought up the context menu in the project explorer view and I expected my wizard to not show up from the "New" sub-menu. However it was still there and it wasn't until I switched to the remote systems view and back to project explorer view that the wizard is finally hidden (the activity calculation was triggered somehow by this I guess?) (In reply to comment #3) > What kind of condition are you using? You mean an activity with an > enabledWhen? If so, what does it look like? This is my perspective extension & activity: <extension point="org.eclipse.ui.perspectiveExtensions"> <perspectiveExtension targetID="org.eclipse.ptp.rdt.ui.remoteCPerspective"> <newWizardShortcut id="a.b.c.newProjectWizard" /> <activity id="a.b.c.newWizardsActivity" name="ABC Wizards Activity"> <enabledWhen> <not> <test property="a.b.c.isWorkspaceOffline" value=""/> </not> </enabledWhen> </activity> <activityPatternBinding activityId="a.b.c.newWizardsActivity" pattern="a\.b\.c/a.b.c.newProjectWizard"> </activityPatternBinding> (In reply to comment #4) > <enabledWhen> > <not> > <test property="a.b.c.isWorkspaceOffline" value=""/> > </not> > </enabledWhen> Property testers don't deal in events like ISourceProviders, which means they won't notify core expressions when they changed. If you change something that changes the results of a property tester, you need to use org.eclipse.ui.services.IEvaluationService.requestEvaluation(String) to request all expressions with that property be re-evaluated. PW (In reply to comment #5) > Property testers don't deal in events like ISourceProviders, which means they > won't notify core expressions when they changed. > > If you change something that changes the results of a property tester, you need > to use org.eclipse.ui.services.IEvaluationService.requestEvaluation(String) to > request all expressions with that property be re-evaluated. > > PW Ah OK. It works for me now. I'll close this as invalid. Thanks Remy and Paul. |