Search code examples
javaeclipseautomationcoding-style

Java Access Modifiers keyword (private, default, protected, public or final, static etc..) automatically hide in eclipse but show in source file


When I write code that time automatically hide some java keyword in eclipse but display in .java file from directory.

Eclipse editor screen shot:

In Eclipse showing like that

.java file screen shot:

.java file code

Please help me !!


Solution

  • The fact that the complete code can be copied proves that the characters exist but are not displayed.

    If in Window > Preferences: Java > Editor > Syntax Coloring deactivating bold for Java > Keywords excluding 'return' make them visible in the Java editor again, only characters in bold are affected. In this case choosing a different font at least for the Java editor might be the solution:

    1. In Window > Preferences: General > Appearance > Colors and Fonts choose a different font for Java > Java Editor Text Font

    I like Source Code Pro as a font for coding, which has to be installed in the operating system to use it in Eclipse.

    Make also sure not using an outdated Java and Eclipse IDE version.