| Summary: | Support Import operations on 'Plug-in Dependencies' entries in Project and Package Explorer | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] PDE | Reporter: | Darin Wright <darin.eclipse> | ||||||
| Component: | UI | Assignee: | Curtis Windatt <curtis.windatt.public> | ||||||
| Status: | VERIFIED FIXED | QA Contact: | |||||||
| Severity: | enhancement | ||||||||
| Priority: | P3 | CC: | ankur_sharma, curtis.windatt.public, daniel_megert, markus.kell.r, Michael_Rennie | ||||||
| Version: | 3.6 | Keywords: | noteworthy | ||||||
| Target Milestone: | 3.8 M2 | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Darin Wright
This has been dropped from the 3.7 plan due to a lack of resources. We should try to do this during 3.8. Created attachment 201838 [details]
Fix
Adds the import sub-menu to the context menu of the plug-in dependencies view and target platform state view. Sub menu only shows on items which we have a model for and do not exist in the workspace. We do not know at menu creation time whether the Import from Repository option is viable, so a dialog informs the user if they try to import from repo when it is not supported (this is not new behaviour).
Committed to master branch. Does not work for me using I20110823-0925 or N20110824-2000. (In reply to comment #5) > Does not work for me using I20110823-0925 or N20110824-2000. I can confirm that the fix is in and works in I20110823-0925. I may have been over eager in closing this as fixed as I added the option to the two views, not to the PDE classpath container contents. I'll try to add to those menus for M2. > I can confirm that the fix is in and works in I20110823-0925. Maybe you refer to comment 3? While it's nice if you add it to many other views, this bug is about the 'Project Explorer' and the 'Package Explorer' and I just tried again in I20110823-0925 or N20110825-2000. to get the 'Import As' for those views without any luck (I also looked in the 'PDE Tools' sub-menu). Did I miss something? Created attachment 202255 [details]
Adds import action to project/package explorer
This adds a "Import from repository" action to IPackageFragmentRoots. I haven't pushed this to the master branch yet as I have a couple of concerns.
1) Performance. All the package fragment root has is a path to the jar/folder. PDE has no mapping of install locations to models. Therefore to check if the action should be enabled, we must search all known external (target) models, ask them for their install location and compare. I found this to not be a problem on my machine with 455 plug-ins, but it could be an issue for 1000+ plug-in targets.
2) Not filtered to just plug-in projects or the plug-in dependencies classpath container. Currently the menu item is visible (not enabled) for all other package fragment roots, even in non-PDE projects. I was trying to use the visbility settings on the extension, but couldn't get the object to adapt to IProject. If we can create our own property tester we can improve this.
3) Poor location in the menu. I originally had it beside the import/export actions, but that menu group is not available in the project explorer. For now I have not specified a menu path.
(In reply to comment #7) > > I can confirm that the fix is in and works in I20110823-0925. > Maybe you refer to comment 3? While it's nice if you add it to many other > views, this bug is about the 'Project Explorer' and the 'Package Explorer' and > I just tried again in I20110823-0925 or N20110825-2000. to get the 'Import As' > for those views without any luck (I also looked in the 'PDE Tools' sub-menu). > Did I miss something? In the target platform state view, you need to select an external plug-in. If you select something from your workspace, the menu will not be visible. Same goes for the dependencies view, you need to focus on a plug-in and select an external plug-in for the menu to be visible. We also need to have a PDE model for the selection. Hopefully this helps. (In reply to comment #8) > Created attachment 202255 [details] [diff] > Adds import action to project/package explorer > > This adds a "Import from repository" action to IPackageFragmentRoots. I haven't > pushed this to the master branch yet as I have a couple of concerns. > > 1) Performance. All the package fragment root has is a path to the jar/folder. > PDE has no mapping of install locations to models. Therefore to check if the > action should be enabled, You could enable it if the JAR is inside a PDE container. Also note that the action should also be available on imported binary PDE projects. > 2) Not filtered to just plug-in projects or the plug-in dependencies classpath > container. Currently the menu item is visible (not enabled) for all other > package fragment roots, even in non-PDE projects. I was trying to use the > visbility settings on the extension, but couldn't get the object to adapt to > IProject. If we can create our own property tester we can improve this. This is a must for committing the feature. I went through a few iterations to find what worked the best. The fix uses the newer command/menus framework and a property tester for IPackageFragmentRoot. http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=f8569bc8cfebc6fc5e89fcf9a3c340baec8ba672 Looks good except for the menu label: - doesn't use title style - no mnemonic ==> filed bug 357452 to track this. |