You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Incorrect Colors in LTK Refactoring Preview Wizard #3775
The Refactoring Preview Wizard Page in Eclipse LTK (Language Toolkit) uses incorrect colors in the two-way compare viewer. Additions are shown in red and deletions are shown in green, which is the opposite of standard conventions.
Steps to Reproduce
Open a Java file in the Eclipse editor
Select a block of code that you want to extract into a separate method
Open the Extract Method refactoring wizard:
Main menu: Refactor → Extract Method...
Click the Preview > button in the "Extract Method" dialog to view the refactoring changes
Observe the compare viewer in the Preview wizard page
Actual Behavior
Additions (new code on the right side showing the extracted method call) are displayed in red color
Deletions (original code on the left side being replaced) are displayed in green color
Expected Behavior
Additions (new code) should be displayed in green color
Deletions (removed code) should be displayed in red color
Tested under this environment:
OS & version: Windows (I think the problem is not Platform dependent)
Community
I understand reporting an issue to this OSS project does not mandate anyone to fix it. Other contributors may consider the issue, or not, at their own convenience. The most efficient way to get it fixed is that I fix it myself and contribute it back as a good quality patch to the project.
Also note, the compare direction is not default, unfortunately the default for Eclipse is "new" on the left side, (which is what I personally would like to see changed at some time). May be that is the reason?
Also note, the compare direction is not default, unfortunately the default for Eclipse is "new" on the left side, (which is what I personally would like to see changed at some time). May be that is the reason?
Activity
iloveeclipse commentedon Mar 13, 2026
Also note, the compare direction is not default, unfortunately the default for Eclipse is "new" on the left side, (which is what I personally would like to see changed at some time). May be that is the reason?
tobiasmelcher commentedon Mar 13, 2026
I also think that this makes the problem.
iloveeclipse commentedon Mar 13, 2026
Yep, just tried (note, additionally to the fix I'm also using flipped default as of eclipse-platform/eclipse.platform#2566):
iloveeclipse commentedon Mar 13, 2026
Without the changed default, the fix would look like:
Incorrect Colors in LTK Refactoring Preview Wizard
BeckerWdf commentedon Mar 13, 2026
Which is also correct, isn't it?
iloveeclipse commentedon Mar 13, 2026
It is formally correct, but wrong from the usability point of view.
BeckerWdf commentedon Mar 13, 2026
You mean it should be red in this case?
iloveeclipse commentedon Mar 13, 2026
No, I mean it should be on the right side :-)
No one expects new changes to be left.
Incorrect Colors in LTK Refactoring Preview Wizard
tobiasmelcher commentedon Mar 16, 2026
Thanks a lot for the very fast fix.