Bug 8464 - [compare] Compare With > Each Other should collapse different type names into one structure compare node
Summary: [compare] Compare With > Each Other should collapse different type names into...
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-01-25 10:35 EST by Carolyn MacLeod CLA
Modified: 2012-05-03 09:26 EDT (History)
1 user (show)

See Also:


Attachments
Compare Browser (282.20 KB, image/bmp)
2002-01-25 10:39 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-01-25 10:35:28 EST
I have 2 classes that are very similar (one was originally copied from the 
other but changes have been made since then).

When I say Compare With -> Each Other, I expected to be able to compare the 
classes, but instead, I got the [+] for "this class is added" and [-] for "this 
class is removed", which is not very useful for comparison.

I would have expected Compare With -> Each Other to compare the 2 java files, 
even though the classes have different names. It is not very useful the way it 
currently is.

I will attach a snapshot of the compare browser in case my explanation is not 
clear.
Comment 1 Carolyn MacLeod CLA 2002-01-25 10:39:05 EST
Created attachment 264 [details]
Compare Browser
Comment 2 Andre Weinand CLA 2002-04-11 04:13:24 EDT
If you compare two classes which were derived from each other but where the 
identifying ID (the class name) no longer match, structure compare cannot 
automatically match them and shows them as one addition and one deletion. This 
is absolutely correct (but doesn't help you :-). So here is what you can do:

- in the structure compare just select the top level node 'compilation unit'
  the text compare browser will show you both classes side by side.

- if you want to compare on a finer granularity than CUs you can
  "Compare with each other' on Java elements too. In the package navigator
  drill down to the two classes that you want to compare, but where the names
  don't match. Select both classes and do 'Compare with each other'.

If your PR is really asking for a way to 'force' a compare on two non-matching 
entities (by selecting them in structure compare), this is a planned feature 
for after 2.0.
Comment 3 Andre Weinand CLA 2002-04-11 04:14:06 EDT
Improvement planned after 2.0
Comment 4 Carolyn MacLeod CLA 2002-04-11 11:42:13 EDT
Drilling down to the class objects to compare with each other does help
- thanks!
I do look forward to the general solution after 2.0.
Comment 5 Eclipse Webmaster CLA 2009-08-30 02:38:36 EDT
As of now 'LATER' and 'REMIND' resolutions are no longer supported.
Please reopen this bug if it is still valid for you.
Comment 6 Markus Keller CLA 2012-05-03 09:25:55 EDT
This is not fixed and the request perfectly makes sense.
"Compare With > Each Other" should collapse different type names into one structure compare node (at least for the top-level types).