diff --git a/idea_plugin/build.gradle.kts b/idea_plugin/build.gradle.kts index 0aec5a7b6..5e965823f 100644 --- a/idea_plugin/build.gradle.kts +++ b/idea_plugin/build.gradle.kts @@ -62,5 +62,5 @@ tasks { dependencies { implementation("com.google.googlejavaformat:google-java-format:${googleJavaFormatVersion}") testImplementation("junit:junit:4.13.2") - testImplementation("com.google.truth:truth:1.1.3") + testImplementation("com.google.truth:truth:1.1.5") } diff --git a/idea_plugin/src/main/java/com/google/googlejavaformat/intellij/GoogleJavaFormatImportOptimizer.java b/idea_plugin/src/main/java/com/google/googlejavaformat/intellij/GoogleJavaFormatImportOptimizer.java index bad03457a..425124219 100644 --- a/idea_plugin/src/main/java/com/google/googlejavaformat/intellij/GoogleJavaFormatImportOptimizer.java +++ b/idea_plugin/src/main/java/com/google/googlejavaformat/intellij/GoogleJavaFormatImportOptimizer.java @@ -64,9 +64,9 @@ public boolean supports(@NotNull PsiFile file) { return Runnables.doNothing(); } - /* pointless to change document text if it hasn't changed, plus this can interfere with - e.g. GoogleJavaFormattingService's output, i.e. it can overwrite the results from the main - formatter. */ + // pointless to change document text if it hasn't changed, plus this can interfere with + // e.g. GoogleJavaFormattingService's output, i.e. it can overwrite the results from the main + // formatter. if (text.equals(origText)) { return Runnables.doNothing(); } @@ -76,9 +76,9 @@ public boolean supports(@NotNull PsiFile file) { documentManager.doPostponedOperationsAndUnblockDocument(document); } - /* similarly to above, don't overwrite new document text if it has changed - we use - getCharsSequence() as we should have `writeAction()` (which I think means effectively a - write-lock) and it saves calling getText(), which apparently is expensive. */ + // similarly to above, don't overwrite new document text if it has changed - we use + // getCharsSequence() as we should have `writeAction()` (which I think means effectively a + // write-lock) and it saves calling getText(), which apparently is expensive. CharSequence newText = document.getCharsSequence(); if (CharSequence.compare(origText, newText) != 0) { return; diff --git a/idea_plugin/src/main/resources/META-INF/plugin.xml b/idea_plugin/src/main/resources/META-INF/plugin.xml index 42011a208..1b1e67ffa 100644 --- a/idea_plugin/src/main/resources/META-INF/plugin.xml +++ b/idea_plugin/src/main/resources/META-INF/plugin.xml @@ -35,6 +35,9 @@ ]]> +
1.17.0.0
+
Updated to use google-java-format 1.17.0.
+
Fixed "Document is locked" errors (Thanks, @facboy!)
1.16.0.2
Disable AD_HOC_FORMATTING, which should stop the formatter from running so often when it wasn't specifically requested.
1.16.0.1