Skip to content

Commit

Permalink
Update the release notes for the IntelliJ plugin.
Browse files Browse the repository at this point in the history
(Also updated a dependency and tweaked the comment formatting.)

PiperOrigin-RevId: 563439879
  • Loading branch information
plumpy authored and google-java-format Team committed Sep 7, 2023
1 parent 9f2cd68 commit 915b78f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion idea_plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand All @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions idea_plugin/src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
]]></description>
<change-notes><![CDATA[
<dl>
<dt>1.17.0.0</dt>
<dd>Updated to use google-java-format 1.17.0.</dd>
<dd>Fixed "Document is locked" errors (Thanks, <code>@facboy</code>!)</dd>
<dt>1.16.0.2</dt>
<dd>Disable AD_HOC_FORMATTING, which should stop the formatter from running so often when it wasn't specifically requested.
<dt>1.16.0.1</dt>
Expand Down

0 comments on commit 915b78f

Please sign in to comment.