Commit 6e560d03 authored by nyquist's avatar nyquist Committed by Commit bot

Create Android Studio chromium style configuration.

The Android Studio Style configuration does not match the checkstyle
configuration, which causes import order to be wrong. The configuration
is specified here:
//tools/android/checkstyle/chromium-style-5.0.xml
under ImportOrder.

This CL copies the style configuration from the Android repository,
but changes it so that it matches what we have in checkstyle.

It also updates the Android Studio documentation to point to the
new file, and adds the new content and the documentation to the
watchlist for Android Studio in addition to updating the error message
from checkstyle to now refer to the new style file.

BUG=None

Review-Url: https://codereview.chromium.org/2710573004
Cr-Commit-Position: refs/heads/master@{#453542}
parent 1eaf120f
......@@ -66,7 +66,9 @@
'|media/video/capture/android'
},
'android_studio': {
'filepath': 'build/android/gradle/'
'filepath': 'build/android/gradle/' \
'|docs/android_studio.md' \
'|tools/android/android_studio'
},
'android_tab': {
'filepath': 'chrome/android/java/src/org/chromium/chrome/browser/Tab'
......
......@@ -78,7 +78,7 @@ includes `R.java`).
* Import Android style settings:
* Help -> Find Action -> "Code Style" (settings) -> Java ->
Manage -> Import
* Select `third_party/android_platform/development/ide/intellij/codestyles/AndroidStyle.xml`
* Select `tools/android/android_studio/ChromiumStyle.xml`
* Turn on automatic import:
* Help -> Find Action -> "Auto Import"
* Tick all the boxes under "Java" and change the dropdown to "All".
......
This diff is collapsed.
per-file ChromiumStyle.xml=file://styleguide/java/OWNERS
......@@ -166,7 +166,7 @@
</module>
<module name="ImportOrder">
<property name="severity" value="error"/>
<message key="import.ordering" value="Wrong order for {0} import. Use :JavaImportOrganize (ECLIM) or Ctrl+Shift+O (Eclipse) to sort imports. An importorder file for configuring Eclipse can be found at //tools/android/eclipse/android.importorder."/>
<message key="import.ordering" value="Wrong order for {0} import. Use :JavaImportOrganize (ECLIM), Ctrl+Shift+O (Eclipse), or Ctrl+Alt+O (Android Studio) to sort imports. An importorder file for configuring Eclipse can be found at //tools/android/eclipse/android.importorder. A style configuration file for Android Studio can be found at //tools/android/android_studio/ChromiumStyle.xml."/>
<property name="groups" value="android, com, dalvik, junit, org, com.google.android.apps.chrome, org.chromium, java, javax"/>
<property name="ordered" value="true"/>
<property name="option" value="top"/>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment