-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Erroneous formatting with Google #137
Comments
Sorry for the late response and thanks for reporting the issue! |
I have issues like that when i have blank lines before package declaration. |
I can confirm this problem does appear when there are blank lines before the package declaration. The more blank lines there are, the further up above the cursor code get overridden. What I also see quite often (independently from the other issue) is that if I try auto complete inside a chain of method calls, that the cursor does not highlight the method arguments (as it does when adding to such a chain, so that I can immediately override them with something useful) but jumps to the next line. This seems to be cause by the code formatter being triggered upon selecting the auto completion when inside such a chain. At the end of a chain no auto formatting happens when selecting the proposed auto complete value. |
I am using branch release/1.14.x, everything is fine. |
I saw this issue in the meantime with the Eclipse formatter myself, but I wasn't able to securely reproduce the issue yet. I'm still investigating, if you have any ideas how to fix it, please let me know. |
I've updated all formatter dependencies to the newest versions and tried to reproduce this issue and I wasn't really able to reproduce this exact issue, but I saw weird behaviour if the formatting of the file didn't match the formatter which was configured and I was writing new code to the file, especially fluent API code like the one in the video above, but as soon as the formatting of the file did match the configured formatting everything was fine. @cbm64chris and @rkraneis could you please try the latest SNAPSHOT version (1.14.1-SNAPSHOT) and see if that version acts better as the current main release? Thanks in advance EDIT: Sorry, I guess you have to wait until everything is merged and all the pipelines ran. I try to merge as soon as possible and write another comment when the SNAPSHOT release will be ready |
@funfried built with zulu11 with NetBeans 12.2 target running on zulu15. Installs fine - will let you know how it goes over the next few days. |
Same here (but s/zulu/adopt/ :trollface:). |
@cbm64chris and @rkraneis I finally got my release pipeline back to work again and so you can download the latest SNAPSHOT from either GitHub Packages or from Maven Central. |
With google formatter, Netbeans 12.3, Adopt JDK 16.
I receive an exception in Google Formatter
The comments and the javadoc is the problem, is a problem with google formatter, https://github.com/google/google-java-format/issues/538 And comment google-guava exclusion.
|
@moacirrf Thanks for the hint, I'll check within the next days and push another SNAPSHOT release |
I updated to the latest Google formatter version and it seems the exclusion is not necessary anymore, actually it breaks the formatter when I keep the exclusion. |
Using the Google format, I am seeing some odd behaviour when hitting enter to autocomplete. Turing back to the NetBeans, auto complete working fine. 1.14.0 installed from the plugins repo on NetBeans 12.1.
The text was updated successfully, but these errors were encountered: