From 2fe1833fb7700efdf26f8662746ebdca62fa0a5d Mon Sep 17 00:00:00 2001 From: Michael Plump Date: Wed, 6 Sep 2023 19:23:23 -0700 Subject: [PATCH] Update the release notes for the IntelliJ plugin. (Also updated a dependency and tweaked the comment formatting.) PiperOrigin-RevId: 563282588 --- idea_plugin/build.gradle.kts | 2 +- .../intellij/GoogleJavaFormatImportOptimizer.java | 12 ++++++------ idea_plugin/src/main/resources/META-INF/plugin.xml | 3 +++ 3 files changed, 10 insertions(+), 7 deletions(-) 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