Skip to content

Commit 3f6c827

Browse files
committed
Describe the IDEA plugin for the marketplace in plugin.xml
The description is what the JetBrains Marketplace shows on the plugin page, so it lives in plugin.xml as HTML rather than in the build: with both set, patchPluginXml overwrites plugin.xml with whatever the build says, which was a one-line string.
1 parent f536e9f commit 3f6c827

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

‎open-java-format-idea-plugin/build.gradle‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ intellijPlatform {
9292

9393
pluginConfiguration {
9494
name = 'open-java-format'
95-
description = "Formats source code using the open-java-format tool."
95+
// No description here: patchPluginXml would overwrite the one in plugin.xml, which is the
96+
// marketplace listing and is written in HTML.
9697
ideaVersion {
9798
sinceBuild = '242' // JBR 21: the first IDEs that can load this plugin's bytecode
9899
untilBuild = provider { null }

‎open-java-format-idea-plugin/src/main/resources/META-INF/plugin.xml‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@
55
openjavaformat
66
</vendor>
77

8+
<!-- The plugin page on the JetBrains Marketplace, and the only copy of the description: the
9+
Gradle build no longer sets one. Only tags the marketplace renders: p, a, b, code, ul, ol, li. -->
10+
<description><![CDATA[
11+
<p>Formats Java code with <a href="https://github.com/openjavaformat/open-java-format">open-java-format</a>, a maintained fork of palantir-java-format: 120 columns, 4-space indents and lambda-friendly line breaking.</p>
12+
<p>With the plugin enabled, <b>Reformat Code</b> runs open-java-format instead of the IDE's built-in Java formatter, so the IDE and your build produce identical files. The IDE's own Java code style settings no longer apply.</p>
13+
<p>The formatter runs in a process of its own, on the IDE's runtime, so the project SDK can be any version. A project that applies the <code>dev.openjavaformat.java-format</code> Gradle plugin takes the formatter version from the build; every other project uses the version bundled with this plugin.</p>
14+
<p>Requires IntelliJ IDEA 2024.2 or later, or another IDE with Java support such as Android Studio.</p>
15+
]]></description>
16+
817
<depends>com.intellij.modules.java</depends>
918
<depends>com.intellij.modules.lang</depends>
1019
<depends>com.intellij.modules.platform</depends>

0 commit comments

Comments
 (0)