| Summary: | [CommonNavigator] Make Common Navigator Framework commonWizard extension capabilities-aware | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Jay Cagle <jcagle> | ||||||||
| Component: | UI | Assignee: | Michael D. Elder <mdelder> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | bokowski, david_williams, for.work.things, mdelder, Michael.Valenta, Mike_Wilson | ||||||||
| Version: | 3.2 | ||||||||||
| Target Milestone: | 3.2.1 | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Windows XP | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Jay Cagle
Created attachment 49876 [details]
org.eclipse.ui.navigator.patch
I took a quick glance at the code and come up with this patch which seems to make the common navigator commonwizard capabilities-aware. I'll admit this was just a quick guess though. All I basically did was in:
CommonWizardDescriptorManager#getEnabledCommonWizardDescriptors, I added the following check:
!WorkbenchActivityHelper.filterItem(descriptor)
This will do an extra check when getting all enabled common wizard descriptors so that if a capability is currently filtering out a wizard, the wizard descriptor will not be returned.
And then I made CommonWizardDescriptor implement IPluginContribution. This interface is needed to make the filterItem method work correctly. Plus, lots of other existing eclipse descriptors implement this interface. It's just 2 methods, getLocalId() & getPluginId(). Both of which can already implemented based on the existing info in CommonWizardDescriptor.
Amy, The patch looks good. This is the correct approach. The only change I would suggest is that the check "!WorkbenchActivityHelper.filterItem(descriptor)" be moved to be the first check in the if statement, since it should be faster than the Core Expression check. We should also update the documentation to reflect this. Boris and Mike W/V -- can you review this as well? +1 Please attach the final patch to be released into the R3_2_maintenance stream. From a first look at CommonWizardDescriptorManager, it seems that getEnabledCommonWizardDescriptorIds should be changed as well. Although this method is internal to the common navigator and not currently called, there might be clients who call it anyway, or the common navigator might be changed to call it in the future. Created attachment 49931 [details]
Patches CommonWizardDescriptorManager.isVisible() to check the Eclipse Capabilities activation
Created attachment 49932 [details]
Adds wizard extensions to test the patch
Adds tests to o.e.ui.tests.navigator to verify the patch.
The patch looks good. It doesn't work for the Team Synchronization case but that is due to a problem in Team and is not critical for 3.2.1 since we have another mechanism to minimize the number of content providers involved. I have entered bug 157034 to request that Team respect capabilities when performing a model based synchronization. The updated patch looks good. Michael, please release this into HEAD as well. +1 Fixed and released to R_3_2_maintenance. Q: Why is this bug still open? I left it open to keep track porting it to 3.3, but that has been done. Closing. |