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

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

Closed
elharo opened this issue Feb 24, 2017 · 12 comments

Comments

@elharo
Copy link
Contributor

elharo commented Feb 24, 2017

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

@sormuras
Copy link
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?

@elharo
Copy link
Contributor Author

elharo commented Feb 24, 2017

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.

@sormuras
Copy link
Contributor

sormuras commented Feb 24, 2017

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!

@markelliot
Copy link

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)

@sormuras
Copy link
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

@sormuras
Copy link
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

@markelliot
Copy link

markelliot commented Apr 18, 2017

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.

@revans2
Copy link

revans2 commented May 4, 2017

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

@sormuras
Copy link
Contributor

sormuras commented May 4, 2017

Does this help? http://stackoverflow.com/a/34333669/1431016

@revans2
Copy link

revans2 commented May 4, 2017

@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

@BruceZu
Copy link

BruceZu commented Aug 20, 2017

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.

@sormuras
Copy link
Contributor

@BruceZu See my answer in #179

ronshapiro pushed a commit that referenced this issue Oct 9, 2017
Fixes #134, Fixes #135

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=171386443
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

5 participants