Bug 508819: Define proper API for hover/info color constants
(platform.ui)

I previously defined a "HOVER" color to allow information planes like
javadoc, problem views etc.. to be styled and have proper colors on
dark theme. However, later non-hover controls started using the color
(e.g javadoc part), and "HOVER" turned out to be a bad name for the
color.
In this patch I'm deprecating the HOVER_ color without breaking
backwards support, and instead I'm introducing "INFORMATION_*" color.

Test:
- Apply patch, launch child Eclipse.
- Try dark theme.
- Inspect Color preference

Results:
- Colors of Javadoc Hover on Dark theme work as before.
- Information Colors in preference page look ok. Description is set.
  Javadoc background/foreground have correct colors. DefaultsTo
  buttons and "editDefault" are grayed out, so old deprecated color
  cannot be edited by javadoc colors (this was fixed in 516533).
  This means that there are no "dead" colors that are uneditable.
- Javadoc colors do not mention "deprecated' anywhere, so deprecation
  is transparent to users.

Notes:
- hovering over "Javadoc" does not leak any notices of deprecation
to user. Only developers will see the 'deprecation' note, users will
be unaware.

- Once this patch is merged, I will update JDT not to reference HOVER_
anymore.

I can't think of a better solution to deprecating a color and haven't
found other examples to copy from. If someone has alternative
suggestions, please let me know.

I tested that JDT does not break with this change. Javadoc hovers are
present as before.

Patch notes:

Patch Set 1,2:
- Implementing INFORMATION_ color ID instead of "HOVER_", because
the colors are used in non-hover context.

Patch Set 3:
- Implemented solution with backwards compatibility.
- Introduced INFORMATION_* colors.
- Made old HOVER_* colors not-visible to the user (isEditable=false)

Patch Set 4:
- Moved deprecated note from label into description, and set labels to:
  "Hover * color".
  This way the javadoc colors don't mention deprecation in user
interface, but a developer who looks at the color in the code will
notice the description that links to the proper color. (See attached
screenshot 'javadoc default label').
  AFIK the user now never sees anything 'deprecated' related.

Patch Set 7:
- Rebased/updated.

Change-Id: I76670ce5b1ec896d8f153ae0d9d161ae38c51ad2
Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
5 files changed
tree: e08c2c9aac3bf20c15445da4eb81c9bab4ad2b23
  1. bundles/
  2. examples/
  3. features/
  4. releng/
  5. tests/
  6. .gitignore
  7. CONTRIBUTING.md
  8. pom.xml
  9. README.md
README.md

Contributing to Eclipse Platform UI project

Thanks for your interest in this project.

Project description:

Platform UI provides the basic building blocks for user interfaces built with Eclipse. Some of these form the Eclipse Rich Client Platform (RCP) and can be used for arbitrary rich client applications, while others are specific to the Eclipse IDE. The Platform UI codebase is built on top of the Eclipse Standard Widget Toolkit (SWT), which is developed as an independent project.

Website: http://www.eclipse.org/platform/ui/

For more information, refer to the Platform UI wiki page.

How to contribute:

Contributions to Platform UI are most welcome. There are many ways to contribute, from entering high quality bug reports, to contributing code or documentation changes. For a complete guide, see the Platform UI - How to contribute wiki page page on the team wiki.

How to build on the command line

You need Maven 3.3.1 installed. After this you can run the build via the following command:

mvn clean verify -Pbuild-individual-bundles

Developer resources:

Information regarding source code management, builds, coding standards, and more.

Contributor License Agreement:

Before your contribution can be accepted by the project, you need to create and electronically sign the Eclipse Foundation Contributor License Agreement (CLA).

Search for bugs:

This project uses Bugzilla to track ongoing development and issues.

Create a new bug:

Be sure to search for existing bugs before you create another one. Remember that contributions are always welcome!

Contact:

Contact the project developers via the project's “dev” list.

License

Eclipse Public License (EPL) v1.0