Skip to content

Incorrect Colors in LTK Refactoring Preview Wizard #3775

@tobiasmelcher

Description

@tobiasmelcher

Summary

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

  1. Open a Java file in the Eclipse editor
  2. Select a block of code that you want to extract into a separate method
  3. Open the Extract Method refactoring wizard:
    • Main menu: RefactorExtract Method...
  4. Click the Preview > button in the "Extract Method" dialog to view the refactoring changes
  5. Observe the compare viewer in the Preview wizard page
Image

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions