簡體   English   中英

Java 訪問修飾符關鍵字(私有、默認、受保護、公共或最終,static 等)自動隱藏在 eclipse 中,但顯示在源文件中

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

當我編寫代碼時,會自動在 eclipse 中隱藏一些 java 關鍵字,但會顯示在目錄中的.java 文件中。

Eclipse 編輯器屏幕截圖:

在 Eclipse 中這樣顯示

.java 文件截圖:

.java 文件代碼

請幫我 !!

可以復制完整代碼的事實證明字符存在但不顯示。

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. 在這種情況下,至少為 Java 編輯器選擇不同的字體可能是解決方案:

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

我喜歡Source Code Pro作為編碼字體,必須安裝在操作系統中才能在 Eclipse 中使用。

還要確保不要使用過時的 Java 和 Eclipse IDE 版本。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM