Bug 8913 - Team menu contributions on types (IType)
Summary: Team menu contributions on types (IType)
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Erich Gamma CLA
QA Contact:
URL:
Whiteboard:
Keywords: usability
Depends on:
Blocks: 10393
  Show dependency tree
 
Reported: 2002-02-01 06:18 EST by Erich Gamma CLA
Modified: 2002-05-11 15:04 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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