Skip to content

The plugin adds a google-java-format formatter implementation that can be configured in Window > Preferences > Java > Code Style > Formatter > Formatter Implementation #134

Closed

Description

@elharo

There is no such Formatter Implementation preference in Eclipse 4.6:

The plugin adds a google-java-format formatter implementation that can be configured in Window > Preferences > Java > Code Style > Formatter > Formatter Implementation

image

Activity

  1. sormuras commented on Feb 24, 2017

    @sormuras
    Contributor

    Then your Eclipse installation didn't find/load a single "Formatter plugin" on startup.

    Did you drop google-java-format-eclipse-plugin-1.3.0.jar to your Eclipse dropins folder before launching the IDE?

  2. elharo commented on Feb 24, 2017

    @elharo
    ContributorAuthor

    Nope. In that case consider this a bug to expand the documentation to include that step.

    Also, if this is a true Eclipse plugin we should provide an update site and possibly upload it to the Eclipse marketplace.

  3. sormuras commented on Feb 24, 2017

    @sormuras
    Contributor

    Nope. In that case consider this a bug to expand the documentation to include that step.

    True. Happy to update the section in README.md if you press the merge button of #106 ... deal?

    Just kidding. Here you go: #135

    Also, if this is a true Eclipse plugin we should provide an update site and possibly upload it to the Eclipse marketplace.

    That'd be perfect!

  4. markelliot commented on Apr 18, 2017

    @markelliot

    Adding the plugin jar to dropins and restarting doesn't add the menu option for me. I'm on Eclipse Neon.3. Any suggested debugging steps? (it sounds like all that should be required is to put the jar in the dropins folder and restart Eclipse)

  5. sormuras commented on Apr 18, 2017

    @sormuras
    Contributor

    Is there any error log statement in the log files? https://wiki.eclipse.org/FAQ_Where_can_I_find_that_elusive_.log_file%3F

  6. sormuras commented on Apr 18, 2017

    @sormuras
    Contributor

    Btw. in fresh Neon.3 installation and a fresh workspace, the dropped-in plugin appears as expected.

    Version: Neon.3 Release (4.6.3)
    Build id: 20170314-1500

    eclipse-gjf-plugin-neon3

  7. markelliot commented on Apr 18, 2017

    @markelliot

    Thanks. Sorry for the noise: I grabbed a fresh install and things do work just fine.

    My existing install, which has been updated from Eclipse Neon (1) remains broken, but I'll just continue with the fresh copy. I do see this in the workspace log:

    !MESSAGE Unable to instantiate formatter extension 'com.google.googlejavaformat.java.GoogleJavaFormatter', returning built-in formatter.

    There don't appear to be additional logs or additional details. I poked around/diffed the setups and don't see anything obvious. I also looked at the Eclipse source a bit, I don't see anywhere additional logging might show up, but it does suggest something is weird with the extension point in my upgraded version.

  8. revans2 commented on May 4, 2017

    @revans2

    I am not able to make this work on the mac at all. I don't even get an error message. I did a clean install of eclipse Neon in a clean workspace and nothing.

    $ ls -lh /Applications/Eclipse.app/Contents/Eclipse/dropins/
    total 11784
    -rw-r--r--@ 1 revans2  admin   5.8M May  4 10:48 google-java-format-eclipse-plugin-1.3.0.jar
    

    Nothing in the logs at all

  9. sormuras commented on May 4, 2017

    @sormuras
    Contributor
  10. revans2 commented on May 4, 2017

    @revans2

    @sormuras I tried that too

    $ ls -l ~/.p2/pool/plugins/google-java-format-eclipse-plugin-1.3.0.jar
    -rw-r--r--@ 1 revans2  staff  6032827 May  4 10:58 /Users/revans2/.p2/pool/plugins/google-java-format-eclipse-plugin-1.3.0.jar
    

    Still no luck and still no logs

  11. BruceZu commented on Aug 20, 2017

    @BruceZu

    It works in Eclipse IDE for Java Developers
    Version: Oxygen Release (4.7.0)
    Build id: 20170620-1800

    But it does not provide AOSP Style option.

  12. sormuras commented on Aug 21, 2017

    @sormuras
    Contributor

    @BruceZu See my answer in #179

  13. added a commit that references this issue on Oct 9, 2017
    a31319f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions