Skip to content

Commit 044961c

Browse files
plumpycushon
authored andcommitted
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
1 parent cfd66b2 commit 044961c

File tree

3 files changed

+33
-8
lines changed

3 files changed

+33
-8
lines changed

idea_plugin/README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
1-
# google-java-format Intellij Plugin
1+
# google-java-format IntelliJ IDEA Plugin
2+
3+
## Enabling
4+
5+
The plugin will not be enabled by default. To enable it in the current project,
6+
go to "File→Settings...→google-java-format Settings" and check the "Enable"
7+
checkbox.
8+
9+
To enable it by default in new projects, use "File→Other Settings→Default
10+
Settings...".
211

312
## Set-up
413

5-
Add `google-java-format*all-deps.jar` to `lib/`.
14+
1. Build `google-java-format*all-deps.jar` by running `mvn install` in the
15+
`core` directory.
16+
2. Create a new "IntelliJ Platform Plugin" project.
17+
3. Add the `google-java-format.iml` module to this project by doing
18+
`File→New→Module from Existing Sources...` and selecting the `iml` file.
19+
4. Under "File→Project Structure→Libraries" add
20+
`core/target/google-java-format*all-deps.jar` file. IntelliJ will ask if you
21+
want to add it as a dependency to the google-java-format module. You do.

idea_plugin/google-java-format.iml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@
1010
</content>
1111
<orderEntry type="inheritedJdk" />
1212
<orderEntry type="sourceFolder" forTests="false" />
13-
<orderEntry type="library" name="google-java-format-1.1-20160728.050102-25-all-deps" level="project" />
1413
</component>
15-
</module>
14+
</module>
Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,30 @@
11
<idea-plugin version="2">
22
<id>google-java-format</id>
33
<name>google-java-format</name>
4-
<version>1.0</version>
4+
<version>1.2.SNAPSHOT.20161216</version>
55
<vendor url="https://github.com/google/google-java-format">
66
Google
77
</vendor>
88

9+
<!-- Mark it as available on all JetBrains IDEs. It's really only useful in
10+
IDEA and Android Studio, but there's no way to specify that for some
11+
reason. It won't crash PyCharm or anything, so whatever. -->
12+
<depends>com.intellij.modules.lang</depends>
13+
914
<description><![CDATA[
1015
Formats Java source code to comply with Google Style.
1116
]]></description>
1217

13-
<idea-version since-build="141.0" until-build="163.0"/>
18+
<!-- CodeStyleManager stayed the same from 143 (IDEA 15) through 162
19+
(2016.2). But they changed a parameter type of a method in 163 (2016.3),
20+
so it needs some work to fix. -->
21+
<idea-version since-build="143.0" until-build="163.0"/>
1422

1523
<project-components>
1624
<component>
17-
<implementation-class>com.google.googlejavaformat.intellij.GoogleJavaFormatSettings</implementation-class>
25+
<implementation-class>
26+
com.google.googlejavaformat.intellij.GoogleJavaFormatSettings
27+
</implementation-class>
1828
<loadForDefaultProject/>
1929
</component>
2030
</project-components>
@@ -25,4 +35,4 @@
2535
displayName="google-java-format Settings"/>
2636
</extensions>
2737

28-
</idea-plugin>
38+
</idea-plugin>

0 commit comments

Comments
 (0)