Merge branch 'traff/terminal-urls'
authorDmitry Trofimov <dmitry.trofimov@jetbrains.com>
Thu, 19 Jan 2017 15:59:36 +0000 (16:59 +0100)
committerDmitry Trofimov <dmitry.trofimov@jetbrains.com>
Thu, 19 Jan 2017 15:59:36 +0000 (16:59 +0100)
692 files changed:
.idea/libraries/TestNG.xml
.idea/libraries/jsr305_1_3_9.xml [deleted file]
RegExpSupport/gen/org/intellij/lang/regexp/_RegExLexer.java
RegExpSupport/src/org/intellij/lang/regexp/RegExpBraceMatcher.java
RegExpSupport/src/org/intellij/lang/regexp/RegExpHighlighter.java
RegExpSupport/src/org/intellij/lang/regexp/RegExpLanguageHost.java
RegExpSupport/src/org/intellij/lang/regexp/RegExpLanguageHosts.java
RegExpSupport/src/org/intellij/lang/regexp/RegExpTT.java
RegExpSupport/src/org/intellij/lang/regexp/psi/RegExpGroup.java
RegExpSupport/src/org/intellij/lang/regexp/psi/impl/RegExpGroupImpl.java
RegExpSupport/src/org/intellij/lang/regexp/psi/impl/RegExpNamedGroupRefImpl.java
RegExpSupport/src/org/intellij/lang/regexp/regexp-lexer.flex
RegExpSupport/src/org/intellij/lang/regexp/validation/RegExpAnnotator.java
RegExpSupport/test/org/intellij/lang/regexp/RegExpLexerTest.java
RegExpSupport/test/org/intellij/lang/regexp/RegExpParsingTest.java
RegExpSupport/testData/psi/Bug6.txt
RegExpSupport/testData/psi/Groups41.txt [new file with mode: 0644]
RegExpSupport/testData/psi/Groups42.txt [new file with mode: 0644]
bin/mac/fsnotifier
bin/mac/restarter
bin/win/restarter.exe
build/conf/nsis/idea.nsi
java/compiler/impl/src/com/intellij/compiler/CompilerConfigurationImpl.java
java/compiler/impl/src/com/intellij/compiler/backwardRefs/CompilerReferenceServiceImpl.java
java/compiler/impl/src/com/intellij/compiler/backwardRefs/DirtyScopeHolder.java
java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/Breakpoint.java
java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/StackCapturingLineBreakpoint.java
java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/JdkComboBox.java
java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ModulesConfigurator.java
java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/ModuleStructureConfigurable.java
java/java-analysis-api/java-analysis-api.iml
java/java-analysis-api/src/com/intellij/openapi/roots/LanguageLevelModuleExtensionImpl.java
java/java-analysis-api/src/com/intellij/openapi/roots/LanguageLevelState.kt [new file with mode: 0644]
java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/analysis/HighlightUtil.java
java/java-analysis-impl/src/com/intellij/codeInspection/visibility/AccessCanBeTightenedInspection.java
java/java-analysis-impl/src/com/intellij/codeInspection/visibility/EntryPointWithVisibilityLevel.java [moved from java/java-analysis-impl/src/com/intellij/codeInspection/visibility/EntryPointWithModifiableVisibilityLevel.java with 70% similarity]
java/java-analysis-impl/src/com/intellij/codeInspection/visibility/VisibilityInspection.java
java/java-impl/src/com/intellij/codeInsight/completion/JavaCompletionSorting.java
java/java-impl/src/com/intellij/codeInsight/completion/JavaCompletionStatistician.java
java/java-impl/src/com/intellij/codeInsight/daemon/impl/JavaLineMarkerProvider.java
java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/AddReturnFix.java
java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/ConvertCollectionToArrayFix.java
java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/CreateClassFromNewFix.java
java/java-impl/src/com/intellij/codeInsight/editorActions/wordSelection/MethodOrClassSelectioner.java
java/java-impl/src/com/intellij/codeInsight/intention/impl/InvertIfConditionAction.java
java/java-impl/src/com/intellij/codeInsight/intention/impl/UnwrapElseBranchAction.java [new file with mode: 0644]
java/java-impl/src/com/intellij/codeInsight/intention/impl/config/QuickFixFactoryImpl.java
java/java-impl/src/com/intellij/codeInspection/ReplaceInefficientStreamCountInspection.java [moved from java/java-analysis-impl/src/com/intellij/codeInspection/ReplaceInefficientStreamCountInspection.java with 99% similarity]
java/java-impl/src/com/intellij/codeInspection/SimplifyStreamApiCallChainsInspection.java [moved from java/java-analysis-impl/src/com/intellij/codeInspection/SimplifyStreamApiCallChainsInspection.java with 81% similarity]
java/java-impl/src/com/intellij/codeInspection/bulkOperation/UseBulkOperationInspection.java
java/java-impl/src/com/intellij/codeInspection/java18api/Java8ArraySetAllInspection.java [new file with mode: 0644]
java/java-impl/src/com/intellij/codeInspection/java18api/Java8MapApiInspection.java
java/java-impl/src/com/intellij/codeInspection/streamMigration/CollectMigration.java
java/java-impl/src/com/intellij/codeInspection/streamMigration/MigrateToStreamFix.java
java/java-impl/src/com/intellij/codeInspection/streamMigration/StreamApiMigrationInspection.java
java/java-impl/src/com/intellij/codeInspection/streamMigration/TerminalBlock.java
java/java-impl/src/com/intellij/codeInspection/streamMigration/ToArrayMigration.java
java/java-impl/src/com/intellij/codeInspection/streamToLoop/SourceOperation.java
java/java-impl/src/com/intellij/codeInspection/streamToLoop/StreamToLoopInspection.java
java/java-impl/src/com/intellij/ide/hierarchy/method/MethodHierarchyNodeDescriptor.java
java/java-impl/src/com/intellij/openapi/projectRoots/impl/JavaSdkImpl.java
java/java-impl/src/com/intellij/openapi/roots/impl/CompilerModuleExtensionImpl.java
java/java-impl/src/com/intellij/psi/formatter/java/JavaSpacePropertyProcessor.java
java/java-impl/src/com/intellij/psi/impl/JavaRegExpHost.java
java/java-impl/src/com/intellij/refactoring/extractSuperclass/JavaExtractSuperBaseDialog.java
java/java-impl/src/com/intellij/refactoring/inline/InlineFieldDialog.java
java/java-impl/src/com/intellij/refactoring/inline/InlineMethodDialog.java
java/java-impl/src/com/intellij/refactoring/rename/RenameJavaMemberProcessor.java
java/java-impl/src/com/intellij/refactoring/util/RefactoringUtil.java
java/java-tests/testData/codeInsight/completion/normalSorting/AbandonSameStatsForDifferentQualifiers.java [deleted file]
java/java-tests/testData/codeInsight/completion/normalSorting/ExpectedTypeIsMoreImportantThanCase.java [deleted file]
java/java-tests/testData/codeInsight/completion/normalSorting/MethodStatisticsPerQualifierType.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/completion/normalSorting/SameStatsForDifferentQualifiersJComponent.java [deleted file]
java/java-tests/testData/codeInsight/completion/normalSorting/SameStatsForDifferentQualifiersJLabel.java [deleted file]
java/java-tests/testData/codeInsight/completion/normalSorting/StatisticsByPrefix.java [deleted file]
java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addReturn/afterArray6.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addReturn/beforeArray6.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/convertCollectionToArray/afterCast.java
java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/convertCollectionToArray/beforeTypeVar.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/convertCollectionToArray/beforeTypeVarArray.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createClassFromNew/after6.java
java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createClassFromNew/after8.java
java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createClassFromNew/afterGenerics.java
java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterToArrayCounted.java
java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterToArrayCountedLengthGeneric.java
java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamToLoop/afterOuterRef.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamToLoop/beforeOuterRef.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/trivialFunctionalExpressionUsage/afterBlockLambdaComments.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/trivialFunctionalExpressionUsage/afterBlockLambdaExpressionStatement.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/trivialFunctionalExpressionUsage/afterBlockLambdaInLambda.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/trivialFunctionalExpressionUsage/afterBlockLambdaNoSurroundingBlock.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/trivialFunctionalExpressionUsage/afterExprLambda.java
java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/trivialFunctionalExpressionUsage/afterExprLambdaComments.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/trivialFunctionalExpressionUsage/afterExprLambdaCommentsUsedArg.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/trivialFunctionalExpressionUsage/beforeBlockLambdaComments.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/trivialFunctionalExpressionUsage/beforeBlockLambdaExpressionStatement.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/trivialFunctionalExpressionUsage/beforeBlockLambdaInLambda.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/trivialFunctionalExpressionUsage/beforeBlockLambdaNoSurroundingBlock.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/trivialFunctionalExpressionUsage/beforeBlockLambdaThrow.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/trivialFunctionalExpressionUsage/beforeBlockLambdaWhileStatement.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/trivialFunctionalExpressionUsage/beforeExprLambda.java
java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/trivialFunctionalExpressionUsage/beforeExprLambdaComments.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/trivialFunctionalExpressionUsage/beforeExprLambdaCommentsUsedArg.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/afterBlock1.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/afterBlock2.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/afterBlock3.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/afterChainedIf1.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/afterChainedIf2.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/afterChainedIf3.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/afterLabeled1.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/afterLastReachable1.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/afterLastReachable2.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/afterSimple1.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/afterSimple2.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/afterSimple3.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/afterSimple4.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/afterSwitch1.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/afterSwitch2.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/afterSwitch3.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/afterSynchronized1.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/afterTry1.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/beforeBlock1.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/beforeBlock2.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/beforeBlock3.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/beforeChainedIf1.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/beforeChainedIf2.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/beforeChainedIf3.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/beforeLabeled1.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/beforeLabeled2.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/beforeLastReachable1.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/beforeLastReachable2.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/beforeNotLastReachable1.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/beforeNotLastReachable2.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/beforeSimple1.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/beforeSimple2.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/beforeSimple3.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/beforeSwitch1.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/beforeSwitch2.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/beforeSwitch3.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/beforeSwitch4.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/beforeSynchronized1.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/beforeSynchronized2.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/beforeTry1.java [new file with mode: 0644]
java/java-tests/testData/codeInsight/unwrapElseBranch/beforeTry2.java [new file with mode: 0644]
java/java-tests/testData/compiler/compilerReferenceFindUsages/testMethodUsageInClassHierarchy2/Foo.java
java/java-tests/testData/inspection/java8ArraysSetAll/afterFieldComments.java [new file with mode: 0644]
java/java-tests/testData/inspection/java8ArraysSetAll/afterSimple.java [new file with mode: 0644]
java/java-tests/testData/inspection/java8ArraysSetAll/beforeFieldComments.java [new file with mode: 0644]
java/java-tests/testData/inspection/java8ArraysSetAll/beforeSimple.java [new file with mode: 0644]
java/java-tests/testData/inspection/java8ArraysSetAll/beforeUnsupportedType.java [new file with mode: 0644]
java/java-tests/testData/inspection/java8MapApi/afterComputeIfAbsentResultUnused.java [new file with mode: 0644]
java/java-tests/testData/inspection/java8MapApi/beforeComputeIfAbsentResultUnused.java [new file with mode: 0644]
java/java-tests/testData/inspection/streamApiCallChains/afterIterateArrayAsLongStream.java [new file with mode: 0644]
java/java-tests/testData/inspection/streamApiCallChains/afterIterateArrayMapToDouble.java [new file with mode: 0644]
java/java-tests/testData/inspection/streamApiCallChains/afterIterateList.java [new file with mode: 0644]
java/java-tests/testData/inspection/streamApiCallChains/afterIterateListMethodRef.java [new file with mode: 0644]
java/java-tests/testData/inspection/streamApiCallChains/afterIterateListTwiceComplexQualifier.java [new file with mode: 0644]
java/java-tests/testData/inspection/streamApiCallChains/afterIterateListUnbox.java [new file with mode: 0644]
java/java-tests/testData/inspection/streamApiCallChains/afterStreamToCollectionMyTypeAddAll.java [deleted file]
java/java-tests/testData/inspection/streamApiCallChains/afterStreamToCollectionMyTypeAddAllCtor.java [deleted file]
java/java-tests/testData/inspection/streamApiCallChains/afterStreamToCollectionMyTypeGeneric.java [deleted file]
java/java-tests/testData/inspection/streamApiCallChains/beforeIterateArrayAsLongStream.java [new file with mode: 0644]
java/java-tests/testData/inspection/streamApiCallChains/beforeIterateArrayMapToDouble.java [new file with mode: 0644]
java/java-tests/testData/inspection/streamApiCallChains/beforeIterateList.java [new file with mode: 0644]
java/java-tests/testData/inspection/streamApiCallChains/beforeIterateListMethodRef.java [new file with mode: 0644]
java/java-tests/testData/inspection/streamApiCallChains/beforeIterateListNoRef.java [new file with mode: 0644]
java/java-tests/testData/inspection/streamApiCallChains/beforeIterateListTwiceComplexQualifier.java [new file with mode: 0644]
java/java-tests/testData/inspection/streamApiCallChains/beforeIterateListUnbox.java [new file with mode: 0644]
java/java-tests/testData/inspection/streamApiCallChains/beforeIterateListWrongRef.java [new file with mode: 0644]
java/java-tests/testData/inspection/streamApiCallChains/beforeStreamToCollectionMyType.java [deleted file]
java/java-tests/testData/inspection/streamApiCallChains/beforeStreamToCollectionMyTypeAddAll.java
java/java-tests/testData/inspection/streamApiCallChains/beforeStreamToCollectionMyTypeAddAllCtor.java [deleted file]
java/java-tests/testData/inspection/streamApiCallChains/beforeStreamToCollectionMyTypeAddAllPrivate.java [deleted file]
java/java-tests/testData/inspection/streamApiCallChains/beforeStreamToCollectionMyTypeEmptyCtor.java [deleted file]
java/java-tests/testData/inspection/streamApiCallChains/beforeStreamToCollectionMyTypeGeneric.java [deleted file]
java/java-tests/testSrc/com/intellij/codeInsight/RegExpHighlightingTest.java
java/java-tests/testSrc/com/intellij/codeInsight/completion/NormalCompletionOrderingTest.groovy
java/java-tests/testSrc/com/intellij/codeInsight/completion/SmartTypeCompletionOrderingTest.groovy
java/java-tests/testSrc/com/intellij/codeInsight/daemon/quickFix/UseBulkOperationInspectionTest.java
java/java-tests/testSrc/com/intellij/codeInsight/folding/JavaFoldingTest.groovy
java/java-tests/testSrc/com/intellij/codeInsight/intention/UnwrapElseBranchTest.java [new file with mode: 0644]
java/java-tests/testSrc/com/intellij/codeInspection/java18api/Java8ArraySetAllInspectionTest.java [new file with mode: 0644]
java/java-tests/testSrc/com/intellij/psi/StubAstSwitchTest.groovy
java/java-tests/testSrc/com/intellij/psi/formatter/java/JavaFormatterSpaceTest.java
java/java-tests/testSrc/com/intellij/psi/formatter/java/JavaFormatterTest.java
java/java-tests/testSrc/com/intellij/roots/JdkComboBoxTest.java [new file with mode: 0644]
java/openapi/src/com/intellij/ide/util/projectWizard/JavaModuleBuilder.java
jps/jps-builders/src/org/jetbrains/jps/backwardRefs/BackwardReferenceIndexBuilder.java
jps/jps-builders/src/org/jetbrains/jps/backwardRefs/index/CompilerIndices.java
json/src/com/jetbrains/jsonSchema/JsonSchemaFileType.java
json/src/com/jetbrains/jsonSchema/extension/schema/JsonSchemaByPropertyIndexResolver.java [deleted file]
json/src/com/jetbrains/jsonSchema/extension/schema/JsonSchemaDefinitionsClimber.java [deleted file]
json/src/com/jetbrains/jsonSchema/extension/schema/JsonSchemaFileIndex.java [deleted file]
json/src/com/jetbrains/jsonSchema/extension/schema/JsonSchemaInsideSchemaResolver.java
json/src/com/jetbrains/jsonSchema/extension/schema/JsonSchemaRefReferenceProvider.java
json/src/com/jetbrains/jsonSchema/impl/JsonBySchemaDocumentationProvider.java
json/src/com/jetbrains/jsonSchema/impl/JsonBySchemaObjectAnnotator.java
json/src/com/jetbrains/jsonSchema/impl/JsonBySchemaObjectCompletionContributor.java
json/src/com/jetbrains/jsonSchema/impl/JsonSchemaExportedDefinitions.java
json/src/com/jetbrains/jsonSchema/impl/JsonSchemaObject.java
json/src/com/jetbrains/jsonSchema/impl/JsonSchemaObjectCodeInsightWrapper.java
json/src/com/jetbrains/jsonSchema/impl/JsonSchemaReader.java
json/src/com/jetbrains/jsonSchema/impl/JsonSchemaServiceEx.java
json/src/com/jetbrains/jsonSchema/impl/JsonSchemaServiceImpl.java
json/src/com/jetbrains/jsonSchema/impl/JsonSchemaWalker.java
json/src/com/jetbrains/jsonSchema/impl/ReadJsonSchemaFromPsi.java [new file with mode: 0644]
json/tests/test/com/jetbrains/jsonSchema/JsonSchemaCrossReferencesTest.java
json/tests/test/com/jetbrains/jsonSchema/JsonSchemaDocumentationTest.java
json/tests/test/com/jetbrains/jsonSchema/JsonSchemaHeavyAbstractTest.java
json/tests/test/com/jetbrains/jsonSchema/impl/JsonBySchemaCompletionTest.java
json/tests/test/com/jetbrains/jsonSchema/impl/JsonSchemaReadTest.java
json/tests/testData/jsonSchema/crossReferences/nestedAllOneAnyWithInheritance/baseSchema.json [new file with mode: 0644]
json/tests/testData/jsonSchema/crossReferences/nestedAllOneAnyWithInheritance/referentSchema.json [new file with mode: 0644]
json/tests/testData/jsonSchema/crossReferences/nestedAllOneAnyWithInheritance/testCompletion.json [new file with mode: 0644]
json/tests/testData/jsonSchema/crossReferences/nestedAllOneAnyWithInheritance/testHighlighting.json [new file with mode: 0644]
json/tests/testData/jsonSchema/crossReferences/nestedAllOneAnyWithInheritance/testNavigation.json [new file with mode: 0644]
json/tests/testData/jsonSchema/documentation/secondLevelSchema.json [moved from json/tests/testData/jsonSchema/documentation/secondLevel_schema.json with 100% similarity]
json/tests/testData/jsonSchema/documentation/simpleSchema.json [moved from json/tests/testData/jsonSchema/documentation/simple_schema.json with 100% similarity]
native/MacRestarter/make.sh [new file with mode: 0755]
native/MacRestarter/restarter.m [moved from native/restarter/restarter.m with 87% similarity]
native/WinRestarter/restarter.c
native/fsNotifier/mac/fsnotifier.c
native/fsNotifier/mac/make.sh
native/restarter/.gitignore [deleted file]
native/restarter/restarter.xcodeproj/project.pbxproj [deleted file]
platform/configuration-store-impl/testSrc/StoredPropertyStateTest.kt [new file with mode: 0644]
platform/core-impl/src/com/intellij/psi/impl/source/PsiFileImpl.java
platform/core-impl/src/com/intellij/psi/impl/source/resolve/ResolveCache.java
platform/core-impl/src/com/intellij/psi/impl/source/resolve/reference/ReferenceProvidersRegistryImpl.java
platform/core-impl/src/com/intellij/util/CachedValueLeakChecker.java [moved from platform/core-impl/src/com/intellij/util/CachedValueChecker.java with 99% similarity]
platform/core-impl/src/com/intellij/util/CachedValuesManagerImpl.java
platform/dvcs-impl/src/com/intellij/dvcs/ui/BranchActionGroupPopup.java
platform/dvcs-impl/src/com/intellij/dvcs/ui/BranchActionUtil.java
platform/editor-ui-api/src/com/intellij/ide/ui/UISettings.java
platform/editor-ui-ex/src/com/intellij/psi/impl/cache/impl/id/PlatformIdTableBuilding.java
platform/extensions/src/com/intellij/openapi/extensions/impl/ExtensionComponentAdapter.java
platform/extensions/src/com/intellij/util/pico/CachingConstructorInjectionComponentAdapter.java
platform/icons/src/fileTypes/jsonSchema.png [new file with mode: 0644]
platform/icons/src/fileTypes/jsonSchema@2x.png [new file with mode: 0644]
platform/icons/src/general/arrowDown_white.png [new file with mode: 0644]
platform/icons/src/general/arrowDown_white@2x.png [new file with mode: 0644]
platform/icons/src/general/siblingInheritedMethod.png [new file with mode: 0644]
platform/icons/src/general/siblingInheritedMethod@2x.png [new file with mode: 0644]
platform/icons/src/icon_small.png
platform/lang-api/src/com/intellij/execution/dashboard/DashboardNode.java
platform/lang-api/src/com/intellij/execution/dashboard/DashboardRunConfigurationNode.java [new file with mode: 0644]
platform/lang-api/src/com/intellij/execution/dashboard/DashboardTreeAction.java [new file with mode: 0644]
platform/lang-api/src/com/intellij/execution/dashboard/Group.java [new file with mode: 0644]
platform/lang-api/src/com/intellij/execution/dashboard/GroupingRule.java [new file with mode: 0644]
platform/lang-api/src/com/intellij/execution/dashboard/PanelContentUI.java
platform/lang-api/src/com/intellij/execution/dashboard/TreeContent.java [new file with mode: 0644]
platform/lang-impl/src/com/intellij/application/options/codeStyle/CodeStyleSchemesActions.java
platform/lang-impl/src/com/intellij/application/options/codeStyle/CodeStyleSchemesModel.java
platform/lang-impl/src/com/intellij/application/options/codeStyle/CodeStyleSchemesPanel.java
platform/lang-impl/src/com/intellij/application/options/colors/ColorAndFontOptions.java
platform/lang-impl/src/com/intellij/application/options/colors/ColorSchemeActions.java
platform/lang-impl/src/com/intellij/application/options/colors/SchemesPanel.java
platform/lang-impl/src/com/intellij/application/options/schemes/AbstractSchemeActions.java [moved from platform/lang-impl/src/com/intellij/application/options/schemes/DefaultSchemeActions.java with 72% similarity]
platform/lang-impl/src/com/intellij/application/options/schemes/AbstractSchemesPanel.java
platform/lang-impl/src/com/intellij/application/options/schemes/SchemeNameGenerator.java [new file with mode: 0644]
platform/lang-impl/src/com/intellij/application/options/schemes/SchemesCombo.java
platform/lang-impl/src/com/intellij/application/options/schemes/SchemesModel.java [new file with mode: 0644]
platform/lang-impl/src/com/intellij/codeInsight/completion/CompletionLookupArranger.java
platform/lang-impl/src/com/intellij/codeInsight/completion/StatisticsWeigher.java
platform/lang-impl/src/com/intellij/codeInsight/editorActions/SmartIndentingBackspaceHandler.java
platform/lang-impl/src/com/intellij/codeInsight/editorActions/UnSelectWordHandler.java
platform/lang-impl/src/com/intellij/codeInsight/hints/settings/ParameterNameHintsSettings.kt
platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionNodeInfo.java
platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionViewPsiTreeChangeAdapter.java
platform/lang-impl/src/com/intellij/execution/actions/StopAction.java
platform/lang-impl/src/com/intellij/execution/configuration/EnvironmentVariablesTextFieldWithBrowseButton.java
platform/lang-impl/src/com/intellij/execution/console/ConsoleConfigurable.java
platform/lang-impl/src/com/intellij/execution/dashboard/RuntimeDashboardContent.java
platform/lang-impl/src/com/intellij/execution/dashboard/RuntimeDashboardManagerImpl.java
platform/lang-impl/src/com/intellij/execution/dashboard/actions/CopyConfigurationAction.java [new file with mode: 0644]
platform/lang-impl/src/com/intellij/execution/dashboard/actions/DebugAction.java [new file with mode: 0644]
platform/lang-impl/src/com/intellij/execution/dashboard/actions/EditConfigurationAction.java [new file with mode: 0644]
platform/lang-impl/src/com/intellij/execution/dashboard/actions/ExecutorAction.java [new file with mode: 0644]
platform/lang-impl/src/com/intellij/execution/dashboard/actions/RemoveConfigurationAction.java [new file with mode: 0644]
platform/lang-impl/src/com/intellij/execution/dashboard/actions/RunAction.java [new file with mode: 0644]
platform/lang-impl/src/com/intellij/execution/dashboard/actions/RunConfigurationTreeAction.java [new file with mode: 0644]
platform/lang-impl/src/com/intellij/execution/dashboard/actions/RuntimeDashboardTreeAction.java [new file with mode: 0644]
platform/lang-impl/src/com/intellij/execution/dashboard/actions/RuntimeDashboardTreeLeafAction.java [new file with mode: 0644]
platform/lang-impl/src/com/intellij/execution/dashboard/actions/StopAction.java [new file with mode: 0644]
platform/lang-impl/src/com/intellij/execution/dashboard/tree/AbstractRunConfigurationNode.java
platform/lang-impl/src/com/intellij/execution/dashboard/tree/ConfigurationTypeGroupingRule.java [new file with mode: 0644]
platform/lang-impl/src/com/intellij/execution/dashboard/tree/FolderGroupingRule.java [new file with mode: 0644]
platform/lang-impl/src/com/intellij/execution/dashboard/tree/GroupImpl.java [new file with mode: 0644]
platform/lang-impl/src/com/intellij/execution/dashboard/tree/Grouper.java [new file with mode: 0644]
platform/lang-impl/src/com/intellij/execution/dashboard/tree/GroupingNode.java [new file with mode: 0644]
platform/lang-impl/src/com/intellij/execution/dashboard/tree/RunConfigurationNode.java
platform/lang-impl/src/com/intellij/execution/dashboard/tree/RunDescriptorNode.java
platform/lang-impl/src/com/intellij/execution/dashboard/tree/RuntimeDashboardTreeStructure.java
platform/lang-impl/src/com/intellij/execution/dashboard/tree/StatusGroupingRule.java [new file with mode: 0644]
platform/lang-impl/src/com/intellij/execution/impl/ConsoleViewImpl.java
platform/lang-impl/src/com/intellij/execution/impl/ExecutionManagerImpl.java
platform/lang-impl/src/com/intellij/ide/projectView/impl/AbstractUrl.java
platform/lang-impl/src/com/intellij/ide/projectView/impl/DirectoryUrl.java
platform/lang-impl/src/com/intellij/ide/projectView/impl/ModuleGroup.java
platform/lang-impl/src/com/intellij/ide/projectView/impl/ModuleGroupUrl.java
platform/lang-impl/src/com/intellij/ide/projectView/impl/ModuleUrl.java
platform/lang-impl/src/com/intellij/ide/projectView/impl/MoveModuleToGroup.java
platform/lang-impl/src/com/intellij/ide/projectView/impl/ProjectViewImpl.java
platform/lang-impl/src/com/intellij/ide/scratch/ScratchFileActions.java
platform/lang-impl/src/com/intellij/openapi/fileEditor/impl/text/PsiAwareTextEditorImpl.java
platform/lang-impl/src/com/intellij/openapi/roots/impl/ModuleRootManagerComponent.java
platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/CodeStyleSchemesImpl.java
platform/lang-impl/src/com/intellij/psi/stubs/StubIndexImpl.java
platform/lang-impl/src/com/intellij/psi/stubs/StubUpdatingIndex.java
platform/lang-impl/src/com/intellij/refactoring/extractSuperclass/ExtractSuperBaseDialog.java
platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndexImpl.java
platform/lang-impl/src/com/intellij/util/indexing/SharedMapBasedForwardIndex.java
platform/lang-impl/src/com/intellij/util/indexing/VfsAwareMapReduceIndex.java
platform/platform-api/src/com/intellij/openapi/actionSystem/ex/ComboBoxAction.java
platform/platform-api/src/com/intellij/openapi/editor/actionSystem/EditorAction.java
platform/platform-api/src/com/intellij/openapi/options/SettingsEditor.java
platform/platform-api/src/com/intellij/psi/statistics/StatisticsManager.java
platform/platform-api/src/com/intellij/ui/components/JBOptionButton.java
platform/platform-api/src/com/intellij/ui/tabs/impl/JBTabsImpl.java
platform/platform-api/src/com/intellij/ui/tabs/impl/singleRow/SingleRowLayout.java
platform/platform-api/src/com/intellij/ui/tabs/impl/singleRow/SingleRowLayoutStrategy.java
platform/platform-api/src/com/intellij/ui/tabs/impl/singleRow/SingleRowPassInfo.java
platform/platform-api/src/com/intellij/util/Alarm.java
platform/platform-api/src/com/intellij/util/io/HttpRequests.java
platform/platform-impl/src/com/intellij/ide/RemoteDesktopDetector.java
platform/platform-impl/src/com/intellij/ide/SystemHealthMonitor.java
platform/platform-impl/src/com/intellij/ide/impl/DataManagerImpl.java
platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorImpl.java
platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorMarkupModelImpl.java
platform/platform-impl/src/com/intellij/openapi/editor/impl/view/IterationState.java
platform/platform-impl/src/com/intellij/openapi/fileTypes/impl/FileTypeManagerImpl.java
platform/platform-impl/src/com/intellij/openapi/project/CacheUpdateRunner.java
platform/platform-impl/src/com/intellij/openapi/project/impl/ProjectManagerImpl.java
platform/platform-impl/src/com/intellij/openapi/vfs/impl/FilePointerPartNode.java
platform/platform-impl/src/com/intellij/openapi/vfs/impl/VirtualFilePointerImpl.java
platform/platform-impl/src/com/intellij/openapi/vfs/impl/VirtualFilePointerManagerImpl.java
platform/platform-impl/src/com/intellij/openapi/vfs/impl/local/NativeFileWatcherImpl.java
platform/platform-impl/src/com/intellij/openapi/wm/IdeaFrameTitleBuilder.java [moved from java/idea-ui/src/com/intellij/openapi/wm/IdeaFrameTitleBuilder.java with 100% similarity]
platform/platform-impl/src/com/intellij/psi/statistics/impl/StatisticsManagerImpl.java
platform/platform-impl/src/com/intellij/psi/statistics/impl/StatisticsUnit.java
platform/platform-impl/src/com/intellij/util/GCUtil.java [moved from platform/testFramework/src/com/intellij/util/GCUtil.java with 98% similarity]
platform/platform-resources-en/src/messages/CodeInsightBundle.properties
platform/platform-resources-en/src/messages/ExecutionBundle.properties
platform/platform-resources-en/src/messages/InspectionsBundle.properties
platform/platform-resources-en/src/messages/RefactoringBundle.properties
platform/platform-resources-en/src/messages/UIBundle.properties
platform/platform-resources/src/META-INF/JsonPlugin.xml
platform/platform-resources/src/META-INF/LangExtensions.xml
platform/platform-resources/src/idea/LangActions.xml
platform/platform-tests/testSrc/com/intellij/execution/impl/ConsoleViewImplTest.java
platform/platform-tests/testSrc/com/intellij/execution/process/AnsiEscapeDecoderTest.java
platform/platform-tests/testSrc/com/intellij/openapi/components/impl/PathMacroManagerTest.java
platform/platform-tests/testSrc/com/intellij/openapi/vfs/impl/VirtualFilePointerTest.java
platform/platform-tests/testSrc/com/intellij/statistics/StatisticsManagerTest.java
platform/platform-tests/testSrc/com/intellij/util/AlarmTest.java
platform/platform-tests/testSrc/com/intellij/util/containers/ConcurrentMapsTest.java
platform/projectModel-api/src/com/intellij/openapi/components/StoredProperty.kt [new file with mode: 0644]
platform/projectModel-api/src/com/intellij/openapi/roots/JavaModuleExternalPaths.java
platform/projectModel-api/src/com/intellij/openapi/roots/ModuleExtension.java
platform/projectModel-api/src/com/intellij/openapi/roots/libraries/LibraryUtil.java
platform/projectModel-impl/src/com/intellij/configurationStore/serializationUtil.kt [new file with mode: 0644]
platform/projectModel-impl/src/com/intellij/openapi/components/ComponentSerializationUtil.java [moved from platform/core-impl/src/com/intellij/openapi/components/ComponentSerializationUtil.java with 97% similarity]
platform/projectModel-impl/src/com/intellij/openapi/components/impl/ModulePathMacroManager.java
platform/projectModel-impl/src/com/intellij/openapi/components/impl/ProjectPathMacroManager.java
platform/projectModel-impl/src/com/intellij/openapi/roots/impl/JavaModuleExternalPathsImpl.java
platform/projectModel-impl/src/com/intellij/openapi/roots/impl/ModifiableModelCommitter.java
platform/projectModel-impl/src/com/intellij/openapi/roots/impl/ModuleRootManagerImpl.java
platform/projectModel-impl/src/com/intellij/openapi/roots/impl/RootModelImpl.java
platform/projectModel-impl/src/com/intellij/openapi/roots/impl/libraries/LibraryTableBase.java
platform/remote-servers/impl/src/com/intellij/remoteServer/impl/runtime/log/DeploymentLogManagerImpl.java
platform/remote-servers/impl/src/com/intellij/remoteServer/impl/runtime/log/LoggingHandlerImpl.java
platform/remote-servers/impl/src/com/intellij/remoteServer/impl/runtime/ui/ServersToolWindowContent.java
platform/remote-servers/impl/src/com/intellij/remoteServer/impl/runtime/ui/tree/actions/ServersTreeAction.java
platform/testFramework/src/com/intellij/testFramework/LightPlatformTestCase.java
platform/testFramework/src/com/intellij/testFramework/PlatformTestCase.java
platform/testFramework/src/com/intellij/testFramework/TestLoggerFactory.java
platform/usageView/src/com/intellij/usages/impl/UsageViewImpl.java
platform/util/resources/misc/registry.properties
platform/util/src/com/intellij/icons/AllIcons.java
platform/util/src/com/intellij/util/SmartList.java
platform/util/src/com/intellij/util/containers/ConcurrentSoftValueHashMap.java
platform/util/src/com/intellij/util/containers/ConcurrentWeakKeySoftValueHashMap.java
platform/util/src/com/intellij/util/containers/WeakKeySoftValueHashMap.java
platform/util/src/com/intellij/util/indexing/impl/AbstractForwardIndex.java
platform/util/src/com/intellij/util/indexing/impl/CollectionInputDataDiffBuilder.java [new file with mode: 0644]
platform/util/src/com/intellij/util/indexing/impl/CollectionInputKeyIterator.java [deleted file]
platform/util/src/com/intellij/util/indexing/impl/DiffUpdateData.java [deleted file]
platform/util/src/com/intellij/util/indexing/impl/EmptyInputDataDiffBuilder.java [new file with mode: 0644]
platform/util/src/com/intellij/util/indexing/impl/EmptyInputKeyIterator.java [deleted file]
platform/util/src/com/intellij/util/indexing/impl/ForwardIndex.java
platform/util/src/com/intellij/util/indexing/impl/InputDataDiffBuilder.java [new file with mode: 0644]
platform/util/src/com/intellij/util/indexing/impl/KeyValueUpdateProcessor.java [new file with mode: 0644]
platform/util/src/com/intellij/util/indexing/impl/MapBasedForwardIndex.java
platform/util/src/com/intellij/util/indexing/impl/MapInputDataDiffBuilder.java [new file with mode: 0644]
platform/util/src/com/intellij/util/indexing/impl/MapInputKeyIterator.java [deleted file]
platform/util/src/com/intellij/util/indexing/impl/MapReduceIndex.java
platform/util/src/com/intellij/util/indexing/impl/RemovedKeyProcessor.java [new file with mode: 0644]
platform/util/src/com/intellij/util/indexing/impl/SimpleUpdateData.java [deleted file]
platform/util/src/com/intellij/util/indexing/impl/UpdateData.java
platform/util/src/com/intellij/util/lang/UrlClassLoader.java
platform/util/src/com/intellij/util/xmlb/AbstractCollectionBinding.java
platform/util/src/com/intellij/util/xmlb/BeanBinding.java
platform/util/src/com/intellij/util/xmlb/MapBinding.java
platform/vcs-api/src/com/intellij/openapi/vcs/ChangeListColumn.java
platform/vcs-api/src/com/intellij/openapi/vcs/changes/ChangesUtil.java
platform/vcs-api/vcs-api.iml
platform/vcs-impl/src/com/intellij/openapi/vcs/changes/committed/AbstractCalledLater.java [deleted file]
platform/vcs-impl/src/com/intellij/openapi/vcs/changes/committed/ChangeListDetailsAction.java
platform/vcs-impl/src/com/intellij/openapi/vcs/changes/committed/CommittedChangesPanel.java
platform/vcs-impl/src/com/intellij/openapi/vcs/changes/committed/CommittedChangesTreeBrowser.java
platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelvedChangesViewManager.java
platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesBrowserLockedFoldersNode.java
platform/vcs-impl/src/com/intellij/openapi/vcs/history/FileHistoryPanelImpl.java
platform/vcs-impl/src/com/intellij/openapi/vcs/history/VcsDiffUtil.java
platform/vcs-log/api/src/com/intellij/vcs/log/VcsLogUserFilter.java
platform/vcs-log/impl/src/com/intellij/vcs/log/data/AbstractDataGetter.java
platform/vcs-log/impl/src/com/intellij/vcs/log/data/CommitDetailsGetter.java
platform/vcs-log/impl/src/com/intellij/vcs/log/data/EmptyIndex.java
platform/vcs-log/impl/src/com/intellij/vcs/log/data/MiniDetailsGetter.java
platform/vcs-log/impl/src/com/intellij/vcs/log/data/VcsLogData.java
platform/vcs-log/impl/src/com/intellij/vcs/log/data/VisiblePackBuilder.java
platform/vcs-log/impl/src/com/intellij/vcs/log/data/index/IndexedDetails.java [new file with mode: 0644]
platform/vcs-log/impl/src/com/intellij/vcs/log/data/index/VcsLogFullDetailsIndex.java
platform/vcs-log/impl/src/com/intellij/vcs/log/data/index/VcsLogIndex.java
platform/vcs-log/impl/src/com/intellij/vcs/log/data/index/VcsLogPersistentIndex.java
platform/vcs-log/impl/src/com/intellij/vcs/log/impl/VcsLogUserFilterImpl.java
platform/vcs-log/impl/src/com/intellij/vcs/log/statistics/VcsLogRepoSizeCollector.java
platform/vcs-log/impl/src/com/intellij/vcs/log/ui/VcsLogActionPlaces.java
platform/vcs-log/impl/src/com/intellij/vcs/log/ui/actions/RefreshLogAction.java
platform/vcs-log/impl/src/com/intellij/vcs/log/ui/frame/IndexSpeedSearch.java [new file with mode: 0644]
platform/vcs-log/impl/src/com/intellij/vcs/log/ui/frame/VcsLogGraphTable.java
platform/vcs-log/impl/src/com/intellij/vcs/log/ui/frame/VcsLogSpeedSearch.java [new file with mode: 0644]
platform/vcs-log/impl/src/com/intellij/vcs/log/ui/render/GraphCommitCellRenderer.java
plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/META-INF/InspectionGadgets.xml
plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/InspectionGadgetsBundle.properties
plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/fixes/AddThisQualifierFix.java
plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/initialization/NonThreadSafeLazyInitializationInspectionBase.java
plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/initialization/StaticVariableUninitializedUseInspection.java
plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/migration/ForCanBeForeachInspectionBase.java
plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/migration/WhileCanBeForeachInspectionBase.java
plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/psiutils/ComparisonUtils.java
plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/psiutils/CountingLoop.java [new file with mode: 0644]
plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/psiutils/ExpressionUtils.java
plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/psiutils/IndexedContainer.java [new file with mode: 0644]
plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/psiutils/MethodCallUtils.java
plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/psiutils/ParenthesesUtils.java
plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/psiutils/SingletonUtil.java
plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/psiutils/UninitializedReadCollector.java
plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/testFrameworks/SimplifiableAssertionInspection.java
plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/visibility/MethodOverridesPrivateMethodInspectionBase.java [deleted file]
plugins/InspectionGadgets/src/com/intellij/codeInspection/TrivialFunctionalExpressionUsageInspection.java
plugins/InspectionGadgets/src/com/siyeh/ig/migration/ForCanBeForeachInspection.java
plugins/InspectionGadgets/src/com/siyeh/ig/migration/WhileCanBeForeachInspection.java
plugins/InspectionGadgets/src/com/siyeh/ig/psiutils/StreamApiUtil.java [moved from plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/psiutils/StreamApiUtil.java with 56% similarity]
plugins/InspectionGadgets/src/com/siyeh/ig/visibility/MethodOverridesInaccessibleMethodMerger.java [new file with mode: 0644]
plugins/InspectionGadgets/src/com/siyeh/ig/visibility/MethodOverridesInaccessibleMethodOfSuperInspection.java [moved from plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/visibility/MethodOverridesPackageLocalMethodInspectionBase.java with 52% similarity]
plugins/InspectionGadgets/src/inspectionDescriptions/InstanceVariableUninitializedUse.html
plugins/InspectionGadgets/src/inspectionDescriptions/MethodOverridesInaccessibleMethodOfSuper.html [new file with mode: 0644]
plugins/InspectionGadgets/src/inspectionDescriptions/MethodOverridesPackageLocalMethod.html [deleted file]
plugins/InspectionGadgets/src/inspectionDescriptions/MethodOverridesPrivateMethod.html [deleted file]
plugins/InspectionGadgets/src/inspectionDescriptions/NonThreadSafeLazyInitialization.html
plugins/InspectionGadgets/src/inspectionDescriptions/StaticVariableUninitializedUse.html
plugins/InspectionGadgets/test/com/siyeh/igfixes/migration/for_can_be_foreach/ForOuterClass.after.java [moved from plugins/InspectionGadgets/src/com/siyeh/ig/visibility/MethodOverridesPrivateMethodInspection.java with 60% similarity]
plugins/InspectionGadgets/test/com/siyeh/igfixes/migration/for_can_be_foreach/ForOuterClass.java [moved from plugins/InspectionGadgets/src/com/siyeh/ig/visibility/MethodOverridesPackageLocalMethodInspection.java with 59% similarity]
plugins/InspectionGadgets/test/com/siyeh/igfixes/migration/for_can_be_foreach/ForOuterClassIterator.after.java [new file with mode: 0644]
plugins/InspectionGadgets/test/com/siyeh/igfixes/migration/for_can_be_foreach/ForOuterClassIterator.java [new file with mode: 0644]
plugins/InspectionGadgets/test/com/siyeh/igfixes/migration/for_can_be_foreach/ForThisClass.after.java [new file with mode: 0644]
plugins/InspectionGadgets/test/com/siyeh/igfixes/migration/for_can_be_foreach/ForThisClass.java [new file with mode: 0644]
plugins/InspectionGadgets/test/com/siyeh/igfixes/migration/for_can_be_foreach/NoQualifier.after.java [new file with mode: 0644]
plugins/InspectionGadgets/test/com/siyeh/igfixes/migration/for_can_be_foreach/NoQualifier.java [new file with mode: 0644]
plugins/InspectionGadgets/test/com/siyeh/igfixes/migration/for_can_be_foreach/QualifyWithThis1.after.java [new file with mode: 0644]
plugins/InspectionGadgets/test/com/siyeh/igfixes/migration/for_can_be_foreach/QualifyWithThis1.java [new file with mode: 0644]
plugins/InspectionGadgets/test/com/siyeh/igfixes/migration/for_can_be_foreach/QualifyWithThis2.after.java [new file with mode: 0644]
plugins/InspectionGadgets/test/com/siyeh/igfixes/migration/for_can_be_foreach/QualifyWithThis2.java [new file with mode: 0644]
plugins/InspectionGadgets/test/com/siyeh/igfixes/migration/for_can_be_foreach/QualifyWithThisInner.after.java [new file with mode: 0644]
plugins/InspectionGadgets/test/com/siyeh/igfixes/migration/for_can_be_foreach/QualifyWithThisInner.java [new file with mode: 0644]
plugins/InspectionGadgets/test/com/siyeh/igtest/classlayout/singleton/Singleton.java
plugins/InspectionGadgets/test/com/siyeh/igtest/classlayout/singleton/expected.xml [deleted file]
plugins/InspectionGadgets/test/com/siyeh/igtest/initialization/static_variable_uninitialized_use/StaticVariableUninitializedUse.java
plugins/InspectionGadgets/testsrc/com/intellij/codeInspection/visibility/AccessCanBeTightenedInspectionTest.java
plugins/InspectionGadgets/testsrc/com/siyeh/ig/classlayout/SingletonInspectionTest.java
plugins/InspectionGadgets/testsrc/com/siyeh/ig/fixes/migration/ForCanBeForeachFixTest.java
plugins/InspectionGadgets/testsrc/com/siyeh/ig/initialization/InstanceVariableUninitializedUseInspectionTest.java
plugins/InspectionGadgets/testsrc/com/siyeh/ig/initialization/StaticVariableUninitializedUseInspectionTest.java
plugins/InspectionGadgets/testsrc/com/siyeh/ig/visibility/MethodOverridesPrivateMethodInspectionTest.java
plugins/IntentionPowerPak/src/com/siyeh/ipp/annotation/AnnotateOverriddenMethodsPredicate.java
plugins/IntentionPowerPak/src/com/siyeh/ipp/asserttoif/ObjectsRequireNonNullIntention.java
plugins/IntentionPowerPak/src/com/siyeh/ipp/junit/CreateAssertIntention.java
plugins/eclipse/src/org/jetbrains/idea/eclipse/conversion/IdeaSpecificSettings.java
plugins/editorconfig/src/org/editorconfig/plugincomponents/ConfigProjectComponent.java
plugins/editorconfig/src/org/editorconfig/settings/EditorConfigConfigurable.java
plugins/editorconfig/src/org/editorconfig/settings/EditorConfigListener.java [new file with mode: 0644]
plugins/editorconfig/src/org/editorconfig/settings/EditorConfigSettings.java
plugins/git4idea/src/git4idea/branch/GitBranchType.java
plugins/git4idea/src/git4idea/log/GitLogProvider.java
plugins/git4idea/src/git4idea/ui/branch/GitBranchManager.java
plugins/git4idea/src/git4idea/ui/branch/GitBranchPopup.java
plugins/git4idea/src/git4idea/ui/branch/GitBranchPopupActions.java
plugins/github/src/org/jetbrains/plugins/github/GithubCreatePullRequestWorker.java
plugins/github/src/org/jetbrains/plugins/github/util/GithubUtil.java
plugins/github/test/org/jetbrains/plugins/github/GithubUtilTest.java [new file with mode: 0644]
plugins/gradle/gradle.iml
plugins/gradle/lib/jsr305-1.3.9.jar [deleted file]
plugins/gradle/src/org/jetbrains/plugins/gradle/service/resolve/GradleExtensionsContributor.kt
plugins/gradle/src/org/jetbrains/plugins/gradle/service/resolve/GradleNonCodeMembersContributor.kt
plugins/gradle/src/org/jetbrains/plugins/gradle/service/resolve/GradleResolverUtil.java
plugins/gradle/src/org/jetbrains/plugins/gradle/service/resolve/NamedDomainObjectCollectionTypeEnhancer.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/annotator/intentions/QuickfixUtil.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/codeInspection/changeToOperator/transformations/Transformations.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/codeInspection/untypedUnresolvedAccess/GrUnresolvedAccessChecker.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/configSlurper/ConfigSlurperMapContentProvider.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/configSlurper/GroovyMapValueTypeEnhancer.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/extensions/GroovyNamedArgumentProvider.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/extensions/impl/StringTypeCondition.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/geb/GebBrowserMemberContributor.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/geb/GebContentDeclarationSearcher.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/geb/GebUtil.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/gpp/GppReferenceContributor.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/lexer/GroovyTokenTypes.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/lexer/TokenSets.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/parser/GroovyElementTypes.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/parser/parsing/statements/expressions/arithmetic/ShiftExpression.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/controlFlow/ControlFlowBuilderUtil.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/impl/GrLiteralClassType.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/impl/GroovyFileImpl.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/impl/GroovyPsiManager.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/impl/statements/blocks/GrClosableBlockImpl.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/impl/statements/expressions/TypesUtil.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/impl/statements/expressions/binaryCalculators/GrBinaryExpressionTypeCalculators.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/impl/statements/expressions/path/GrClosureDelegateTypeCalculator.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/impl/statements/expressions/path/GrDGMTypeCalculator.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/impl/synthetic/GrLightClassReferenceElement.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/impl/types/GrCodeReferenceElementImpl.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/impl/utils/ParenthesesUtils.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/util/GdkMethodUtil.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/util/psiTreeUtil.kt [new file with mode: 0644]
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/resolve/GdkMethodDslProvider.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/spock/SpockPomDeclarationSearcher.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/spock/SpockUtils.java
plugins/groovy/src/META-INF/plugin.xml
plugins/groovy/src/org/jetbrains/plugins/groovy/formatter/models/spacing/SpacingTokens.java
plugins/groovy/src/org/jetbrains/plugins/groovy/formatter/processors/GroovyWrappingProcessor.java
plugins/groovy/src/org/jetbrains/plugins/groovy/lang/completion/CompleteCodeReferenceElement.java
plugins/groovy/src/org/jetbrains/plugins/groovy/lang/completion/MapKeysCompletionProvider.java
plugins/groovy/src/org/jetbrains/plugins/groovy/refactoring/changeSignature/GrChangeSignatureUsageProcessor.java
plugins/groovy/src/org/jetbrains/plugins/groovy/refactoring/convertToJava/GenerationUtil.java
plugins/groovy/src/org/jetbrains/plugins/groovy/regexp/GroovyRegExpHost.java
plugins/groovy/src/org/jetbrains/plugins/groovy/spock/SpockTestFramework.java
plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/changeSignature/ChangeSignatureTest.groovy
plugins/groovy/testdata/refactoring/changeSignature/MoveParametersMultiline.groovy [new file with mode: 0644]
plugins/groovy/testdata/refactoring/changeSignature/MoveParametersMultiline_after.groovy [new file with mode: 0644]
plugins/groovy/testdata/refactoring/changeSignature/RemoveParameterMultiline.groovy [new file with mode: 0644]
plugins/groovy/testdata/refactoring/changeSignature/RemoveParameterMultiline_after.groovy [new file with mode: 0644]
plugins/hg4idea/src/org/zmlx/hg4idea/log/HgLogProvider.java
plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/main/ClassWriter.java
plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/main/rels/ClassWrapper.java
plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/main/rels/NestedClassProcessor.java
plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/NewExprent.java
plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/VarExprent.java
plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/vars/VarProcessor.java
plugins/java-decompiler/engine/test/org/jetbrains/java/decompiler/SingleClassesTest.java
plugins/java-decompiler/engine/testData/classes/pkg/TestAnonymousClassConstructor$1.class [new file with mode: 0644]
plugins/java-decompiler/engine/testData/classes/pkg/TestAnonymousClassConstructor$10.class [new file with mode: 0644]
plugins/java-decompiler/engine/testData/classes/pkg/TestAnonymousClassConstructor$11.class [new file with mode: 0644]
plugins/java-decompiler/engine/testData/classes/pkg/TestAnonymousClassConstructor$12.class [new file with mode: 0644]
plugins/java-decompiler/engine/testData/classes/pkg/TestAnonymousClassConstructor$2.class [new file with mode: 0644]
plugins/java-decompiler/engine/testData/classes/pkg/TestAnonymousClassConstructor$3.class [new file with mode: 0644]
plugins/java-decompiler/engine/testData/classes/pkg/TestAnonymousClassConstructor$4.class [new file with mode: 0644]
plugins/java-decompiler/engine/testData/classes/pkg/TestAnonymousClassConstructor$5.class [new file with mode: 0644]
plugins/java-decompiler/engine/testData/classes/pkg/TestAnonymousClassConstructor$6.class [new file with mode: 0644]
plugins/java-decompiler/engine/testData/classes/pkg/TestAnonymousClassConstructor$7.class [new file with mode: 0644]
plugins/java-decompiler/engine/testData/classes/pkg/TestAnonymousClassConstructor$8.class [new file with mode: 0644]
plugins/java-decompiler/engine/testData/classes/pkg/TestAnonymousClassConstructor$9.class [new file with mode: 0644]
plugins/java-decompiler/engine/testData/classes/pkg/TestAnonymousClassConstructor$InnerPrivate.class [new file with mode: 0644]
plugins/java-decompiler/engine/testData/classes/pkg/TestAnonymousClassConstructor$InnerPrivateString.class [new file with mode: 0644]
plugins/java-decompiler/engine/testData/classes/pkg/TestAnonymousClassConstructor$InnerPublic.class [new file with mode: 0644]
plugins/java-decompiler/engine/testData/classes/pkg/TestAnonymousClassConstructor$InnerPublicString.class [new file with mode: 0644]
plugins/java-decompiler/engine/testData/classes/pkg/TestAnonymousClassConstructor$InnerStaticPrivate.class [new file with mode: 0644]
plugins/java-decompiler/engine/testData/classes/pkg/TestAnonymousClassConstructor$InnerStaticPrivateString.class [new file with mode: 0644]
plugins/java-decompiler/engine/testData/classes/pkg/TestAnonymousClassConstructor$InnerStaticPublic.class [new file with mode: 0644]
plugins/java-decompiler/engine/testData/classes/pkg/TestAnonymousClassConstructor$InnerStaticPublicString.class [new file with mode: 0644]
plugins/java-decompiler/engine/testData/classes/pkg/TestAnonymousClassConstructor.class [new file with mode: 0644]
plugins/java-decompiler/engine/testData/classes/pkg/TestAnonymousParamNames$1.class [new file with mode: 0644]
plugins/java-decompiler/engine/testData/classes/pkg/TestAnonymousParamNames$Clazz.class [new file with mode: 0644]
plugins/java-decompiler/engine/testData/classes/pkg/TestAnonymousParamNames.class [new file with mode: 0644]
plugins/java-decompiler/engine/testData/classes/pkg/TestAnonymousParams$1.class [new file with mode: 0644]
plugins/java-decompiler/engine/testData/classes/pkg/TestAnonymousParams.class [new file with mode: 0644]
plugins/java-decompiler/engine/testData/results/TestAnonymousClassConstructor.dec [new file with mode: 0644]
plugins/java-decompiler/engine/testData/results/TestAnonymousParamNames.dec [new file with mode: 0644]
plugins/java-decompiler/engine/testData/results/TestAnonymousParams.dec [new file with mode: 0644]
plugins/java-decompiler/engine/testData/src/pkg/TestAnonymousClassConstructor.java [new file with mode: 0644]
plugins/java-decompiler/engine/testData/src/pkg/TestAnonymousParamNames.java [new file with mode: 0644]
plugins/java-decompiler/engine/testData/src/pkg/TestAnonymousParams.java [new file with mode: 0644]
plugins/javaFX/src/org/jetbrains/plugins/javaFX/JavaFxProjectSdkSetupValidator.java
plugins/javaFX/src/org/jetbrains/plugins/javaFX/fxml/JavaFxPsiUtil.java
plugins/javaFX/src/org/jetbrains/plugins/javaFX/fxml/codeInsight/inspections/JavaFxColorRgbInspection.java
plugins/javaFX/src/org/jetbrains/plugins/javaFX/fxml/codeInsight/inspections/JavaFxDefaultTagInspection.java
plugins/javaFX/src/org/jetbrains/plugins/javaFX/fxml/descriptors/JavaFxClassTagDescriptorBase.java
plugins/javaFX/src/org/jetbrains/plugins/javaFX/fxml/descriptors/JavaFxPropertyAttributeDescriptor.java
plugins/javaFX/src/org/jetbrains/plugins/javaFX/fxml/descriptors/JavaFxPropertyTagDescriptor.java
plugins/javaFX/src/org/jetbrains/plugins/javaFX/fxml/refs/JavaFxComponentIdReferenceProvider.java
plugins/junit/src/com/intellij/execution/junit2/inspection/JUnitEntryPoint.java
plugins/junit/test/com/intellij/execution/junit/JUnitTreeByDescriptionHierarchyTest.java
plugins/junit5_rt/src/com/intellij/junit5/JUnit5TestExecutionListener.java
plugins/junit_rt/src/com/intellij/junit4/JUnit4TestListener.java
plugins/maven/maven3-server-common/src/org/jetbrains/idea/maven/server/embedder/FieldAccessor.java
plugins/maven/maven3-server-impl/src/org/jetbrains/idea/maven/server/Maven3ServerEmbedderImpl.java
plugins/maven/maven30-server-impl/src/org/jetbrains/idea/maven/server/Maven30ServerEmbedderImpl.java
plugins/maven/src/main/java/org/jetbrains/idea/maven/importing/MavenSourceFoldersModuleExtension.java
plugins/properties/src/com/intellij/lang/properties/editor/ResourceBundleEditorFileListener.java
plugins/svn4idea/src/org/jetbrains/idea/svn/auth/SvnAuthenticationManager.java
plugins/svn4idea/src/org/jetbrains/idea/svn/branchConfig/BranchConfigurationDialog.java
plugins/svn4idea/src/org/jetbrains/idea/svn/branchConfig/SvnBranchConfigurationManager.java
plugins/svn4idea/src/org/jetbrains/idea/svn/dialogs/AddRepositoryLocationDialog.java
plugins/svn4idea/src/org/jetbrains/idea/svn/dialogs/RepositoryBrowserComponent.java
plugins/svn4idea/src/org/jetbrains/idea/svn/dialogs/RepositoryBrowserDialog.java
python/educational-core/student/resources/META-INF/plugin.xml
python/educational-core/student/src/com/jetbrains/edu/learning/StudyUtils.java
python/educational-core/student/src/com/jetbrains/edu/learning/actions/StudyRefreshTaskFileAction.java
python/educational-core/student/src/com/jetbrains/edu/learning/core/EduAnswerPlaceholderPainter.java
python/educational-core/student/src/com/jetbrains/edu/learning/courseFormat/Task.java
python/educational-core/student/src/com/jetbrains/edu/learning/courseGeneration/StudyProjectGenerator.java
python/educational-core/student/src/com/jetbrains/edu/learning/stepic/EduStepicConnector.java
python/educational-core/student/src/com/jetbrains/edu/learning/stepic/StepicStudyOptions.java
python/educational-python/student-python/resources/META-INF/plugin.xml
python/educational-python/student-python/src/com/jetbrains/edu/learning/PyStudyLanguageLevelInspection.kt [moved from python/educational-python/student-python/src/com/jetbrains/edu/learning/StudyLanguageLevelInspection.kt with 83% similarity]
python/helpers/pycharm/_jb_utils.py
python/helpers/pycharm/django_manage.py
python/helpers/pydev/_pydevd_bundle/pydevd_signature.py
python/helpers/pydev/pydevd_plugins/jinja2_debug.py
python/pluginResources/META-INF/plugin.xml
python/python-community.iml
python/src/com/jetbrains/commandInterface/console/CommandConsole.java
python/src/com/jetbrains/commandInterface/console/CommandLineConsoleApi.java [deleted file]
python/src/com/jetbrains/commandInterface/console/CommandLineConsoleApi.kt [new file with mode: 0644]
python/src/com/jetbrains/commandInterface/console/package-info.java
python/src/com/jetbrains/extensions/ModuleExt.kt [new file with mode: 0644]
python/src/com/jetbrains/extensions/package-info.java [new file with mode: 0644]
python/src/com/jetbrains/extenstions/PsiElementExt.kt [new file with mode: 0644]
python/src/com/jetbrains/python/PyBundle.properties
python/src/com/jetbrains/python/codeInsight/controlflow/PyTypeAssertionEvaluator.java
python/src/com/jetbrains/python/formatter/PyBlock.java
python/src/com/jetbrains/python/formatter/PyCodeStyleSettings.java
python/src/com/jetbrains/python/formatter/PyImportsCodeStylePanel.java
python/src/com/jetbrains/python/formatter/PyLanguageCodeStyleSettingsProvider.java
python/src/com/jetbrains/python/formatter/PythonFormattingModelBuilder.java
python/src/com/jetbrains/python/newProject/PythonProjectGenerator.java
python/src/com/jetbrains/python/psi/PsiQuery.java
python/src/com/jetbrains/python/psi/impl/PyFunctionImpl.java
python/src/com/jetbrains/python/psi/impl/PyStringLiteralExpressionImpl.java
python/src/com/jetbrains/python/remote/NewFilesProcessor.java [new file with mode: 0644]
python/src/com/jetbrains/python/remote/PyProjectSynchronizer.kt
python/src/com/jetbrains/python/remote/PythonRemoteInterpreterManager.java
python/src/com/jetbrains/python/validation/Pep8ExternalAnnotator.java
python/testData/codeInsight/controlflow/break.txt
python/testData/codeInsight/controlflow/continue.txt
python/testData/codeInsight/controlflow/ifelsereturn.txt
python/testData/codeInsight/controlflow/return.txt
python/testData/codeInsight/controlflow/while.txt
python/testData/formatter/hangClosingBracketsInCollectionLiterals.py [new file with mode: 0644]
python/testData/formatter/hangClosingBracketsInCollectionLiterals_after.py [new file with mode: 0644]
python/testData/formatter/hangClosingOffComprehensionsAndGeneratorExpressions.py [new file with mode: 0644]
python/testData/formatter/hangClosingOffComprehensionsAndGeneratorExpressions_after.py [new file with mode: 0644]
python/testData/formatter/hangClosingOnComprehensionsAndGeneratorExpressions.py [new file with mode: 0644]
python/testData/formatter/hangClosingOnComprehensionsAndGeneratorExpressions_after.py [new file with mode: 0644]
python/testData/formatter/hangClosingParenthesisInFromImport.py [new file with mode: 0644]
python/testData/formatter/hangClosingParenthesisInFromImport_after.py [new file with mode: 0644]
python/testData/formatter/hangClosingParenthesisInFunctionCall.py [new file with mode: 0644]
python/testData/formatter/hangClosingParenthesisInFunctionCall_after.py [new file with mode: 0644]
python/testData/formatter/hangClosingParenthesisInFunctionDefinition.py [new file with mode: 0644]
python/testData/formatter/hangClosingParenthesisInFunctionDefinition_after.py [new file with mode: 0644]
python/testData/formatter/spaceBetweenParenthesesInEmptyArgumentList.py [new file with mode: 0644]
python/testData/formatter/spaceBetweenParenthesesInEmptyArgumentList_after.py [new file with mode: 0644]
python/testData/formatter/spaceBetweenParenthesesInEmptyParameterList.py [new file with mode: 0644]
python/testData/formatter/spaceBetweenParenthesesInEmptyParameterList_after.py [new file with mode: 0644]
python/testData/formatter/spaceWithinDeclarationParentheses.py
python/testData/formatter/spaceWithinDeclarationParentheses_after.py
python/testData/formatter/spaceWithingCallParentheses.py [new file with mode: 0644]
python/testData/formatter/spaceWithingCallParentheses_after.py [new file with mode: 0644]
python/testData/regexp/lookbehind.py [new file with mode: 0644]
python/testSrc/com/jetbrains/python/PyFormatterTest.java
python/testSrc/com/jetbrains/python/PyRegexpTest.java
python/testSrc/com/jetbrains/python/PyTypeTest.java
resources-en/src/inspectionDescriptions/Java8ArraySetAll.html [new file with mode: 0644]
resources-en/src/inspectionDescriptions/SimplifyStreamApiCallChains.html
resources-en/src/intentionDescriptions/UnwrapElseBranchAction/after.java.template [new file with mode: 0644]
resources-en/src/intentionDescriptions/UnwrapElseBranchAction/before.java.template [new file with mode: 0644]
resources-en/src/intentionDescriptions/UnwrapElseBranchAction/description.html [new file with mode: 0644]
resources/src/META-INF/IdeaPlugin.xml
xml/xml-analysis-impl/src/com/intellij/codeInsight/daemon/impl/analysis/XmlHighlightVisitor.java
xml/xml-psi-impl/src/com/intellij/lexer/BaseHtmlLexer.java
xml/xml-psi-impl/src/com/intellij/xml/XmlExtension.java

index db5a82957313f0d362b60606fd8a25c9e4a6e254..f3bb9a682688fe08736692793ea07d458d062109 100644 (file)
@@ -5,6 +5,8 @@
       <root url="jar://$PROJECT_DIR$/plugins/testng/lib/jcommander.jar!/" />
     </CLASSES>
     <JAVADOC />
-    <SOURCES />
+    <SOURCES>
+      <root url="jar://$PROJECT_DIR$/plugins/testng/lib/src/testng-sources.jar!/" />
+    </SOURCES>
   </library>
 </component>
\ No newline at end of file
diff --git a/.idea/libraries/jsr305_1_3_9.xml b/.idea/libraries/jsr305_1_3_9.xml
deleted file mode 100644 (file)
index af2783a..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<component name="libraryTable">
-  <library name="jsr305-1.3.9">
-    <CLASSES>
-      <root url="jar://$PROJECT_DIR$/plugins/gradle/lib/jsr305-1.3.9.jar!/" />
-    </CLASSES>
-    <JAVADOC />
-    <SOURCES>
-      <root url="jar://$PROJECT_DIR$/plugins/gradle/lib/jsr305-1.3.9.jar!/" />
-    </SOURCES>
-  </library>
-</component>
\ No newline at end of file
index bd99b5944414c8907512cd61e3e26d93333a8dd5..eb0e4c07606829d1bf7686df67bf8dc6f501da69 100644 (file)
@@ -200,13 +200,13 @@ class _RegExLexer implements FlexLexer {
     "\1\74\1\75\1\76\1\77\1\100\1\101\1\12\1\102"+
     "\1\103\1\104\1\105\1\106\1\107\1\110\1\111\1\112"+
     "\2\53\1\113\1\0\1\114\1\115\1\116\1\117\1\120"+
-    "\1\0\1\121\2\0\1\122\1\123\1\124\1\73\1\125"+
-    "\1\126\1\127\1\130\2\131\1\132\1\133\1\134\1\135"+
-    "\1\136\1\137\1\140\2\0\1\73\1\141\1\130\2\131"+
-    "\1\142\1\130\1\143\1\144";
+    "\1\121\1\0\1\122\2\0\1\123\1\124\1\125\1\73"+
+    "\1\126\1\127\1\130\1\131\2\132\1\133\1\134\1\135"+
+    "\1\136\1\137\1\140\1\141\2\0\1\73\1\142\1\131"+
+    "\2\132\1\143\1\131\1\144\1\145";
 
   private static int [] zzUnpackAction() {
-    int [] result = new int[148];
+    int [] result = new int[149];
     int offset = 0;
     offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
     return result;
@@ -245,14 +245,14 @@ class _RegExLexer implements FlexLexer {
     "\0\u046e\0\u046e\0\u0a95\0\u046e\0\u0ad4\0\u0b13\0\u0b52\0\u046e"+
     "\0\u046e\0\u0b91\0\u046e\0\u046e\0\u046e\0\u046e\0\u046e\0\u046e"+
     "\0\u046e\0\u046e\0\u046e\0\u046e\0\u0bd0\0\u046e\0\u0c0f\0\u0c4e"+
-    "\0\u046e\0\u046e\0\u046e\0\u046e\0\u0c8d\0\u046e\0\u0ccc\0\u0d0b"+
-    "\0\u046e\0\u046e\0\u046e\0\u0d4a\0\u046e\0\u0d89\0\u046e\0\u0dc8"+
-    "\0\u0e07\0\u0e46\0\u046e\0\u046e\0\u046e\0\u046e\0\u046e\0\u046e"+
-    "\0\u046e\0\u0e85\0\u0ec4\0\u046e\0\u046e\0\u0f03\0\u0f42\0\u046e"+
-    "\0\u046e\0\u0f81\0\u046e\0\u046e";
+    "\0\u046e\0\u046e\0\u046e\0\u046e\0\u046e\0\u0c8d\0\u046e\0\u0ccc"+
+    "\0\u0d0b\0\u046e\0\u046e\0\u046e\0\u0d4a\0\u046e\0\u0d89\0\u046e"+
+    "\0\u0dc8\0\u0e07\0\u0e46\0\u046e\0\u046e\0\u046e\0\u046e\0\u046e"+
+    "\0\u046e\0\u046e\0\u0e85\0\u0ec4\0\u046e\0\u046e\0\u0f03\0\u0f42"+
+    "\0\u046e\0\u046e\0\u0f81\0\u046e\0\u046e";
 
   private static int [] zzUnpackRowMap() {
-    int [] result = new int[148];
+    int [] result = new int[149];
     int offset = 0;
     offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
     return result;
@@ -326,26 +326,26 @@ class _RegExLexer implements FlexLexer {
     "\1\0\1\100\2\0\3\100\17\0\1\153\74\0\1\154"+
     "\17\0\2\155\1\0\1\155\4\0\3\155\5\0\3\155"+
     "\3\0\3\155\23\0\1\156\37\0\1\157\17\0\1\160"+
-    "\1\161\4\0\1\162\1\0\1\162\1\163\1\164\1\165"+
-    "\6\0\1\166\7\0\1\107\31\0\1\107\3\0\3\107"+
-    "\11\0\1\167\24\0\1\167\31\0\1\167\3\0\3\167"+
-    "\25\0\1\170\154\0\1\171\1\172\13\0\77\173\47\0"+
-    "\1\174\3\0\3\174\25\0\1\175\20\0\2\176\1\0"+
-    "\1\176\4\0\3\176\5\0\3\176\3\0\3\176\25\0"+
-    "\1\177\20\0\2\200\1\0\1\200\4\0\3\200\5\0"+
-    "\3\200\3\0\3\200\74\0\1\201\1\202\1\201\103\0"+
-    "\1\203\1\204\20\0\1\205\17\0\2\155\1\0\1\155"+
-    "\4\0\3\155\5\0\3\155\3\0\3\155\103\0\1\206"+
-    "\10\0\1\207\76\0\1\210\1\211\2\0\3\212\1\0"+
-    "\73\212\5\0\1\166\7\0\1\167\31\0\1\167\3\0"+
-    "\3\167\50\0\1\213\116\0\1\214\3\0\3\214\46\0"+
-    "\2\215\1\0\1\215\4\0\3\215\5\0\3\215\3\0"+
-    "\3\215\46\0\2\216\1\0\1\216\4\0\3\216\5\0"+
-    "\3\216\3\0\3\216\74\0\3\217\74\0\3\220\21\0"+
-    "\3\212\1\221\73\212\5\0\1\124\116\0\2\222\1\0"+
-    "\1\222\4\0\3\222\5\0\3\222\3\0\3\222\74\0"+
-    "\3\223\46\0\2\224\1\0\1\224\4\0\3\224\5\0"+
-    "\3\224\3\0\3\224\21\0";
+    "\1\161\4\0\1\162\1\0\1\163\1\164\1\165\1\166"+
+    "\6\0\1\167\7\0\1\107\31\0\1\107\3\0\3\107"+
+    "\11\0\1\170\24\0\1\170\31\0\1\170\3\0\3\170"+
+    "\25\0\1\171\154\0\1\172\1\173\13\0\77\174\47\0"+
+    "\1\175\3\0\3\175\25\0\1\176\20\0\2\177\1\0"+
+    "\1\177\4\0\3\177\5\0\3\177\3\0\3\177\25\0"+
+    "\1\200\20\0\2\201\1\0\1\201\4\0\3\201\5\0"+
+    "\3\201\3\0\3\201\74\0\1\202\1\203\1\202\103\0"+
+    "\1\204\1\205\20\0\1\206\17\0\2\155\1\0\1\155"+
+    "\4\0\3\155\5\0\3\155\3\0\3\155\103\0\1\207"+
+    "\10\0\1\210\76\0\1\211\1\212\2\0\3\213\1\0"+
+    "\73\213\5\0\1\167\7\0\1\170\31\0\1\170\3\0"+
+    "\3\170\50\0\1\214\116\0\1\215\3\0\3\215\46\0"+
+    "\2\216\1\0\1\216\4\0\3\216\5\0\3\216\3\0"+
+    "\3\216\46\0\2\217\1\0\1\217\4\0\3\217\5\0"+
+    "\3\217\3\0\3\217\74\0\3\220\74\0\3\221\21\0"+
+    "\3\213\1\222\73\213\5\0\1\124\116\0\2\223\1\0"+
+    "\1\223\4\0\3\223\5\0\3\223\3\0\3\223\74\0"+
+    "\3\224\46\0\2\225\1\0\1\225\4\0\3\225\5\0"+
+    "\3\225\3\0\3\225\21\0";
 
   private static int [] zzUnpackTrans() {
     int [] result = new int[4032];
@@ -392,12 +392,12 @@ class _RegExLexer implements FlexLexer {
     "\1\1\1\11\1\1\1\11\1\1\3\11\2\1\2\11"+
     "\1\1\3\11\3\1\2\0\11\11\2\1\2\11\1\1"+
     "\4\11\1\1\1\11\3\1\2\11\1\1\12\11\1\1"+
-    "\1\11\1\0\1\1\4\11\1\0\1\11\2\0\3\11"+
+    "\1\11\1\0\1\1\5\11\1\0\1\11\2\0\3\11"+
     "\1\1\1\11\1\1\1\11\3\1\7\11\2\0\2\11"+
     "\2\1\2\11\1\1\2\11";
 
   private static int [] zzUnpackAttribute() {
-    int [] result = new int[148];
+    int [] result = new int[149];
     int offset = 0;
     offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
     return result;
@@ -773,238 +773,238 @@ class _RegExLexer implements FlexLexer {
           case 1: 
             { yypopstate(); return RegExpTT.COMMENT;
             }
-          case 101: break;
+          case 102: break;
           case 2: 
             { return RegExpTT.CHARACTER;
             }
-          case 102: break;
+          case 103: break;
           case 3: 
             { return RegExpTT.DOT;
             }
-          case 103: break;
+          case 104: break;
           case 4: 
             { capturingGroupCount++; return RegExpTT.GROUP_BEGIN;
             }
-          case 104: break;
+          case 105: break;
           case 5: 
             { return RegExpTT.GROUP_END;
             }
-          case 105: break;
+          case 106: break;
           case 6: 
             { if (allowDanglingMetacharacters != Boolean.TRUE) { yypushstate(QUANTIFIER); return RegExpTT.LBRACE; } return RegExpTT.CHARACTER;
             }
-          case 106: break;
+          case 107: break;
           case 7: 
             { return (allowDanglingMetacharacters != Boolean.FALSE) ? RegExpTT.CHARACTER : RegExpTT.RBRACE;
             }
-          case 107: break;
+          case 108: break;
           case 8: 
             { yypushstate(CLASS1); return RegExpTT.CLASS_BEGIN;
             }
-          case 108: break;
+          case 109: break;
           case 9: 
             { return allowDanglingMetacharacters == Boolean.FALSE ? RegExpTT.CLASS_END : RegExpTT.CHARACTER;
             }
-          case 109: break;
+          case 110: break;
           case 10: 
             { return StringEscapesTokenTypes.INVALID_CHARACTER_ESCAPE_TOKEN;
             }
-          case 110: break;
+          case 111: break;
           case 11: 
             { return commentMode ? com.intellij.psi.TokenType.WHITE_SPACE : RegExpTT.CTRL_CHARACTER;
             }
-          case 111: break;
+          case 112: break;
           case 12: 
             { return RegExpTT.CARET;
             }
-          case 112: break;
+          case 113: break;
           case 13: 
             { return RegExpTT.DOLLAR;
             }
-          case 113: break;
+          case 114: break;
           case 14: 
             { return RegExpTT.QUEST;
             }
-          case 114: break;
+          case 115: break;
           case 15: 
             { return RegExpTT.STAR;
             }
-          case 115: break;
+          case 116: break;
           case 16: 
             { return RegExpTT.PLUS;
             }
-          case 116: break;
+          case 117: break;
           case 17: 
             { return RegExpTT.UNION;
             }
-          case 117: break;
+          case 118: break;
           case 18: 
             { if (commentMode) { yypushstate(COMMENT); return RegExpTT.COMMENT; } else return RegExpTT.CHARACTER;
             }
-          case 118: break;
+          case 119: break;
           case 19: 
             { yypopstate(); yypushback(1);
             }
-          case 119: break;
+          case 120: break;
           case 20: 
             { yypopstate(); return RegExpTT.RBRACE;
             }
-          case 120: break;
+          case 121: break;
           case 21: 
             { return RegExpTT.NAME;
             }
-          case 121: break;
+          case 122: break;
           case 22: 
             { return RegExpTT.NUMBER;
             }
-          case 122: break;
+          case 123: break;
           case 23: 
             { return RegExpTT.COMMA;
             }
-          case 123: break;
+          case 124: break;
           case 24: 
             { yybegin(CLASS1); return RegExpTT.CARET;
             }
-          case 124: break;
+          case 125: break;
           case 25: 
             { states.set(states.size() - 1, CLASS2); return RegExpTT.CHARACTER;
             }
-          case 125: break;
+          case 126: break;
           case 26: 
             { yypushback(1); yybegin(CLASS2);
             }
-          case 126: break;
+          case 127: break;
           case 27: 
             { yybegin(CLASS2); if (allowNestedCharacterClasses) { yypushstate(CLASS1); return RegExpTT.CLASS_BEGIN; } return RegExpTT.CHARACTER;
             }
-          case 127: break;
+          case 128: break;
           case 28: 
             { if (allowEmptyCharacterClass) { yypopstate(); return RegExpTT.CLASS_END; } yybegin(CLASS2); return RegExpTT.CHARACTER;
             }
-          case 128: break;
+          case 129: break;
           case 29: 
             { if (commentMode) return com.intellij.psi.TokenType.WHITE_SPACE; yypushback(1); yybegin(CLASS2);
             }
-          case 129: break;
+          case 130: break;
           case 30: 
             { if (allowNestedCharacterClasses) { yypushstate(CLASS1); return RegExpTT.CLASS_BEGIN; } return RegExpTT.CHARACTER;
             }
-          case 130: break;
+          case 131: break;
           case 31: 
             { yypopstate(); return RegExpTT.CLASS_END;
             }
-          case 131: break;
+          case 132: break;
           case 32: 
             { return RegExpTT.MINUS;
             }
-          case 132: break;
+          case 133: break;
           case 33: 
             { yypopstate(); yypushstate(EMBRACED); return RegExpTT.LBRACE;
             }
-          case 133: break;
+          case 134: break;
           case 34: 
             { yypopstate(); return RegExpTT.CATEGORY_SHORT_HAND;
             }
-          case 134: break;
+          case 135: break;
           case 35: 
             { yybegin(YYINITIAL); return RegExpTT.BAD_CHARACTER;
             }
-          case 135: break;
+          case 136: break;
           case 36: 
             { yybegin(YYINITIAL); return RegExpTT.GROUP_END;
             }
-          case 136: break;
+          case 137: break;
           case 37: 
             { handleOptions(); return RegExpTT.OPTIONS_ON;
             }
-          case 137: break;
+          case 138: break;
           case 38: 
             { handleOptions(); return RegExpTT.OPTIONS_OFF;
             }
-          case 138: break;
+          case 139: break;
           case 39: 
             { yybegin(YYINITIAL); return RegExpTT.COLON;
             }
-          case 139: break;
+          case 140: break;
           case 40: 
             { yybegin(YYINITIAL); return RegExpTT.GT;
             }
-          case 140: break;
+          case 141: break;
           case 41: 
             { yybegin(YYINITIAL); return RegExpTT.QUOTE;
             }
-          case 141: break;
+          case 142: break;
           case 42: 
             { return RegExpTT.BAD_CHARACTER;
             }
-          case 142: break;
+          case 143: break;
           case 43: 
             { yypopstate(); return (yycharat(-1) == 'u') ? StringEscapesTokenTypes.INVALID_UNICODE_ESCAPE_TOKEN : RegExpTT.BAD_HEX_VALUE;
             }
-          case 143: break;
+          case 144: break;
           case 44: 
             { yybegin(OPTIONS); return RegExpTT.SET_OPTIONS;
             }
-          case 144: break;
+          case 145: break;
           case 45: 
             // lookahead expression with fixed base length
             zzMarkedPos = Character.offsetByCodePoints
                 (zzBufferL/*, zzStartRead, zzEndRead - zzStartRead*/, zzStartRead, 1);
             { yypushstate(NEGATED_CLASS); return RegExpTT.CLASS_BEGIN;
             }
-          case 145: break;
+          case 146: break;
           case 46: 
             { return RegExpTT.REDUNDANT_ESCAPE;
             }
-          case 146: break;
+          case 147: break;
           case 47: 
             { return (yystate() == CLASS2) ? RegExpTT.REDUNDANT_ESCAPE : RegExpTT.ESC_CHARACTER;
             }
-          case 147: break;
+          case 148: break;
           case 48: 
             { return (allowDanglingMetacharacters != Boolean.TRUE && yystate() != CLASS2) ? RegExpTT.ESC_CHARACTER : RegExpTT.REDUNDANT_ESCAPE;
             }
-          case 148: break;
+          case 149: break;
           case 49: 
             { return (allowDanglingMetacharacters == Boolean.FALSE && yystate() != CLASS2) ? RegExpTT.ESC_CHARACTER : RegExpTT.REDUNDANT_ESCAPE;
             }
-          case 149: break;
+          case 150: break;
           case 50: 
             { return RegExpTT.ESC_CHARACTER;
             }
-          case 150: break;
+          case 151: break;
           case 51: 
             { return (yystate() == CLASS2) ? RegExpTT.ESC_CHARACTER : RegExpTT.REDUNDANT_ESCAPE;
             }
-          case 151: break;
+          case 152: break;
           case 52: 
             { return commentMode ? RegExpTT.ESC_CTRL_CHARACTER : RegExpTT.REDUNDANT_ESCAPE;
             }
-          case 152: break;
+          case 153: break;
           case 53: 
             { return RegExpTT.ESC_CTRL_CHARACTER;
             }
-          case 153: break;
+          case 154: break;
           case 54: 
             { return RegExpTT.BOUNDARY;
             }
-          case 154: break;
+          case 155: break;
           case 55: 
             { return RegExpTT.CHAR_CLASS;
             }
-          case 155: break;
+          case 156: break;
           case 56: 
             { if (xmlSchemaMode) return RegExpTT.CHAR_CLASS; else return StringEscapesTokenTypes.INVALID_CHARACTER_ESCAPE_TOKEN;
             }
-          case 156: break;
+          case 157: break;
           case 57: 
             { yypushstate(PROP); return RegExpTT.PROPERTY;
             }
-          case 157: break;
+          case 158: break;
           case 58: 
             { return allowTransformationEscapes ? RegExpTT.CHAR_CLASS : StringEscapesTokenTypes.INVALID_CHARACTER_ESCAPE_TOKEN;
             }
-          case 158: break;
+          case 159: break;
           case 59: 
             { String text = yytext().toString().substring(1);
                                 if (allowOctalNoLeadingZero) {
@@ -1047,64 +1047,64 @@ class _RegExLexer implements FlexLexer {
                                   return RegExpTT.BACKREF;
                                 }
             }
-          case 159: break;
+          case 160: break;
           case 60: 
             { yypushstate(QUOTED); return RegExpTT.QUOTE_BEGIN;
             }
-          case 160: break;
+          case 161: break;
           case 61: 
             { return RegExpTT.BAD_HEX_VALUE;
             }
-          case 161: break;
+          case 162: break;
           case 62: 
             { return allowTransformationEscapes ? RegExpTT.CHAR_CLASS : StringEscapesTokenTypes.INVALID_UNICODE_ESCAPE_TOKEN;
             }
-          case 162: break;
+          case 163: break;
           case 63: 
             { return (allowOctalNoLeadingZero ? RegExpTT.OCT_CHAR : RegExpTT.BAD_OCT_VALUE);
             }
-          case 163: break;
+          case 164: break;
           case 64: 
             { return (allowHexDigitClass || allowHorizontalWhitespaceClass ? RegExpTT.CHAR_CLASS : StringEscapesTokenTypes.INVALID_CHARACTER_ESCAPE_TOKEN);
             }
-          case 164: break;
+          case 165: break;
           case 65: 
             { yypushstate(NAMED); return RegExpTT.NAMED_CHARACTER;
             }
-          case 165: break;
+          case 166: break;
           case 66: 
             { yypopstate(); return RegExpTT.QUOTE_END;
             }
-          case 166: break;
+          case 167: break;
           case 67: 
             // lookahead expression with fixed base length
             zzMarkedPos = Character.offsetByCodePoints
                 (zzBufferL/*, zzStartRead, zzEndRead - zzStartRead*/, zzStartRead, 1);
             { yybegin(CLASS2); if (allowNestedCharacterClasses) { yypushstate(NEGATED_CLASS); return RegExpTT.CLASS_BEGIN; } return RegExpTT.CHARACTER;
             }
-          case 167: break;
+          case 168: break;
           case 68: 
             // lookahead expression with fixed base length
             zzMarkedPos = Character.offsetByCodePoints
                 (zzBufferL/*, zzStartRead, zzEndRead - zzStartRead*/, zzStartRead, 1);
             { yybegin(CLASS2); if (allowPosixBracketExpressions) { yypushback(1); } else if (allowNestedCharacterClasses) { yypushstate(CLASS1); return RegExpTT.CLASS_BEGIN; } else { return RegExpTT.CHARACTER; }
             }
-          case 168: break;
+          case 169: break;
           case 69: 
             { yybegin(CLASS2); return allowEmptyCharacterClass ? RegExpTT.ESC_CHARACTER : RegExpTT.REDUNDANT_ESCAPE;
             }
-          case 169: break;
+          case 170: break;
           case 70: 
             { yypushstate(QUOTED_CLASS1); return RegExpTT.QUOTE_BEGIN;
             }
-          case 170: break;
+          case 171: break;
           case 71: 
             // lookahead expression with fixed base length
             zzMarkedPos = Character.offsetByCodePoints
                 (zzBufferL/*, zzStartRead, zzEndRead - zzStartRead*/, zzStartRead, 1);
             { if (allowNestedCharacterClasses) { yypushstate(NEGATED_CLASS); return RegExpTT.CLASS_BEGIN; } return RegExpTT.CHARACTER;
             }
-          case 171: break;
+          case 172: break;
           case 72: 
             { if (allowPosixBracketExpressions) {
                             yybegin(BRACKET_EXPRESSION);
@@ -1114,128 +1114,132 @@ class _RegExLexer implements FlexLexer {
                             return allowNestedCharacterClasses ? RegExpTT.CLASS_BEGIN : RegExpTT.CHARACTER;
                           }
             }
-          case 172: break;
+          case 173: break;
           case 73: 
             { if (allowNestedCharacterClasses) return RegExpTT.ANDAND; else yypushback(1); return RegExpTT.CHARACTER;
             }
-          case 173: break;
+          case 174: break;
           case 74: 
             { yybegin(CLASS2); return RegExpTT.BRACKET_EXPRESSION_END;
             }
-          case 174: break;
+          case 175: break;
           case 75: 
             { yybegin(PY_COND_REF); return RegExpTT.PYTHON_COND_REF;
             }
-          case 175: break;
+          case 176: break;
           case 76: 
             { yybegin(NAMED_GROUP); capturingGroupCount++; return RegExpTT.RUBY_NAMED_GROUP;
             }
-          case 176: break;
+          case 177: break;
           case 77: 
             { yybegin(QUOTED_NAMED_GROUP); capturingGroupCount++; return RegExpTT.RUBY_QUOTED_NAMED_GROUP;
             }
-          case 177: break;
+          case 178: break;
           case 78: 
             { return RegExpTT.NON_CAPT_GROUP;
             }
-          case 178: break;
+          case 179: break;
           case 79: 
-            { return RegExpTT.POS_LOOKAHEAD;
+            { return RegExpTT.ATOMIC_GROUP;
             }
-          case 179: break;
+          case 180: break;
           case 80: 
-            { return RegExpTT.NEG_LOOKAHEAD;
+            { return RegExpTT.POS_LOOKAHEAD;
             }
-          case 180: break;
+          case 181: break;
           case 81: 
+            { return RegExpTT.NEG_LOOKAHEAD;
+            }
+          case 182: break;
+          case 82: 
             // lookahead expression with fixed base length
             zzMarkedPos = Character.offsetByCodePoints
                 (zzBufferL/*, zzStartRead, zzEndRead - zzStartRead*/, zzStartRead, 1);
             { yypushstate(QUANTIFIER); return RegExpTT.LBRACE;
             }
-          case 181: break;
-          case 82
+          case 183: break;
+          case 83
             { yybegin(NAMED_GROUP); return RegExpTT.RUBY_NAMED_GROUP_CALL;
             }
-          case 182: break;
-          case 83
+          case 184: break;
+          case 84
             { yybegin(QUOTED_NAMED_GROUP); return RegExpTT.RUBY_QUOTED_NAMED_GROUP_CALL;
             }
-          case 183: break;
-          case 84
+          case 185: break;
+          case 85
             { if (xmlSchemaMode) { yypushback(1); return RegExpTT.CHAR_CLASS; } else return RegExpTT.CTRL;
             }
-          case 184: break;
-          case 85
+          case 186: break;
+          case 86
             // lookahead expression with fixed base length
             zzMarkedPos = Character.offsetByCodePoints
                 (zzBufferL/*, zzStartRead, zzEndRead - zzStartRead*/, zzStartRead, 2);
             { if (allowExtendedUnicodeCharacter) yypushstate(EMBRACED_HEX); else return RegExpTT.BAD_HEX_VALUE;
             }
-          case 185: break;
-          case 86
+          case 187: break;
+          case 87
             { if (allowOneHexCharEscape) { return RegExpTT.HEX_CHAR; } else { yypushback(1); return RegExpTT.BAD_HEX_VALUE; }
             }
-          case 186: break;
-          case 87
+          case 188: break;
+          case 88
             // lookahead expression with fixed base length
             zzMarkedPos = Character.offsetByCodePoints
                 (zzBufferL/*, zzStartRead, zzEndRead - zzStartRead*/, zzStartRead, 2);
             { if (allowExtendedUnicodeCharacter) yypushstate(EMBRACED_HEX); else return StringEscapesTokenTypes.INVALID_UNICODE_ESCAPE_TOKEN;
             }
-          case 187: break;
-          case 88
+          case 189: break;
+          case 89
             { yypushback(yylength() - 2); return StringEscapesTokenTypes.INVALID_UNICODE_ESCAPE_TOKEN;
             }
-          case 188: break;
-          case 89
+          case 190: break;
+          case 90
             { return RegExpTT.OCT_CHAR;
             }
-          case 189: break;
-          case 90
+          case 191: break;
+          case 91
             { yybegin(NAMED_GROUP); return RegExpTT.RUBY_NAMED_GROUP_REF;
             }
-          case 190: break;
-          case 91
+          case 192: break;
+          case 92
             { yybegin(QUOTED_NAMED_GROUP); return RegExpTT.RUBY_QUOTED_NAMED_GROUP_REF;
             }
-          case 191: break;
-          case 92
+          case 193: break;
+          case 93
             { yypopstate(); return (yycharat(-1) == 'u') ? RegExpTT.UNICODE_CHAR : RegExpTT.HEX_CHAR;
             }
-          case 192: break;
-          case 93
+          case 194: break;
+          case 94
             { yybegin(NAMED_GROUP); capturingGroupCount++; return RegExpTT.PYTHON_NAMED_GROUP;
             }
-          case 193: break;
-          case 94
+          case 195: break;
+          case 95
             { yybegin(PY_NAMED_GROUP_REF); return RegExpTT.PYTHON_NAMED_GROUP_REF;
             }
-          case 194: break;
-          case 95
+          case 196: break;
+          case 96
             { return RegExpTT.POS_LOOKBEHIND;
             }
-          case 195: break;
-          case 96
+          case 197: break;
+          case 97
             { return RegExpTT.NEG_LOOKBEHIND;
             }
-          case 196: break;
-          case 97
+          case 198: break;
+          case 98
             { return RegExpTT.HEX_CHAR;
             }
-          case 197: break;
-          case 98
+          case 199: break;
+          case 99
             { return RegExpTT.COMMENT;
             }
-          case 198: break;
-          case 99
+          case 200: break;
+          case 100
             { if (allowOctalNoLeadingZero) yypushback(1); return RegExpTT.OCT_CHAR;
             }
-          case 199: break;
-          case 100
+          case 201: break;
+          case 101
             { return RegExpTT.UNICODE_CHAR;
             }
-          case 200: break;
+          case 202: break;
           default:
             zzScanError(ZZ_NO_MATCH);
           }
index 976b65126933606b8a656cfeb0ce41aeac8873ab..72a92d6b499452b095c52d5cb4daa4eb356923bf 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2016 JetBrains s.r.o.
+ * Copyright 2000-2017 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.
@@ -28,6 +28,7 @@ public class RegExpBraceMatcher implements PairedBraceMatcher {
     return new BracePair[]{
       new BracePair(RegExpTT.GROUP_BEGIN, RegExpTT.GROUP_END, true),
       new BracePair(RegExpTT.SET_OPTIONS, RegExpTT.GROUP_END, true), new BracePair(RegExpTT.NON_CAPT_GROUP, RegExpTT.GROUP_END, true),
+      new BracePair(RegExpTT.ATOMIC_GROUP, RegExpTT.GROUP_END, true),
       new BracePair(RegExpTT.POS_LOOKAHEAD, RegExpTT.GROUP_END, true), new BracePair(RegExpTT.NEG_LOOKAHEAD, RegExpTT.GROUP_END, true),
       new BracePair(RegExpTT.POS_LOOKBEHIND, RegExpTT.GROUP_END, true), new BracePair(RegExpTT.NEG_LOOKBEHIND, RegExpTT.GROUP_END, true),
       new BracePair(RegExpTT.PYTHON_NAMED_GROUP, RegExpTT.GROUP_END, true),
index f9566b3b85476cc3b38c4c913c1fea2c76c92b20..8211d59c43e3a7ab9f7491fb5b3bbb9b9e07e1fa 100644 (file)
@@ -105,6 +105,7 @@ public class RegExpHighlighter extends SyntaxHighlighterBase {
     ourMap.put(RegExpTT.QUOTE_END, QUOTE_CHARACTER);
 
     ourMap.put(RegExpTT.NON_CAPT_GROUP, PARENTHS);
+    ourMap.put(RegExpTT.ATOMIC_GROUP, PARENTHS);
     ourMap.put(RegExpTT.POS_LOOKBEHIND, PARENTHS);
     ourMap.put(RegExpTT.NEG_LOOKBEHIND, PARENTHS);
     ourMap.put(RegExpTT.POS_LOOKAHEAD, PARENTHS);
index 4a568d6f779ff573e383221b19ff21f1e38ae7c3..61f3d12ac3410ac35dbb9ac6259ff173fa7e7e57 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2016 JetBrains s.r.o.
+ * Copyright 2000-2017 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.
@@ -95,4 +95,28 @@ public interface RegExpLanguageHost {
   default Number getQuantifierValue(@NotNull RegExpNumber number) {
     return Double.parseDouble(number.getText());
   }
+
+  default Lookbehind supportsLookbehind(@NotNull RegExpGroup lookbehindGroup) {
+    return Lookbehind.FULL; // to not break existing implementations, although rarely actually supported.
+  }
+
+  enum Lookbehind {
+    /** Lookbehind not supported. */
+    NOT_SUPPORTED,
+
+    /**
+     * Alternation inside lookbehind (a|b|c) branches must have same length,
+     * finite repetition with identical min, max values (a{3} or a{3,3}) allowed.
+     */
+    FIXED_LENGTH_ALTERNATION,
+
+    /** Alternation (a|bc|def) branches inside look behind may have different length */
+    VARIABLE_LENGTH_ALTERNATION,
+
+    /** Finite repetition inside lookbehind with different minimum, maximum values allowed */
+    FINITE_REPETITION,
+
+    /** Full regex syntax inside lookbehind ,i.e. star (*) and plus (*) repetition and backreferences, allowed. */
+    FULL
+  }
 }
index 79aafff773af336da0692f4bfca739327e72a0ae..85f81e97d72c426df190e102ac804a4a951595fb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2016 JetBrains s.r.o.
+ * Copyright 2000-2017 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.
@@ -162,6 +162,14 @@ public final class RegExpLanguageHosts extends ClassExtension<RegExpLanguageHost
     return host != null && host.isValidNamedCharacter(namedCharacter);
   }
 
+  public RegExpLanguageHost.Lookbehind supportsLookbehind(RegExpGroup group) {
+    final RegExpLanguageHost host = findRegExpHost(group);
+    if (host == null) {
+      return RegExpLanguageHost.Lookbehind.FULL;
+    }
+    return host.supportsLookbehind(group);
+  }
+
   @Nullable
   public Number getQuantifierValue(@NotNull RegExpNumber valueElement) {
     final RegExpLanguageHost host = findRegExpHost(valueElement);
index 79427fd04e2aae0e796d28ca2fc2ecc7d9411153..86c7db996ecbee529732c0ba1a85bec37496894e 100644 (file)
@@ -54,8 +54,10 @@ public interface RegExpTT {
     /** ")" */
     IElementType GROUP_END = new RegExpElementType("GROUP_END");
 
-    /** "(?:" or "(?>" */
+    /** "(?:" */
     IElementType NON_CAPT_GROUP = new RegExpElementType("NON_CAPT_GROUP");
+    /** "(?>" */
+    IElementType ATOMIC_GROUP = new RegExpElementType("ATOMIC_GROUP");
     /** "(?<=" */
     IElementType POS_LOOKBEHIND = new RegExpElementType("POS_LOOKBEHIND");
     /** "(?<!" */
@@ -161,7 +163,7 @@ public interface RegExpTT {
 
     TokenSet QUANTIFIERS = TokenSet.create(QUEST, PLUS, STAR, LBRACE);
 
-    TokenSet GROUPS = TokenSet.create(GROUP_BEGIN, NON_CAPT_GROUP, POS_LOOKAHEAD, NEG_LOOKAHEAD, POS_LOOKBEHIND, NEG_LOOKBEHIND);
+    TokenSet GROUPS = TokenSet.create(GROUP_BEGIN, NON_CAPT_GROUP, ATOMIC_GROUP, POS_LOOKAHEAD, NEG_LOOKAHEAD, POS_LOOKBEHIND, NEG_LOOKBEHIND);
 
     TokenSet BOUNDARIES = TokenSet.create(BOUNDARY, CARET, DOLLAR);
 }
index 8684c19bad15e72039a8a7f3c230e1f148ff77d6..48698e88ae920ed09383f5328b0bf0d752427b5b 100644 (file)
@@ -19,19 +19,60 @@ import com.intellij.psi.PsiNamedElement;
 import org.jetbrains.annotations.Nullable;
 
 public interface RegExpGroup extends RegExpAtom, PsiNamedElement {
-  boolean isCapturing();
 
-  boolean isSimple();
+  boolean isCapturing();
 
   @Nullable
   RegExpPattern getPattern();
 
+  /** @deprecated use #getType() */
+  @Deprecated
   boolean isPythonNamedGroup();
 
+  /** @deprecated use #getType() */
+  @Deprecated
   boolean isRubyNamedGroup();
 
-  boolean isNamedGroup();
+  /** @return true, if this is a named group of any kind, false otherwise */
+  boolean isAnyNamedGroup();
 
   @Nullable
   String getGroupName();
+
+  Type getType();
+
+  enum Type {
+    /** (?<name>pattern) */
+    NAMED_GROUP,
+
+    /** (?'name'pattern) */
+    QUOTED_NAMED_GROUP,
+
+    /** (?P<name>pattern) */
+    PYTHON_NAMED_GROUP,
+
+    /** (pattern) */
+    CAPTURING_GROUP,
+
+    /** (?>pattern) */
+    ATOMIC,
+
+    /** (?:pattern) */
+    NON_CAPTURING,
+
+    /** (?=pattern) */
+    POSITIVE_LOOKAHEAD,
+
+    /** (?!pattern) */
+    NEGATIVE_LOOKAHEAD,
+
+    /** (?<=pattern) */
+    POSITIVE_LOOKBEHIND,
+
+    /** (?<!pattern) */
+    NEGATIVE_LOOKBEHIND,
+
+    /** (?i:pattern) */
+    OPTIONS
+  }
 }
index f8e87f16a478c64fe202534dbb637aeef418be12..089e17679c671bb2ca0c1866cf3a7cb3e354d623 100644 (file)
@@ -32,47 +32,85 @@ public class RegExpGroupImpl extends RegExpElementImpl implements RegExpGroup {
     super(astNode);
   }
 
+  @Override
   public void accept(RegExpElementVisitor visitor) {
     visitor.visitRegExpGroup(this);
   }
 
-  public boolean isCapturing() {
-    final ASTNode node = getNode().getFirstChildNode();
-    if (node == null) {
-      return false;
-    }
-    final IElementType type = node.getElementType();
-    return type == RegExpTT.GROUP_BEGIN || type == RegExpTT.RUBY_NAMED_GROUP ||
-           type == RegExpTT.RUBY_QUOTED_NAMED_GROUP || type == RegExpTT.PYTHON_NAMED_GROUP;
-  }
-
-  public boolean isSimple() {
-    final ASTNode node = getNode().getFirstChildNode();
-    return node != null && (node.getElementType() == RegExpTT.GROUP_BEGIN || node.getElementType() == RegExpTT.NON_CAPT_GROUP);
-  }
-
+  @Override
   public RegExpPattern getPattern() {
     final ASTNode node = getNode().findChildByType(RegExpElementTypes.PATTERN);
     return node != null ? (RegExpPattern)node.getPsi() : null;
   }
 
+  @Override
+  public boolean isCapturing() {
+    final Type type = getType();
+    return type == Type.CAPTURING_GROUP || type == Type.NAMED_GROUP || type == Type.QUOTED_NAMED_GROUP || type == Type.PYTHON_NAMED_GROUP;
+  }
+
+  /** @deprecated use #getType */
+  @Deprecated
+  @Override
   public boolean isPythonNamedGroup() {
-    return getNode().findChildByType(RegExpTT.PYTHON_NAMED_GROUP) != null;
+    return getType() == Type.PYTHON_NAMED_GROUP;
   }
 
+  /** @deprecated use #getType */
+  @Deprecated
+  @Override
   public boolean isRubyNamedGroup() {
-    return getNode().findChildByType(RegExpTT.RUBY_NAMED_GROUP) != null ||
-           getNode().findChildByType(RegExpTT.RUBY_QUOTED_NAMED_GROUP) != null;
+    final Type type = getType();
+    return type == Type.NAMED_GROUP || type == Type.QUOTED_NAMED_GROUP;
   }
 
-  public boolean isNamedGroup() {
-    return getNode().findChildByType(RegExpTT.RUBY_NAMED_GROUP) != null;
+  @Override
+  public boolean isAnyNamedGroup() {
+    final Type type = getType();
+    return type == Type.NAMED_GROUP || type == Type.QUOTED_NAMED_GROUP || type == Type.PYTHON_NAMED_GROUP;
   }
 
-  public String getGroupName() {
-    if (!isPythonNamedGroup() && !isRubyNamedGroup()) {
-      return null;
+  @Override
+  public Type getType() {
+    final IElementType elementType = getNode().getFirstChildNode().getElementType();
+    if (elementType == RegExpTT.GROUP_BEGIN) {
+      return Type.CAPTURING_GROUP;
+    }
+    else if (elementType == RegExpTT.RUBY_NAMED_GROUP) {
+      return Type.NAMED_GROUP;
+    }
+    else if (elementType == RegExpTT.PYTHON_NAMED_GROUP) {
+      return Type.PYTHON_NAMED_GROUP;
+    }
+    else if (elementType == RegExpTT.RUBY_QUOTED_NAMED_GROUP) {
+      return Type.QUOTED_NAMED_GROUP;
+    }
+    else if (elementType == RegExpTT.ATOMIC_GROUP) {
+      return Type.ATOMIC;
+    }
+    else if (elementType == RegExpTT.NON_CAPT_GROUP) {
+      return Type.NON_CAPTURING;
+    }
+    else if (elementType == RegExpTT.SET_OPTIONS) {
+      return Type.OPTIONS;
+    }
+    else if (elementType == RegExpTT.POS_LOOKAHEAD) {
+      return Type.POSITIVE_LOOKAHEAD;
     }
+    else if (elementType == RegExpTT.NEG_LOOKAHEAD) {
+      return Type.NEGATIVE_LOOKAHEAD;
+    }
+    else if (elementType == RegExpTT.POS_LOOKBEHIND) {
+      return Type.POSITIVE_LOOKBEHIND;
+    }
+    else if (elementType == RegExpTT.NEG_LOOKBEHIND) {
+      return Type.NEGATIVE_LOOKBEHIND;
+    }
+    throw new AssertionError();
+  }
+
+  @Override
+  public String getGroupName() {
     final ASTNode nameNode = getNode().findChildByType(RegExpTT.NAME);
     return nameNode != null ? nameNode.getText() : null;
   }
index 9c80cd0be121265ab268b75d3a905cfd8df2dfdd..2e6d19116ccc70fc049883f17fd0996744693783 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2016 JetBrains s.r.o.
+ * Copyright 2000-2017 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.
@@ -60,9 +60,8 @@ public class RegExpNamedGroupRefImpl extends RegExpElementImpl implements RegExp
           if (!(element instanceof RegExpGroup)) {
             return false;
           }
-          final RegExpGroup regExpGroup = (RegExpGroup)element;
-          return (regExpGroup.isPythonNamedGroup() || regExpGroup.isRubyNamedGroup()) &&
-                 Comparing.equal(getGroupName(), regExpGroup.getGroupName());
+          final RegExpGroup group = (RegExpGroup)element;
+          return group.isAnyNamedGroup() && Comparing.equal(getGroupName(), group.getGroupName());
         }
       }
     );
@@ -138,7 +137,7 @@ public class RegExpNamedGroupRefImpl extends RegExpElementImpl implements RegExp
                 return false;
               }
               final RegExpGroup regExpGroup = (RegExpGroup)element;
-              return regExpGroup.isPythonNamedGroup() || regExpGroup.isRubyNamedGroup();
+              return regExpGroup.isAnyNamedGroup();
             }
           }
         );
index 6fd70655d1b6b7c9bd413f8b1f429475e0a1aa66..e1082e308f41eab071e4ba2e3f5d2b3cfd9ea561 100644 (file)
@@ -349,7 +349,8 @@ HEX_CHAR=[0-9a-fA-F]
   "$"           { return RegExpTT.DOLLAR; }
   {DOT}         { return RegExpTT.DOT;    }
 
-  "(?:"|"(?>" { return RegExpTT.NON_CAPT_GROUP;  }
+  "(?:"       { return RegExpTT.NON_CAPT_GROUP;  }
+  "(?>"       { return RegExpTT.ATOMIC_GROUP;  }
   "(?="       { return RegExpTT.POS_LOOKAHEAD;   }
   "(?!"       { return RegExpTT.NEG_LOOKAHEAD;   }
   "(?<="      { return RegExpTT.POS_LOOKBEHIND;  }
index 84d23a613dda3225db5a6dddb86d8aae15618c80..4f94c33b04d85b54acc9d92d4d6abed7adb326f4 100644 (file)
@@ -28,6 +28,7 @@ import com.intellij.psi.StringEscapesTokenTypes;
 import com.intellij.psi.tree.IElementType;
 import com.intellij.psi.util.PsiTreeUtil;
 import com.intellij.util.containers.ContainerUtil;
+import org.intellij.lang.regexp.RegExpLanguageHost;
 import org.intellij.lang.regexp.RegExpLanguageHosts;
 import org.intellij.lang.regexp.RegExpTT;
 import org.intellij.lang.regexp.psi.*;
@@ -108,19 +109,19 @@ public final class RegExpAnnotator extends RegExpElementVisitor implements Annot
 
   private boolean handleSurrogates(RegExpCharRange range, Character f, Character t) {
     // \ud800\udc00-\udbff\udfff
-    PsiElement prevSibling = range.getPrevSibling();
-    PsiElement nextSibling = range.getNextSibling();
+    final PsiElement prevSibling = range.getPrevSibling();
+    final PsiElement nextSibling = range.getNextSibling();
 
     if (prevSibling instanceof RegExpChar && nextSibling instanceof RegExpChar) {
-      Character prevSiblingValue = ((RegExpChar)prevSibling).getValue();
-      Character nextSiblingValue = ((RegExpChar)nextSibling).getValue();
+      final Character prevSiblingValue = ((RegExpChar)prevSibling).getValue();
+      final Character nextSiblingValue = ((RegExpChar)nextSibling).getValue();
 
       if (prevSiblingValue != null && nextSiblingValue != null &&
           Character.isSurrogatePair(prevSiblingValue, f) && Character.isSurrogatePair(t, nextSiblingValue)) {
         if (Character.toCodePoint(prevSiblingValue, f) > Character.toCodePoint(t, nextSiblingValue)) {
-          TextRange prevSiblingRange = prevSibling.getTextRange();
-          TextRange nextSiblingRange = nextSibling.getTextRange();
-          TextRange errorRange = new TextRange(prevSiblingRange.getStartOffset(), nextSiblingRange.getEndOffset());
+          final TextRange prevSiblingRange = prevSibling.getTextRange();
+          final TextRange nextSiblingRange = nextSibling.getTextRange();
+          final TextRange errorRange = new TextRange(prevSiblingRange.getStartOffset(), nextSiblingRange.getEndOffset());
           myHolder.createErrorAnnotation(errorRange, ILLEGAL_CHARACTER_RANGE_TO_FROM);
         }
         return true;
@@ -183,7 +184,7 @@ public final class RegExpAnnotator extends RegExpElementVisitor implements Annot
   @Override
   public void visitRegExpChar(final RegExpChar ch) {
     final PsiElement child = ch.getFirstChild();
-    IElementType type = child.getNode().getElementType();
+    final IElementType type = child.getNode().getElementType();
     if (type == StringEscapesTokenTypes.INVALID_CHARACTER_ESCAPE_TOKEN) {
       myHolder.createErrorAnnotation(ch, "Illegal/unsupported escape sequence");
       return;
@@ -275,7 +276,8 @@ public final class RegExpAnnotator extends RegExpElementVisitor implements Annot
       else if (branches.length == 1) {
         final RegExpAtom[] atoms = branches[0].getAtoms();
         if (atoms.length == 1 && atoms[0] instanceof RegExpGroup) {
-          if (group.isSimple()) {
+          final RegExpGroup.Type type = group.getType();
+          if (type == RegExpGroup.Type.CAPTURING_GROUP || type == RegExpGroup.Type.ATOMIC || type == RegExpGroup.Type.NON_CAPTURING) {
             final RegExpGroup innerGroup = (RegExpGroup)atoms[0];
             if (group.isCapturing() == innerGroup.isCapturing()) {
               myHolder.createWarningAnnotation(group, "Redundant group nesting");
@@ -284,7 +286,7 @@ public final class RegExpAnnotator extends RegExpElementVisitor implements Annot
         }
       }
     }
-    if (group.isPythonNamedGroup() || group.isRubyNamedGroup()) {
+    if (group.isAnyNamedGroup()) {
       if (!myLanguageHosts.supportsNamedGroupSyntax(group)) {
         myHolder.createErrorAnnotation(group, "This named group syntax is not supported");
       }
@@ -294,6 +296,16 @@ public final class RegExpAnnotator extends RegExpElementVisitor implements Annot
       final ASTNode node = group.getNode().findChildByType(RegExpTT.NAME);
       if (node != null) myHolder.createErrorAnnotation(node, "Invalid group name");
     }
+    final RegExpGroup.Type groupType = group.getType();
+    if (groupType == RegExpGroup.Type.POSITIVE_LOOKBEHIND || groupType == RegExpGroup.Type.NEGATIVE_LOOKBEHIND) {
+      final RegExpLanguageHost.Lookbehind support = myLanguageHosts.supportsLookbehind(group);
+      if (support == RegExpLanguageHost.Lookbehind.NOT_SUPPORTED) {
+        myHolder.createErrorAnnotation(group, "Look-behind groups not supported in this regex dialect");
+      }
+      else {
+        group.accept(new LookbehindVisitor(support, myHolder));
+      }
+    }
   }
 
   @Override
@@ -425,4 +437,152 @@ public final class RegExpAnnotator extends RegExpElementVisitor implements Annot
     }
   }
 
+
+  private static class LookbehindVisitor extends RegExpRecursiveElementVisitor {
+
+    private final RegExpLanguageHost.Lookbehind mySupport;
+    private final AnnotationHolder myHolder;
+    private int myLength = 0;
+    private boolean myStop = false;
+
+    LookbehindVisitor(RegExpLanguageHost.Lookbehind support, AnnotationHolder holder) {
+      mySupport = support;
+      myHolder = holder;
+    }
+
+    @Override
+    public void visitRegExpElement(RegExpElement element) {
+      if (myStop) {
+        return;
+      }
+      super.visitRegExpElement(element);
+    }
+
+    @Override
+    public void visitRegExpChar(RegExpChar ch) {
+      super.visitRegExpChar(ch);
+      myLength++;
+    }
+
+    @Override
+    public void visitSimpleClass(RegExpSimpleClass simpleClass) {
+      super.visitSimpleClass(simpleClass);
+      myLength++;
+    }
+
+    @Override
+    public void visitRegExpClass(RegExpClass expClass) {
+      super.visitRegExpClass(expClass);
+      myLength++;
+    }
+
+    @Override
+    public void visitRegExpProperty(RegExpProperty property) {
+      super.visitRegExpProperty(property);
+      myLength++;
+    }
+
+    @Override
+    public void visitRegExpNamedCharacter(RegExpNamedCharacter namedCharacter) {
+      super.visitRegExpNamedCharacter(namedCharacter);
+      myLength++;
+    }
+
+    @Override
+    public void visitRegExpBackref(RegExpBackref backref) {
+      super.visitRegExpBackref(backref);
+      if (mySupport != RegExpLanguageHost.Lookbehind.FULL) {
+        stopAndReportError(backref, "Group reference not allowed inside lookbehind");
+      }
+    }
+
+    @Override
+    public void visitRegExpPattern(RegExpPattern pattern) {
+      if (mySupport != RegExpLanguageHost.Lookbehind.FIXED_LENGTH_ALTERNATION) {
+        super.visitRegExpPattern(pattern);
+        return;
+      }
+      final int length = myLength;
+      int branchLength = -1;
+      final RegExpBranch[] branches = pattern.getBranches();
+      for (RegExpBranch branch : branches) {
+        myLength = 0;
+        super.visitRegExpBranch(branch);
+        if (branchLength == -1) {
+          branchLength = myLength;
+        } else if (branchLength != myLength) {
+          stopAndReportError(pattern, "Alternation alternatives needs to have the same length inside lookbehind");
+          return;
+        }
+      }
+      myLength = length;
+    }
+
+    @Override
+    public void visitRegExpQuantifier(RegExpQuantifier quantifier) {
+      super.visitRegExpQuantifier(quantifier);
+      if (mySupport == RegExpLanguageHost.Lookbehind.FULL) {
+        return;
+      }
+      if (quantifier.isCounted()) {
+        final RegExpNumber minElement = quantifier.getMin();
+        final RegExpNumber maxElement = quantifier.getMax();
+        if (minElement != null && maxElement != null) {
+          try {
+            final long min = Long.parseLong(minElement.getText());
+            final long max = Long.parseLong(maxElement.getText());
+            if (min == max) {
+              myLength += min;
+              return;
+            }
+          } catch (NumberFormatException ignore) {}
+        }
+        if (mySupport != RegExpLanguageHost.Lookbehind.FINITE_REPETITION) {
+          stopAndReportError(quantifier, "Unequal min and max in counted quantifier not allowed inside lookbehind");
+        }
+      }
+      else {
+        final ASTNode token = quantifier.getToken();
+        assert token != null;
+        final String tokenText = token.getText();
+        if ("?".equals(tokenText) && mySupport == RegExpLanguageHost.Lookbehind.FINITE_REPETITION) {
+          return;
+        }
+        stopAndReportError(quantifier, tokenText + " repetition not allowed inside lookbehind");
+      }
+    }
+
+    @Override
+    public void visitRegExpBoundary(RegExpBoundary boundary) {
+      super.visitRegExpBoundary(boundary);
+      // is zero length
+    }
+
+    @Override
+    public void visitRegExpNamedGroupRef(RegExpNamedGroupRef groupRef) {
+      super.visitRegExpNamedGroupRef(groupRef);
+      if (mySupport != RegExpLanguageHost.Lookbehind.FULL) {
+        stopAndReportError(groupRef, "Named group reference not allowed inside lookbehind");
+      }
+    }
+
+    @Override
+    public void visitRegExpPyCondRef(RegExpPyCondRef condRef) {
+      super.visitRegExpPyCondRef(condRef);
+      if (mySupport != RegExpLanguageHost.Lookbehind.FULL) {
+        stopAndReportError(condRef, "Conditional group reference not allowed inside lookbehind");
+      }
+    }
+
+    @Override
+    public void visitPosixBracketExpression(RegExpPosixBracketExpression posixBracketExpression) {
+      super.visitPosixBracketExpression(posixBracketExpression);
+      myLength++;
+    }
+
+    public void stopAndReportError(RegExpElement element, String message) {
+      myHolder.createErrorAnnotation(element, message);
+      myStop = true;
+    }
+  }
 }
index 96ff581eaa160f91ab287f7582d0bd2865a89449..c832b533b3f2a90718d2e3bf0b639af6904cee8f 100644 (file)
@@ -27,6 +27,20 @@ import static org.intellij.lang.regexp.RegExpCapability.*;
  */
 public class RegExpLexerTest extends LexerTestCase {
 
+  public void testAtomicGroup() {
+    final RegExpLexer lexer = new RegExpLexer(EnumSet.noneOf(RegExpCapability.class));
+    doTest("(?>atom)", "ATOMIC_GROUP ('(?>')\n" +
+                       "CHARACTER ('a')\n" +
+                       "CHARACTER ('t')\n" +
+                       "CHARACTER ('o')\n" +
+                       "CHARACTER ('m')\n" +
+                       "GROUP_END (')')", lexer);
+    doTest("(?:no)", "NON_CAPT_GROUP ('(?:')\n" +
+                     "CHARACTER ('n')\n" +
+                     "CHARACTER ('o')\n" +
+                     "GROUP_END (')')", lexer);
+  }
+
   public void testAmpersand() {
     final RegExpLexer lexer = new RegExpLexer(EnumSet.noneOf(RegExpCapability.class));
     doTest("[a&&]", "CLASS_BEGIN ('[')\n" +
index f9c986d1a15ffd9a8514dee521d7b3e931e81816..0b5a040a90ea7b44bbaa3a4b761c05d8788f6d53 100644 (file)
@@ -190,6 +190,8 @@ public class RegExpParsingTest extends ParsingTestCase {
   public void testGroups38() throws IOException { doCodeTest("\\g'name'"); }
   public void testGroups39() throws IOException { doCodeTest("(?(name)yes-pattern|no-pattern)"); }
   public void testGroups40() throws IOException { doCodeTest("(?(name)yes-pattern|{"); }
+  public void testGroups41() throws IOException { doCodeTest("(?>atomic)"); }
+  public void testGroups42() throws IOException { doCodeTest("(?:non-capturing)"); }
 
   public void testEscapes1() throws IOException { doCodeTest("\\q"); }
   public void testEscapes2() throws IOException { doCodeTest("\\#"); }
index c623b3d6d3b6260f6b4dde833085de067d2c099e..4f7a36746f26676897e004a09e053a98756fa9e5 100644 (file)
@@ -22,7 +22,7 @@ REGEXP_FILE
           PsiElement(COMMA)(',')
           PsiElement(RBRACE)('}')
       RegExpGroupImpl: <(?>\s)>
-        PsiElement(NON_CAPT_GROUP)('(?>')
+        PsiElement(ATOMIC_GROUP)('(?>')
         RegExpPatternImpl: <\s>
           RegExpBranchImpl: <\s>
             RegExpSimpleClassImpl: <\s>
diff --git a/RegExpSupport/testData/psi/Groups41.txt b/RegExpSupport/testData/psi/Groups41.txt
new file mode 100644 (file)
index 0000000..bd0a8d3
--- /dev/null
@@ -0,0 +1,20 @@
+REGEXP_FILE
+  RegExpPatternImpl: <(?>atomic)>
+    RegExpBranchImpl: <(?>atomic)>
+      RegExpGroupImpl: <(?>atomic)>
+        PsiElement(ATOMIC_GROUP)('(?>')
+        RegExpPatternImpl: <atomic>
+          RegExpBranchImpl: <atomic>
+            RegExpCharImpl: <a>
+              PsiElement(CHARACTER)('a')
+            RegExpCharImpl: <t>
+              PsiElement(CHARACTER)('t')
+            RegExpCharImpl: <o>
+              PsiElement(CHARACTER)('o')
+            RegExpCharImpl: <m>
+              PsiElement(CHARACTER)('m')
+            RegExpCharImpl: <i>
+              PsiElement(CHARACTER)('i')
+            RegExpCharImpl: <c>
+              PsiElement(CHARACTER)('c')
+        PsiElement(GROUP_END)(')')
\ No newline at end of file
diff --git a/RegExpSupport/testData/psi/Groups42.txt b/RegExpSupport/testData/psi/Groups42.txt
new file mode 100644 (file)
index 0000000..57dc4fd
--- /dev/null
@@ -0,0 +1,34 @@
+REGEXP_FILE
+  RegExpPatternImpl: <(?:non-capturing)>
+    RegExpBranchImpl: <(?:non-capturing)>
+      RegExpGroupImpl: <(?:non-capturing)>
+        PsiElement(NON_CAPT_GROUP)('(?:')
+        RegExpPatternImpl: <non-capturing>
+          RegExpBranchImpl: <non-capturing>
+            RegExpCharImpl: <n>
+              PsiElement(CHARACTER)('n')
+            RegExpCharImpl: <o>
+              PsiElement(CHARACTER)('o')
+            RegExpCharImpl: <n>
+              PsiElement(CHARACTER)('n')
+            RegExpCharImpl: <->
+              PsiElement(CHARACTER)('-')
+            RegExpCharImpl: <c>
+              PsiElement(CHARACTER)('c')
+            RegExpCharImpl: <a>
+              PsiElement(CHARACTER)('a')
+            RegExpCharImpl: <p>
+              PsiElement(CHARACTER)('p')
+            RegExpCharImpl: <t>
+              PsiElement(CHARACTER)('t')
+            RegExpCharImpl: <u>
+              PsiElement(CHARACTER)('u')
+            RegExpCharImpl: <r>
+              PsiElement(CHARACTER)('r')
+            RegExpCharImpl: <i>
+              PsiElement(CHARACTER)('i')
+            RegExpCharImpl: <n>
+              PsiElement(CHARACTER)('n')
+            RegExpCharImpl: <g>
+              PsiElement(CHARACTER)('g')
+        PsiElement(GROUP_END)(')')
\ No newline at end of file
index 02040b8cbf39cef1c7e4c95432b199ee7ab4ebb1..8148a790c7abcfdd9ae6bb1fe7e69b9c9f72c0f4 100755 (executable)
Binary files a/bin/mac/fsnotifier and b/bin/mac/fsnotifier differ
index 6c093cdf119b6c77d875f31ebab30c0ff07f2265..f026d9472c06b03e89b52190c9b33e762057f611 100755 (executable)
Binary files a/bin/mac/restarter and b/bin/mac/restarter differ
index f335717f7836e95f24a089c2cdd26e5209dfe53c..38891700274a879908627a22da64d4b3c608f707 100644 (file)
Binary files a/bin/win/restarter.exe and b/bin/win/restarter.exe differ
index e81e7e3e2e36d809f92454b80c6d19630cb49c3b..6fcbda97b6d4c36db004bfe912b9da3c61463f47 100644 (file)
@@ -1237,6 +1237,10 @@ finish:
   StrCpy $1 "${PRODUCT_PATHS_SELECTOR}"
   Call un.OMDeleteRegKey
 
+  StrCpy $0 "${MUI_LANGDLL_REGISTRY_ROOT}"
+  StrCpy $1 "${MUI_LANGDLL_REGISTRY_KEY}"
+  Call un.OMDeleteRegKey
+
   StrCpy $0 "HKCR"
   StrCpy $1 "IntelliJIdeaProjectFile\DefaultIcon"
   StrCpy $2 ""
index 9dfc637d0a3b25b981c5dfed0d9044bf6c6ce2f0..3b7bb5a9b10252c7d313681a755a1ae4ffd32892 100644 (file)
@@ -112,19 +112,7 @@ public class CompilerConfigurationImpl extends CompilerConfiguration implements
 
   public CompilerConfigurationImpl(Project project) {
     myProject = project;
-    myExcludesConfiguration = new ExcludedEntriesConfiguration(project.getMessageBus().syncPublisher(ExcludedEntriesListener.TOPIC));
-    Disposer.register(project, myExcludesConfiguration);
-    project.getMessageBus().connect().subscribe(ExcludedEntriesListener.TOPIC, new ExcludedEntriesListener() {
-      @Override
-      public void onEntryAdded(@NotNull ExcludeEntryDescription description) {
-        BuildManager.getInstance().clearState(myProject);
-      }
-
-      @Override
-      public void onEntryRemoved(@NotNull ExcludeEntryDescription description) {
-        BuildManager.getInstance().clearState(myProject);
-      }
-    });
+    myExcludesConfiguration = createExcludedEntriesConfiguration(project);
     MessageBusConnection connection = project.getMessageBus().connect(project);
     connection.subscribe(ProjectTopics.MODULES, new ModuleListener() {
       @Override
@@ -139,6 +127,25 @@ public class CompilerConfigurationImpl extends CompilerConfiguration implements
     });
   }
 
+  // Overridden in Upsource
+  @NotNull
+  protected ExcludedEntriesConfiguration createExcludedEntriesConfiguration(@NotNull Project project) {
+    final ExcludedEntriesConfiguration cfg = new ExcludedEntriesConfiguration(project.getMessageBus().syncPublisher(ExcludedEntriesListener.TOPIC));
+    Disposer.register(project, cfg);
+    project.getMessageBus().connect().subscribe(ExcludedEntriesListener.TOPIC, new ExcludedEntriesListener() {
+      @Override
+      public void onEntryAdded(@NotNull ExcludeEntryDescription description) {
+        BuildManager.getInstance().clearState(project);
+      }
+
+      @Override
+      public void onEntryRemoved(@NotNull ExcludeEntryDescription description) {
+        BuildManager.getInstance().clearState(project);
+      }
+    });
+    return cfg;
+  }
+
   private static class State {
     public String DEFAULT_COMPILER = JavaCompilers.JAVAC_ID;
     public int BUILD_PROCESS_HEAP_SIZE = DEFAULT_BUILD_PROCESS_HEAP_SIZE;
index f3c303244d82bd31b98cdda2ef31fbf8bdd621ea..649135c5e9bf6e003498e8c47cf5dca496992511 100644 (file)
@@ -103,38 +103,22 @@ public class CompilerReferenceServiceImpl extends CompilerReferenceService imple
       compilerManager.addCompilationStatusListener(new CompilationStatusListener() {
         @Override
         public void compilationFinished(boolean aborted, int errors, int warnings, CompileContext compileContext) {
-          compilationFinished(errors, compileContext);
+          compilationFinished(compileContext);
         }
 
         @Override
         public void automakeCompilationFinished(int errors, int warnings, CompileContext compileContext) {
-          compilationFinished(errors, compileContext);
+          compilationFinished(compileContext);
         }
 
-        private void compilationFinished(int errors, CompileContext context) {
+        private void compilationFinished(CompileContext context) {
           Runnable compilationFinished = () -> {
             final Module[] compilationModules = ReadAction.compute(() -> {
               if (myProject.isDisposed()) return null;
               return context.getCompileScope().getAffectedModules();
             });
             if (compilationModules == null) return;
-            Set<Module> modulesWithErrors;
-            if (errors != 0) {
-              modulesWithErrors = Stream.of(context.getMessages(CompilerMessageCategory.ERROR))
-                .map(CompilerMessage::getVirtualFile)
-                .distinct()
-                .map(f -> f == null ? null : myProjectFileIndex.getModuleForFile(f))
-                .collect(Collectors.toSet());
-            }
-            else {
-              modulesWithErrors = Collections.emptySet();
-            }
-            if (modulesWithErrors.contains(null) /*unknown error location*/) {
-              myDirtyScopeHolder.compilerActivityFinished(Module.EMPTY_ARRAY, compilationModules);
-            } else {
-              myDirtyScopeHolder.compilerActivityFinished(compilationModules, modulesWithErrors.toArray(Module.EMPTY_ARRAY));
-            }
-
+            myDirtyScopeHolder.compilerActivityFinished();
             myCompilationCount.increment();
             openReaderIfNeed();
           };
@@ -149,19 +133,11 @@ public class CompilerReferenceServiceImpl extends CompilerReferenceService imple
           CompileScope projectCompileScope = compilerManager.createProjectCompileScope(myProject);
           boolean isUpToDate = compilerManager.isUpToDate(projectCompileScope);
           executeOnBuildThread(() -> {
-            Module[] modules = ReadAction.compute(() -> {
-              if (myProject.isDisposed()) return null;
-              return projectCompileScope.getAffectedModules();
-            });
-            if (modules == null) return;
+            myDirtyScopeHolder.upToDateChecked(isUpToDate);
             if (isUpToDate) {
-              myDirtyScopeHolder.compilerActivityFinished(modules, Module.EMPTY_ARRAY);
               myCompilationCount.increment();
               openReaderIfNeed();
             }
-            else {
-              myDirtyScopeHolder.compilerActivityFinished(Module.EMPTY_ARRAY, modules);
-            }
           });
         });
       }
index 71f1e5af2ff5387dfd466e55bda88a7fad0c87e7..8947b41cf5762c1b8fafea713419a6e99c399f8c 100644 (file)
 package com.intellij.compiler.backwardRefs;
 
 import com.intellij.compiler.CompilerConfiguration;
+import com.intellij.compiler.CompilerReferenceService;
 import com.intellij.compiler.backwardRefs.view.DirtyScopeTestInfo;
+import com.intellij.compiler.server.CustomBuilderMessageHandler;
 import com.intellij.openapi.application.ReadAction;
 import com.intellij.openapi.compiler.options.ExcludeEntryDescription;
 import com.intellij.openapi.compiler.options.ExcludedEntriesListener;
 import com.intellij.openapi.editor.Document;
 import com.intellij.openapi.fileEditor.FileDocumentManager;
 import com.intellij.openapi.module.Module;
+import com.intellij.openapi.module.ModuleManager;
 import com.intellij.openapi.progress.ProcessCanceledException;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.util.UserDataHolderBase;
@@ -35,14 +38,17 @@ import com.intellij.psi.util.PsiModificationTracker;
 import com.intellij.util.ObjectUtils;
 import com.intellij.util.SmartList;
 import com.intellij.util.containers.ContainerUtil;
+import com.intellij.util.messages.MessageBusConnection;
 import gnu.trove.THashSet;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.TestOnly;
+import org.jetbrains.jps.backwardRefs.BackwardReferenceIndexBuilder;
 
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.util.Set;
+import java.util.stream.Collectors;
 
 public class DirtyScopeHolder extends UserDataHolderBase {
   private final CompilerReferenceServiceImpl myService;
@@ -55,6 +61,8 @@ public class DirtyScopeHolder extends UserDataHolderBase {
   private final List<ExcludeEntryDescription> myExcludedDescriptions = new SmartList<>(); // guarded by myLock
   private boolean myCompilationPhase; // guarded by myLock
   private volatile GlobalSearchScope myExcludedFilesScope; // calculated outside myLock
+  private final Set<String> myCompilationAffectedModules = ContainerUtil.newConcurrentSet(); // used outside myLock
+
 
   public DirtyScopeHolder(@NotNull CompilerReferenceServiceImpl service,
                           FileDocumentManager fileDocumentManager,
@@ -63,16 +71,25 @@ public class DirtyScopeHolder extends UserDataHolderBase {
     myFileDocManager = fileDocumentManager;
     myPsiDocManager = psiDocumentManager;
 
-    service.getProject().getMessageBus().connect().subscribe(ExcludedEntriesListener.TOPIC, new ExcludedEntriesListener() {
-      @Override
-      public void onEntryAdded(@NotNull ExcludeEntryDescription description) {
-        synchronized (myLock) {
-          if (myCompilationPhase) {
-            myExcludedDescriptions.add(description);
+    if (CompilerReferenceService.isEnabled()) {
+      final MessageBusConnection connect = service.getProject().getMessageBus().connect();
+      connect.subscribe(ExcludedEntriesListener.TOPIC, new ExcludedEntriesListener() {
+        @Override
+        public void onEntryAdded(@NotNull ExcludeEntryDescription description) {
+          synchronized (myLock) {
+            if (myCompilationPhase) {
+              myExcludedDescriptions.add(description);
+            }
           }
         }
-      }
-    });
+      });
+
+      connect.subscribe(CustomBuilderMessageHandler.TOPIC, (builderId, messageType, messageText) -> {
+        if (BackwardReferenceIndexBuilder.BUILDER_ID.equals(builderId)) {
+          myCompilationAffectedModules.add(messageText);
+        }
+      });
+    }
   }
 
   void compilerActivityStarted() {
@@ -80,22 +97,54 @@ public class DirtyScopeHolder extends UserDataHolderBase {
       myCompilationPhase = true;
       Collections.addAll(myExcludedDescriptions, CompilerConfiguration.getInstance(myService.getProject()).getExcludedEntriesConfiguration().getExcludeEntryDescriptions());
       myExcludedFilesScope = null;
+      myCompilationAffectedModules.clear();
     }
   }
 
-  void compilerActivityFinished(Module[] affectedModules, Module[] markAsDirty) {
+  void upToDateChecked(boolean isUpToDate) {
+    compilationFinished(() -> {
+      if (!isUpToDate) {
+        final Module[] modules = ReadAction.compute(() -> {
+          final Project project = myService.getProject();
+          if (project.isDisposed()) {
+            return null;
+          }
+          return ModuleManager.getInstance(project).getModules();
+        });
+        if (modules == null) return;
+        ContainerUtil.addAll(myVFSChangedModules, modules);
+      }
+    });
+  }
+
+  void compilerActivityFinished() {
+    compilationFinished(() -> {
+      final List<Module> compiledModules = ReadAction.compute(() -> {
+        final Project project = myService.getProject();
+        if (project.isDisposed()) {
+          return null;
+        }
+        final ModuleManager moduleManager = ModuleManager.getInstance(myService.getProject());
+        return myCompilationAffectedModules.stream().map(moduleManager::findModuleByName).collect(Collectors.toList());
+      });
+      if (compiledModules == null) return;
+      myVFSChangedModules.removeAll(compiledModules);
+    });
+  }
+
+  private void compilationFinished(Runnable action) {
     ExcludeEntryDescription[] descriptions;
     synchronized (myLock) {
       myCompilationPhase = false;
-
-      ContainerUtil.removeAll(myVFSChangedModules, affectedModules);
-      Collections.addAll(myVFSChangedModules, markAsDirty);
+      action.run();
+      myCompilationAffectedModules.clear();
       myVFSChangedModules.addAll(myChangedModulesDuringCompilation);
       myChangedModulesDuringCompilation.clear();
       descriptions = myExcludedDescriptions.toArray(new ExcludeEntryDescription[myExcludedDescriptions.size()]);
       myExcludedDescriptions.clear();
     }
     myExcludedFilesScope = ExcludedFromCompileFilesUtil.getExcludedFilesScope(descriptions, myService.getFileTypes(), myService.getProject(), myService.getFileIndex());
+
   }
 
   GlobalSearchScope getDirtyScope() {
@@ -122,7 +171,7 @@ public class DirtyScopeHolder extends UserDataHolderBase {
   }
 
   @NotNull
-  private Set<Module> getAllDirtyModules() {
+  Set<Module> getAllDirtyModules() {
     final Set<Module> dirtyModules = new THashSet<>(myVFSChangedModules);
     for (Document document : myFileDocManager.getUnsavedDocuments()) {
       final VirtualFile file = myFileDocManager.getFile(document);
index 688fb4ebafb7b2188c09dbeeff2782d413df811a..3dcb6ed92d1885a9c3ff3c3ff3451679a1982bd2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2016 JetBrains s.r.o.
+ * Copyright 2000-2017 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.
@@ -68,6 +68,7 @@ import org.jetbrains.java.debugger.breakpoints.properties.JavaBreakpointProperti
 
 import javax.swing.*;
 import java.util.Arrays;
+import java.util.Objects;
 import java.util.function.Function;
 
 public abstract class Breakpoint<P extends JavaBreakpointProperties> implements FilteredRequestor, ClassPrepareRequestor {
@@ -393,7 +394,7 @@ public abstract class Breakpoint<P extends JavaBreakpointProperties> implements
                                           TextWithImports text,
                                           EvaluatingComputable<ExpressionEvaluator> supplier) throws EvaluateException {
       EvaluatorCache cache = (EvaluatorCache)request.getProperty(propertyName);
-      if (cache != null && cache.myContext.equals(context) && cache.myTextWithImports.equals(text)) {
+      if (cache != null && Objects.equals(cache.myContext, context) && Objects.equals(cache.myTextWithImports, text)) {
         return cache.myEvaluator;
       }
       ExpressionEvaluator evaluator = supplier.compute();
index e3e43c4641f3ff943ce41dcbf148114fdccbcd05..49ad2cc50c1b137c97b8962e34f21cefb6fbf58f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2016 JetBrains s.r.o.
+ * Copyright 2000-2017 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.
@@ -22,6 +22,7 @@ import com.intellij.debugger.engine.events.SuspendContextCommandImpl;
 import com.intellij.debugger.jdi.StackFrameProxyImpl;
 import com.intellij.debugger.memory.utils.StackFrameItem;
 import com.intellij.debugger.settings.DebuggerSettings;
+import com.intellij.openapi.project.Project;
 import com.intellij.openapi.util.Comparing;
 import com.intellij.openapi.util.Key;
 import com.intellij.util.containers.ContainerUtil;
@@ -43,8 +44,6 @@ import java.util.Map;
  * @author egor
  */
 public class StackCapturingLineBreakpoint extends WildcardMethodBreakpoint {
-  private final DebugProcessImpl myDebugProcess;
-
   private final String mySignature;
   private final int myParamNo;
 
@@ -53,13 +52,12 @@ public class StackCapturingLineBreakpoint extends WildcardMethodBreakpoint {
 
   private final JavaMethodBreakpointProperties myProperties = new JavaMethodBreakpointProperties();
 
-  public StackCapturingLineBreakpoint(DebugProcessImpl debugProcess,
+  public StackCapturingLineBreakpoint(Project project,
                                       String className,
                                       String methodName,
                                       String methodSignature,
                                       int paramNo) {
-    super(debugProcess.getProject(), null);
-    myDebugProcess = debugProcess;
+    super(project, null);
     mySignature = methodSignature;
     myParamNo = paramNo;
     myProperties.EMULATED = true;
@@ -86,7 +84,8 @@ public class StackCapturingLineBreakpoint extends WildcardMethodBreakpoint {
       if (suspendContext != null) {
         StackFrameProxyImpl frameProxy = suspendContext.getFrameProxy();
         if (frameProxy != null) {
-          Map<ObjectReference, List<StackFrameItem>> stacks = myDebugProcess.getUserData(CAPTURED_STACKS);
+          DebugProcessImpl process = suspendContext.getDebugProcess();
+          Map<ObjectReference, List<StackFrameItem>> stacks = process.getUserData(CAPTURED_STACKS);
           if (stacks == null) {
             stacks = new LinkedHashMap<ObjectReference, List<StackFrameItem>>() {
               @Override
@@ -94,7 +93,7 @@ public class StackCapturingLineBreakpoint extends WildcardMethodBreakpoint {
                 return size() > MAX_STORED_STACKS;
               }
             };
-            myDebugProcess.putUserData(CAPTURED_STACKS, Collections.synchronizedMap(stacks));
+            process.putUserData(CAPTURED_STACKS, Collections.synchronizedMap(stacks));
           }
           Value key = ContainerUtil.getOrElse(frameProxy.getArgumentValues(), myParamNo, null);
           if (key instanceof ObjectReference) {
@@ -117,7 +116,8 @@ public class StackCapturingLineBreakpoint extends WildcardMethodBreakpoint {
   }
 
   public static void track(DebugProcessImpl debugProcess, String classFqn, String methodName, @Nullable String methodSignature, int paramNo) {
-    StackCapturingLineBreakpoint breakpoint = new StackCapturingLineBreakpoint(debugProcess, classFqn, methodName, methodSignature, paramNo);
+    StackCapturingLineBreakpoint breakpoint =
+      new StackCapturingLineBreakpoint(debugProcess.getProject(), classFqn, methodName, methodSignature, paramNo);
     breakpoint.createRequest(debugProcess);
   }
 }
index df117f25879d8b069fd49de366652e7a59a861c3..acaea7c444f3595f53174035218944ea706b54d9 100644 (file)
 package com.intellij.openapi.roots.ui.configuration;
 
 import com.intellij.ide.DataManager;
-import com.intellij.ide.util.projectWizard.ProjectJdkListRenderer;
 import com.intellij.openapi.actionSystem.*;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.project.ProjectBundle;
 import com.intellij.openapi.projectRoots.Sdk;
 import com.intellij.openapi.projectRoots.SdkType;
 import com.intellij.openapi.projectRoots.SdkTypeId;
+import com.intellij.openapi.roots.ui.OrderEntryAppearanceService;
 import com.intellij.openapi.roots.ui.configuration.projectRoot.JdkListConfigurable;
 import com.intellij.openapi.roots.ui.configuration.projectRoot.ProjectSdksModel;
 import com.intellij.openapi.ui.ComboBoxWithWidePopup;
@@ -30,7 +30,9 @@ import com.intellij.openapi.ui.popup.JBPopupFactory;
 import com.intellij.openapi.util.Computable;
 import com.intellij.openapi.util.Condition;
 import com.intellij.openapi.util.Conditions;
+import com.intellij.openapi.util.SystemInfo;
 import com.intellij.openapi.util.text.StringUtil;
+import com.intellij.ui.ColoredListCellRenderer;
 import com.intellij.ui.ScreenUtil;
 import com.intellij.ui.SimpleTextAttributes;
 import com.intellij.util.containers.ContainerUtil;
@@ -43,13 +45,14 @@ import javax.swing.*;
 import java.awt.*;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
-import java.util.Comparator;
+import java.util.Arrays;
+import java.util.Collection;
 
 /**
  * @author Eugene Zhuravlev
  * @since May 18, 2005
  */
-public class JdkComboBox extends ComboBoxWithWidePopup {
+public class JdkComboBox extends ComboBoxWithWidePopup<JdkComboBox.JdkComboBoxItem> {
 
   private static final Icon EMPTY_ICON = JBUI.scale(EmptyIcon.create(1, 16));
 
@@ -78,9 +81,14 @@ public class JdkComboBox extends ComboBoxWithWidePopup {
     myFilter = filter;
     mySdkTypeFilter = sdkTypeFilter;
     myCreationFilter = creationFilter;
-    setRenderer(new ProjectJdkListRenderer() {
+    setRenderer(new ColoredListCellRenderer<JdkComboBoxItem>() {
       @Override
-      public void doCustomize(JList list, Object value, int index, boolean selected, boolean hasFocus) {
+      protected void customizeCellRenderer(@NotNull JList<? extends JdkComboBoxItem> list,
+                                           JdkComboBoxItem value,
+                                           int index,
+                                           boolean selected,
+                                           boolean hasFocus) {
+
         if (JdkComboBox.this.isEnabled()) {
           setIcon(EMPTY_ICON);    // to fix vertical size
           if (value instanceof InvalidJdkComboBoxItem) {
@@ -107,9 +115,11 @@ public class JdkComboBox extends ComboBoxWithWidePopup {
             append(version == null ? type.getPresentableName() : version);
             append(" (" + home + ")", SimpleTextAttributes.GRAYED_ATTRIBUTES);
           }
+          else if (value != null) {
+            OrderEntryAppearanceService.getInstance().forJdk(value.getJdk(), false, selected, true).customize(this);
+          }
           else {
-            super.doCustomize(list, value != null ? ((JdkComboBoxItem)value).getJdk()
-                                                  : new NoneJdkComboBoxItem(), index, selected, hasFocus);
+            customizeCellRenderer(list, new NoneJdkComboBoxItem(), index, selected, hasFocus);
           }
         }
       }
@@ -280,7 +290,7 @@ public class JdkComboBox extends ComboBoxWithWidePopup {
     model.reload(firstItem, ProjectStructureConfigurable.getInstance(project).getProjectJdksModel(), mySdkTypeFilter, myFilter, false);
   }
 
-  private static class JdkComboBoxModel extends DefaultComboBoxModel {
+  private static class JdkComboBoxModel extends DefaultComboBoxModel<JdkComboBoxItem> {
     public JdkComboBoxModel(@NotNull final ProjectSdksModel jdksModel, @Nullable Condition<SdkTypeId> sdkTypeFilter,
                             @Nullable Condition<Sdk> sdkFilter, boolean addSuggested) {
       reload(null, jdksModel, sdkTypeFilter, sdkFilter, addSuggested);
@@ -307,63 +317,33 @@ public class JdkComboBox extends ComboBoxWithWidePopup {
 
     @NotNull
     private static Sdk[] sortSdks(@NotNull final Sdk[] sdks) {
-      final ContainerUtil.KeyOrderedMultiMap<MyComparatorWrapper, Sdk> comparatorToSdkMap = new ContainerUtil.KeyOrderedMultiMap<>();
-      for (Sdk sdk : sdks) {
-        final SdkTypeId sdkType = sdk.getSdkType();
-        comparatorToSdkMap.putValue(new MyComparatorWrapper(sdkType instanceof SdkType ? (SdkType)sdkType : null), sdk);
-      }
-
-      return comparatorToSdkMap.entrySet().stream().flatMap(entry -> entry.getValue().stream().sorted(entry.getKey().getComparator()))
-        .toArray(size -> new Sdk[size]);
+      Sdk[] clone = sdks.clone();
+      Arrays.sort(clone, (sdk1, sdk2) -> {
+        SdkType sdkType1 = (SdkType)sdk1.getSdkType();
+        SdkType sdkType2 = (SdkType)sdk2.getSdkType();
+        if (!sdkType1.getComparator().equals(sdkType2.getComparator())) return StringUtil.compare(sdkType1.getPresentableName(), sdkType2.getPresentableName(), true);
+        return sdkType1.getComparator().compare(sdk1, sdk2);
+      });
+      return clone;
     }
 
     protected void addSuggestedItems(@Nullable Condition<SdkTypeId> sdkTypeFilter, Sdk[] jdks) {
+      // todo remove it when unix is supported
+      if (!SystemInfo.isWindows) return;
       SdkType[] types = SdkType.getAllTypes();
       for (SdkType type : types) {
         if (sdkTypeFilter == null || sdkTypeFilter.value(type) && ContainerUtil.find(jdks, sdk -> sdk.getSdkType() == type) == null) {
-          String homePath = type.suggestHomePath();
-          if (homePath != null && type.isValidSdkHome(homePath)) {
-            addElement(new SuggestedJdkItem(type, homePath));
+          Collection<String> paths = type.suggestHomePaths();
+          for (String path : paths) {
+            addElement(new SuggestedJdkItem(type, path));
           }
         }
       }
     }
-
-    private static class MyComparatorWrapper implements Comparable<MyComparatorWrapper> {
-      @Nullable
-      private SdkType mySdkType = null;
-
-      private MyComparatorWrapper(@Nullable final SdkType type) {
-        mySdkType = type;
-      }
-
-      @Nullable
-      private String getNameToCompare() {
-        return mySdkType == null ? null : mySdkType.getPresentableName();
-      }
-
-      @NotNull
-      private Comparator<Sdk> getComparator() {
-        return mySdkType == null ? SdkType.ALPHABETICAL_COMPARATOR : mySdkType.getComparator();
-      }
-
-      @Override
-      public int compareTo(@NotNull final MyComparatorWrapper comparatorWrapper) {
-        if (getComparator() == comparatorWrapper.getComparator()) return 0;
-
-        return StringUtil.compare(getNameToCompare(), comparatorWrapper.getNameToCompare(), true);
-      }
-    }
-
-    // implements javax.swing.ListModel
-    @Override
-    public JdkComboBoxItem getElementAt(int index) {
-      return (JdkComboBoxItem)super.getElementAt(index);
-    }
   }
 
   public static Condition<Sdk> getSdkFilter(@Nullable final Condition<SdkTypeId> filter) {
-    return filter == null ? Conditions.<Sdk>alwaysTrue() : (Condition<Sdk>)sdk -> filter.value(sdk.getSdkType());
+    return filter == null ? Conditions.alwaysTrue() : sdk -> filter.value(sdk.getSdkType());
   }
 
   public abstract static class JdkComboBoxItem {
index d1db913acec9354a5c8ec1616997ba226cafec64..c9ab97df0949af972bf9831453f5d6946267997e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2014 JetBrains s.r.o.
+ * Copyright 2000-2017 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.
@@ -55,6 +55,7 @@ import com.intellij.packaging.artifacts.ModifiableArtifactModel;
 import com.intellij.projectImport.ProjectImportBuilder;
 import com.intellij.util.containers.ContainerUtil;
 import com.intellij.util.containers.HashMap;
+import gnu.trove.THashMap;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -273,12 +274,11 @@ public class ModulesConfigurator implements ModulesProvider, ModuleEditor.Change
       }
     }
 
-    final List<ModifiableRootModel> models = new ArrayList<>(myModuleEditors.size());
     for (ModuleEditor moduleEditor : myModuleEditors.values()) {
       moduleEditor.canApply();
     }
     
-    final Map<Sdk, Sdk> modifiedToOriginalMap = new HashMap<>();
+    final Map<Sdk, Sdk> modifiedToOriginalMap = new THashMap<>();
     final ProjectSdksModel projectJdksModel = ProjectStructureConfigurable.getInstance(myProject).getProjectJdksModel();
     for (Map.Entry<Sdk, Sdk> entry : projectJdksModel.getProjectSdks().entrySet()) {
       modifiedToOriginalMap.put(entry.getValue(), entry.getKey());
@@ -286,6 +286,7 @@ public class ModulesConfigurator implements ModulesProvider, ModuleEditor.Change
 
     final Ref<ConfigurationException> exceptionRef = Ref.create();
     ApplicationManager.getApplication().runWriteAction(() -> {
+      final List<ModifiableRootModel> models = new ArrayList<>(myModuleEditors.size());
       try {
         for (final ModuleEditor moduleEditor : myModuleEditors.values()) {
           final ModifiableRootModel model = moduleEditor.apply();
@@ -311,8 +312,7 @@ public class ModulesConfigurator implements ModulesProvider, ModuleEditor.Change
       }
 
       try {
-        final ModifiableRootModel[] rootModels = models.toArray(new ModifiableRootModel[models.size()]);
-        ModifiableModelCommitter.multiCommit(rootModels, myModuleModel);
+        ModifiableModelCommitter.multiCommit(models, myModuleModel);
         myModuleModelCommitted = true;
         myFacetsConfigurator.commitFacets();
 
index e57117ffc473b5a55c321938535050e1e8853f37..0655d9ea5ec337ed2d38281f7728fabb9ab0a379 100644 (file)
@@ -58,7 +58,6 @@ import com.intellij.openapi.util.text.StringUtil;
 import com.intellij.openapi.vfs.LocalFileSystem;
 import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.openapi.vfs.pointers.VirtualFilePointerManager;
-import com.intellij.openapi.wm.WindowManager;
 import com.intellij.ui.navigation.Place;
 import com.intellij.util.PathUtil;
 import com.intellij.util.PlatformIcons;
@@ -103,7 +102,7 @@ public class ModuleStructureConfigurable extends BaseStructureConfigurable imple
     return 0;
   };
 
-  private boolean myPlainMode;
+  private boolean myHideModuleGroups;
 
   private final ModuleManager myModuleManager;
 
@@ -151,7 +150,7 @@ public class ModuleStructureConfigurable extends BaseStructureConfigurable imple
     final ArrayList<AnAction> result = super.createActions(fromPopup);
     if (fromPopup) {
       result.add(Separator.getInstance());
-      result.add(new MyGroupAction());
+      result.add(new HideGroupsAction());
       addCollapseExpandActions(result);
     }
     return result;
@@ -229,7 +228,7 @@ public class ModuleStructureConfigurable extends BaseStructureConfigurable imple
       if (nodesAdded) {
         myTree.setShowsRootHandles(true);
       }
-      final String[] groupPath = myPlainMode ? null : myContext.myModulesConfigurator.getModuleModel().getModuleGroupPath(module);
+      final String[] groupPath = myHideModuleGroups ? null : myContext.myModulesConfigurator.getModuleModel().getModuleGroupPath(module);
       if (groupPath == null || groupPath.length == 0){
         myRoot.add(moduleNode);
       }
@@ -282,7 +281,7 @@ public class ModuleStructureConfigurable extends BaseStructureConfigurable imple
       nodes[i ++] = node;
     }
     for (final MyNode moduleNode : nodes) {
-      final String[] groupPath = myPlainMode
+      final String[] groupPath = myHideModuleGroups
                                  ? null
                                  : group != null ? group.getGroupPath() : null;
       if (groupPath == null || groupPath.length == 0){
@@ -492,15 +491,13 @@ public class ModuleStructureConfigurable extends BaseStructureConfigurable imple
   }
 
   public void addLibraryOrderEntry(final Module module, final Library library) {
-    Component parent = WindowManager.getInstance().suggestParentWindow(module.getProject());
-
     final ModuleEditor moduleEditor = myContext.myModulesConfigurator.getModuleEditor(module);
     LOG.assertTrue(moduleEditor != null, "Current module editor was not initialized");
     final ModifiableRootModel modelProxy = moduleEditor.getModifiableRootModelProxy();
     final OrderEntry[] entries = modelProxy.getOrderEntries();
     for (OrderEntry entry : entries) {
       if (entry instanceof LibraryOrderEntry && Comparing.strEqual(entry.getPresentableName(), library.getName())) {
-        if (Messages.showYesNoDialog(parent,
+        if (Messages.showYesNoDialog(module.getProject(),
                                      ProjectBundle.message("project.roots.replace.library.entry.message", entry.getPresentableName()),
                                      ProjectBundle.message("project.roots.replace.library.entry.title"),
                                      Messages.getInformationIcon()) == Messages.YES) {
@@ -605,7 +602,7 @@ public class ModuleStructureConfigurable extends BaseStructureConfigurable imple
                                   PlatformIcons.CLOSED_MODULE_GROUP_ICON);
   }
 
-  private boolean canBeCopiedByExtension(final NamedConfigurable configurable) {
+  private static boolean canBeCopiedByExtension(final NamedConfigurable configurable) {
     for (final ModuleStructureExtension extension : ModuleStructureExtension.EP_NAME.getExtensions()) {
       if (extension.canBeCopied(configurable)) {
         return true;
@@ -669,7 +666,7 @@ public class ModuleStructureConfigurable extends BaseStructureConfigurable imple
     @Override
     @Nullable
     public Object getData(@NonNls String dataId) {
-      if (DataKeys.MODULE_CONTEXT_ARRAY.is(dataId)){
+      if (LangDataKeys.MODULE_CONTEXT_ARRAY.is(dataId)){
         final TreePath[] paths = myTree.getSelectionPaths();
         if (paths != null) {
           ArrayList<Module> modules = new ArrayList<>();
@@ -685,7 +682,7 @@ public class ModuleStructureConfigurable extends BaseStructureConfigurable imple
           return !modules.isEmpty() ? modules.toArray(new Module[modules.size()]) : null;
         }
       }
-      if (DataKeys.MODULE_CONTEXT.is(dataId)){
+      if (LangDataKeys.MODULE_CONTEXT.is(dataId)){
         return getSelectedModule();
       }
       if (LangDataKeys.MODIFIABLE_MODULE_MODEL.is(dataId)){
@@ -697,20 +694,18 @@ public class ModuleStructureConfigurable extends BaseStructureConfigurable imple
   }
 
 
-  private class MyGroupAction extends ToggleAction implements DumbAware {
+  private class HideGroupsAction extends ToggleAction implements DumbAware {
 
-    public MyGroupAction() {
+    public HideGroupsAction() {
       super("", "", AllIcons.ObjectBrowser.CompactEmptyPackages);
     }
 
     @Override
-    public void update(final AnActionEvent e) {
+    public void update(@NotNull final AnActionEvent e) {
       super.update(e);
       final Presentation presentation = e.getPresentation();
-      String text = ProjectBundle.message("project.roots.plain.mode.action.text.disabled");
-      if (myPlainMode){
-        text = ProjectBundle.message("project.roots.plain.mode.action.text.enabled");
-      }
+      String text;
+      text = ProjectBundle.message(myHideModuleGroups ? "project.roots.plain.mode.action.text.enabled" : "project.roots.plain.mode.action.text.disabled");
       presentation.setText(text);
       presentation.setDescription(text);
 
@@ -721,12 +716,12 @@ public class ModuleStructureConfigurable extends BaseStructureConfigurable imple
 
     @Override
     public boolean isSelected(AnActionEvent e) {
-      return myPlainMode;
+      return myHideModuleGroups;
     }
 
     @Override
     public void setSelected(AnActionEvent e, boolean state) {
-      myPlainMode = state;
+      myHideModuleGroups = state;
       DefaultMutableTreeNode selection = null;
       final TreePath selectionPath = myTree.getSelectionPath();
       if (selectionPath != null){
index e4fd6149572978000ebc6490d92d6a8d4d036265..e4036f35aded34a111b7ede874ea3a414b494a18 100644 (file)
@@ -10,6 +10,6 @@
     <orderEntry type="module" module-name="analysis-api" />
     <orderEntry type="module" module-name="java-psi-api" />
     <orderEntry type="module" module-name="projectModel-api" />
+    <orderEntry type="library" name="KotlinJavaRuntime" level="project" />
   </component>
-</module>
-
+</module>
\ No newline at end of file
index 9377ad40c843b5a4ae8ca372feb5c95edb186aec..c12802205313579c57cf66a8b0b0fe0e09ad2335 100644 (file)
  */
 package com.intellij.openapi.roots;
 
+import com.intellij.openapi.components.PersistentStateComponentWithModificationTracker;
 import com.intellij.openapi.diagnostic.Logger;
 import com.intellij.openapi.module.Module;
 import com.intellij.pom.java.LanguageLevel;
-import org.jdom.Element;
-import org.jetbrains.annotations.NonNls;
-import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
-public class LanguageLevelModuleExtensionImpl extends ModuleExtension implements LanguageLevelModuleExtension {
+public class LanguageLevelModuleExtensionImpl extends ModuleExtension implements LanguageLevelModuleExtension,
+                                                                                 PersistentStateComponentWithModificationTracker<LanguageLevelState> {
   private static final Logger LOG = Logger.getInstance(LanguageLevelModuleExtensionImpl.class);
 
-  @NonNls private static final String LANGUAGE_LEVEL_ELEMENT_NAME = "LANGUAGE_LEVEL";
   private Module myModule;
   private final boolean myWritable;
 
-  private LanguageLevel myLanguageLevel;
   private final LanguageLevelModuleExtensionImpl mySource;
 
+  private LanguageLevelState myState = new LanguageLevelState();
+
+  @Override
+  public long getStateModificationCount() {
+    return myState.getModificationCount();
+  }
+
   public static LanguageLevelModuleExtensionImpl getInstance(final Module module) {
     return ModuleRootManager.getInstance(module).getModuleExtension(LanguageLevelModuleExtensionImpl.class);
   }
@@ -51,37 +55,26 @@ public class LanguageLevelModuleExtensionImpl extends ModuleExtension implements
   public LanguageLevelModuleExtensionImpl(final LanguageLevelModuleExtensionImpl source, boolean writable) {
     myWritable = writable;
     myModule = source.myModule;
-    myLanguageLevel = source.myLanguageLevel;
     mySource = source;
+    // setter must be used instead of creating new state with constructor param because in any case default language level for module is null (i.e. project language level)
+    myState.setLanguageLevel(source.getLanguageLevel());
   }
 
   @Override
   public void setLanguageLevel(final LanguageLevel languageLevel) {
     LOG.assertTrue(myWritable, "Writable model can be retrieved from writable ModifiableRootModel");
-    myLanguageLevel = languageLevel;
+    myState.setLanguageLevel(languageLevel);
   }
 
+  @Nullable
   @Override
-  public void readExternal(@NotNull Element element) {
-    final String languageLevel = element.getAttributeValue(LANGUAGE_LEVEL_ELEMENT_NAME);
-    if (languageLevel != null) {
-      try {
-        myLanguageLevel = LanguageLevel.valueOf(languageLevel);
-      }
-      catch (IllegalArgumentException e) {
-        //bad value was stored
-      }
-    }
-    else {
-      myLanguageLevel = null;
-    }
+  public LanguageLevelState getState() {
+    return myState;
   }
 
   @Override
-  public void writeExternal(final Element element) {
-    if (myLanguageLevel != null) {
-      element.setAttribute(LANGUAGE_LEVEL_ELEMENT_NAME, myLanguageLevel.toString());
-    }
+  public void loadState(LanguageLevelState state) {
+    myState = state;
   }
 
   @Override
@@ -91,26 +84,26 @@ public class LanguageLevelModuleExtensionImpl extends ModuleExtension implements
 
   @Override
   public void commit() {
-    if (mySource != null && mySource.myLanguageLevel != myLanguageLevel) {
-      mySource.myLanguageLevel = myLanguageLevel;
+    if (isChanged()) {
+      mySource.myState.setLanguageLevel(myState.getLanguageLevel());
       LanguageLevelProjectExtension.getInstance(myModule.getProject()).languageLevelsChanged();
     }
   }
 
   @Override
   public boolean isChanged() {
-    return mySource != null && mySource.myLanguageLevel != myLanguageLevel;
+    return mySource != null && !mySource.myState.equals(myState);
   }
 
   @Override
   public void dispose() {
     myModule = null;
-    myLanguageLevel = null;
+    myState = null;
   }
 
   @Nullable
   @Override
   public LanguageLevel getLanguageLevel() {
-    return myLanguageLevel;
+    return myState.getLanguageLevel();
   }
 }
diff --git a/java/java-analysis-api/src/com/intellij/openapi/r