Updates to the google-java-format IntelliJ plugin.
* Add some more docs (both user-level and developer) to the README.md.
* Mark the plugin as available in all JetBrains IDEs.
* Mark it as unsupported in 2016.3. Which it is. (For now.)
MOE_MIGRATED_REVID=142272002
diff --git a/idea_plugin/README.md b/idea_plugin/README.md
index c13a777..022b3c1 100644
--- a/idea_plugin/README.md
+++ b/idea_plugin/README.md
@@ -1,5 +1,21 @@
-# google-java-format Intellij Plugin
+# google-java-format IntelliJ IDEA Plugin
+
+## Enabling
+
+The plugin will not be enabled by default. To enable it in the current project,
+go to "File→Settings...→google-java-format Settings" and check the "Enable"
+checkbox.
+
+To enable it by default in new projects, use "File→Other Settings→Default
+Settings...".
## Set-up
-Add `google-java-format*all-deps.jar` to `lib/`.
+1. Build `google-java-format*all-deps.jar` by running `mvn install` in the
+ `core` directory.
+2. Create a new "IntelliJ Platform Plugin" project.
+3. Add the `google-java-format.iml` module to this project by doing
+ `File→New→Module from Existing Sources...` and selecting the `iml` file.
+4. Under "File→Project Structure→Libraries" add
+ `core/target/google-java-format*all-deps.jar` file. IntelliJ will ask if you
+ want to add it as a dependency to the google-java-format module. You do.
diff --git a/idea_plugin/google-java-format.iml b/idea_plugin/google-java-format.iml
index 2808d73..a5cd516 100644
--- a/idea_plugin/google-java-format.iml
+++ b/idea_plugin/google-java-format.iml
@@ -10,6 +10,5 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="library" name="google-java-format-1.1-20160728.050102-25-all-deps" level="project" />
</component>
-</module>
\ No newline at end of file
+</module>
diff --git a/idea_plugin/resources/META-INF/plugin.xml b/idea_plugin/resources/META-INF/plugin.xml
index f49db5b..31b6e77 100644
--- a/idea_plugin/resources/META-INF/plugin.xml
+++ b/idea_plugin/resources/META-INF/plugin.xml
@@ -1,20 +1,30 @@
<idea-plugin version="2">
<id>google-java-format</id>
<name>google-java-format</name>
- <version>1.0</version>
+ <version>1.2.SNAPSHOT.20161216</version>
<vendor url="https://github.com/google/google-java-format">
Google
</vendor>
+ <!-- Mark it as available on all JetBrains IDEs. It's really only useful in
+ IDEA and Android Studio, but there's no way to specify that for some
+ reason. It won't crash PyCharm or anything, so whatever. -->
+ <depends>com.intellij.modules.lang</depends>
+
<description><![CDATA[
Formats Java source code to comply with Google Style.
]]></description>
- <idea-version since-build="141.0" until-build="163.0"/>
+ <!-- CodeStyleManager stayed the same from 143 (IDEA 15) through 162
+ (2016.2). But they changed a parameter type of a method in 163 (2016.3),
+ so it needs some work to fix. -->
+ <idea-version since-build="143.0" until-build="163.0"/>
<project-components>
<component>
- <implementation-class>com.google.googlejavaformat.intellij.GoogleJavaFormatSettings</implementation-class>
+ <implementation-class>
+ com.google.googlejavaformat.intellij.GoogleJavaFormatSettings
+ </implementation-class>
<loadForDefaultProject/>
</component>
</project-components>
@@ -25,4 +35,4 @@
displayName="google-java-format Settings"/>
</extensions>
-</idea-plugin>
\ No newline at end of file
+</idea-plugin>