google / google-java-format

Reformats Java source code to comply with Google Java Style.
Other
5.6k stars 854 forks source link

//$NON-NLS-x$ notation broken in Eclipse formatter 1.6 #361

Open JackPGreen opened 5 years ago

JackPGreen commented 5 years ago

Take the simple class:

public class test {
  public static void main(final String[] args) {
    String myString = "someString"; //$NON-NLS-1$
  }
}

Using "google-java-format-eclipse-plugin_1.6.0.jar", when formatted it converts: //$NON-NLS-1$ To: // $NON-NLS-1$

This is supposed to be fixed in issue #221, but doesn't appear to be...?

Am I missing something?

JackPGreen commented 5 years ago

I've tried the 1.7 Eclipse plugin from #331 but this issue is still present.

cushon commented 4 years ago

I think it was only fixed for cases where the //$NON-NLS-1$ comment appears on its own line.

JackPGreen commented 2 years ago

This is still a problem in Eclipse plugin version 1.11.0.