Bug 10393 - Classes should have the same actions as CU's wherever possible
Summary: Classes should have the same actions as CU's wherever possible
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P1 normal (vote)
Target Milestone: ---   Edit
Assignee: Erich Gamma CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 8913
Blocks:
  Show dependency tree
 
Reported: 2002-02-27 11:17 EST by Carolyn MacLeod CLA
Modified: 2002-05-07 16:52 EDT (History)
3 users (show)

See Also:


Attachments
Three menus side by side (769.05 KB, image/bmp)
2002-02-27 11:23 EST, Carolyn MacLeod CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Carolyn MacLeod CLA 2002-02-27 11:17:14 EST
I am opening this PR because an older PR containing this problem was just 
marked resolved/worksforme, which is not entirely accurate. The older PR is: 
http://bugs.eclipse.org/bugs/show_bug.cgi?id=3750
It is ok to close the older PR because the menu ordering problem has been 
corrected, but the "missing menu items" problem is still very much there.

As of 20020214-Stable build:

Go To -> Type... is missing from the Hierarchy view
Open With -> is missing from Class in Packages view
Copy Names is missing from the Hierarchy view
Cut is missing from CU in Packages view
Move is missing from Type in Packages and in Hierarchy view
	(should be able to move the type or the whole CU)
Run/Debug is missing from the Hierarchy view
But the most important missing thing from any Type is *all* of the TEAM 
functions, including the whole Team -> menu, and team items in the Compare 
With -> menu, and Replace With -> menu.

I will paste a bitmap of 3 menus side-by-side so that you can easily see where 
the gaps are. In this diagram, the menu on the left is the CU menu in the 
Packages view, the menu in the middle is the Type menu in the Packages view, 
and the menu on the right is the Type menu in the Hierarchy view. Ideally, all 
menus on Types and CUs in all perspectives should be analyzed in this visual 
manner - I have not used the new VAJ perspective much yet (waiting for the 
types to be displayed in a hierarchy) so I did not analyze those menus, but I 
suspect strongly that we will discover inconsistencies and gaps if we look.

Please, if you don't do anything else, add team support to Types. This was done 
in VAME and it made a huge difference. There is less mental and actual context 
switch required. The current implementation in Eclipse reveals that there is a 
framework behind everything, and we do not want to let this show. The user 
should have a seamless experience without so many context switches. The 90% 
case is that the CU/Type ratio is 1:1. In the other 10% case, the tools should 
be able to figure out what the user meant, or if it is unclear, then just ask 
them.
Comment 1 Carolyn MacLeod CLA 2002-02-27 11:23:46 EST
Created attachment 403 [details]
Three menus side by side
Comment 2 Adam Kiezun CLA 2002-02-27 12:12:13 EST
i second that request - a primary type should be treated the same as its cu
and the other way round (cu like its primary type)

however, we must find a general solution for this - going throught all type 
actions and enabling them on cus is simply not possible.
Comment 3 Erich Gamma CLA 2002-03-04 18:54:03 EST
see 8913 for details on the team actions and issues with it. I also want to see 
this change for 2.0

Another alternative is to change the IResource adapter in the 
JavaElementAdapterFactory to return the CU for a top level type. This would 
enable IResource aware actions for top-level types.

However, this will also result in duplicate compare actions (structure compare, 
resource compare)

Regarding the other gaps:
see >>

Go To -> Type... is missing from the Hierarchy view
>>this would be a useful addition. 

Open With -> is missing from Class in Packages view
>>intended, you can't open an arbitrary editor on a file inside a JAR

Copy Names is missing from the Hierarchy view
>>will be subsumed by the Copy action (this is an M4 work item)

Cut is missing from CU in Packages view
>>this is consistent with the navigator

Move is missing from Type in Packages and in Hierarchy view
	(should be able to move the type or the whole CU)
>>moving a type should be mapped to moving the containing CU

Run/Debug is missing from the Hierarchy view
>>this is View contribution from the debugger it should be added

But the most important missing thing from any Type is *all* of the TEAM 
functions, including the whole Team -> menu, and team items in the Compare 
With -> menu, and Replace With -> menu.
>>see above

Comment 4 Erich Gamma CLA 2002-05-07 16:52:11 EDT
Team actions will be available on types in 20020508

Moving a type is mapped to moving container CU.

Run/Debug actions are now obsolete

Filed a separate bug for the got type action in the hierarchy view 15268 

closing this bug