Community
Participate
Working Groups
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.
Created attachment 264 [details] Compare Browser
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.
Improvement planned after 2.0
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.
As of now 'LATER' and 'REMIND' resolutions are no longer supported. Please reopen this bug if it is still valid for you.
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).