3

I am using the Dark theme in Eclipse Oxygen. When I hover over a class to view the Javadoc, the links are in blue and very hard to see enter image description here

I have tried editing the hyperlink color in Preferences -> General -> Appearance -> Colors and Fonts -> Basic -> Hyperlink text color but that didn't work. Under the Java section in Colors and Fonts there is an entry to edit Javadoc background and Javadoc text color, but I see nothing for Javadoc hyperlink color or something like that. I could change the background color as a workaround but that breaks the dark theme and I'd rather not.

3 Answers 3

7

The short answer is you can't because it's system dependent.

Among the many other ongoing dark-theme bugs that need to be fixed, the particular bug you've found has been recently reported here as bug 517393. The target fix for this bug is in Eclipse Photon (4.8) Milestone 2.

7

I've figured out a workaround for this issue at least for Windows.

On Windows, Eclipse's html renderer follows Internet Explorer's option for changing color of webpage. So, if you do not use Internet Explorer or just do not mind such change of all webpage, let's go!

Please note that some desciption below may not be accurate since I do not use an English version of Windows.

Open IE, click GEAR icon at top right corner - choose Internet Optioin - click Color at the bottom - uncheck Use Windows Color - change the color of Visited and Unvisited, and the rest two to suit your need if you use dark theme in Eclipse. Apply the change.

Then click Accessibility (on the right of Font) - check Omit Color - Apply the change.

It's done.

1
  • 1
    This same issue has been bugging me forever. Great answer. Nov 17, 2018 at 18:14
1

For those who are like me still stuck with an older Eclipse IDE like 4.7.3 (without the fix of the bug mentioned in the first answer) and are using Windows:

The workaround in the previous answer does not work if you have Microsoft Edge installed instead of Internet Explorer. Reason: Microsoft Edge does not let you change the link color. There are Chrome Extension that you can install but this didn't work for me either.

Another solution could be to switch Windows to "High contrast mode". Someone even managed to change the link color for Eclipse. I accidently found this "temporary" workaround:

  1. Start Eclipse
  2. Activate Windows "High contrast mode"
  3. Eclipse wants to be restarted. Say yes.
  4. Deactivate Windows "High contrast mode"
  5. Again, Eclipse wants to be restarted. Again, say yes.
  6. Now the Javadoc popup looks like in "Light" theme!? So links are very easy to see now.

However, that's not a really comfortable workaround: it needs some time and you have to repeat these steps after every reboot. My "favorite workaround" for now, is to select the link text in the Javadoc popup with the mouse, so that the link text is displayed with a more readable background/foreground color combination.

1
  • I accidently noticed in my case (Eclipse 4.7.3, Windows 10) that the "workaround" in my answer above seems to be not necessary: after starting Eclipse in dark mode and just working/waiting for a certain amount of time (I think at most for an hour) the Javadoc popup dialog changed it's appearance from "dark mode" to "light"! Weird! Once this magic appearance change happend, if I don't reboot Windows, after every restart of Eclipse the Javadoc popup is shown in "light" mode instantly after startup! Weird but welcome effect! :-)
    – user -27
    Feb 21, 2022 at 11:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.