Community
Participate
Working Groups
Build Identifier: 20100917-0705 When looking at changes (from the Team functionality, using subclipse plugin for SVN access) in Java code in the Java Source Compare Editor, some items (words) are highlighted, even if they are not changed between the compared versions of the document. It turns out that it is the a "Mark Occurrences" feature from the regular Java editor. This is a bit confusing, especially as it can not be controlled from the compare editor (placing the text cursor on a Java item does not make its occurrences highlighted, turning occurrence marking on/off with alt-shift-o does not work, neither is there an icon for it in the toolbar). IMO, the occurrence marking should not be visible in compare. Additional details: - the compare editor does not behave the same behavior if opened from Synchronize view by double-clicking on a changed file or when using the context menu Compare With / Base Revision on the opened file in Java Editor - The first shows the occurrences from a regular editor of the same file in sync. Whatever change is done in the editor (by moving the text cursor) to the highlighting, it is immediately visible in compare editor. - error in code are underlined by red in the compare editor - any text changes in the editor are visible in the compare editor The Compare With... editor on the other hand does not sync to any changes made in the file editor. It also never show the red underlining of error. So questions are: - what is with highlighting? Either they should not be visible in compare (my preference) or they should be fuly supported (turning on/off, selecting what to highlight, just like in regular editor) - what are there two different behaviors of Java Source Compare Editor (one updating to changes made in the compared file, the other being "static") ? I recall there being requests for this "live update" and it being turned down as requiring too much CPU time. See: bug 41564 , bug 176690 org.eclipse.compare 3.5.100.I20100526-0800 Subclipse (Required) 1.6.17 org.tigris.subversion.subclipse.feature.group Reproducible: Always Steps to Reproduce: 1. Open compare of changed java file in Team Synchronizing 2. Open the same file in java editor 3. highlight some occurrences in the java editor Result: highlight visible in compare editor
*** This bug has been marked as a duplicate of bug 64911 ***
I also noticed that sometimes two different items are highlighted in the same Java Source Editor. Is that the same underlying problem? (example: a local variable and its occurrences are highlighted, while at the same time a method name and its references)
(In reply to comment #2) > I also noticed that sometimes two different items are highlighted in the same > Java Source Editor. Is that the same underlying problem? Yes, if you have two editors open on the same file.
Two source editors? Is that even possible? I don't remember what I had. It was a source editor and a compare editor and maybe something more. A new double click on the file in Project Explorer just switches focus to the existing source editor.
> Two source editors? Is that even possible? See Window > New Editor > I also noticed that sometimes two different items are highlighted in the same > Java Source Editor. Is that the same underlying problem? The second set of highlighting were probably search results (from a File or Java search). Implementation-wise, these are also annotations, so they are also subsumed under bug 64911.