Merge remote-tracking branch 'origin/master'

This commit is contained in:
Anna Kozlova
2014-09-10 14:18:26 +04:00
49 changed files with 1019 additions and 78 deletions
+1
View File
@@ -1,3 +1,4 @@
/android
/config
/system
.idea/workspace.xml
+11
View File
@@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="asm-tools">
<CLASSES>
<root url="jar://$PROJECT_DIR$/android/android/lib/asm-4.0.jar!/" />
<root url="jar://$PROJECT_DIR$/android/android/lib/asm-analysis-4.0.jar!/" />
<root url="jar://$PROJECT_DIR$/android/android/lib/asm-tree-4.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>
+10
View File
@@ -0,0 +1,10 @@
<component name="libraryTable">
<library name="bouncy-castle">
<CLASSES>
<root url="jar://$PROJECT_DIR$/android/android/lib/bcpkix-jdk15on-1.48.jar!/" />
<root url="jar://$PROJECT_DIR$/android/android/lib/bcprov-jdk15on-1.48.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>
+11
View File
@@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="builder-model">
<CLASSES>
<root url="jar://$PROJECT_DIR$/android/android/lib/builder-model-0.12.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/android/android/lib/src/builder-model-0.12.0-sources.jar!/" />
</SOURCES>
</library>
</component>
+9
View File
@@ -0,0 +1,9 @@
<component name="libraryTable">
<library name="commons-compress">
<CLASSES>
<root url="jar://$PROJECT_DIR$/android/android/lib/commons-compress-1.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>
+10
View File
@@ -0,0 +1,10 @@
<component name="libraryTable">
<library name="easymock-tools">
<CLASSES>
<root url="jar://$PROJECT_DIR$/lib/dev/easymockclassextension.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/dev/easymock.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>
+9
View File
@@ -0,0 +1,9 @@
<component name="libraryTable">
<library name="freemarker-2.3.20">
<CLASSES>
<root url="jar://$PROJECT_DIR$/android/android/lib/freemarker-2.3.20.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>
+11
View File
@@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="guava-tools">
<CLASSES>
<root url="jar://$PROJECT_DIR$/lib/guava-17.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/lib/src/guava-17.0-sources.jar!/" />
</SOURCES>
</library>
</component>
+11
View File
@@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="javawriter">
<CLASSES>
<root url="jar://$PROJECT_DIR$/android/android/lib/javawriter-2.2.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/android/android/lib/src/javawriter-2.2.1-sources.jar!/" />
</SOURCES>
</library>
</component>
+9
View File
@@ -0,0 +1,9 @@
<component name="libraryTable">
<library name="kxml2">
<CLASSES>
<root url="jar://$PROJECT_DIR$/android/android/lib/kxml2-2.3.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>
+16
View File
@@ -0,0 +1,16 @@
<component name="libraryTable">
<library name="lombok-ast">
<CLASSES>
<root url="jar://$PROJECT_DIR$/android/android/lib/lombok-ast-0.2.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/android/android/lib/src/lombok-ast-0.2.2-src.zip!/src/main" />
<root url="jar://$PROJECT_DIR$/android/android/lib/src/lombok-ast-0.2.2-src.zip!/src/printer" />
<root url="jar://$PROJECT_DIR$/android/android/lib/src/lombok-ast-0.2.2-src.zip!/src/template" />
<root url="jar://$PROJECT_DIR$/android/android/lib/src/lombok-ast-0.2.2-src.zip!/src/ecjTransformer" />
<root url="jar://$PROJECT_DIR$/android/android/lib/src/lombok-ast-0.2.2-src.zip!/src/javacTransformer" />
<root url="jar://$PROJECT_DIR$/android/android/lib/src/lombok-ast-0.2.2-src.zip!/build/lombok.ast_generatedSource" />
</SOURCES>
</library>
</component>
+11
View File
@@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="mockito">
<CLASSES>
<root url="jar://$PROJECT_DIR$/android/android/lib/mockito-all-1.9.5.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/android/android/lib/mockito-all-1.9.5.jar!/" />
</SOURCES>
</library>
</component>
+24 -3
View File
@@ -10,18 +10,26 @@
<module fileurl="file://$PROJECT_DIR$/plugins/IntelliLang/IntelliLang-xml.iml" filepath="$PROJECT_DIR$/plugins/IntelliLang/IntelliLang-xml.iml" group="plugins/IntelliLang" />
<module fileurl="file://$PROJECT_DIR$/RegExpSupport/RegExpSupport.iml" filepath="$PROJECT_DIR$/RegExpSupport/RegExpSupport.iml" group="platform" />
<module fileurl="file://$PROJECT_DIR$/plugins/ShortcutPromoter/ShortcutPromoter.iml" filepath="$PROJECT_DIR$/plugins/ShortcutPromoter/ShortcutPromoter.iml" group="plugins" />
<module fileurl="file://$PROJECT_DIR$/android/adt-branding/adt-branding.iml" filepath="$PROJECT_DIR$/android/adt-branding/adt-branding.iml" group="android" />
<module fileurl="file://$PROJECT_DIR$/platform/analysis-api/analysis-api.iml" filepath="$PROJECT_DIR$/platform/analysis-api/analysis-api.iml" group="platform" />
<module fileurl="file://$PROJECT_DIR$/platform/analysis-impl/analysis-impl.iml" filepath="$PROJECT_DIR$/platform/analysis-impl/analysis-impl.iml" group="platform" />
<module fileurl="file://$PROJECT_DIR$/android/android/android.iml" filepath="$PROJECT_DIR$/android/android/android.iml" group="android" />
<module fileurl="file://$PROJECT_DIR$/android/android/common/android-common.iml" filepath="$PROJECT_DIR$/android/android/common/android-common.iml" group="android" />
<module fileurl="file://$PROJECT_DIR$/android/android-gradle-jps/android-gradle-jps.iml" filepath="$PROJECT_DIR$/android/android-gradle-jps/android-gradle-jps.iml" group="android" />
<module fileurl="file://$PROJECT_DIR$/android/android/jps-plugin/android-jps-plugin.iml" filepath="$PROJECT_DIR$/android/android/jps-plugin/android-jps-plugin.iml" group="android" />
<module fileurl="file://$PROJECT_DIR$/android/android/rt/android-rt.iml" filepath="$PROJECT_DIR$/android/android/rt/android-rt.iml" group="android" />
<module fileurl="file://$PROJECT_DIR$/platform/annotations/annotations.iml" filepath="$PROJECT_DIR$/platform/annotations/annotations.iml" group="platform" />
<module fileurl="file://$PROJECT_DIR$/plugins/ant/ant.iml" filepath="$PROJECT_DIR$/plugins/ant/ant.iml" group="plugins" />
<module fileurl="file://$PROJECT_DIR$/plugins/ant/jps-plugin/ant-jps-plugin.iml" filepath="$PROJECT_DIR$/plugins/ant/jps-plugin/ant-jps-plugin.iml" group="plugins" />
<module fileurl="file://$PROJECT_DIR$/jps/antLayout/antlayout.iml" filepath="$PROJECT_DIR$/jps/antLayout/antlayout.iml" group="jps" />
<module fileurl="file://$PROJECT_DIR$/plugins/google-app-engine/runtime/appEngine-runtime.iml" filepath="$PROJECT_DIR$/plugins/google-app-engine/runtime/appEngine-runtime.iml" group="plugins/GAE" />
<module fileurl="file://$PROJECT_DIR$/android/tools-base/asset-studio/assetstudio.iml" filepath="$PROJECT_DIR$/android/tools-base/asset-studio/assetstudio.iml" group="android/sdktools" />
<module fileurl="file://$PROJECT_DIR$/platform/boot/boot.iml" filepath="$PROJECT_DIR$/platform/boot/boot.iml" group="platform" />
<module fileurl="file://$PROJECT_DIR$/platform/bootstrap/bootstrap.iml" filepath="$PROJECT_DIR$/platform/bootstrap/bootstrap.iml" group="platform" />
<module fileurl="file://$PROJECT_DIR$/build/build.iml" filepath="$PROJECT_DIR$/build/build.iml" />
<module fileurl="file://$PROJECT_DIR$/colorSchemes/colorSchemes.iml" filepath="$PROJECT_DIR$/colorSchemes/colorSchemes.iml" group="platform" />
<module fileurl="file://$PROJECT_DIR$/plugins/commander/commander.iml" filepath="$PROJECT_DIR$/plugins/commander/commander.iml" group="plugins" />
<module fileurl="file://$PROJECT_DIR$/android/tools-base/common/common.iml" filepath="$PROJECT_DIR$/android/tools-base/common/common.iml" group="android/sdktools" />
<module fileurl="file://$PROJECT_DIR$/plugins/eclipse/common-eclipse-util/common-eclipse-util.iml" filepath="$PROJECT_DIR$/plugins/eclipse/common-eclipse-util/common-eclipse-util.iml" group="plugins" />
<module fileurl="file://$PROJECT_DIR$/plugins/javaFX/common-javaFX-plugin/common-javaFX-plugin.iml" filepath="$PROJECT_DIR$/plugins/javaFX/common-javaFX-plugin/common-javaFX-plugin.iml" group="plugins/JavaFX" />
<module fileurl="file://$PROJECT_DIR$/community-main.iml" filepath="$PROJECT_DIR$/community-main.iml" />
@@ -39,6 +47,7 @@
<module fileurl="file://$PROJECT_DIR$/build/cucumber-test-runner/cucumber-test-runner.iml" filepath="$PROJECT_DIR$/build/cucumber-test-runner/cucumber-test-runner.iml" group="plugins" />
<module fileurl="file://$PROJECT_DIR$/plugins/cvs/cvs-core/cvs-core.iml" filepath="$PROJECT_DIR$/plugins/cvs/cvs-core/cvs-core.iml" group="plugins/VCS/cvs" />
<module fileurl="file://$PROJECT_DIR$/plugins/cvs/cvs-plugin/cvs-plugin.iml" filepath="$PROJECT_DIR$/plugins/cvs/cvs-plugin/cvs-plugin.iml" group="plugins/VCS/cvs" />
<module fileurl="file://$PROJECT_DIR$/android/tools-base/ddmlib/ddmlib.iml" filepath="$PROJECT_DIR$/android/tools-base/ddmlib/ddmlib.iml" group="android/sdktools" />
<module fileurl="file://$PROJECT_DIR$/java/debugger/impl/debugger-impl.iml" filepath="$PROJECT_DIR$/java/debugger/impl/debugger-impl.iml" group="java" />
<module fileurl="file://$PROJECT_DIR$/java/debugger/openapi/debugger-openapi.iml" filepath="$PROJECT_DIR$/java/debugger/openapi/debugger-openapi.iml" group="java" />
<module fileurl="file://$PROJECT_DIR$/plugins/devkit/devkit.iml" filepath="$PROJECT_DIR$/plugins/devkit/devkit.iml" group="plugins" />
@@ -46,13 +55,16 @@
<module fileurl="file://$PROJECT_DIR$/xml/dom-impl/dom-impl.iml" filepath="$PROJECT_DIR$/xml/dom-impl/dom-impl.iml" group="xml" />
<module fileurl="file://$PROJECT_DIR$/xml/dom-openapi/dom-openapi.iml" filepath="$PROJECT_DIR$/xml/dom-openapi/dom-openapi.iml" group="xml" />
<module fileurl="file://$PROJECT_DIR$/xml/dom-tests/dom-tests.iml" filepath="$PROJECT_DIR$/xml/dom-tests/dom-tests.iml" group="xml" />
<module fileurl="file://$PROJECT_DIR$/android/tools-base/draw9patch/draw9patch.iml" filepath="$PROJECT_DIR$/android/tools-base/draw9patch/draw9patch.iml" group="android/sdktools" />
<module fileurl="file://$PROJECT_DIR$/platform/duplicates-analysis/duplicates-analysis.iml" filepath="$PROJECT_DIR$/platform/duplicates-analysis/duplicates-analysis.iml" />
<module fileurl="file://$PROJECT_DIR$/platform/dvcs-api/dvcs-api.iml" filepath="$PROJECT_DIR$/platform/dvcs-api/dvcs-api.iml" group="platform" />
<module fileurl="file://$PROJECT_DIR$/platform/dvcs-impl/dvcs-impl.iml" filepath="$PROJECT_DIR$/platform/dvcs-impl/dvcs-impl.iml" group="platform" />
<module fileurl="file://$PROJECT_DIR$/platform/dvcs-api/dvcs-api.iml" filepath="$PROJECT_DIR$/platform/dvcs-api/dvcs-api.iml" group="platform"/>
<module fileurl="file://$PROJECT_DIR$/android/tools-base/device_validator/dvlib/dvlib.iml" filepath="$PROJECT_DIR$/android/tools-base/device_validator/dvlib/dvlib.iml" group="android/sdktools" />
<module fileurl="file://$PROJECT_DIR$/plugins/eclipse/eclipse.iml" filepath="$PROJECT_DIR$/plugins/eclipse/eclipse.iml" group="plugins" />
<module fileurl="file://$PROJECT_DIR$/plugins/eclipse/jps-plugin/eclipse-jps-plugin.iml" filepath="$PROJECT_DIR$/plugins/eclipse/jps-plugin/eclipse-jps-plugin.iml" group="plugins" />
<module fileurl="file://$PROJECT_DIR$/platform/editor-ui-api/editor-ui-api.iml" filepath="$PROJECT_DIR$/platform/editor-ui-api/editor-ui-api.iml" group="platform" />
<module fileurl="file://$PROJECT_DIR$/platform/editor-ui-ex/editor-ui-ex.iml" filepath="$PROJECT_DIR$/platform/editor-ui-ex/editor-ui-ex.iml" group="platform" />
<module fileurl="file://$PROJECT_DIR$/plugins/editorconfig/editorconfig.iml" filepath="$PROJECT_DIR$/plugins/editorconfig/editorconfig.iml" group="plugins" />
<module fileurl="file://$PROJECT_DIR$/java/execution/impl/execution-impl.iml" filepath="$PROJECT_DIR$/java/execution/impl/execution-impl.iml" group="java" />
<module fileurl="file://$PROJECT_DIR$/java/execution/openapi/execution-openapi.iml" filepath="$PROJECT_DIR$/java/execution/openapi/execution-openapi.iml" group="java" />
<module fileurl="file://$PROJECT_DIR$/platform/extensions/extensions.iml" filepath="$PROJECT_DIR$/platform/extensions/extensions.iml" group="platform" />
@@ -66,6 +78,7 @@
<module fileurl="file://$PROJECT_DIR$/plugins/google-app-engine/google-app-engine.iml" filepath="$PROJECT_DIR$/plugins/google-app-engine/google-app-engine.iml" group="plugins/GAE" />
<module fileurl="file://$PROJECT_DIR$/plugins/google-app-engine/jps-plugin/google-app-engine-jps-plugin.iml" filepath="$PROJECT_DIR$/plugins/google-app-engine/jps-plugin/google-app-engine-jps-plugin.iml" group="plugins/GAE" />
<module fileurl="file://$PROJECT_DIR$/plugins/gradle/gradle.iml" filepath="$PROJECT_DIR$/plugins/gradle/gradle.iml" group="community/plugins/gradle" />
<module fileurl="file://$PROJECT_DIR$/android/tools-base/gradle-import/gradle-import.iml" filepath="$PROJECT_DIR$/android/tools-base/gradle-import/gradle-import.iml" group="android/sdktools" />
<module fileurl="file://$PROJECT_DIR$/plugins/gradle/jps-plugin/gradle-jps-plugin.iml" filepath="$PROJECT_DIR$/plugins/gradle/jps-plugin/gradle-jps-plugin.iml" group="community/plugins/gradle" />
<module fileurl="file://$PROJECT_DIR$/plugins/gradle/tooling-extension-api/gradle-tooling-extension-api.iml" filepath="$PROJECT_DIR$/plugins/gradle/tooling-extension-api/gradle-tooling-extension-api.iml" group="community/plugins/gradle" />
<module fileurl="file://$PROJECT_DIR$/plugins/gradle/tooling-extension-impl/gradle-tooling-extension-impl.iml" filepath="$PROJECT_DIR$/plugins/gradle/tooling-extension-impl/gradle-tooling-extension-impl.iml" group="community/plugins/gradle" />
@@ -116,12 +129,17 @@
<module fileurl="file://$PROJECT_DIR$/plugins/junit_rt/junit_rt.iml" filepath="$PROJECT_DIR$/plugins/junit_rt/junit_rt.iml" group="plugins" />
<module fileurl="file://$PROJECT_DIR$/platform/lang-api/lang-api.iml" filepath="$PROJECT_DIR$/platform/lang-api/lang-api.iml" group="platform" />
<module fileurl="file://$PROJECT_DIR$/platform/lang-impl/lang-impl.iml" filepath="$PROJECT_DIR$/platform/lang-impl/lang-impl.iml" group="platform" />
<module fileurl="file://$PROJECT_DIR$/android/tools-base/layoutlib-api/layoutlib-api.iml" filepath="$PROJECT_DIR$/android/tools-base/layoutlib-api/layoutlib-api.iml" group="android/sdktools" />
<module fileurl="file://$PROJECT_DIR$/android/tools-base/lint/libs/lint-api/lint-api.iml" filepath="$PROJECT_DIR$/android/tools-base/lint/libs/lint-api/lint-api.iml" group="android/sdktools" />
<module fileurl="file://$PROJECT_DIR$/android/tools-base/lint/libs/lint-checks/lint-checks.iml" filepath="$PROJECT_DIR$/android/tools-base/lint/libs/lint-checks/lint-checks.iml" group="android/sdktools" />
<module fileurl="file://$PROJECT_DIR$/platform/lvcs-api/lvcs-api.iml" filepath="$PROJECT_DIR$/platform/lvcs-api/lvcs-api.iml" group="platform" />
<module fileurl="file://$PROJECT_DIR$/platform/lvcs-impl/lvcs-impl.iml" filepath="$PROJECT_DIR$/platform/lvcs-impl/lvcs-impl.iml" group="platform" />
<module fileurl="file://$PROJECT_DIR$/android/android/main_AndroidStudio.iml" filepath="$PROJECT_DIR$/android/android/main_AndroidStudio.iml" group="android" />
<module fileurl="file://$PROJECT_DIR$/python/main_idea_python_plugin.iml" filepath="$PROJECT_DIR$/python/main_idea_python_plugin.iml" group="python" />
<module fileurl="file://$PROJECT_DIR$/python/main_pycharm_ce.iml" filepath="$PROJECT_DIR$/python/main_pycharm_ce.iml" group="python" />
<module fileurl="file://$PROJECT_DIR$/python/edu/main_pycharm_edu.iml" filepath="$PROJECT_DIR$/python/edu/main_pycharm_edu.iml" group="python/educational" />
<module fileurl="file://$PROJECT_DIR$/java/manifest/manifest.iml" filepath="$PROJECT_DIR$/java/manifest/manifest.iml" group="java" />
<module fileurl="file://$PROJECT_DIR$/android/tools-base/build-system/manifest-merger/manifest-merger.iml" filepath="$PROJECT_DIR$/android/tools-base/build-system/manifest-merger/manifest-merger.iml" group="android/sdktools" />
<module fileurl="file://$PROJECT_DIR$/plugins/maven/maven.iml" filepath="$PROJECT_DIR$/plugins/maven/maven.iml" group="plugins/maven" />
<module fileurl="file://$PROJECT_DIR$/plugins/maven/artifact-resolver-m2/maven-artifact-resolver-m2.iml" filepath="$PROJECT_DIR$/plugins/maven/artifact-resolver-m2/maven-artifact-resolver-m2.iml" group="plugins/maven" />
<module fileurl="file://$PROJECT_DIR$/plugins/maven/artifact-resolver-m3/maven-artifact-resolver-m3.iml" filepath="$PROJECT_DIR$/plugins/maven/artifact-resolver-m3/maven-artifact-resolver-m3.iml" group="plugins/maven" />
@@ -130,7 +148,9 @@
<module fileurl="file://$PROJECT_DIR$/plugins/maven/maven-server-api/maven-server-api.iml" filepath="$PROJECT_DIR$/plugins/maven/maven-server-api/maven-server-api.iml" group="plugins/maven" />
<module fileurl="file://$PROJECT_DIR$/plugins/maven/maven2-server-impl/maven2-server-impl.iml" filepath="$PROJECT_DIR$/plugins/maven/maven2-server-impl/maven2-server-impl.iml" group="plugins/maven" />
<module fileurl="file://$PROJECT_DIR$/plugins/maven/maven3-server-impl/maven3-server-impl.iml" filepath="$PROJECT_DIR$/plugins/maven/maven3-server-impl/maven3-server-impl.iml" group="plugins/maven" />
<module fileurl="file://$PROJECT_DIR$/android/tools-base/ninepatch/ninepatch.iml" filepath="$PROJECT_DIR$/android/tools-base/ninepatch/ninepatch.iml" group="android/sdktools" />
<module fileurl="file://$PROJECT_DIR$/java/openapi/openapi.iml" filepath="$PROJECT_DIR$/java/openapi/openapi.iml" group="java" />
<module fileurl="file://$PROJECT_DIR$/android/tools-base/perflib/perflib.iml" filepath="$PROJECT_DIR$/android/tools-base/perflib/perflib.iml" group="android/sdktools" />
<module fileurl="file://$PROJECT_DIR$/platform/platform-api/platform-api.iml" filepath="$PROJECT_DIR$/platform/platform-api/platform-api.iml" group="platform" />
<module fileurl="file://$PROJECT_DIR$/platform/platform-impl/platform-impl.iml" filepath="$PROJECT_DIR$/platform/platform-impl/platform-impl.iml" group="platform" />
<module fileurl="file://$PROJECT_DIR$/platform/platform-main/platform-main.iml" filepath="$PROJECT_DIR$/platform/platform-main/platform-main.iml" group="platform" />
@@ -168,6 +188,8 @@
<module fileurl="file://$PROJECT_DIR$/python/rest/rest.iml" filepath="$PROJECT_DIR$/python/rest/rest.iml" group="python" />
<module fileurl="file://$PROJECT_DIR$/platform/script-debugger/backend/script-debugger-backend.iml" filepath="$PROJECT_DIR$/platform/script-debugger/backend/script-debugger-backend.iml" group="platform/script-debugger" />
<module fileurl="file://$PROJECT_DIR$/platform/script-debugger/debugger-ui/script-debugger-ui.iml" filepath="$PROJECT_DIR$/platform/script-debugger/debugger-ui/script-debugger-ui.iml" group="platform/script-debugger" />
<module fileurl="file://$PROJECT_DIR$/android/tools-base/sdk-common/sdk-common.iml" filepath="$PROJECT_DIR$/android/tools-base/sdk-common/sdk-common.iml" group="android/sdktools" />
<module fileurl="file://$PROJECT_DIR$/android/tools-base/sdklib/sdklib.iml" filepath="$PROJECT_DIR$/android/tools-base/sdklib/sdklib.iml" group="android/sdktools" />
<module fileurl="file://$PROJECT_DIR$/platform/smRunner/smRunner.iml" filepath="$PROJECT_DIR$/platform/smRunner/smRunner.iml" group="platform" />
<module fileurl="file://$PROJECT_DIR$/plugins/cvs/smartcvs-src/smartcvs-src.iml" filepath="$PROJECT_DIR$/plugins/cvs/smartcvs-src/smartcvs-src.iml" group="plugins/VCS/cvs" />
<module fileurl="file://$PROJECT_DIR$/spellchecker/spellchecker.iml" filepath="$PROJECT_DIR$/spellchecker/spellchecker.iml" group="plugins" />
@@ -190,6 +212,7 @@
<module fileurl="file://$PROJECT_DIR$/plugins/testng/testng.iml" filepath="$PROJECT_DIR$/plugins/testng/testng.iml" group="plugins" />
<module fileurl="file://$PROJECT_DIR$/plugins/testng_rt/testng_rt.iml" filepath="$PROJECT_DIR$/plugins/testng_rt/testng_rt.iml" group="plugins" />
<module fileurl="file://$PROJECT_DIR$/platform/testFramework/bootstrap/tests_bootstrap.iml" filepath="$PROJECT_DIR$/platform/testFramework/bootstrap/tests_bootstrap.iml" group="platform" />
<module fileurl="file://$PROJECT_DIR$/android/tools-base/testutils/testutils.iml" filepath="$PROJECT_DIR$/android/tools-base/testutils/testutils.iml" group="android/sdktools" />
<module fileurl="file://$PROJECT_DIR$/java/typeMigration/typeMigration.iml" filepath="$PROJECT_DIR$/java/typeMigration/typeMigration.iml" />
<module fileurl="file://$PROJECT_DIR$/plugins/ui-designer/ui-designer.iml" filepath="$PROJECT_DIR$/plugins/ui-designer/ui-designer.iml" group="plugins" />
<module fileurl="file://$PROJECT_DIR$/plugins/ui-designer-core/ui-designer-core.iml" filepath="$PROJECT_DIR$/plugins/ui-designer-core/ui-designer-core.iml" group="plugins" />
@@ -220,8 +243,6 @@
<module fileurl="file://$PROJECT_DIR$/plugins/xslt-debugger/engine/xslt-debugger-engine.iml" filepath="$PROJECT_DIR$/plugins/xslt-debugger/engine/xslt-debugger-engine.iml" group="plugins" />
<module fileurl="file://$PROJECT_DIR$/plugins/xslt-debugger/engine/impl/xslt-debugger-engine-impl.iml" filepath="$PROJECT_DIR$/plugins/xslt-debugger/engine/impl/xslt-debugger-engine-impl.iml" group="plugins" />
<module fileurl="file://$PROJECT_DIR$/plugins/xpath/xslt-rt/xslt-rt.iml" filepath="$PROJECT_DIR$/plugins/xpath/xslt-rt/xslt-rt.iml" group="plugins" />
<module fileurl="file://$PROJECT_DIR$/plugins/editorconfig/editorconfig.iml" filepath="$PROJECT_DIR$/plugins/editorconfig/editorconfig.iml" group="plugins"/>
</modules>
</component>
</project>
Generated
+2
View File
@@ -2,6 +2,8 @@
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
<mapping directory="$PROJECT_DIR$/android" vcs="Git" />
<mapping directory="$PROJECT_DIR$/android/tools-base" vcs="Git" />
</component>
</project>
+1 -3
View File
@@ -254,9 +254,7 @@ def layoutFull(String home, String targetDirectory, String patchedDescriptorDir
}
public def layoutCommunityPlugins(String home) {
if (isDefined("androidPluginHome")) {
layoutAndroid(p("androidPluginHome"))
}
layoutAndroid("$home/android")
dir("plugins") {
def simplePlugins = ["commander", "copyright", "java-i18n", "hg4idea", "github"] //, "tasks-time-tracking"]
+2
View File
@@ -0,0 +1,2 @@
call git clone git://git.jetbrains.org/idea/android.git android
call git clone git://git.jetbrains.org/idea/adt-tools-base.git android/tools-base
Executable
+2
View File
@@ -0,0 +1,2 @@
git clone git://git.jetbrains.org/idea/android.git android
git clone git://git.jetbrains.org/idea/adt-tools-base.git android/tools-base
@@ -62,8 +62,9 @@ public class ClassesTreeStructureProvider implements SelectableTreeStructureProv
if (originalElement instanceof PsiFile) {
PsiFile classFile = (PsiFile)originalElement;
final VirtualFile virtualClassFile = classFile.getVirtualFile();
if (virtualClassFile != null && fileIndex.isInLibraryClasses(virtualClassFile) &&
classOwner.getManager().areElementsEquivalent(classOwner.getContainingDirectory(), classFile.getContainingDirectory())) {
if (virtualClassFile != null && fileIndex.isInLibraryClasses(virtualClassFile)
&& !classOwner.getManager().areElementsEquivalent(classOwner, classFile)
&& classOwner.getManager().areElementsEquivalent(classOwner.getContainingDirectory(), classFile.getContainingDirectory())) {
continue;
}
}
@@ -23,17 +23,21 @@ import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.editor.ex.util.LexerEditorHighlighter;
import com.intellij.openapi.editor.highlighter.EditorHighlighter;
import com.intellij.openapi.editor.highlighter.HighlighterIterator;
import com.intellij.openapi.fileTypes.*;
import com.intellij.openapi.fileTypes.FileType;
import com.intellij.openapi.fileTypes.InternalFileType;
import com.intellij.openapi.fileTypes.LanguageFileType;
import com.intellij.openapi.fileTypes.PlainTextFileType;
import com.intellij.openapi.fileTypes.impl.CustomSyntaxTableFileType;
import com.intellij.openapi.util.Key;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.psi.CustomHighlighterTokenType;
import com.intellij.psi.impl.cache.impl.BaseFilterLexer;
import com.intellij.psi.impl.cache.CacheUtil;
import com.intellij.psi.impl.cache.impl.BaseFilterLexer;
import com.intellij.psi.impl.cache.impl.IndexPatternUtil;
import com.intellij.psi.impl.cache.impl.OccurrenceConsumer;
import com.intellij.psi.impl.cache.impl.todo.TodoIndexEntry;
import com.intellij.psi.impl.cache.impl.todo.TodoIndexers;
import com.intellij.psi.impl.cache.impl.todo.VersionedTodoIndexer;
import com.intellij.psi.search.IndexPattern;
import com.intellij.psi.tree.IElementType;
import com.intellij.psi.tree.TokenSet;
@@ -116,7 +120,7 @@ public abstract class PlatformIdTableBuilding {
return ourTodoIndexers.containsKey(fileType) || TodoIndexers.INSTANCE.forFileType(fileType) != null || fileType instanceof InternalFileType;
}
private static class CompositeTodoIndexer implements DataIndexer<TodoIndexEntry, Integer, FileContent> {
private static class CompositeTodoIndexer extends VersionedTodoIndexer {
private final DataIndexer<TodoIndexEntry, Integer, FileContent>[] indexers;
public CompositeTodoIndexer(@NotNull DataIndexer<TodoIndexEntry, Integer, FileContent>... indexers) {
@@ -139,9 +143,18 @@ public abstract class PlatformIdTableBuilding {
}
return result;
}
@Override
public int getVersion() {
int version = super.getVersion();
for(DataIndexer dataIndexer:indexers) {
version += dataIndexer instanceof VersionedTodoIndexer ? ((VersionedTodoIndexer)dataIndexer).getVersion() : 0xFF;
}
return version;
}
}
private static class TokenSetTodoIndexer implements DataIndexer<TodoIndexEntry, Integer, FileContent> {
private static class TokenSetTodoIndexer extends VersionedTodoIndexer {
@NotNull private final TokenSet myCommentTokens;
private final VirtualFile myFile;
@@ -201,7 +214,7 @@ public abstract class PlatformIdTableBuilding {
}
}
public static class PlainTextTodoIndexer implements DataIndexer<TodoIndexEntry, Integer, FileContent> {
public static class PlainTextTodoIndexer extends VersionedTodoIndexer {
@Override
@NotNull
public Map<TodoIndexEntry, Integer> map(@NotNull final FileContent inputData) {
@@ -20,8 +20,10 @@ import com.intellij.lang.Language;
import com.intellij.lang.LanguageParserDefinitions;
import com.intellij.lang.ParserDefinition;
import com.intellij.openapi.fileTypes.FileType;
import com.intellij.openapi.fileTypes.FileTypeRegistry;
import com.intellij.openapi.fileTypes.LanguageFileType;
import com.intellij.openapi.fileTypes.impl.CustomSyntaxTableFileType;
import com.intellij.openapi.util.Comparing;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.psi.impl.cache.impl.id.PlatformIdTableBuilding;
import com.intellij.psi.search.IndexPatternProvider;
@@ -39,7 +41,9 @@ import java.beans.PropertyChangeListener;
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.Map;
/**
@@ -49,7 +53,10 @@ import java.util.Map;
public class TodoIndex extends FileBasedIndexExtension<TodoIndexEntry, Integer> {
@NonNls public static final ID<TodoIndexEntry, Integer> NAME = ID.create("TodoIndex");
public TodoIndex(MessageBus messageBus) {
private final FileTypeRegistry myFileTypeManager;
public TodoIndex(MessageBus messageBus, FileTypeRegistry manager) {
myFileTypeManager = manager;
messageBus.connect().subscribe(IndexPatternProvider.INDEX_PATTERNS_CHANGED, new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
@@ -127,7 +134,27 @@ public class TodoIndex extends FileBasedIndexExtension<TodoIndexEntry, Integer>
@Override
public int getVersion() {
return 8;
int version = 8;
FileType[] types = myFileTypeManager.getRegisteredFileTypes();
Arrays.sort(types, new Comparator<FileType>() {
@Override
public int compare(FileType o1, FileType o2) {
return Comparing.compare(o1.getName(), o2.getName());
}
});
for(FileType fileType:types) {
DataIndexer<TodoIndexEntry, Integer, FileContent> indexer = TodoIndexers.INSTANCE.forFileType(fileType);
if (indexer == null) continue;
if (!(indexer instanceof VersionedTodoIndexer)) {
int a = 1;
}
int versionFromIndexer = indexer instanceof VersionedTodoIndexer ? (((VersionedTodoIndexer)indexer).getVersion()) : 0xFF;
version = version * 31 + (versionFromIndexer ^ indexer.getClass().getName().hashCode());
}
return version;
}
@Override
@@ -27,7 +27,7 @@ import org.jetbrains.annotations.NotNull;
* @author max
*/
public class DefaultWordsScanner implements WordsScanner {
public class DefaultWordsScanner extends VersionedWordsScanner {
private final Lexer myLexer;
private final TokenSet myIdentifierTokenSet;
private final TokenSet myCommentTokenSet;
@@ -25,7 +25,7 @@ import com.intellij.util.text.CharArrayUtil;
*
* @author max
*/
public class SimpleWordsScanner implements WordsScanner {
public class SimpleWordsScanner extends VersionedWordsScanner {
public void processWords(CharSequence fileText, Processor<WordOccurrence> processor) {
int index = 0;
WordOccurrence occurrence = null;
@@ -0,0 +1,22 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.lang.cacheBuilder;
public abstract class VersionedWordsScanner implements WordsScanner {
public int getVersion() {
return 1;
}
}
@@ -24,4 +24,7 @@ import com.intellij.util.indexing.FileContent;
* Date: Jan 16, 2008
*/
public abstract class FileTypeIdIndexer implements DataIndexer<IdIndexEntry, Integer, FileContent> {
public int getVersion() {
return 1;
}
}
@@ -161,6 +161,11 @@ public class IdTableBuilding {
});
return consumer.getResult();
}
@Override
public int getVersion() {
return myScanner instanceof VersionedWordsScanner ? ((VersionedWordsScanner)myScanner).getVersion() : -1;
}
}
public static void scanWords(final ScanWordProcessor processor, final CharSequence chars, final int startOffset, final int endOffset) {
@@ -18,7 +18,6 @@ package com.intellij.psi.impl.cache.impl.todo;
import com.intellij.psi.impl.cache.impl.BaseFilterLexerUtil;
import com.intellij.psi.impl.cache.impl.IdAndToDoScannerBasedOnFilterLexer;
import com.intellij.util.indexing.DataIndexer;
import com.intellij.util.indexing.FileContent;
import org.jetbrains.annotations.NotNull;
@@ -28,8 +27,7 @@ import java.util.Map;
* @author Eugene Zhuravlev
* Date: Jan 20, 2008
*/
public abstract class LexerBasedTodoIndexer implements DataIndexer<TodoIndexEntry, Integer, FileContent>,
IdAndToDoScannerBasedOnFilterLexer {
public abstract class LexerBasedTodoIndexer extends VersionedTodoIndexer implements IdAndToDoScannerBasedOnFilterLexer {
@Override
@NotNull
public Map<TodoIndexEntry,Integer> map(@NotNull final FileContent inputData) {
@@ -0,0 +1,25 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.psi.impl.cache.impl.todo;
import com.intellij.util.indexing.DataIndexer;
import com.intellij.util.indexing.FileContent;
public abstract class VersionedTodoIndexer implements DataIndexer<TodoIndexEntry, Integer, FileContent> {
public int getVersion() {
return 1;
}
}
@@ -0,0 +1,106 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.psi.codeStyle.autodetect;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.editor.Document;
import com.intellij.openapi.project.Project;
import com.intellij.psi.PsiDocumentManager;
import com.intellij.psi.PsiFile;
import com.intellij.psi.codeStyle.CodeStyleSettingsManager;
import org.jetbrains.annotations.NotNull;
import java.util.List;
import static com.intellij.psi.codeStyle.CommonCodeStyleSettings.*;
public class IndentOptionsDetector {
private static Logger LOG = Logger.getInstance("#com.intellij.psi.codeStyle.CommonCodeStyleSettings.IndentOptionsDetector");
private static final double RATE_THRESHOLD = 0.8;
private static final int MIN_LINES_THRESHOLD = 50;
private static int MAX_INDENT_TO_DETECT = 8;
private final PsiFile myFile;
private final Project myProject;
private final Document myDocument;
public IndentOptionsDetector(@NotNull PsiFile file) {
myFile = file;
myProject = file.getProject();
myDocument = PsiDocumentManager.getInstance(myProject).getDocument(myFile);
}
@NotNull
public IndentOptions getIndentOptions() {
IndentOptions indentOptions = (IndentOptions)CodeStyleSettingsManager.getSettings(myProject).getIndentOptions(myFile.getFileType()).clone();
if (myDocument != null) {
List<LineIndentInfo> linesInfo = new LineIndentInfoBuilder(myDocument.getCharsSequence()).build();
IndentUsageStatistics stats = new IndentUsageStatisticsImpl(linesInfo);
adjustIndentOptions(indentOptions, stats);
}
return indentOptions;
}
private void adjustIndentOptions(@NotNull IndentOptions indentOptions, @NotNull IndentUsageStatistics stats) {
int linesWithTabs = stats.getTotalLinesWithLeadingTabs();
int linesWithWhiteSpaceIndent = stats.getTotalLinesWithLeadingSpaces();
int totalLines = linesWithTabs + linesWithWhiteSpaceIndent;
double lineWithTabsRate = (double)linesWithTabs / totalLines;
if (linesWithTabs > MIN_LINES_THRESHOLD && lineWithTabsRate > RATE_THRESHOLD) {
if (!indentOptions.USE_TAB_CHARACTER) {
indentOptions.USE_TAB_CHARACTER = true;
LOG.info("Detected tab usage in" + myFile);
}
}
else if (linesWithWhiteSpaceIndent > MIN_LINES_THRESHOLD && (1 - lineWithTabsRate) > RATE_THRESHOLD) {
int newIndentSize = getPositiveIndentSize(stats);
if (newIndentSize > 0 && indentOptions.INDENT_SIZE != newIndentSize) {
indentOptions.INDENT_SIZE = newIndentSize;
LOG.info("Detected indent size: " + newIndentSize + " for file " + myFile);
}
}
}
private static int getPositiveIndentSize(@NotNull IndentUsageStatistics stats) {
int totalIndentSizesDetected = stats.getTotalIndentSizesDetected();
if (totalIndentSizesDetected == 0) return -1;
IndentUsageInfo maxUsedIndentInfo = stats.getKMostUsedIndentInfo(0);
int maxUsedIndentSize = maxUsedIndentInfo.getIndentSize();
if (maxUsedIndentSize == 0) {
if (totalIndentSizesDetected < 1) return -1;
maxUsedIndentInfo = stats.getKMostUsedIndentInfo(1);
maxUsedIndentSize = maxUsedIndentInfo.getIndentSize();
}
if (maxUsedIndentSize <= MAX_INDENT_TO_DETECT) {
int totalUsagesWithoutZeroIndent = stats.getTotalLinesWithLeadingSpaces() - stats.getTimesIndentUsed(0);
double usageRate = (double)maxUsedIndentInfo.getTimesUsed() / totalUsagesWithoutZeroIndent;
if (usageRate > RATE_THRESHOLD) {
return maxUsedIndentSize;
}
}
return -1;
}
}
@@ -0,0 +1,39 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.psi.codeStyle.autodetect;
public class IndentUsageInfo {
private final int indentSize;
private final int timesUsed;
public IndentUsageInfo(int indentSize, int timesUsed) {
this.indentSize = indentSize;
this.timesUsed = timesUsed;
}
public int getIndentSize() {
return indentSize;
}
public int getTimesUsed() {
return timesUsed;
}
@Override
public String toString() {
return "indent: " + indentSize + ", used " + timesUsed;
}
}
@@ -0,0 +1,30 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.psi.codeStyle.autodetect;
public interface IndentUsageStatistics {
int getTotalLinesWithLeadingTabs();
int getTotalLinesWithLeadingSpaces();
IndentUsageInfo getKMostUsedIndentInfo(int k);
int getTotalIndentSizesDetected();
int getTimesIndentUsed(int indent);
}
@@ -0,0 +1,149 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.psi.codeStyle.autodetect;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.containers.Stack;
import gnu.trove.TIntIntHashMap;
import gnu.trove.TIntIntIterator;
import org.jetbrains.annotations.NotNull;
import java.util.Comparator;
import java.util.List;
public class IndentUsageStatisticsImpl implements IndentUsageStatistics {
private static final Comparator<IndentUsageInfo> DECREASING_ORDER = new Comparator<IndentUsageInfo>() {
@Override
public int compare(@NotNull IndentUsageInfo o1, @NotNull IndentUsageInfo o2) {
return o1.getTimesUsed() < o2.getTimesUsed() ? 1 : o1.getTimesUsed() == o2.getTimesUsed() ? 0 : -1;
}
};
private List<LineIndentInfo> myLineInfos;
private int myPreviousLineIndent;
private int myPreviousRelativeIndent;
private int myTotalLinesWithTabs = 0;
private int myTotalLinesWithWhiteSpaces = 0;
private TIntIntHashMap myIndentToUsages = new TIntIntHashMap();
private List<IndentUsageInfo> myIndentUsages = ContainerUtil.newArrayList();
private Stack<IndentData> myParentIndents = ContainerUtil.newStack(new IndentData(0, 0));
public IndentUsageStatisticsImpl(@NotNull List<LineIndentInfo> lineInfos) {
myLineInfos = lineInfos;
buildIndentToUsagesMap();
myIndentUsages = toIndentUsageList(myIndentToUsages);
ContainerUtil.sort(myIndentUsages, DECREASING_ORDER);
}
@NotNull
private static List<IndentUsageInfo> toIndentUsageList(@NotNull TIntIntHashMap indentToUsages) {
List<IndentUsageInfo> indentUsageInfos = ContainerUtil.newArrayList();
TIntIntIterator it = indentToUsages.iterator();
while (it.hasNext()) {
it.advance();
indentUsageInfos.add(new IndentUsageInfo(it.key(), it.value()));
}
return indentUsageInfos;
}
public void buildIndentToUsagesMap() {
myPreviousLineIndent = 0;
myPreviousRelativeIndent = 0;
for (LineIndentInfo lineInfo : myLineInfos) {
if (lineInfo.isLineWithTabs()) {
myTotalLinesWithTabs++;
}
else if (lineInfo.isLineWithWhiteSpaceIndent()) {
handleWhiteSpaceIndent(lineInfo.getIndentSize());
}
}
}
@NotNull
private IndentData findParentIndent(int indent) {
while (myParentIndents.size() != 1 && myParentIndents.peek().indent > indent) {
myParentIndents.pop();
}
return myParentIndents.peek();
}
private void handleWhiteSpaceIndent(int currentIndent) {
int relativeIndent = currentIndent - myPreviousLineIndent;
if (relativeIndent < 0) {
IndentData indentData = findParentIndent(currentIndent);
myPreviousLineIndent = indentData.indent;
myPreviousRelativeIndent = indentData.relativeIndent;
relativeIndent = currentIndent - myPreviousLineIndent;
}
if (relativeIndent == 0) {
relativeIndent = myPreviousRelativeIndent;
}
else {
myParentIndents.push(new IndentData(currentIndent, relativeIndent));
}
increaseIndentUsage(relativeIndent);
myPreviousRelativeIndent = relativeIndent;
myPreviousLineIndent = currentIndent;
myTotalLinesWithWhiteSpaces++;
}
private void increaseIndentUsage(int relativeIndent) {
int timesUsed = myIndentToUsages.get(relativeIndent);
myIndentToUsages.put(relativeIndent, ++timesUsed);
}
@Override
public int getTotalLinesWithLeadingTabs() {
return myTotalLinesWithTabs;
}
@Override
public int getTotalLinesWithLeadingSpaces() {
return myTotalLinesWithWhiteSpaces;
}
@Override
public IndentUsageInfo getKMostUsedIndentInfo(int k) {
return myIndentUsages.get(k);
}
@Override
public int getTimesIndentUsed(int indent) {
return myIndentToUsages.get(indent);
}
@Override
public int getTotalIndentSizesDetected() {
return myIndentToUsages.size();
}
private static class IndentData {
public final int indent;
public final int relativeIndent;
public IndentData(int indent, int relativeIndent) {
this.indent = indent;
this.relativeIndent = relativeIndent;
}
}
}
@@ -0,0 +1,56 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.psi.codeStyle.autodetect;
import org.jetbrains.annotations.NotNull;
public class LineIndentInfo {
public static LineIndentInfo EMPTY_LINE = new LineIndentInfo(LineType.EMPTY_LINE, -1);
public static LineIndentInfo LINE_WITH_COMMENT = new LineIndentInfo(LineType.LINE_WITH_COMMENT, -1);
public static LineIndentInfo LINE_WITH_TABS = new LineIndentInfo(LineType.LINE_WITH_TABS, -1);
private final int myIndentSize;
private final LineType myType;
private LineIndentInfo(@NotNull LineType type, int indentSize) {
myType = type;
myIndentSize = indentSize;
}
@NotNull
public static LineIndentInfo newWhiteSpaceIndent(int indentSize) {
return new LineIndentInfo(LineType.LINE_WITH_WHITESPACE_INDENT, indentSize);
}
public int getIndentSize() {
return myIndentSize;
}
public boolean isLineWithWhiteSpaceIndent() {
return myType == LineType.LINE_WITH_WHITESPACE_INDENT;
}
public boolean isLineWithTabs() {
return myType == LineType.LINE_WITH_TABS;
}
private enum LineType {
EMPTY_LINE,
LINE_WITH_COMMENT,
LINE_WITH_TABS,
LINE_WITH_WHITESPACE_INDENT
}
}
@@ -0,0 +1,80 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.psi.codeStyle.autodetect;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.text.CharArrayUtil;
import org.jetbrains.annotations.NotNull;
import java.util.List;
public class LineIndentInfoBuilder {
private static final int MAX_LINES_TO_PROCESS = 500;
private final CharSequence myText;
private final int myLength;
public LineIndentInfoBuilder(@NotNull CharSequence text) {
myText = text;
myLength = text.length();
}
@NotNull
public List<LineIndentInfo> build() {
List<LineIndentInfo> lineIndentInfos = ContainerUtil.newArrayList();
int lineStartOffset = 0;
int currentLine = 0;
while (lineStartOffset < myText.length() && currentLine < MAX_LINES_TO_PROCESS) {
int lineEndOffset = getLineEndOffset(lineStartOffset);
int textStartOffset = CharArrayUtil.shiftForward(myText, lineStartOffset, lineEndOffset, " \t");
if (textStartOffset != lineEndOffset) {
lineIndentInfos.add(createInfoFromWhiteSpaceRange(lineStartOffset, textStartOffset));
} else {
lineIndentInfos.add(LineIndentInfo.EMPTY_LINE);
}
lineStartOffset = lineEndOffset + 1;
currentLine++;
}
return lineIndentInfos;
}
@NotNull
private LineIndentInfo createInfoFromWhiteSpaceRange(int lineStartOffset, int textStartOffset) {
if (myText.charAt(textStartOffset) == '*') {
return LineIndentInfo.LINE_WITH_COMMENT;
}
else if (CharArrayUtil.indexOf(myText, "\t", lineStartOffset, textStartOffset) > 0) {
return LineIndentInfo.LINE_WITH_TABS;
}
else {
int indentSize = textStartOffset - lineStartOffset;
return LineIndentInfo.newWhiteSpaceIndent(indentSize);
}
}
private int getLineEndOffset(int lineStartOffset) {
int lineEndOffset = CharArrayUtil.indexOf(myText, "\n", lineStartOffset, myLength);
if (lineEndOffset < 0) {
lineEndOffset = myText.length();
}
return lineEndOffset;
}
}
@@ -1005,11 +1005,10 @@ public class SingleInspectionProfilePanel extends JPanel {
northPanel.add(createTreeToolbarPanel().getComponent(), new GridBagConstraints(1, 0, 1, 1, 0.5, 1, GridBagConstraints.BASELINE_LEADING, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
treePanel.add(northPanel, BorderLayout.NORTH);
myMainSplitter = new Splitter(false);
myMainSplitter = new Splitter(false, myProperties.getFloat(VERTICAL_DIVIDER_PROPORTION, 0.5f), 0.01f, 0.99f);
myMainSplitter.setFirstComponent(treePanel);
myMainSplitter.setSecondComponent(myRightSplitter);
myMainSplitter.setHonorComponentsMinimumSize(false);
myMainSplitter.setProportion(myProperties.getFloat(VERTICAL_DIVIDER_PROPORTION, 0.5f));
final JPanel panel = new JPanel(new BorderLayout());
panel.add(myMainSplitter, BorderLayout.CENTER);
@@ -220,7 +220,7 @@ public class InspectionsConfigTreeTable extends TreeTable {
@Override
public void setValueAt(final Object aValue, final Object node, final int column) {
LOG.assertTrue(column == IS_ENABLED_COLUMN);
LOG.assertTrue(aValue != null);
LOG.assertTrue(aValue != null, "node = " + node);
final boolean doEnable = (Boolean) aValue;
for (final InspectionConfigTreeNode aNode : InspectionsAggregationUtil.getInspectionsNodes((InspectionConfigTreeNode) node)) {
final String toolId = aNode.getKey().toString();
@@ -15,6 +15,9 @@
*/
package com.intellij.psi.impl.cache.impl.id;
import com.intellij.openapi.fileTypes.FileType;
import com.intellij.openapi.fileTypes.FileTypeRegistry;
import com.intellij.openapi.util.Comparing;
import com.intellij.openapi.util.ThreadLocalCachedIntArray;
import com.intellij.util.indexing.CustomInputsIndexFileBasedIndexExtension;
import com.intellij.util.io.DataExternalizer;
@@ -27,9 +30,35 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Comparator;
public class IdIndexImpl extends IdIndex implements CustomInputsIndexFileBasedIndexExtension<IdIndexEntry> {
private static final ThreadLocalCachedIntArray spareBufferLocal = new ThreadLocalCachedIntArray();
private final FileTypeRegistry myFileTypeManager;
public IdIndexImpl(FileTypeRegistry manager) {
myFileTypeManager = manager;
}
@Override
public int getVersion() {
FileType[] types = myFileTypeManager.getRegisteredFileTypes();
Arrays.sort(types, new Comparator<FileType>() {
@Override
public int compare(FileType o1, FileType o2) {
return Comparing.compare(o1.getName(), o2.getName());
}
});
int version = super.getVersion();
for(FileType fileType:types) {
if (!isIndexable(fileType)) continue;
FileTypeIdIndexer indexer = IdIndexers.INSTANCE.forFileType(fileType);
if (indexer == null) continue;
version = version * 31 + (indexer.getVersion() ^ indexer.getClass().getName().hashCode());
}
return version;
}
@NotNull
@Override
@@ -134,12 +134,12 @@ public class CreateLauncherScriptAction extends DumbAwareAction {
private static File createLauncherScriptFile() throws IOException, ExecutionException {
String runPath = PathManager.getHomePath();
final String productName = ApplicationNamesInfo.getInstance().getProductName().toLowerCase();
if (!SystemInfo.isMac) {
// for Macs just use "*.app"
final String productName = ApplicationNamesInfo.getInstance().getProductName().toLowerCase();
runPath += "/bin/" + productName + ".sh";
} else if (runPath.endsWith(CONTENTS)) {
runPath = runPath.substring(0, runPath.length() - CONTENTS.length());
runPath += "/MacOS/" + productName;
}
String launcherContents = ExecUtil.loadTemplate(CreateLauncherScriptAction.class.getClassLoader(), "launcher.py",
newHashMap(asList("$CONFIG_PATH$", "$RUN_PATH$"),
@@ -25,7 +25,6 @@
</constraints>
<properties>
<contentType value="text/html"/>
<text value="&lt;html&gt;&#10; &lt;head&gt;&#10;&#10; &lt;/head&gt;&#10; &lt;body&gt;&#10; &lt;p style=&quot;margin-top: 0&quot;&gt;&#10; &#10; &lt;/p&gt;&#10; &lt;/body&gt;&#10;&lt;/html&gt;&#10;"/>
</properties>
</component>
<vspacer id="bf1d9">
+13 -33
View File
@@ -18,30 +18,19 @@ for i, arg in enumerate(sys.argv[1:]):
print(('Usage:\n' + \
' {0} -h |-? | --help\n' + \
' {0} [-l|--line line] file[:line]\n' + \
' {0} diff <left> <right>\n' + \
' {0} merge <left> <right> [base] <result>').format(sys.argv[0]))
' {0} diff <left> <right>' + \
' {0} merge <local> <remote> [base] <merged>').format(sys.argv[0]))
exit(0)
elif arg == 'diff' and i == 0:
args.append(arg)
elif arg == 'merge' and i == 0:
args.append(arg)
elif arg == '-l' or arg == '--line':
args.append(arg)
skip_next = True
elif skip_next:
args.append(arg)
skip_next = False
else:
if ':' in arg:
file_path, line_number = arg.rsplit(':', 1)
if line_number.isdigit():
args.append('-l')
args.append(line_number)
args.append(os.path.abspath(file_path))
else:
args.append(os.path.abspath(arg))
elif ':' in arg:
file_path, line_number = arg.rsplit(':', 1)
if line_number.isdigit():
args.append('-l')
args.append(line_number)
args.append(file_path)
else:
args.append(os.path.abspath(arg))
args.append(arg)
else:
args.append(arg)
def launch_with_port(port):
found = False
@@ -57,7 +46,6 @@ def launch_with_port(port):
try:
path_len = struct.unpack(">h", s.recv(2))[0]
path = s.recv(path_len)
path = os.path.abspath(path)
if os.path.abspath(path) == os.path.abspath(CONFIG_PATH):
found = True
break
@@ -90,13 +78,5 @@ if port == -1:
else:
if launch_with_port(port): exit()
if sys.platform == "darwin":
# Mac OS: RUN_PATH is *.app path
if len(args):
args.insert(0, "--args")
os.execvp("open", ["-a", RUN_PATH] + args)
else:
# unix common
bin_dir, bin_file = os.path.split(RUN_PATH)
os.chdir(bin_dir)
os.execv(bin_file, [bin_file] + args)
bin_dir, bin_file = os.path.split(RUN_PATH)
os.execv(RUN_PATH, [bin_file] + args)
@@ -0,0 +1,51 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
public interface Doable {
/*
*
*
*
*
*
*
*
*
*
*
*/
public void count() {
}
/*
*
*
*
*
*
*
*
*
*
*
*/
public void test() {
}
}
@@ -0,0 +1,31 @@
class Test {
public void test() {
// boolean function-available(string)
addFunction(decls, new FunctionImpl("function-available", XPathType.BOOLEAN,
new Parameter(XPathType.STRING, Parameter.Kind.REQUIRED)));
// node-set current()
addFunction(decls, new FunctionImpl("current", XPathType.NODESET));
// EXSLT (http://www.exslt.org) extensions supported by Xalan & Saxon
addFunction(decls, EXSLT_DATE_TIME, new FunctionImpl("date", XPathType.STRING, optional_string));
addFunction(decls, EXSLT_DATE_TIME, new FunctionImpl("date-time", XPathType.STRING));
addFunction(decls, EXSLT_DATE_TIME, new FunctionImpl("day-abbreviation", XPathType.STRING, optional_string));
addFunction(decls, EXSLT_DATE_TIME, new FunctionImpl("day-in-month", XPathType.NUMBER, optional_string));
addFunction(decls, EXSLT_DATE_TIME, new FunctionImpl("day-in-week", XPathType.NUMBER, optional_string));
addFunction(decls, EXSLT_DATE_TIME, new FunctionImpl("day-in-year", XPathType.NUMBER, optional_string));
addFunction(decls, EXSLT_DATE_TIME, new FunctionImpl("day-name", XPathType.STRING, optional_string));
addFunction(decls, EXSLT_DATE_TIME, new FunctionImpl("day-of-week-in-month", XPathType.NUMBER, optional_string));
addFunction(decls, EXSLT_DATE_TIME, new FunctionImpl("hour-in-day", XPathType.NUMBER, optional_string));
addFunction(decls, EXSLT_DATE_TIME, new FunctionImpl("leap-year", XPathType.BOOLEAN, optional_string));
addFunction(decls, EXSLT_DATE_TIME, new FunctionImpl("minute-in-hour", XPathType.NUMBER, optional_string));
addFunction(decls, EXSLT_DATE_TIME, new FunctionImpl("month-abbreviation", XPathType.STRING, optional_string));
addFunction(decls, EXSLT_DATE_TIME, new FunctionImpl("month-in-year", XPathType.NUMBER, optional_string));
addFunction(decls, EXSLT_DATE_TIME, new FunctionImpl("month-name", XPathType.STRING, optional_string));
addFunction(decls, EXSLT_DATE_TIME, new FunctionImpl("second-in-minute", XPathType.NUMBER, optional_string));
addFunction(decls, EXSLT_DATE_TIME, new FunctionImpl("time", XPathType.STRING, optional_string));
addFunction(decls, EXSLT_DATE_TIME, new FunctionImpl("week-in-year", XPathType.NUMBER, optional_string));
addFunction(decls, EXSLT_DATE_TIME, new FunctionImpl("year", XPathType.NUMBER, optional_string));
}
}
@@ -0,0 +1,14 @@
public class A {
public void test() {
int a = 2;
int c = 2;
int r = 3;
int rq = 3;
int rw = 3;
int re = 3;
}
public void a() {
}
}
@@ -0,0 +1,135 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.psi.autodetect;
import com.intellij.openapi.editor.Document;
import com.intellij.psi.codeStyle.autodetect.*;
import com.intellij.testFramework.LightPlatformCodeInsightTestCase;
import com.intellij.testFramework.PlatformTestCase;
import com.intellij.testFramework.PlatformTestUtil;
import org.jetbrains.annotations.NotNull;
import org.junit.Assert;
import java.io.File;
import java.util.List;
public class IndentAutoDetectionTest extends LightPlatformCodeInsightTestCase {
private static final String BASE_PATH = "codeStyle/autodetect/";
static {
PlatformTestCase.initPlatformLangPrefix();
}
public void testSimpleIndent() {
doTestMaxUsedIndent(2, 6);
}
public void testManyComments() {
doTestMaxUsedIndent(2, 6);
}
public void testManyZeroRelativeIndent() {
doTestMaxUsedIndent(2);
}
public void testSpacesToNumbers() throws Exception {
String text = " i\n" +
" a\n" +
" t\n";
doTestLineToIndentMapping(text, 5, 4, 10);
}
public void testEmptyLines() throws Exception {
doTestLineToIndentMapping(" \n\n\n", -1, -1, -1);
}
public void testSpacesInSimpleClass() {
doTestLineToIndentMapping(
"public class A {\n" +
"\n" +
" public void test() {\n" +
" int a = 2;\n" +
" }\n" +
"\n" +
" public void a() {\n" +
" }\n" +
"}",
0, -1, 4, 6, 4, -1, 4, 4, 0
);
}
public void testComplexIndents() {
doTestLineToIndentMapping(
"class Test\n" +
"{\n" +
" int a;\n" +
" int b;\n" +
" \n" +
" public void test() {\n" +
" int c;\n" +
" }\n" +
" \n" +
" public void run() {\n" +
" Runnable runnable = new Runnable() {\n" +
" @Override\n" +
" public void run() {\n" +
" System.out.println(\"Hello!\");\n" +
" }\n" +
" };\n" +
" }\n" +
"}",
0, 0, 2, 2, -1, 2, 4, 2, -1, 2, 4, 6, 6, 8, 6, 4, 2, 0
);
}
public void doTestMaxUsedIndent(int indentExpected, int timesUsedExpected) {
IndentUsageInfo maxIndentExpected = new IndentUsageInfo(indentExpected, timesUsedExpected);
IndentUsageInfo indentInfo = getMaxUsedIndentInfo();
Assert.assertEquals("Indent size mismatch", maxIndentExpected.getIndentSize(), indentInfo.getIndentSize());
Assert.assertEquals("Indent size usage number mismatch", maxIndentExpected.getTimesUsed(), indentInfo.getTimesUsed());
}
public void doTestMaxUsedIndent(int indentExpected) {
IndentUsageInfo indentInfo = getMaxUsedIndentInfo();
Assert.assertEquals("Indent size mismatch", indentExpected, indentInfo.getIndentSize());
}
@NotNull
private IndentUsageInfo getMaxUsedIndentInfo() {
configureByFile(getTestName(true) + ".java");
Document document = getDocument(myFile);
List<LineIndentInfo> lines = new LineIndentInfoBuilder(document.getCharsSequence()).build();
IndentUsageStatistics statistics = new IndentUsageStatisticsImpl(lines);
return statistics.getKMostUsedIndentInfo(0);
}
private static void doTestLineToIndentMapping(@NotNull CharSequence text, int... spacesForLine) {
List<LineIndentInfo> list = new LineIndentInfoBuilder(text).build();
Assert.assertEquals(list.size(), spacesForLine.length);
for (int i = 0; i < spacesForLine.length; i++) {
int indentSize = list.get(i).getIndentSize();
Assert.assertEquals("Mismatch on line " + i, spacesForLine[i], indentSize);
}
}
@Override
@NotNull
public String getTestDataPath() {
return PlatformTestUtil.getCommunityPath().replace(File.separatorChar, '/')
+ "/platform/platform-tests/testData/"
+ BASE_PATH;
}
}
@@ -26,12 +26,12 @@ public class GithubUser {
@NotNull private final String myHtmlUrl;
@Nullable private final String myGravatarId;
@Nullable private final String myAvatarUrl;
public GithubUser(@NotNull String login, @NotNull String htmlUrl, @Nullable String gravatarId) {
public GithubUser(@NotNull String login, @NotNull String htmlUrl, @Nullable String avatarUrl) {
myLogin = login;
myHtmlUrl = htmlUrl;
myGravatarId = gravatarId;
myAvatarUrl = avatarUrl;
}
@NotNull
@@ -45,7 +45,7 @@ public class GithubUser {
}
@Nullable
public String getGravatarId() {
return myGravatarId;
public String getAvatarUrl() {
return myAvatarUrl;
}
}
@@ -55,13 +55,13 @@ public class GithubUserDetailed extends GithubUser {
public GithubUserDetailed(@NotNull String login,
@NotNull String htmlUrl,
@Nullable String gravatarId,
@Nullable String avatarUrl,
@Nullable String name,
@Nullable String email,
@Nullable Integer ownedPrivateRepos,
@Nullable String type,
@Nullable UserPlan plan) {
super(login, htmlUrl, gravatarId);
super(login, htmlUrl, avatarUrl);
myName = name;
myEmail = email;
myOwnedPrivateRepos = ownedPrivateRepos;
@@ -74,14 +74,14 @@ class GithubUserRaw implements DataConstructor {
@SuppressWarnings("ConstantConditions")
@NotNull
public GithubUser createUser() {
return new GithubUser(login, htmlUrl, gravatarId);
return new GithubUser(login, htmlUrl, avatarUrl);
}
@SuppressWarnings("ConstantConditions")
@NotNull
public GithubUserDetailed createUserDetailed() {
GithubUserDetailed.UserPlan plan = this.plan == null ? null : this.plan.create();
return new GithubUserDetailed(login, htmlUrl, gravatarId, name, email, ownedPrivateRepos, type, plan);
return new GithubUserDetailed(login, htmlUrl, avatarUrl, name, email, ownedPrivateRepos, type, plan);
}
@SuppressWarnings("unchecked")
@@ -26,16 +26,16 @@ import java.util.Date;
* @author Dennis.Ushakov
*/
public class GithubComment extends SimpleComment {
@Nullable private final String myGravatarId;
@Nullable private final String myAvatarUrl;
@NotNull private final String myUserHtmlUrl;
public GithubComment(@Nullable Date date,
@Nullable String author,
@NotNull String text,
@Nullable String gravatarId,
@Nullable String avatarUrl,
@NotNull String userHtmlUrl) {
super(date, author, text);
myGravatarId = gravatarId;
myAvatarUrl = avatarUrl;
myUserHtmlUrl = userHtmlUrl;
}
@@ -43,9 +43,9 @@ public class GithubComment extends SimpleComment {
builder.append("<hr>");
builder.append("<table>");
builder.append("<tr><td>");
if (myGravatarId != null) {
builder.append("<img src=\"").append("http://www.gravatar.com/avatar/").append(myGravatarId).append("?s=40\"/><br>");
}
if (myAvatarUrl != null) {
builder.append("<img src=\"").append(myAvatarUrl).append("\" height=\"40\" width=\"40\"/><br>");
}
builder.append("</td><td>");
if (getAuthor() != null) {
builder.append("<b>Author:</b> <a href=\"").append(myUserHtmlUrl).append("\">").append(getAuthor()).append("</a><br>");
@@ -240,7 +240,7 @@ public class GithubRepository extends BaseRepositoryImpl {
@Override
public Comment fun(GithubIssueComment comment) {
return new GithubComment(comment.getCreatedAt(), comment.getUser().getLogin(), comment.getBodyHtml(),
comment.getUser().getGravatarId(),
comment.getUser().getAvatarUrl(),
comment.getUser().getHtmlUrl());
}
});
@@ -15,7 +15,6 @@
*/
package com.intellij.lang.properties;
import com.intellij.lang.HtmlScriptContentProvider;
import com.intellij.lang.properties.psi.PropertiesFile;
import com.intellij.lang.properties.psi.PropertyKeyIndex;
import com.intellij.lang.properties.xml.XmlPropertiesFileImpl;
@@ -79,7 +78,13 @@ public class PropertiesImplUtil extends PropertiesUtil {
private static ResourceBundle getResourceBundle(@NotNull final String baseName, @NotNull final PsiDirectory baseDirectory) {
PropertiesFile defaultPropertiesFile = null;
final ResourceBundleManager bundleBaseNameManager = ResourceBundleManager.getInstance(baseDirectory.getProject());
for (final PsiFile psiFile : baseDirectory.getFiles()) {
final PsiFile[] psiFiles = ApplicationManager.getApplication().runReadAction(new Computable<PsiFile[]>() {
@Override
public PsiFile[] compute() {
return baseDirectory.getFiles();
}
});
for (final PsiFile psiFile : psiFiles) {
if (baseName.equals(bundleBaseNameManager.getBaseName(psiFile))) {
final PropertiesFile propertiesFile = getPropertiesFile(psiFile);
if (propertiesFile != null) {
@@ -147,4 +152,4 @@ public class PropertiesImplUtil extends PropertiesUtil {
}
return getResourceBundle(baseName, baseDirectory);
}
}
}