在 Eclipse 中为 GWT 文本编辑器更改文本字体
Change Text Font In Eclipse For GWT Text Editors
我正在使用带有 GWT Eclipse 插件的 Eclipse。我想使用与默认字体不同的字体(在本例中为 Fira Code)。根据我的喜好,在颜色和字体中,我将设置 "Text Font" 设置为使用 Fira 代码,它在普通的 Java 文本编辑器中工作得很好。但是,如果我打开 GWT 项目中的源文件,GWT Eclipse 插件会使用它自己的文本编辑器来忽略自定义字体并使用 Eclipse 的默认字体。
有没有办法强制 GWT 文本编辑器也使用该设置?
虽然还没有官方修复,GitHub 用户 voytechs 提供了一个解决方法 here:
Unless you absolutely need to use the GWT Java Editor for every single .java file type because it has syntax support for JNSI code, you can change the order in which the text editors are chosen for the .java file type.
Preferences > General > Editors > File Associations > File Types > *.java > Associated editors:
- Select "Java Editor"
- Click "Default" button to make that the default editor
You can still edit java files with JNSI comment code in it with the GWT Java Editor:
- Project Explorer > Right Click your .java" file > Open With > GWT Java Editor
The regular java editor can easily change the default font size or resize the font size on the fly. I adjust the font size using the ctrl+ and ctrl- key press inside the Java editor.
我正在使用带有 GWT Eclipse 插件的 Eclipse。我想使用与默认字体不同的字体(在本例中为 Fira Code)。根据我的喜好,在颜色和字体中,我将设置 "Text Font" 设置为使用 Fira 代码,它在普通的 Java 文本编辑器中工作得很好。但是,如果我打开 GWT 项目中的源文件,GWT Eclipse 插件会使用它自己的文本编辑器来忽略自定义字体并使用 Eclipse 的默认字体。
有没有办法强制 GWT 文本编辑器也使用该设置?
虽然还没有官方修复,GitHub 用户 voytechs 提供了一个解决方法 here:
Unless you absolutely need to use the GWT Java Editor for every single .java file type because it has syntax support for JNSI code, you can change the order in which the text editors are chosen for the .java file type.
Preferences > General > Editors > File Associations > File Types > *.java > Associated editors:
- Select "Java Editor"
- Click "Default" button to make that the default editor
You can still edit java files with JNSI comment code in it with the GWT Java Editor:
- Project Explorer > Right Click your .java" file > Open With > GWT Java Editor
The regular java editor can easily change the default font size or resize the font size on the fly. I adjust the font size using the ctrl+ and ctrl- key press inside the Java editor.