Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Eclipse's font settings for GWT text editors #389

Open
LinusPhoenix opened this issue Oct 4, 2018 · 3 comments
Open

Use Eclipse's font settings for GWT text editors #389

LinusPhoenix opened this issue Oct 4, 2018 · 3 comments

Comments

@LinusPhoenix
Copy link

Hi,

I changed Eclipse's (Eclipse Photon) "Text Font" and "Text Editor Block Selection Font" settings. The new font shows up in the text editors for normal Java projects, but not when I open files associated to GWT projects, those still use the default one. It would be nice if GWT editors either respected the Basic Eclipse setting or there was an option for changing the font in those as well.

@rob5n
Copy link

rob5n commented Feb 11, 2019

I am also experiencing this issue on Eclipse 2018-12. The only workaround I can find is to use File > Open With > Java Editor each time you open a file.

@rob5n
Copy link

rob5n commented Feb 12, 2019

I took a brief look at the code. There is com.google.gwt.eclipse.core.editors.java.GWTJavaEditor which extends org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor which in turn extends the eclipse JavaEditor class.
If the Java Editor is successfully using the Text Font preference, I would expect any plugins that extend that editor to also use the same font preference, unless they specify otherwise. And this seems to have been working up until Photon came out? I wonder if it is a bug in Eclipse? Or is the GWT plugin not being explicit enough about the fonts?

@voytechs
Copy link

I ran into this same issue with pretty much all of the eclipses with the GWT v3 plugin that has the GWT Java Editor. It doesn't follow the text-editor font inheritance properly.

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:

  1. Select "Java Editor"
  2. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants