Bug 8913

Summary: Team menu contributions on types (IType)
Product: [Eclipse Project] JDT Reporter: Erich Gamma <erich_gamma>
Component: UIAssignee: Erich Gamma <erich_gamma>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: andre_weinand, daniel_megert, Kevin_McGuire
Version: 2.0Keywords: usability
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Bug Depends on:    
Bug Blocks: 10393    

Description Erich Gamma CLA 2002-02-01 06:18:45 EST
There is a usability issue in that the team operations are not reachable in 
some Java views, since we only show types and not Compilation Units.

It is desirable to allow VCM operations on types so that users can version from 
the type hiearchy or the type list view. The idea is that a top-level type is 
considered the same as the Compilation unit. We have done the same trick in 
VAME and it worked fine.

To achieve this we can change the JavaContributorResourceAdapter to map top-
level types to their containing CU. This enables the Team actions on types.

This results in the following problems:
1) VCM actions appear but are still disabled. I haven't verified it, but I 
suspect that VCM operations don't use the JavaContributorResourceAdapter but 
the IResource adapter as a consequence they target the ITypes and not the 
compilation units. IType returns null when asked for the adapted IResource. As 
a consequence the action appears in the menu but it is disabled. One idea would 
be to introduce an ITeamResourceAdapter that we could implement for Java. It 
knows that top level types are mapped to compilation units.

2) You get duplicate menu entries for the local history action contributions. 
One corresponds to the Resource actions and the other to the Java aware 
(structure aware) local history actions.
This could be solved by setting "adaptable" to false for the resource compare 
actions (org.eclipse.compare/plugin.xml).
Comment 1 Dani Megert CLA 2002-03-28 11:09:59 EST
2) could also be solved by removing equal actions (at least if in same category)

We should have a solution for 2.0. It is a usability issue for Java Browsing
Comment 2 Erich Gamma CLA 2002-05-11 15:04:51 EDT
in 20020508