Misc: Extract kotlin-ultimate project
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
.DS_Store
|
||||
.idea/shelf
|
||||
dependencies
|
||||
ideaSDK
|
||||
out
|
||||
tmp
|
||||
workspace.xml
|
||||
*.versionsBackup
|
||||
Generated
+1
@@ -0,0 +1 @@
|
||||
kotlin-ultimate
|
||||
Generated
+8
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="AntConfiguration">
|
||||
<buildFile url="file://$PROJECT_DIR$/update_dependencies.xml" />
|
||||
<buildFile url="file://$PROJECT_DIR$/build.xml" />
|
||||
<buildFile url="file://$PROJECT_DIR$/../idea-runner/runner.xml" />
|
||||
</component>
|
||||
</project>
|
||||
Generated
+8
@@ -0,0 +1,8 @@
|
||||
<component name="ArtifactManager">
|
||||
<artifact name="Dummy">
|
||||
<output-path>$PROJECT_DIR$/out/artifacts/Dummy</output-path>
|
||||
<root id="root">
|
||||
<element id="module-output" name="kotlin-ultimate" />
|
||||
</root>
|
||||
</artifact>
|
||||
</component>
|
||||
Generated
+8
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JavaProjectCodeInsightSettings">
|
||||
<excluded-names>
|
||||
<name>kotlin.reflect.jvm.internal.impl</name>
|
||||
</excluded-names>
|
||||
</component>
|
||||
</project>
|
||||
Generated
+15
-1
@@ -1,12 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<option name="DEFAULT_COMPILER" value="Javac" />
|
||||
<option name="BUILD_PROCESS_HEAP_SIZE" value="2000" />
|
||||
<resourceExtensions />
|
||||
<wildcardResourcePatterns />
|
||||
<wildcardResourcePatterns>
|
||||
<entry name="!?*.java" />
|
||||
<entry name="!?*.form" />
|
||||
<entry name="!?*.class" />
|
||||
<entry name="!?*.groovy" />
|
||||
<entry name="!?*.scala" />
|
||||
<entry name="!?*.flex" />
|
||||
<entry name="!?*.kt" />
|
||||
<entry name="!?*.clj" />
|
||||
</wildcardResourcePatterns>
|
||||
<annotationProcessing>
|
||||
<profile default="true" name="Default" enabled="false">
|
||||
<processorPath useClasspath="true" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
</component>
|
||||
<component name="JavacSettings">
|
||||
<option name="ADDITIONAL_OPTIONS_STRING" value="-target 1.6" />
|
||||
</component>
|
||||
</project>
|
||||
Generated
+9
@@ -0,0 +1,9 @@
|
||||
<component name="CopyrightManager">
|
||||
<copyright>
|
||||
<option name="notice" value="Copyright 2010-&#36;today.year JetBrains s.r.o. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License." />
|
||||
<option name="keyword" value="Copyright" />
|
||||
<option name="allowReplaceKeyword" value="JetBrains" />
|
||||
<option name="myName" value="apache" />
|
||||
<option name="myLocal" value="true" />
|
||||
</copyright>
|
||||
</component>
|
||||
+3
@@ -1,5 +1,8 @@
|
||||
<component name="CopyrightManager">
|
||||
<settings default="">
|
||||
<module2copyright>
|
||||
<element module="all except testData" copyright="apache" />
|
||||
</module2copyright>
|
||||
<LanguageOptions name="Groovy">
|
||||
<option name="fileTypeOverride" value="1" />
|
||||
</LanguageOptions>
|
||||
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
<component name="ProjectDictionaryState">
|
||||
<dictionary name="Nikolay.Krasko">
|
||||
<words>
|
||||
<w>accessors</w>
|
||||
<w>fqname</w>
|
||||
<w>goto</w>
|
||||
<w>gradle</w>
|
||||
<w>intrinsics</w>
|
||||
<w>kdoc</w>
|
||||
<w>kompiler</w>
|
||||
<w>memoize</w>
|
||||
<w>memoized</w>
|
||||
<w>multiline</w>
|
||||
<w>preload</w>
|
||||
<w>preloader</w>
|
||||
<w>preloading</w>
|
||||
<w>preprocess</w>
|
||||
<w>redeclarations</w>
|
||||
<w>subclassed</w>
|
||||
<w>subgraph</w>
|
||||
<w>substep</w>
|
||||
</words>
|
||||
</dictionary>
|
||||
</component>
|
||||
Generated
+22
@@ -0,0 +1,22 @@
|
||||
<component name="ProjectDictionaryState">
|
||||
<dictionary name="abreslav">
|
||||
<words>
|
||||
<w>accessor</w>
|
||||
<w>covariantly</w>
|
||||
<w>deserialized</w>
|
||||
<w>dominator</w>
|
||||
<w>inferrer</w>
|
||||
<w>iterable</w>
|
||||
<w>nondeterministic</w>
|
||||
<w>nullable</w>
|
||||
<w>overridable</w>
|
||||
<w>pseudocode</w>
|
||||
<w>substitutor</w>
|
||||
<w>subtyping</w>
|
||||
<w>supertype</w>
|
||||
<w>supertypes</w>
|
||||
<w>tuple</w>
|
||||
<w>unary</w>
|
||||
</words>
|
||||
</dictionary>
|
||||
</component>
|
||||
Generated
+10
@@ -0,0 +1,10 @@
|
||||
<component name="ProjectDictionaryState">
|
||||
<dictionary name="bashor">
|
||||
<words>
|
||||
<w>ctor</w>
|
||||
<w>interner</w>
|
||||
<w>lookups</w>
|
||||
<w>unescape</w>
|
||||
</words>
|
||||
</dictionary>
|
||||
</component>
|
||||
Generated
+8
@@ -0,0 +1,8 @@
|
||||
<component name="ProjectDictionaryState">
|
||||
<dictionary name="dzharkov">
|
||||
<words>
|
||||
<w>checkcast</w>
|
||||
<w>insn</w>
|
||||
</words>
|
||||
</dictionary>
|
||||
</component>
|
||||
Generated
+13
@@ -0,0 +1,13 @@
|
||||
<component name="ProjectDictionaryState">
|
||||
<dictionary name="geevee">
|
||||
<words>
|
||||
<w>builtins</w>
|
||||
<w>callables</w>
|
||||
<w>klass</w>
|
||||
<w>proto</w>
|
||||
<w>protoc</w>
|
||||
<w>protos</w>
|
||||
<w>ubuntu</w>
|
||||
</words>
|
||||
</dictionary>
|
||||
</component>
|
||||
Generated
+9
@@ -0,0 +1,9 @@
|
||||
<component name="ProjectDictionaryState">
|
||||
<dictionary name="max">
|
||||
<words>
|
||||
<w>classfiles</w>
|
||||
<w>codegen</w>
|
||||
<w>kotlin</w>
|
||||
</words>
|
||||
</dictionary>
|
||||
</component>
|
||||
Generated
+25
@@ -0,0 +1,25 @@
|
||||
<component name="ProjectDictionaryState">
|
||||
<dictionary name="valentin">
|
||||
<words>
|
||||
<w>decapitalize</w>
|
||||
<w>delegator</w>
|
||||
<w>funs</w>
|
||||
<w>immediates</w>
|
||||
<w>initializers</w>
|
||||
<w>inserter</w>
|
||||
<w>negatable</w>
|
||||
<w>pparent</w>
|
||||
<w>precheck</w>
|
||||
<w>prioritizer</w>
|
||||
<w>processings</w>
|
||||
<w>rbrace</w>
|
||||
<w>rbracket</w>
|
||||
<w>renderers</w>
|
||||
<w>rparenth</w>
|
||||
<w>selectioner</w>
|
||||
<w>summand</w>
|
||||
<w>unpluralize</w>
|
||||
<w>weighers</w>
|
||||
</words>
|
||||
</dictionary>
|
||||
</component>
|
||||
Generated
+1
-1
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false">
|
||||
<file url="PROJECT" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
||||
+426
@@ -0,0 +1,426 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0" is_locked="false">
|
||||
<option name="myName" value="idea.default" />
|
||||
<option name="myLocal" value="false" />
|
||||
<inspection_tool class="AbstractMethodCallInConstructor" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="ArchaicSystemPropertyAccess" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AssignmentToForLoopParameter" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="m_checkForeachParameters" value="false" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="AssignmentToStaticFieldFromInstanceMethod" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<scope name="IDEA Test Sources" level="WARNING" enabled="false" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="AssignmentUsedAsCondition" enabled="false" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AutoBoxing" enabled="true" level="WARNING" enabled_by_default="false">
|
||||
<scope name="runtime.classes" level="WARNING" enabled="true">
|
||||
<option name="ignoreAddedToCollection" value="false" />
|
||||
</scope>
|
||||
<option name="ignoreAddedToCollection" value="false" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="AutoUnboxing" enabled="true" level="WARNING" enabled_by_default="false">
|
||||
<scope name="runtime.classes" level="WARNING" enabled="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="BooleanMethodIsAlwaysInverted" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="BusyWait" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="CStyleArrayDeclaration" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="CastConflictsWithInstanceof" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="CastToIncompatibleInterface" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="ChainedEquality" enabled="false" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="ClassNameSameAsAncestorName" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="CloneCallsSuperClone" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CloneDeclaresCloneNotSupported" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ComparisonOfShortAndChar" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="ConditionalExpressionWithIdenticalBranches" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="ConfusingOctalEscape" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="ConstantConditionalExpression" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<scope name="IDEA Test Sources" level="WARNING" enabled="false" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="ConstantConditions" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<scope name="runtime.classes" level="WARNING" enabled="false">
|
||||
<option name="SUGGEST_NULLABLE_ANNOTATIONS" value="false" />
|
||||
<option name="DONT_REPORT_TRUE_ASSERT_STATEMENTS" value="false" />
|
||||
</scope>
|
||||
<option name="SUGGEST_NULLABLE_ANNOTATIONS" value="false" />
|
||||
<option name="DONT_REPORT_TRUE_ASSERT_STATEMENTS" value="false" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="ConstantIfStatement" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<scope name="IDEA Test Sources" level="WARNING" enabled="false" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="ContinueOrBreakFromFinallyBlock" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CovariantCompareTo" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="CovariantEquals" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="DeclareCollectionAsInterface" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
||||
<option name="ignoreLocalVariables" value="false" />
|
||||
<option name="ignorePrivateMethodsAndFields" value="false" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="DoubleCheckedLocking" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="ignoreOnVolatileVariables" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="DuplicateCondition" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="ignoreMethodCalls" value="false" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="EmptyStatementBody" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="m_reportEmptyBlocks" value="false" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="EmptySynchronizedStatement" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="EnumSwitchStatementWhichMissesCases" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="ignoreSwitchStatementsWithDefault" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="ExceptionNameDoesntEndWithException" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="FieldAccessedSynchronizedAndUnsynchronized" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="countGettersAndSetters" value="false" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="FieldMayBeFinal" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="FieldMayBeStatic" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="Finalize" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="ignoreTrivialFinalizers" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="FinalizeNotProtected" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="ForLoopReplaceableByWhile" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="m_ignoreLoopsWithoutConditions" value="false" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="ForLoopThatDoesntUseLoopVariable" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="HtmlUnknownTag" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="myValues">
|
||||
<value>
|
||||
<list size="5">
|
||||
<item index="0" class="java.lang.String" itemvalue="nobr" />
|
||||
<item index="1" class="java.lang.String" itemvalue="noembed" />
|
||||
<item index="2" class="java.lang.String" itemvalue="comment" />
|
||||
<item index="3" class="java.lang.String" itemvalue="noscript" />
|
||||
<item index="4" class="java.lang.String" itemvalue="javascript" />
|
||||
</list>
|
||||
</value>
|
||||
</option>
|
||||
<option name="myCustomValuesEnabled" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="IOResource" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="ignoredTypesString" value="java.io.ByteArrayOutputStream,java.io.ByteArrayInputStream,java.io.StringBufferInputStream,java.io.CharArrayWriter,java.io.CharArrayReader,java.io.StringWriter,java.io.StringReader" />
|
||||
<option name="insideTryAllowed" value="false" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="IfStatementWithIdenticalBranches" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="InnerClassMayBeStatic" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="InstanceofCatchParameter" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="InstanceofIncompatibleInterface" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="JUnitTestClassNamingConvention" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="m_regex" value="[A-Z][A-Za-z0-9]*Test" />
|
||||
<option name="m_minLength" value="8" />
|
||||
<option name="m_maxLength" value="64" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="JavaDoc" enabled="true" level="WARNING" enabled_by_default="false">
|
||||
<scope name="IDEA Test Sources" level="WARNING" enabled="false">
|
||||
<option name="TOP_LEVEL_CLASS_OPTIONS">
|
||||
<value>
|
||||
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||
<option name="REQUIRED_TAGS" value="" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="INNER_CLASS_OPTIONS">
|
||||
<value>
|
||||
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||
<option name="REQUIRED_TAGS" value="" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="METHOD_OPTIONS">
|
||||
<value>
|
||||
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||
<option name="REQUIRED_TAGS" value="@return@param@throws or @exception" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="FIELD_OPTIONS">
|
||||
<value>
|
||||
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||
<option name="REQUIRED_TAGS" value="" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="IGNORE_DEPRECATED" value="false" />
|
||||
<option name="IGNORE_JAVADOC_PERIOD" value="true" />
|
||||
<option name="IGNORE_DUPLICATED_THROWS" value="false" />
|
||||
<option name="IGNORE_POINT_TO_ITSELF" value="false" />
|
||||
<option name="myAdditionalJavadocTags" value="" />
|
||||
</scope>
|
||||
<scope name="idea openapi" level="WARNING" enabled="true">
|
||||
<option name="TOP_LEVEL_CLASS_OPTIONS">
|
||||
<value>
|
||||
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||
<option name="REQUIRED_TAGS" value="" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="INNER_CLASS_OPTIONS">
|
||||
<value>
|
||||
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||
<option name="REQUIRED_TAGS" value="" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="METHOD_OPTIONS">
|
||||
<value>
|
||||
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||
<option name="REQUIRED_TAGS" value="@return@param@throws or @exception" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="FIELD_OPTIONS">
|
||||
<value>
|
||||
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||
<option name="REQUIRED_TAGS" value="" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="IGNORE_DEPRECATED" value="true" />
|
||||
<option name="IGNORE_JAVADOC_PERIOD" value="true" />
|
||||
<option name="IGNORE_DUPLICATED_THROWS" value="false" />
|
||||
<option name="IGNORE_POINT_TO_ITSELF" value="false" />
|
||||
<option name="myAdditionalJavadocTags" value="" />
|
||||
</scope>
|
||||
<scope name="runtime.classes" level="WARNING" enabled="true">
|
||||
<option name="TOP_LEVEL_CLASS_OPTIONS">
|
||||
<value>
|
||||
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||
<option name="REQUIRED_TAGS" value="" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="INNER_CLASS_OPTIONS">
|
||||
<value>
|
||||
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||
<option name="REQUIRED_TAGS" value="" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="METHOD_OPTIONS">
|
||||
<value>
|
||||
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||
<option name="REQUIRED_TAGS" value="@return@param@throws or @exception" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="FIELD_OPTIONS">
|
||||
<value>
|
||||
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||
<option name="REQUIRED_TAGS" value="" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="IGNORE_DEPRECATED" value="false" />
|
||||
<option name="IGNORE_JAVADOC_PERIOD" value="true" />
|
||||
<option name="IGNORE_DUPLICATED_THROWS" value="false" />
|
||||
<option name="IGNORE_POINT_TO_ITSELF" value="false" />
|
||||
<option name="myAdditionalJavadocTags" value="" />
|
||||
</scope>
|
||||
<option name="TOP_LEVEL_CLASS_OPTIONS">
|
||||
<value>
|
||||
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||
<option name="REQUIRED_TAGS" value="" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="INNER_CLASS_OPTIONS">
|
||||
<value>
|
||||
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||
<option name="REQUIRED_TAGS" value="" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="METHOD_OPTIONS">
|
||||
<value>
|
||||
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||
<option name="REQUIRED_TAGS" value="@return@param@throws or @exception" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="FIELD_OPTIONS">
|
||||
<value>
|
||||
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||
<option name="REQUIRED_TAGS" value="" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="IGNORE_DEPRECATED" value="false" />
|
||||
<option name="IGNORE_JAVADOC_PERIOD" value="true" />
|
||||
<option name="IGNORE_DUPLICATED_THROWS" value="false" />
|
||||
<option name="IGNORE_POINT_TO_ITSELF" value="false" />
|
||||
<option name="myAdditionalJavadocTags" value="" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="JavadocReference" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<scope name="IDEA Test Sources" level="ERROR" enabled="false" />
|
||||
<scope name="idea openapi" level="WARNING" enabled="true" />
|
||||
<scope name="runtime.classes" level="ERROR" enabled="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="MethodMayBeStatic" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="m_onlyPrivateOrFinal" value="false" />
|
||||
<option name="m_ignoreEmptyMethods" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="MethodNamesDifferOnlyByCase" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="MethodOverloadsParentMethod" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="MethodOverridesPrivateMethod" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="MethodOverridesStaticMethod" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="MissingOverrideAnnotation" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="ignoreObjectMethods" value="true" />
|
||||
<option name="ignoreAnonymousClassMethods" value="false" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="MisspelledCompareTo" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="MisspelledEquals" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="MisspelledHashcode" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="MisspelledSetUp" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="MisspelledTearDown" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="MisspelledToString" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="MultipleDeclaration" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="ignoreForLoopDeclarations" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="MultipleTypedDeclaration" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="NestedSynchronizedStatement" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="NoExplicitFinalizeCalls" enabled="true" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="NonExceptionNameEndsWithException" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="NonStaticFinalLogger" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<scope name="IDEA Test Sources" level="WARNING" enabled="false">
|
||||
<option name="loggerClassName" value="java.util.logging.Logger" />
|
||||
</scope>
|
||||
<option name="loggerClassName" value="java.util.logging.Logger" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="NonSynchronizedMethodOverridesSynchronizedMethod" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="ObjectEqualsNull" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ObjectNotify" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="ObsoleteCollection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="ignoreRequiredObsoleteCollectionTypes" value="false" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="PackageDirectoryMismatch" enabled="true" level="WARNING" enabled_by_default="false">
|
||||
<scope name="all except testData" level="WARNING" enabled="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="ProtectedMemberInFinalClass" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="PublicFieldAccessedInSynchronizedContext" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="PyCompatibilityInspection" enabled="true" level="ERROR" enabled_by_default="true">
|
||||
<option name="fromVersion" value="2.4" />
|
||||
<option name="toVersion" value="3.1" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="ReplaceAssignmentWithOperatorAssignment" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="ignoreLazyOperators" value="true" />
|
||||
<option name="ignoreObscureOperators" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="SSBasedInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<searchConfiguration name="SwingUtilities.invokeLater" text="SwingUtilities.invokeLater($runnable$)" recursive="false" caseInsensitive="false" type="JAVA">
|
||||
<constraint name="Instance" regexp="SwingUtilities" minCount="0" target="true" within="" contains="" />
|
||||
<constraint name="MethodCall" within="" contains="" />
|
||||
<constraint name="Parameter" minCount="0" maxCount="2147483647" within="" contains="" />
|
||||
<constraint name="__context__" within="" contains="" />
|
||||
<constraint name="runnable" within="" contains="" />
|
||||
</searchConfiguration>
|
||||
<replaceConfiguration name="DirectCallOfDispose" text="$Instance$.dispose()" recursive="false" caseInsensitive="false" type="JAVA" reformatAccordingToStyle="true" shortenFQN="true" replacement="Disposer.dispose($Instance$)">
|
||||
<constraint name="Instance" regexp="super" nameOfExprType="Disposable" withinHierarchy="true" exprTypeWithinHierarchy="true" minCount="0" negateName="true" within="" contains="" />
|
||||
<constraint name="MethodCall" target="true" within="" contains="" />
|
||||
<constraint name="Parameter" minCount="0" maxCount="2147483647" within="" contains="" />
|
||||
<constraint name="__context__" within="" contains="" />
|
||||
</replaceConfiguration>
|
||||
<replaceConfiguration name="new Object[0]" text="new Object[0]" recursive="false" caseInsensitive="true" type="JAVA" reformatAccordingToStyle="true" shortenFQN="true" replacement="com.intellij.util.ArrayUtil.EMPTY_OBJECT_ARRAY" />
|
||||
<replaceConfiguration name="new String[0]" text="new String[0]" recursive="false" caseInsensitive="true" type="JAVA" reformatAccordingToStyle="true" shortenFQN="true" replacement="com.intellij.util.ArrayUtil.EMPTY_STRING_ARRAY" />
|
||||
<replaceConfiguration name="new Class[0]" text="new Class[0]" recursive="false" caseInsensitive="true" type="JAVA" reformatAccordingToStyle="true" shortenFQN="true" replacement="com.intellij.util.ArrayUtil.EMPTY_CLASS_ARRAY" />
|
||||
<replaceConfiguration name="Log.error" text="$LOG$.assertTrue(false, $e$)" recursive="false" caseInsensitive="true" type="JAVA" reformatAccordingToStyle="true" shortenFQN="true" replacement="$LOG$.error($e$)">
|
||||
<constraint name="e" within="" contains="" />
|
||||
<constraint name="LOG" within="" contains="" />
|
||||
</replaceConfiguration>
|
||||
<replaceConfiguration name="toStringArray" text="$collection$.toArray(new String[$collection$.size()])" recursive="false" caseInsensitive="true" type="JAVA" reformatAccordingToStyle="true" shortenFQN="true" replacement="com.intellij.util.ArrayUtil.toStringArray($collection$)">
|
||||
<constraint name="collection" within="" contains="" />
|
||||
</replaceConfiguration>
|
||||
<replaceConfiguration name="toObjectArray" text="$collection$.toArray(new Object[$collection$.size()])" recursive="false" caseInsensitive="true" type="JAVA" reformatAccordingToStyle="true" shortenFQN="true" replacement="com.intellij.util.ArrayUtil.toObjectArray($collection$)">
|
||||
<constraint name="collection" within="" contains="" />
|
||||
</replaceConfiguration>
|
||||
<replaceConfiguration name="toStringArray0" text="$collection$.toArray(new String[0])" recursive="false" caseInsensitive="true" type="JAVA" reformatAccordingToStyle="true" shortenFQN="true" replacement="com.intellij.util.ArrayUtil.toStringArray($collection$)">
|
||||
<constraint name="collection" within="" contains="" />
|
||||
</replaceConfiguration>
|
||||
<replaceConfiguration name="toObjectArray0" text="$collection$.toArray(new Object[0])" recursive="false" caseInsensitive="true" type="JAVA" reformatAccordingToStyle="true" shortenFQN="true" replacement="com.intellij.util.ArrayUtil.toObjectArray($collection$)">
|
||||
<constraint name="collection" within="" contains="" />
|
||||
</replaceConfiguration>
|
||||
<replaceConfiguration name="toStringArray00" text="$collection$.toArray(ArrayUtil.EMPTY_STRING_ARRAY)" recursive="false" caseInsensitive="true" type="JAVA" reformatAccordingToStyle="true" shortenFQN="true" replacement="com.intellij.util.ArrayUtil.toStringArray($collection$)">
|
||||
<constraint name="collection" within="" contains="" />
|
||||
</replaceConfiguration>
|
||||
<replaceConfiguration name="toObjectArray00" text="$collection$.toArray(ArrayUtil.EMPTY_OBJECT_ARRAY)" recursive="false" caseInsensitive="true" type="JAVA" reformatAccordingToStyle="true" shortenFQN="true" replacement="com.intellij.util.ArrayUtil.toObjectArray($collection$)">
|
||||
<constraint name="collection" within="" contains="" />
|
||||
</replaceConfiguration>
|
||||
<replaceConfiguration name="File.createTempFile" text="java.io.File.createTempFile($prefix$, $suffix$)" recursive="false" caseInsensitive="true" type="JAVA" reformatAccordingToStyle="true" shortenFQN="true" replacement="com.intellij.openapi.util.io.FileUtil.createTempFile($prefix$, $suffix$)">
|
||||
<constraint name="prefix" within="" contains="" />
|
||||
<constraint name="suffix" within="" contains="" />
|
||||
</replaceConfiguration>
|
||||
<replaceConfiguration name="File.createTempFile(dir)" text="java.io.File.createTempFile($prefix$, $suffix$, $dir$)" recursive="false" caseInsensitive="true" type="JAVA" reformatAccordingToStyle="true" shortenFQN="true" replacement="com.intellij.openapi.util.io.FileUtil.createTempFile($dir$, $prefix$, $suffix$, true)">
|
||||
<constraint name="prefix" within="" contains="" />
|
||||
<constraint name="suffix" within="" contains="" />
|
||||
<constraint name="dir" within="" contains="" />
|
||||
</replaceConfiguration>
|
||||
<searchConfiguration name="Use RecursionManager?" text="class $Class$ { ThreadLocal<$FieldType$> $FieldName$ = $Init$; }" recursive="false" caseInsensitive="false" type="JAVA">
|
||||
<constraint name="Class" script="""" within="" contains="" />
|
||||
<constraint name="FieldType" script="""" regexp="Collection" withinHierarchy="true" maxCount="2147483647" target="true" wholeWordsOnly="true" within="" contains="" />
|
||||
<constraint name="FieldName" script="""" maxCount="2147483647" within="" contains="" />
|
||||
<constraint name="Init" script="""" minCount="0" maxCount="2147483647" within="" contains="" />
|
||||
<constraint name="__context__" script="""" within="" contains="" />
|
||||
</searchConfiguration>
|
||||
</inspection_tool>
|
||||
<inspection_tool class="SetReplaceableByEnumSet" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="SetupCallsSuperSetup" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="SetupIsPublicVoidNoArg" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="SimplifiableIfStatement" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="Since15" enabled="true" level="ERROR" enabled_by_default="true">
|
||||
<scope name="IDEA Test Sources" level="ERROR" enabled="false" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="SocketResource" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="insideTryAllowed" value="false" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="StaticCallOnSubclass" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="StaticFieldReferenceOnSubclass" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="StaticSuite" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="StringConstructor" enabled="false" level="WARNING" enabled_by_default="false">
|
||||
<option name="ignoreSubstringArguments" value="false" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="StringEquality" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="StringEqualsEmptyString" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="SwitchStatementWithConfusingDeclaration" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="SynchronizeOnThis" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="SystemOutErr" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<scope name="Tests" level="WARNING" enabled="false" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="TeardownCallsSuperTeardown" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="TeardownIsPublicVoidNoArg" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="TestCaseWithConstructor" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="TestCaseWithNoTestMethods" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="ignoreSupers" value="false" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="TestMethodIsPublicVoidNoArg" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="TestOnlyProblems" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="TextLabelInSwitchStatement" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="ThreadDumpStack" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<scope name="IDEA Test Sources" level="WARNING" enabled="false" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="ThreadRun" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="ThreadStartInConstruction" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="ThrowablePrintStackTrace" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<scope name="Tests" level="WARNING" enabled="false" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="TrivialIf" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="TrivialStringConcatenation" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="UndeclaredTests" enabled="true" level="WARNING" enabled_by_default="false">
|
||||
<scope name="Tests" level="WARNING" enabled="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="UnnecessarilyQualifiedStaticUsage" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<scope name="IDEA Test Sources" level="WARNING" enabled="false">
|
||||
<option name="m_ignoreStaticFieldAccesses" value="false" />
|
||||
<option name="m_ignoreStaticMethodCalls" value="false" />
|
||||
<option name="m_ignoreStaticAccessFromStaticContext" value="false" />
|
||||
</scope>
|
||||
<option name="m_ignoreStaticFieldAccesses" value="false" />
|
||||
<option name="m_ignoreStaticMethodCalls" value="false" />
|
||||
<option name="m_ignoreStaticAccessFromStaticContext" value="false" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="UnnecessaryBoxing" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UnnecessaryFinalOnLocalVariableOrParameter" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="UnnecessaryFullyQualifiedName" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<scope name="IDEA Test Sources" level="WARNING" enabled="false">
|
||||
<option name="m_ignoreJavadoc" value="true" />
|
||||
</scope>
|
||||
<option name="m_ignoreJavadoc" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="UnnecessaryLabelOnBreakStatement" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UnnecessaryLabelOnContinueStatement" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UnnecessaryQualifierForThis" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="UnnecessaryUnboxing" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UseOfPropertiesAsHashtable" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="UtilityClassWithPublicConstructor" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="WaitNotInLoop" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="WaitNotInSynchronizedContext" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="WaitWhileHoldingTwoLocks" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="WeakerAccess" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="SUGGEST_PACKAGE_LOCAL_FOR_MEMBERS" value="false" />
|
||||
<option name="SUGGEST_PACKAGE_LOCAL_FOR_TOP_CLASSES" value="false" />
|
||||
<option name="SUGGEST_PRIVATE_FOR_INNERS" value="false" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="WhileLoopSpinsOnField" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="ignoreNonEmtpyLoops" value="false" />
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
</component>
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<settings>
|
||||
<option name="PROJECT_PROFILE" value="Project Default" />
|
||||
<option name="PROJECT_PROFILE" value="idea.default" />
|
||||
<option name="USE_PROJECT_PROFILE" value="true" />
|
||||
<version value="1.0" />
|
||||
</settings>
|
||||
|
||||
Generated
+6
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="KotlinCompilerSettings">
|
||||
<option name="additionalArguments" value="-version -Xallow-kotlin-package -Xskip-metadata-version-check" />
|
||||
</component>
|
||||
</project>
|
||||
Generated
+12
@@ -0,0 +1,12 @@
|
||||
<component name="libraryTable">
|
||||
<library name="css-support">
|
||||
<CLASSES>
|
||||
<root url="file://$PROJECT_DIR$/ideaSDK/plugins/CSS/lib" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$PROJECT_DIR$/ideaSDK/lib/src/src_css-api.zip!/" />
|
||||
</SOURCES>
|
||||
<jarDirectory url="file://$PROJECT_DIR$/ideaSDK/plugins/CSS/lib" recursive="false" />
|
||||
</library>
|
||||
</component>
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
<component name="libraryTable">
|
||||
<library name="database-support">
|
||||
<CLASSES>
|
||||
<root url="file://$PROJECT_DIR$/ideaSDK/plugins/DatabaseTools/lib" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$PROJECT_DIR$/ideaSDK/lib/src/src_database-openapi.zip!/" />
|
||||
</SOURCES>
|
||||
<jarDirectory url="file://$PROJECT_DIR$/ideaSDK/plugins/DatabaseTools/lib" recursive="false" />
|
||||
</library>
|
||||
</component>
|
||||
@@ -0,0 +1,19 @@
|
||||
<component name="libraryTable">
|
||||
<library name="gradle-and-groovy-plugin">
|
||||
<ANNOTATIONS>
|
||||
<root url="file://$PROJECT_DIR$/../annotations" />
|
||||
</ANNOTATIONS>
|
||||
<CLASSES>
|
||||
<root url="file://$PROJECT_DIR$/ideaSDK/plugins/gradle/lib" />
|
||||
<root url="file://$PROJECT_DIR$/ideaSDK/plugins/Groovy/lib" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="file://$PROJECT_DIR$/ideaSDK/plugins/gradle/lib" />
|
||||
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/" />
|
||||
</SOURCES>
|
||||
<jarDirectory url="file://$PROJECT_DIR$/ideaSDK/plugins/gradle/lib" recursive="false" />
|
||||
<jarDirectory url="file://$PROJECT_DIR$/ideaSDK/plugins/Groovy/lib" recursive="false" />
|
||||
<jarDirectory url="file://$PROJECT_DIR$/ideaSDK/plugins/gradle/lib" recursive="false" type="SOURCES" />
|
||||
</library>
|
||||
</component>
|
||||
Generated
+19
@@ -0,0 +1,19 @@
|
||||
<component name="libraryTable">
|
||||
<library name="idea-full">
|
||||
<ANNOTATIONS>
|
||||
<root url="file://$PROJECT_DIR$/../annotations" />
|
||||
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/" />
|
||||
</ANNOTATIONS>
|
||||
<CLASSES>
|
||||
<root url="file://$PROJECT_DIR$/ideaSDK/lib" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$PROJECT_DIR$/../dependencies/guava-17.0-sources.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/../dependencies/asm5-src.zip!/" />
|
||||
<root url="jar://$PROJECT_DIR$/../dependencies/cli-parser-1.1.1-sources.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/" />
|
||||
</SOURCES>
|
||||
<jarDirectory url="file://$PROJECT_DIR$/ideaSDK/lib" recursive="false" />
|
||||
</library>
|
||||
</component>
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
<component name="libraryTable">
|
||||
<library name="intellij-core">
|
||||
<ANNOTATIONS>
|
||||
<root url="file://$PROJECT_DIR$/../annotations" />
|
||||
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/" />
|
||||
</ANNOTATIONS>
|
||||
<CLASSES>
|
||||
<root url="file://$PROJECT_DIR$/ideaSDK/core" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$PROJECT_DIR$/../dependencies/guava-17.0-sources.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/../dependencies/asm5-src.zip!/" />
|
||||
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/" />
|
||||
</SOURCES>
|
||||
<jarDirectory url="file://$PROJECT_DIR$/ideaSDK/core" recursive="false" />
|
||||
</library>
|
||||
</component>
|
||||
Generated
+14
@@ -0,0 +1,14 @@
|
||||
<component name="libraryTable">
|
||||
<library name="java-i18n">
|
||||
<ANNOTATIONS>
|
||||
<root url="file://$PROJECT_DIR$/../annotations" />
|
||||
</ANNOTATIONS>
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/ideaSDK/plugins/java-i18n/lib/java-i18n.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
<component name="libraryTable">
|
||||
<library name="javaee-support">
|
||||
<CLASSES>
|
||||
<root url="file://$PROJECT_DIR$/ideaSDK/plugins/JavaEE/lib" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$PROJECT_DIR$/ideaSDK/lib/src/src_javaee-openapi.zip!/" />
|
||||
</SOURCES>
|
||||
<jarDirectory url="file://$PROJECT_DIR$/ideaSDK/plugins/JavaEE/lib" recursive="false" />
|
||||
</library>
|
||||
</component>
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
<component name="libraryTable">
|
||||
<library name="javax.inject">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/../lib/javax.inject.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$PROJECT_DIR$/../lib/javax.inject-src.zip!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
Generated
+9
@@ -0,0 +1,9 @@
|
||||
<component name="libraryTable">
|
||||
<library name="jsp-support">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/ideaSDK/plugins/jsp/lib/jsp-impl.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
<component name="libraryTable">
|
||||
<library name="junit-plugin">
|
||||
<ANNOTATIONS>
|
||||
<root url="file://$PROJECT_DIR$/../annotations" />
|
||||
</ANNOTATIONS>
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/ideaSDK/plugins/junit/lib/idea-junit.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/ideaSDK/plugins/junit/lib/resources_en.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
<component name="libraryTable">
|
||||
<library name="kotlin-reflect">
|
||||
<CLASSES>
|
||||
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-reflect.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="kotlin-runtime">
|
||||
<CLASSES>
|
||||
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-runtime.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="file://$PROJECT_DIR$/../libraries/stdlib/src" />
|
||||
<root url="file://$PROJECT_DIR$/../core/builtins/native" />
|
||||
<root url="file://$PROJECT_DIR$/../core/builtins/src" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
@@ -0,0 +1,99 @@
|
||||
<component name="libraryTable">
|
||||
<library name="main-project-production">
|
||||
<CLASSES>
|
||||
<root url="file://$PROJECT_DIR$/../out/production/android-compiler-plugin" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/android-extensions-compiler" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/android-extensions-idea" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/android-extensions-jps" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/android-idea-plugin" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/android-jps-plugin" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/android-tests" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/annotation-collector" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/ant" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/backend" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/backend-common" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/bare-plugin" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/build" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/build-common" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/builtins" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/builtins-serializer" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/cli" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/cli-common" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/cli-runner" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/conditional-preprocessor" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/container" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/daemon" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/daemon-client" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/daemon-common" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/descriptor.loader.java" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/descriptors" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/descriptors.runtime" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/deserialization" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/eval4j" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/frontend" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/frontend.java" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/ide-common" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/idea" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/idea-analysis" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/idea-android" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/idea-completion" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/idea-core" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/idea-jps-common" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/idea-js" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/idea-live-templates" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/idea-repl" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/instrumentation" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/j2k" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/jps-plugin" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/js.dart-ast" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/js.frontend" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/js.inliner" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/js.parser" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/js.serializer" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/js.translator" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/kotlin-android-plugin" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/kotlinr" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/light-classes" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/plugin-api" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/preloader" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/resolution" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/rmi-interface" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/rmi-server" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/serialization" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/util" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/util.runtime" />
|
||||
<root url="file://$PROJECT_DIR$/../out/production/Kotlin" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="file://$PROJECT_DIR$/../idea/src" />
|
||||
<root url="file://$PROJECT_DIR$/../compiler/light-classes/src" />
|
||||
<root url="file://$PROJECT_DIR$/../compiler/backend-common/src" />
|
||||
<root url="file://$PROJECT_DIR$/../compiler/backend/src" />
|
||||
<root url="file://$PROJECT_DIR$/../compiler/android-tests/src" />
|
||||
<root url="file://$PROJECT_DIR$/../compiler/cli/src" />
|
||||
<root url="file://$PROJECT_DIR$/../compiler/cli/cli-common/src" />
|
||||
<root url="file://$PROJECT_DIR$/../compiler/frontend/src" />
|
||||
<root url="file://$PROJECT_DIR$/../compiler/frontend.java/src" />
|
||||
<root url="file://$PROJECT_DIR$/../compiler/preloader/src" />
|
||||
<root url="file://$PROJECT_DIR$/../compiler/preloader/instrumentation/src" />
|
||||
<root url="file://$PROJECT_DIR$/../compiler/resolution/src" />
|
||||
<root url="file://$PROJECT_DIR$/../compiler/serialization/src" />
|
||||
<root url="file://$PROJECT_DIR$/../compiler/util/src" />
|
||||
<root url="file://$PROJECT_DIR$/../core/descriptor.loader.java/src" />
|
||||
<root url="file://$PROJECT_DIR$/../core/descriptors/src" />
|
||||
<root url="file://$PROJECT_DIR$/../core/deserialization/src" />
|
||||
<root url="file://$PROJECT_DIR$/../core/reflection.jvm/src" />
|
||||
<root url="file://$PROJECT_DIR$/../core/runtime.jvm/src" />
|
||||
<root url="file://$PROJECT_DIR$/../core/util.runtime/src" />
|
||||
<root url="file://$PROJECT_DIR$/../idea/ide-common/src" />
|
||||
<root url="file://$PROJECT_DIR$/../idea/idea-analysis/src" />
|
||||
<root url="file://$PROJECT_DIR$/../idea/idea-android/src" />
|
||||
<root url="file://$PROJECT_DIR$/../idea/idea-completion/src" />
|
||||
<root url="file://$PROJECT_DIR$/../idea/idea-core/src" />
|
||||
<root url="file://$PROJECT_DIR$/../idea/idea-jps-common/src" />
|
||||
<root url="file://$PROJECT_DIR$/../idea/idea-live-templates/src" />
|
||||
<root url="file://$PROJECT_DIR$/../idea/idea-test-framework/src" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
<component name="libraryTable">
|
||||
<library name="main-project-tests">
|
||||
<CLASSES>
|
||||
<root url="file://$PROJECT_DIR$/../out/test/compiler-tests" />
|
||||
<root url="file://$PROJECT_DIR$/../out/test/idea-test-framework" />
|
||||
<root url="file://$PROJECT_DIR$/../out/test/idea" />
|
||||
<root url="file://$PROJECT_DIR$/../out/test/idea-completion" />
|
||||
<root url="file://$PROJECT_DIR$/../out/test/generators" />
|
||||
<root url="file://$PROJECT_DIR$/../out/test/tests-common" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="file://$PROJECT_DIR$/../idea/idea-completion/tests" />
|
||||
<root url="file://$PROJECT_DIR$/../idea/idea-android/tests" />
|
||||
<root url="file://$PROJECT_DIR$/../idea/tests" />
|
||||
<root url="file://$PROJECT_DIR$/../generators/src" />
|
||||
<root url="file://$PROJECT_DIR$/../generators/tests" />
|
||||
<root url="file://$PROJECT_DIR$/../compiler/tests-common" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
<component name="libraryTable">
|
||||
<library name="persistence-support">
|
||||
<CLASSES>
|
||||
<root url="file://$PROJECT_DIR$/ideaSDK/plugins/PersistenceSupport/lib" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$PROJECT_DIR$/ideaSDK/lib/src/src_persistence-openapi.zip!/" />
|
||||
</SOURCES>
|
||||
<jarDirectory url="file://$PROJECT_DIR$/ideaSDK/plugins/PersistenceSupport/lib" recursive="false" />
|
||||
</library>
|
||||
</component>
|
||||
Generated
+14
@@ -0,0 +1,14 @@
|
||||
<component name="libraryTable">
|
||||
<library name="properties">
|
||||
<ANNOTATIONS>
|
||||
<root url="file://$PROJECT_DIR$/../annotations" />
|
||||
</ANNOTATIONS>
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/ideaSDK/plugins/properties/lib/properties.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
<component name="libraryTable">
|
||||
<library name="spring-support">
|
||||
<CLASSES>
|
||||
<root url="file://$PROJECT_DIR$/ideaSDK/plugins/Spring/lib" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$PROJECT_DIR$/ideaSDK/lib/src/src_spring-openapi.zip!/" />
|
||||
</SOURCES>
|
||||
<jarDirectory url="file://$PROJECT_DIR$/ideaSDK/plugins/Spring/lib" recursive="false" />
|
||||
</library>
|
||||
</component>
|
||||
Generated
+48
-1
@@ -7,11 +7,58 @@
|
||||
</component>
|
||||
<component name="EntryPointsManager">
|
||||
<entry_points version="2.0" />
|
||||
<list size="1">
|
||||
<item index="0" class="java.lang.String" itemvalue="javax.inject.Inject" />
|
||||
</list>
|
||||
</component>
|
||||
<component name="FacetAutodetectingManager">
|
||||
<autodetection-disabled>
|
||||
<facet-type id="Python">
|
||||
<modules>
|
||||
<module name="Jet" />
|
||||
</modules>
|
||||
</facet-type>
|
||||
</autodetection-disabled>
|
||||
</component>
|
||||
<component name="IdProvider" IDEtalkID="71A301FF1940049D6D82F12C40F1E1D5" />
|
||||
<component name="JavadocGenerationManager">
|
||||
<option name="OUTPUT_DIRECTORY" />
|
||||
<option name="OPTION_SCOPE" value="protected" />
|
||||
<option name="OPTION_HIERARCHY" value="true" />
|
||||
<option name="OPTION_NAVIGATOR" value="true" />
|
||||
<option name="OPTION_INDEX" value="true" />
|
||||
<option name="OPTION_SEPARATE_INDEX" value="true" />
|
||||
<option name="OPTION_DOCUMENT_TAG_USE" value="false" />
|
||||
<option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false" />
|
||||
<option name="OPTION_DOCUMENT_TAG_VERSION" value="false" />
|
||||
<option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="true" />
|
||||
<option name="OPTION_DEPRECATED_LIST" value="true" />
|
||||
<option name="OTHER_OPTIONS" value="" />
|
||||
<option name="HEAP_SIZE" />
|
||||
<option name="LOCALE" />
|
||||
<option name="OPEN_IN_BROWSER" value="true" />
|
||||
</component>
|
||||
<component name="MavenProjectsManager">
|
||||
<option name="originalFiles">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/confluence-highlighting/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/confluence/pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectResources">
|
||||
<default-html-doctype>http://www.w3.org/1999/xhtml</default-html-doctype>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_3" assert-keyword="false" jdk-15="false">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" default="false" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
<component name="SuppressABINotification">
|
||||
<option name="isSuppressed" value="true" />
|
||||
</component>
|
||||
<component name="WebServicesPlugin" addRequiredLibraries="true" />
|
||||
<component name="com.sixrr.metrics.MetricsReloaded">
|
||||
<option name="selectedProfile" value="" />
|
||||
<option name="autoscroll" value="false" />
|
||||
<option name="showOnlyWarnings" value="false" />
|
||||
</component>
|
||||
</project>
|
||||
Generated
+8
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/kotlin-ultimate.iml" filepath="$PROJECT_DIR$/kotlin-ultimate.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
Generated
+171
@@ -0,0 +1,171 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CodeStyleSettingsManager">
|
||||
<option name="PER_PROJECT_SETTINGS">
|
||||
<value>
|
||||
<option name="LINE_SEPARATOR" value=" " />
|
||||
<option name="ELSE_ON_NEW_LINE" value="true" />
|
||||
<option name="ALIGN_MULTILINE_PARAMETERS_IN_CALLS" value="true" />
|
||||
<option name="ALIGN_MULTILINE_BINARY_OPERATION" value="true" />
|
||||
<option name="ALIGN_MULTILINE_TERNARY_OPERATION" value="true" />
|
||||
<option name="TERNARY_OPERATION_WRAP" value="5" />
|
||||
<option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
|
||||
<option name="IF_BRACE_FORCE" value="1" />
|
||||
<ADDITIONAL_INDENT_OPTIONS fileType="css">
|
||||
<option name="INDENT_SIZE" value="4" />
|
||||
<option name="CONTINUATION_INDENT_SIZE" value="8" />
|
||||
<option name="TAB_SIZE" value="4" />
|
||||
<option name="USE_TAB_CHARACTER" value="false" />
|
||||
<option name="SMART_TABS" value="false" />
|
||||
<option name="LABEL_INDENT_SIZE" value="0" />
|
||||
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
|
||||
<option name="USE_RELATIVE_INDENTS" value="false" />
|
||||
</ADDITIONAL_INDENT_OPTIONS>
|
||||
<ADDITIONAL_INDENT_OPTIONS fileType="groovy">
|
||||
<option name="INDENT_SIZE" value="2" />
|
||||
<option name="CONTINUATION_INDENT_SIZE" value="8" />
|
||||
<option name="TAB_SIZE" value="4" />
|
||||
<option name="USE_TAB_CHARACTER" value="false" />
|
||||
<option name="SMART_TABS" value="false" />
|
||||
<option name="LABEL_INDENT_SIZE" value="0" />
|
||||
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
|
||||
<option name="USE_RELATIVE_INDENTS" value="false" />
|
||||
</ADDITIONAL_INDENT_OPTIONS>
|
||||
<ADDITIONAL_INDENT_OPTIONS fileType="gsp">
|
||||
<option name="INDENT_SIZE" value="2" />
|
||||
<option name="CONTINUATION_INDENT_SIZE" value="8" />
|
||||
<option name="TAB_SIZE" value="4" />
|
||||
<option name="USE_TAB_CHARACTER" value="false" />
|
||||
<option name="SMART_TABS" value="false" />
|
||||
<option name="LABEL_INDENT_SIZE" value="0" />
|
||||
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
|
||||
<option name="USE_RELATIVE_INDENTS" value="false" />
|
||||
</ADDITIONAL_INDENT_OPTIONS>
|
||||
<ADDITIONAL_INDENT_OPTIONS fileType="haml">
|
||||
<option name="INDENT_SIZE" value="2" />
|
||||
<option name="CONTINUATION_INDENT_SIZE" value="8" />
|
||||
<option name="TAB_SIZE" value="4" />
|
||||
<option name="USE_TAB_CHARACTER" value="false" />
|
||||
<option name="SMART_TABS" value="false" />
|
||||
<option name="LABEL_INDENT_SIZE" value="0" />
|
||||
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
|
||||
<option name="USE_RELATIVE_INDENTS" value="false" />
|
||||
</ADDITIONAL_INDENT_OPTIONS>
|
||||
<ADDITIONAL_INDENT_OPTIONS fileType="js">
|
||||
<option name="INDENT_SIZE" value="4" />
|
||||
<option name="CONTINUATION_INDENT_SIZE" value="8" />
|
||||
<option name="TAB_SIZE" value="4" />
|
||||
<option name="USE_TAB_CHARACTER" value="false" />
|
||||
<option name="SMART_TABS" value="false" />
|
||||
<option name="LABEL_INDENT_SIZE" value="0" />
|
||||
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
|
||||
<option name="USE_RELATIVE_INDENTS" value="false" />
|
||||
</ADDITIONAL_INDENT_OPTIONS>
|
||||
<ADDITIONAL_INDENT_OPTIONS fileType="jsp">
|
||||
<option name="INDENT_SIZE" value="4" />
|
||||
<option name="CONTINUATION_INDENT_SIZE" value="8" />
|
||||
<option name="TAB_SIZE" value="4" />
|
||||
<option name="USE_TAB_CHARACTER" value="false" />
|
||||
<option name="SMART_TABS" value="false" />
|
||||
<option name="LABEL_INDENT_SIZE" value="0" />
|
||||
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
|
||||
<option name="USE_RELATIVE_INDENTS" value="false" />
|
||||
</ADDITIONAL_INDENT_OPTIONS>
|
||||
<ADDITIONAL_INDENT_OPTIONS fileType="php">
|
||||
<option name="INDENT_SIZE" value="4" />
|
||||
<option name="CONTINUATION_INDENT_SIZE" value="8" />
|
||||
<option name="TAB_SIZE" value="4" />
|
||||
<option name="USE_TAB_CHARACTER" value="false" />
|
||||
<option name="SMART_TABS" value="false" />
|
||||
<option name="LABEL_INDENT_SIZE" value="0" />
|
||||
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
|
||||
<option name="USE_RELATIVE_INDENTS" value="false" />
|
||||
</ADDITIONAL_INDENT_OPTIONS>
|
||||
<ADDITIONAL_INDENT_OPTIONS fileType="py">
|
||||
<option name="INDENT_SIZE" value="4" />
|
||||
<option name="CONTINUATION_INDENT_SIZE" value="8" />
|
||||
<option name="TAB_SIZE" value="4" />
|
||||
<option name="USE_TAB_CHARACTER" value="false" />
|
||||
<option name="SMART_TABS" value="false" />
|
||||
<option name="LABEL_INDENT_SIZE" value="0" />
|
||||
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
|
||||
<option name="USE_RELATIVE_INDENTS" value="false" />
|
||||
</ADDITIONAL_INDENT_OPTIONS>
|
||||
<ADDITIONAL_INDENT_OPTIONS fileType="sass">
|
||||
<option name="INDENT_SIZE" value="2" />
|
||||
<option name="CONTINUATION_INDENT_SIZE" value="8" />
|
||||
<option name="TAB_SIZE" value="4" />
|
||||
<option name="USE_TAB_CHARACTER" value="false" />
|
||||
<option name="SMART_TABS" value="false" />
|
||||
<option name="LABEL_INDENT_SIZE" value="0" />
|
||||
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
|
||||
<option name="USE_RELATIVE_INDENTS" value="false" />
|
||||
</ADDITIONAL_INDENT_OPTIONS>
|
||||
<ADDITIONAL_INDENT_OPTIONS fileType="scala">
|
||||
<option name="INDENT_SIZE" value="2" />
|
||||
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
||||
<option name="TAB_SIZE" value="2" />
|
||||
<option name="USE_TAB_CHARACTER" value="false" />
|
||||
<option name="SMART_TABS" value="false" />
|
||||
<option name="LABEL_INDENT_SIZE" value="0" />
|
||||
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
|
||||
<option name="USE_RELATIVE_INDENTS" value="false" />
|
||||
</ADDITIONAL_INDENT_OPTIONS>
|
||||
<ADDITIONAL_INDENT_OPTIONS fileType="sql">
|
||||
<option name="INDENT_SIZE" value="2" />
|
||||
<option name="CONTINUATION_INDENT_SIZE" value="8" />
|
||||
<option name="TAB_SIZE" value="4" />
|
||||
<option name="USE_TAB_CHARACTER" value="false" />
|
||||
<option name="SMART_TABS" value="false" />
|
||||
<option name="LABEL_INDENT_SIZE" value="0" />
|
||||
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
|
||||
<option name="USE_RELATIVE_INDENTS" value="false" />
|
||||
</ADDITIONAL_INDENT_OPTIONS>
|
||||
<ADDITIONAL_INDENT_OPTIONS fileType="xml">
|
||||
<option name="INDENT_SIZE" value="4" />
|
||||
<option name="CONTINUATION_INDENT_SIZE" value="8" />
|
||||
<option name="TAB_SIZE" value="4" />
|
||||
<option name="USE_TAB_CHARACTER" value="false" />
|
||||
<option name="SMART_TABS" value="false" />
|
||||
<option name="LABEL_INDENT_SIZE" value="0" />
|
||||
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
|
||||
<option name="USE_RELATIVE_INDENTS" value="false" />
|
||||
</ADDITIONAL_INDENT_OPTIONS>
|
||||
<ADDITIONAL_INDENT_OPTIONS fileType="yml">
|
||||
<option name="INDENT_SIZE" value="2" />
|
||||
<option name="CONTINUATION_INDENT_SIZE" value="8" />
|
||||
<option name="TAB_SIZE" value="4" />
|
||||
<option name="USE_TAB_CHARACTER" value="false" />
|
||||
<option name="SMART_TABS" value="false" />
|
||||
<option name="LABEL_INDENT_SIZE" value="0" />
|
||||
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
|
||||
<option name="USE_RELATIVE_INDENTS" value="false" />
|
||||
</ADDITIONAL_INDENT_OPTIONS>
|
||||
<codeStyleSettings language="JAVA">
|
||||
<option name="ELSE_ON_NEW_LINE" value="true" />
|
||||
<option name="ALIGN_MULTILINE_PARAMETERS_IN_CALLS" value="true" />
|
||||
<option name="ALIGN_MULTILINE_BINARY_OPERATION" value="true" />
|
||||
<option name="ALIGN_MULTILINE_TERNARY_OPERATION" value="true" />
|
||||
<option name="TERNARY_OPERATION_WRAP" value="5" />
|
||||
<option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
|
||||
<option name="IF_BRACE_FORCE" value="1" />
|
||||
<option name="PARENT_SETTINGS_INSTALLED" value="true" />
|
||||
<indentOptions />
|
||||
</codeStyleSettings>
|
||||
<codeStyleSettings language="JavaScript">
|
||||
<option name="ELSE_ON_NEW_LINE" value="true" />
|
||||
<option name="ALIGN_MULTILINE_BINARY_OPERATION" value="true" />
|
||||
<option name="IF_BRACE_FORCE" value="1" />
|
||||
<option name="PARENT_SETTINGS_INSTALLED" value="true" />
|
||||
</codeStyleSettings>
|
||||
<codeStyleSettings language="PHP">
|
||||
<option name="ELSE_ON_NEW_LINE" value="true" />
|
||||
<option name="IF_BRACE_FORCE" value="1" />
|
||||
<option name="PARENT_SETTINGS_INSTALLED" value="true" />
|
||||
</codeStyleSettings>
|
||||
</value>
|
||||
</option>
|
||||
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
|
||||
</component>
|
||||
</project>
|
||||
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Generate Tests" type="Application" factoryName="Application">
|
||||
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
|
||||
<pattern>
|
||||
<option name="PATTERN" value="org.jetbrains.kotlin.tests.*" />
|
||||
<option name="ENABLED" value="true" />
|
||||
</pattern>
|
||||
</extension>
|
||||
<option name="MAIN_CLASS_NAME" value="org.jetbrains.kotlin.tests.GenerateTestsKt" />
|
||||
<option name="VM_PARAMETERS" value="-ea" />
|
||||
<option name="PROGRAM_PARAMETERS" value="" />
|
||||
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/.." />
|
||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
||||
<option name="ALTERNATIVE_JRE_PATH" />
|
||||
<option name="ENABLE_SWING_INSPECTOR" value="false" />
|
||||
<option name="ENV_VARIABLES" />
|
||||
<option name="PASS_PARENT_ENVS" value="true" />
|
||||
<module name="kotlin-ultimate" />
|
||||
<envs />
|
||||
<RunnerSettings RunnerId="Debug">
|
||||
<option name="DEBUG_PORT" value="" />
|
||||
<option name="TRANSPORT" value="0" />
|
||||
<option name="LOCAL" value="true" />
|
||||
</RunnerSettings>
|
||||
<RunnerSettings RunnerId="Profile " />
|
||||
<RunnerSettings RunnerId="Run" />
|
||||
<ConfigurationWrapper RunnerId="Debug" />
|
||||
<ConfigurationWrapper RunnerId="Run" />
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="IDEA" type="Application" factoryName="Application" singleton="true">
|
||||
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
|
||||
<option name="MAIN_CLASS_NAME" value="com.intellij.idea.Main" />
|
||||
<option name="VM_PARAMETERS" value="-Xmx900m -XX:ReservedCodeCacheSize=64m -XX:MaxPermSize=450m -XX:+HeapDumpOnOutOfMemoryError -ea -Didea.is.internal=true -Didea.debug.mode=true -Didea.system.path=../system-idea -Didea.config.path=../config-idea -Dapple.laf.useScreenMenuBar=true -Dapple.awt.graphics.UseQuartz=true -Dsun.io.useCanonCaches=false -Dplugin.path=$PROJECT_DIR$/out/artifacts/Kotlin -Dkotlin.internal.mode.enabled=true -Didea.additional.classpath=../idea-kotlin-runtime/kotlin-runtime.jar,../idea-kotlin-runtime/kotlin-reflect.jar" />
|
||||
<option name="PROGRAM_PARAMETERS" value="" />
|
||||
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/ideaSDK/bin" />
|
||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
||||
<option name="ALTERNATIVE_JRE_PATH" />
|
||||
<option name="ENABLE_SWING_INSPECTOR" value="false" />
|
||||
<option name="ENV_VARIABLES" />
|
||||
<option name="PASS_PARENT_ENVS" value="true" />
|
||||
<module name="kotlin-ultimate" />
|
||||
<envs />
|
||||
<RunnerSettings RunnerId="Debug">
|
||||
<option name="DEBUG_PORT" value="" />
|
||||
<option name="TRANSPORT" value="0" />
|
||||
<option name="LOCAL" value="true" />
|
||||
</RunnerSettings>
|
||||
<RunnerSettings RunnerId="JavaRebel">
|
||||
<option name="bootstrapPath" />
|
||||
<option name="jrebelArgs" value="" />
|
||||
<option name="loggingEnabled" value="false" />
|
||||
<option name="useBootstrapDefaults" value="true" />
|
||||
</RunnerSettings>
|
||||
<RunnerSettings RunnerId="JavaRebel Debug">
|
||||
<option name="bootstrapPath" />
|
||||
<option name="debugPort" value="" />
|
||||
<option name="jrebelArgs" value="" />
|
||||
<option name="loggingEnabled" value="false" />
|
||||
<option name="transport" value="0" />
|
||||
<option name="useBootstrapDefaults" value="true" />
|
||||
<option name="DEBUG_PORT" value="" />
|
||||
<option name="TRANSPORT" value="0" />
|
||||
<option name="LOCAL" value="true" />
|
||||
</RunnerSettings>
|
||||
<RunnerSettings RunnerId="Profile " />
|
||||
<RunnerSettings RunnerId="Run" />
|
||||
<ConfigurationWrapper RunnerId="Debug" />
|
||||
<ConfigurationWrapper RunnerId="Profile " />
|
||||
<ConfigurationWrapper RunnerId="Run" />
|
||||
<method>
|
||||
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/build.xml" target="build_artifact" />
|
||||
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/../idea-runner/runner.xml" target="force-enable-kotlin-plugin" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
||||
@@ -0,0 +1,28 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="IDEA (No ProcessCanceledException)" type="Application" factoryName="Application" singleton="true">
|
||||
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
|
||||
<option name="MAIN_CLASS_NAME" value="com.intellij.idea.Main" />
|
||||
<option name="VM_PARAMETERS" value="-Xmx900m -XX:ReservedCodeCacheSize=64m -XX:MaxPermSize=450m -XX:+HeapDumpOnOutOfMemoryError -ea -Didea.is.internal=true -Didea.debug.mode=true -Didea.system.path=../system-idea -Didea.config.path=../config-idea -Dapple.laf.useScreenMenuBar=true -Dapple.awt.graphics.UseQuartz=true -Dsun.io.useCanonCaches=false -Dplugin.path=$PROJECT_DIR$/out/artifacts/Kotlin -Didea.ProcessCanceledException=disabled -Dkotlin.internal.mode.enabled=true -Didea.additional.classpath=../idea-kotlin-runtime/kotlin-runtime.jar,../idea-kotlin-runtime/kotlin-reflect.jar" />
|
||||
<option name="PROGRAM_PARAMETERS" value="" />
|
||||
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/ideaSDK/bin" />
|
||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
||||
<option name="ALTERNATIVE_JRE_PATH" value="" />
|
||||
<option name="ENABLE_SWING_INSPECTOR" value="false" />
|
||||
<option name="ENV_VARIABLES" />
|
||||
<option name="PASS_PARENT_ENVS" value="true" />
|
||||
<module name="kotlin-ultimate" />
|
||||
<envs />
|
||||
<RunnerSettings RunnerId="Debug">
|
||||
<option name="DEBUG_PORT" value="" />
|
||||
<option name="TRANSPORT" value="0" />
|
||||
<option name="LOCAL" value="true" />
|
||||
</RunnerSettings>
|
||||
<RunnerSettings RunnerId="Run" />
|
||||
<ConfigurationWrapper RunnerId="Debug" />
|
||||
<ConfigurationWrapper RunnerId="Run" />
|
||||
<method>
|
||||
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/build.xml" target="build_artifact" />
|
||||
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/../idea-runner/runner.xml" target="force-enable-kotlin-plugin" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
||||
@@ -0,0 +1,39 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Ultimate Plugin Tests" type="JUnit" factoryName="JUnit">
|
||||
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
|
||||
<pattern>
|
||||
<option name="PATTERN" value="org.jetbrains.kotlin.*" />
|
||||
<option name="ENABLED" value="true" />
|
||||
</pattern>
|
||||
</extension>
|
||||
<module name="kotlin-ultimate" />
|
||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
||||
<option name="ALTERNATIVE_JRE_PATH" />
|
||||
<option name="PACKAGE_NAME" value="org.jetbrains.kotlin" />
|
||||
<option name="MAIN_CLASS_NAME" value="" />
|
||||
<option name="METHOD_NAME" value="" />
|
||||
<option name="TEST_OBJECT" value="package" />
|
||||
<option name="VM_PARAMETERS" value="-ea -XX:+HeapDumpOnOutOfMemoryError -Xmx1200m -XX:MaxPermSize=400m -XX:+UseCodeCacheFlushing -XX:ReservedCodeCacheSize=64m" />
|
||||
<option name="PARAMETERS" value="" />
|
||||
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/.." />
|
||||
<option name="ENV_VARIABLES" />
|
||||
<option name="PASS_PARENT_ENVS" value="true" />
|
||||
<option name="TEST_SEARCH_SCOPE">
|
||||
<value defaultName="singleModule" />
|
||||
</option>
|
||||
<envs />
|
||||
<patterns />
|
||||
<RunnerSettings RunnerId="Debug">
|
||||
<option name="DEBUG_PORT" value="" />
|
||||
<option name="TRANSPORT" value="0" />
|
||||
<option name="LOCAL" value="true" />
|
||||
</RunnerSettings>
|
||||
<RunnerSettings RunnerId="Profile " />
|
||||
<RunnerSettings RunnerId="Run" />
|
||||
<ConfigurationWrapper RunnerId="Debug" />
|
||||
<ConfigurationWrapper RunnerId="Run" />
|
||||
<method>
|
||||
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/build.xml" target="patch_outer_plugin_xml_for_tests" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
||||
Generated
+13
-1
@@ -120,5 +120,17 @@
|
||||
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
|
||||
</item>
|
||||
</group>
|
||||
<group name="Intellij">
|
||||
<item class="com.intellij.ui.RawCommandLineEditor" icon="/com/intellij/uiDesigner/icons/panel.png" removable="true" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="7" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="com.intellij.openapi.ui.TextFieldWithBrowseButton" icon="/com/intellij/uiDesigner/icons/panel.png" removable="true" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="com.intellij.ui.ComboboxWithBrowseButton" icon="/com/intellij/uiDesigner/icons/panel.png" removable="true" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="0" />
|
||||
</item>
|
||||
</group>
|
||||
</component>
|
||||
</project>
|
||||
</project>
|
||||
|
||||
|
||||
Generated
+21
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="IssueNavigationConfiguration">
|
||||
<option name="links">
|
||||
<list>
|
||||
<IssueNavigationLink>
|
||||
<option name="issueRegexp" value="[A-Z]+\-\d+" />
|
||||
<option name="linkRegexp" value="http://youtrack.jetbrains.com/issue/$0" />
|
||||
</IssueNavigationLink>
|
||||
<IssueNavigationLink>
|
||||
<option name="issueRegexp" value="EA\-(\d+)" />
|
||||
<option name="linkRegexp" value="http://ea.jetbrains.com/browser/ea_problems/$1" />
|
||||
</IssueNavigationLink>
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
<project default="build_artifact">
|
||||
<property name="artifact.root" value="out/artifacts/Kotlin"/>
|
||||
<property name="production.root" value="out/production/kotlin-ultimate"/>
|
||||
<property name="meta.inf" value="${production.root}/META-INF"/>
|
||||
<property name="kotlin.plugin.jar" value="${artifact.root}/lib/kotlin-plugin.jar"/>
|
||||
|
||||
<macrodef name="merge_plugin_xml">
|
||||
<attribute name="main.plugin.xml.dir" />
|
||||
|
||||
<sequential>
|
||||
<loadfile srcfile="${meta.inf}/ultimate-plugin.xml" property="ultimate.plugin.xml.content">
|
||||
<filterchain>
|
||||
<tokenfilter>
|
||||
<filetokenizer/>
|
||||
<replaceregex pattern="\<idea-plugin\>" replace="" />
|
||||
<replaceregex pattern="\</idea-plugin\>" replace="" />
|
||||
</tokenfilter>
|
||||
</filterchain>
|
||||
</loadfile>
|
||||
|
||||
<replace file="@{main.plugin.xml.dir}/plugin.xml" token="<!-- ULTIMATE-PLUGIN-PLACEHOLDER -->" value="${ultimate.plugin.xml.content}"/>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
|
||||
<target name="build_artifact">
|
||||
<copy todir="${artifact.root}">
|
||||
<fileset dir="../${artifact.root}"/>
|
||||
</copy>
|
||||
|
||||
<unzip src="${kotlin.plugin.jar}" dest="${production.root}">
|
||||
<patternset>
|
||||
<include name="META-INF/plugin.xml"/>
|
||||
</patternset>
|
||||
</unzip>
|
||||
|
||||
<merge_plugin_xml main.plugin.xml.dir="${meta.inf}"/>
|
||||
|
||||
<jar destfile="${kotlin.plugin.jar}" update="true">
|
||||
<fileset dir="${production.root}"/>
|
||||
<file file="${meta.inf}/plugin.xml"/>
|
||||
</jar>
|
||||
|
||||
<delete file="${meta.inf}/plugin.xml"/>
|
||||
</target>
|
||||
|
||||
<target name="patch_outer_plugin_xml_for_tests">
|
||||
<merge_plugin_xml main.plugin.xml.dir="../out/production/idea/META-INF" />
|
||||
</target>
|
||||
</project>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/resources" isTestSource="false" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/dependencies" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="main-project-production" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="main-project-tests" level="project" />
|
||||
<orderEntry type="library" name="kotlin-runtime" level="project" />
|
||||
<orderEntry type="library" name="kotlin-reflect" level="project" />
|
||||
<orderEntry type="library" name="javax.inject" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="css-support" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="database-support" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="javaee-support" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="jsp-support" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="persistence-support" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="spring-support" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="properties" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="java-i18n" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="gradle-and-groovy-plugin" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="junit-plugin" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="intellij-core" level="project" />
|
||||
<orderEntry type="library" name="idea-full" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -0,0 +1,5 @@
|
||||
<html>
|
||||
<body>
|
||||
This inspection reports final Kotlin classes and functions annotated with Spring @Component, @Configuration or @Bean annotations
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1 @@
|
||||
Ensures that Kotlin files using Spring belong to a module with a configured Spring facet.
|
||||
@@ -0,0 +1,45 @@
|
||||
<idea-plugin>
|
||||
<extensions defaultExtensionNs="com.intellij">
|
||||
<psi.referenceContributor language="kotlin" implementation="org.jetbrains.kotlin.idea.spring.references.KotlinSpringReferenceContributor"/>
|
||||
|
||||
<multiHostInjector implementation="org.jetbrains.kotlin.idea.spring.el.KotlinSpringELInjector"/>
|
||||
|
||||
<codeInsight.lineMarkerProvider language="kotlin" implementationClass="org.jetbrains.kotlin.idea.spring.lineMarking.KotlinSpringClassAnnotator"/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.spring.inspections.KotlinFinalClassOrFunSpringInspection"
|
||||
displayName="Final Kotlin class or function with Spring annotation"
|
||||
groupBundle="resources.messages.SpringBundle"
|
||||
groupKey="inspection.group.code"
|
||||
groupPath="Spring,Spring Core"
|
||||
enabledByDefault="true"
|
||||
level="WARNING"/>
|
||||
<localInspection language="kotlin"
|
||||
displayName="Spring Facet Code Configuration (Kotlin)"
|
||||
groupBundle="resources.messages.SpringBundle"
|
||||
groupKey="inspection.group.setup"
|
||||
groupPath="Spring,Spring Core"
|
||||
enabledByDefault="true"
|
||||
level="WARNING"
|
||||
implementationClass="org.jetbrains.kotlin.idea.spring.inspections.KotlinSpringFacetCodeInspection"/>
|
||||
</extensions>
|
||||
|
||||
<actions>
|
||||
<action id="Kotlin.Spring.Beans.Generate.Setter.Dependency.Action"
|
||||
class="org.jetbrains.kotlin.idea.spring.generate.GenerateKotlinSpringBeanXmlDependencyAction$Setter">
|
||||
<add-to-group anchor="last" group-id="GenerateGroup"/>
|
||||
</action>
|
||||
<action id="Kotlin.Spring.Beans.Generate.Constructor.Dependency.Action"
|
||||
class="org.jetbrains.kotlin.idea.spring.generate.GenerateKotlinSpringBeanXmlDependencyAction$Constructor">
|
||||
<add-to-group anchor="last" group-id="GenerateGroup"/>
|
||||
</action>
|
||||
<action id="Kotlin.Spring.Beans.Generate.Lateinit.Property.Dependency.Action"
|
||||
class="org.jetbrains.kotlin.idea.spring.generate.GenerateKotlinSpringBeanXmlDependencyAction$LateinitProperty">
|
||||
<add-to-group anchor="last" group-id="GenerateGroup"/>
|
||||
</action>
|
||||
|
||||
<action id="Kotlin.Spring.Beans.Generate.Autowired.Dependency.Action"
|
||||
class="org.jetbrains.kotlin.idea.spring.generate.GenerateKotlinAutowiredDependencyAction">
|
||||
<add-to-group anchor="last" group-id="GenerateGroup"/>
|
||||
</action>
|
||||
</actions>
|
||||
</idea-plugin>
|
||||
@@ -0,0 +1,8 @@
|
||||
<idea-plugin>
|
||||
<depends optional="true" config-file="kotlin-spring.xml">com.intellij.spring</depends>
|
||||
<depends optional="true">com.intellij.javaee</depends>
|
||||
<depends optional="true">com.intellij.persistence</depends>
|
||||
<depends optional="true">com.intellij.database</depends>
|
||||
<depends optional="true">com.intellij.css</depends>
|
||||
<depends optional="true">com.intellij.jsp</depends>
|
||||
</idea-plugin>
|
||||
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* Copyright 2010-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.idea.spring.el
|
||||
|
||||
import com.intellij.ide.plugins.PluginManager
|
||||
import com.intellij.lang.injection.MultiHostInjector
|
||||
import com.intellij.lang.injection.MultiHostRegistrar
|
||||
import com.intellij.psi.PsiElement
|
||||
import com.intellij.psi.PsiLanguageInjectionHost
|
||||
import com.intellij.psi.impl.source.jsp.el.ELContextProvider
|
||||
import com.intellij.spring.constants.SpringAnnotationsConstants
|
||||
import com.intellij.spring.el.SpringELLanguage
|
||||
import com.intellij.spring.el.SpringElTemplateParser
|
||||
import com.intellij.spring.el.contextProviders.SpringElContextProvider
|
||||
import org.jetbrains.kotlin.descriptors.ConstructorDescriptor
|
||||
import org.jetbrains.kotlin.idea.caches.resolve.analyze
|
||||
import org.jetbrains.kotlin.idea.imports.importableFqName
|
||||
import org.jetbrains.kotlin.psi.KtAnnotationEntry
|
||||
import org.jetbrains.kotlin.psi.KtStringTemplateExpression
|
||||
import org.jetbrains.kotlin.psi.KtValueArgument
|
||||
import org.jetbrains.kotlin.psi.psiUtil.getStrictParentOfType
|
||||
import org.jetbrains.kotlin.psi.psiUtil.isPlain
|
||||
import org.jetbrains.kotlin.resolve.calls.callUtil.getResolvedCall
|
||||
import org.jetbrains.kotlin.resolve.lazy.BodyResolveMode
|
||||
import org.jetbrains.kotlin.utils.ifEmpty
|
||||
|
||||
class KotlinSpringELInjector : MultiHostInjector {
|
||||
companion object {
|
||||
private val RELEVANT_ANNOTATIONS = setOf(SpringAnnotationsConstants.VALUE, SpringAnnotationsConstants.SCHEDULED)
|
||||
|
||||
// SpEL support requires both Spring and J2EE plugins
|
||||
// This code works around the inability to specify multiple dependencies for a given plugin config file
|
||||
private val contextRecorder by lazy {
|
||||
if ("com.intellij.javaee" in PluginManager.getDisabledPlugins()) return@lazy null
|
||||
{ host: PsiElement -> host.putUserData(ELContextProvider.ourContextProviderKey, SpringElContextProvider(host)) }
|
||||
}
|
||||
}
|
||||
|
||||
override fun getLanguagesToInject(registrar: MultiHostRegistrar, host: PsiElement) {
|
||||
if (host is KtStringTemplateExpression) {
|
||||
if (!host.isPlain()) return
|
||||
|
||||
val argument = host.parent as? KtValueArgument ?: return
|
||||
val entry = argument.getStrictParentOfType<KtAnnotationEntry>() ?: return
|
||||
val context = entry.analyze(BodyResolveMode.PARTIAL)
|
||||
val resolvedCall = entry.getResolvedCall(context) ?: return
|
||||
val annotation = (resolvedCall.resultingDescriptor as? ConstructorDescriptor)?.containingDeclaration ?: return
|
||||
if (annotation.importableFqName?.asString() !in RELEVANT_ANNOTATIONS) return
|
||||
|
||||
val text = host.getText()
|
||||
val ranges = SpringElTemplateParser.parse(text).ifEmpty { return }
|
||||
for (range in ranges) {
|
||||
registrar
|
||||
.startInjecting(SpringELLanguage.INSTANCE)
|
||||
.addPlace(null, null, host as PsiLanguageInjectionHost, range)
|
||||
.doneInjecting()
|
||||
}
|
||||
|
||||
contextRecorder!!(host)
|
||||
}
|
||||
}
|
||||
|
||||
override fun elementsToInjectIn() = contextRecorder?.let { listOf(KtStringTemplateExpression::class.java) } ?: emptyList()
|
||||
}
|
||||
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright 2010-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.idea.spring.generate
|
||||
|
||||
import com.intellij.openapi.editor.Editor
|
||||
import com.intellij.openapi.module.Module
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.psi.PsiFile
|
||||
import com.intellij.spring.SpringBundle
|
||||
import org.jetbrains.kotlin.asJava.toLightClass
|
||||
import org.jetbrains.kotlin.idea.editor.BatchTemplateRunner
|
||||
import org.jetbrains.kotlin.idea.util.application.executeWriteCommand
|
||||
import org.jetbrains.kotlin.psi.KtClass
|
||||
|
||||
class GenerateKotlinAutowiredDependencyAction : GenerateKotlinSpringBeanDependencyAction(
|
||||
SpringBundle.message("action.generate.autowired.dependencies.action.text")
|
||||
) {
|
||||
override fun checkContext(module: Module) = true
|
||||
|
||||
override fun invoke(project: Project, editor: Editor, file: PsiFile) {
|
||||
val klass = getTargetClass(editor, file) as? KtClass ?: return
|
||||
val lightClass = klass.toLightClass() ?: return
|
||||
project
|
||||
.executeWriteCommand<List<BatchTemplateRunner>>("") { generateAutowiredDependenciesFor(lightClass) }
|
||||
.forEach { it.runTemplates() }
|
||||
}
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright 2010-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.idea.spring.generate
|
||||
|
||||
import com.intellij.openapi.module.Module
|
||||
import com.intellij.spring.model.actions.generate.GenerateSpringBeanDependenciesUtil
|
||||
import icons.SpringApiIcons
|
||||
import org.jetbrains.kotlin.asJava.toLightClass
|
||||
import org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateActionBase
|
||||
import org.jetbrains.kotlin.psi.KtClass
|
||||
import org.jetbrains.kotlin.psi.KtClassOrObject
|
||||
|
||||
abstract class GenerateKotlinSpringBeanDependencyAction(text: String) : KotlinGenerateActionBase() {
|
||||
init {
|
||||
templatePresentation.text = text
|
||||
templatePresentation.icon = SpringApiIcons.Spring
|
||||
}
|
||||
|
||||
override fun isValidForClass(targetClass: KtClassOrObject): Boolean {
|
||||
if (targetClass !is KtClass || targetClass.isInterface() || targetClass.isEnum() || targetClass.fqName == null) return false
|
||||
val lightClass = targetClass.toLightClass() ?: return false
|
||||
val module = GenerateSpringBeanDependenciesUtil.getSpringModule(lightClass) ?: return false
|
||||
return checkContext(module)
|
||||
}
|
||||
|
||||
abstract fun checkContext(module: Module): Boolean
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Copyright 2010-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.idea.spring.generate
|
||||
|
||||
import com.intellij.openapi.editor.Editor
|
||||
import com.intellij.openapi.module.Module
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.psi.PsiFile
|
||||
import com.intellij.psi.xml.XmlFile
|
||||
import com.intellij.spring.SpringBundle
|
||||
import com.intellij.spring.SpringManager
|
||||
import com.intellij.spring.model.utils.SpringModelUtils
|
||||
import org.jetbrains.kotlin.asJava.toLightClass
|
||||
import org.jetbrains.kotlin.idea.editor.BatchTemplateRunner
|
||||
import org.jetbrains.kotlin.idea.util.application.executeWriteCommand
|
||||
import org.jetbrains.kotlin.psi.KtClass
|
||||
|
||||
abstract class GenerateKotlinSpringBeanXmlDependencyAction(
|
||||
text: String,
|
||||
private val injectionKind: SpringDependencyInjectionKind
|
||||
) : GenerateKotlinSpringBeanDependencyAction(text) {
|
||||
class Constructor: GenerateKotlinSpringBeanXmlDependencyAction(
|
||||
SpringBundle.message("action.Spring.Beans.Generate.Constructor.Dependency.Action.text"),
|
||||
SpringDependencyInjectionKind.CONSTRUCTOR
|
||||
)
|
||||
|
||||
class Setter: GenerateKotlinSpringBeanXmlDependencyAction(
|
||||
SpringBundle.message("action.Spring.Beans.Generate.Setter.Dependency.Action.text"),
|
||||
SpringDependencyInjectionKind.SETTER
|
||||
)
|
||||
|
||||
class LateinitProperty: GenerateKotlinSpringBeanXmlDependencyAction(
|
||||
"Spring 'lateinit' Dependency...",
|
||||
SpringDependencyInjectionKind.LATEINIT_PROPERTY
|
||||
)
|
||||
|
||||
override fun checkContext(module: Module): Boolean {
|
||||
return SpringManager.getInstance(module.project).getCombinedModel(module).configFiles.any { it is XmlFile }
|
||||
}
|
||||
|
||||
override fun invoke(project: Project, editor: Editor, file: PsiFile) {
|
||||
val klass = getTargetClass(editor, file) as? KtClass ?: return
|
||||
val lightClass = klass.toLightClass() ?: return
|
||||
val springModel = SpringModelUtils.getInstance().getPsiClassSpringModel(lightClass)
|
||||
val templates = project.executeWriteCommand<List<BatchTemplateRunner>>("") {
|
||||
generateDependenciesFor(springModel, lightClass, injectionKind)
|
||||
}
|
||||
templates.forEach { it.runTemplates() }
|
||||
}
|
||||
}
|
||||
+120
@@ -0,0 +1,120 @@
|
||||
/*
|
||||
* Copyright 2010-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.idea.spring.generate
|
||||
|
||||
import com.intellij.codeInsight.template.TemplateBuilderImpl
|
||||
import com.intellij.openapi.application.ApplicationManager
|
||||
import com.intellij.openapi.util.text.StringUtil
|
||||
import com.intellij.psi.PsiClass
|
||||
import com.intellij.spring.CommonSpringModel
|
||||
import com.intellij.spring.constants.SpringAnnotationsConstants
|
||||
import com.intellij.spring.model.CommonSpringBean
|
||||
import com.intellij.spring.model.SpringBeanPointer
|
||||
import com.intellij.spring.model.SpringModelSearchParameters
|
||||
import com.intellij.spring.model.actions.generate.GenerateSpringBeanDependenciesUtil
|
||||
import com.intellij.spring.model.utils.SpringModelSearchers
|
||||
import com.intellij.spring.model.utils.SpringModelUtils
|
||||
import com.intellij.util.IncorrectOperationException
|
||||
import org.jetbrains.kotlin.asJava.KtLightClass
|
||||
import org.jetbrains.kotlin.idea.core.KotlinNameSuggester
|
||||
import org.jetbrains.kotlin.idea.editor.BatchTemplateRunner
|
||||
import org.jetbrains.kotlin.psi.KtProperty
|
||||
import org.jetbrains.kotlin.psi.KtPsiFactory
|
||||
import org.jetbrains.kotlin.psi.psiUtil.containingClassOrObject
|
||||
import org.jetbrains.kotlin.psi.psiUtil.createSmartPointer
|
||||
import org.jetbrains.kotlin.utils.ifEmpty
|
||||
import org.jetbrains.kotlin.idea.util.ShortenReferences
|
||||
|
||||
// TODO: GenerateAutowiredDependenciesUtil.getQualifierName() is not accessible here
|
||||
private fun SpringBeanPointer<CommonSpringBean>.getQualifierName(): String? {
|
||||
val value = springBean.springQualifier?.qualifierValue
|
||||
return if (value.isNullOrBlank()) name else value
|
||||
}
|
||||
|
||||
private fun createAutowiredProperty(
|
||||
currentBeanClass: KtLightClass,
|
||||
candidateBean: SpringBeanPointer<CommonSpringBean>,
|
||||
candidateBeanClasses: Array<out PsiClass>,
|
||||
model: CommonSpringModel
|
||||
): KtProperty? {
|
||||
try {
|
||||
val ktBeanClass = currentBeanClass.kotlinOrigin ?: return null
|
||||
|
||||
val qualifierName = candidateBean.getQualifierName()
|
||||
val candidateBeanClass = candidateBeanClasses.first()
|
||||
val beanName = candidateBean.name
|
||||
val name = if (beanName != null && KotlinNameSuggester.isIdentifier(beanName)) beanName else candidateBeanClass.name!!
|
||||
|
||||
val psiFactory = KtPsiFactory(currentBeanClass.project)
|
||||
// TODO: Use KtPsiFactory.CallableBuilder
|
||||
val prototype = psiFactory.createProperty("lateinit var ${name.decapitalize()}: ${candidateBeanClass.defaultTypeText}").apply {
|
||||
addAnnotationEntry(psiFactory.createAnnotationEntry("@${SpringAnnotationsConstants.AUTOWIRED}"))
|
||||
|
||||
val searchParameters = SpringModelSearchParameters.byClass(candidateBeanClass).withInheritors().effectiveBeanTypes()
|
||||
if (SpringModelSearchers.findBeans(model, searchParameters).size > 1 && !qualifierName.isNullOrBlank()) {
|
||||
val annotationText = "@${SpringAnnotationsConstants.QUALIFIER}(\"${StringUtil.escapeStringCharacters(qualifierName!!)}\")"
|
||||
addAnnotationEntry(psiFactory.createAnnotationEntry(annotationText))
|
||||
}
|
||||
}
|
||||
return ktBeanClass.addDeclaration(prototype).apply { ShortenReferences.DEFAULT.process(this) }
|
||||
}
|
||||
catch (e: IncorrectOperationException) {
|
||||
throw RuntimeException(e)
|
||||
}
|
||||
}
|
||||
|
||||
private fun addCreatePropertyTemplate(
|
||||
property: KtProperty,
|
||||
candidateBean: SpringBeanPointer<CommonSpringBean>,
|
||||
candidateBeanClasses: Array<out PsiClass>
|
||||
): BatchTemplateRunner {
|
||||
return BatchTemplateRunner(property.project).apply {
|
||||
val propertyPointer = property.createSmartPointer()
|
||||
addTemplateFactory(property) {
|
||||
val currentProperty = propertyPointer.element ?: return@addTemplateFactory null
|
||||
val builder = TemplateBuilderImpl(currentProperty)
|
||||
builder.appendVariableTemplate(currentProperty, candidateBeanClasses) {
|
||||
val existingNames = currentProperty.containingClassOrObject!!.declarations
|
||||
.mapNotNull { if (it != currentProperty) (it as? KtProperty)?.name else null }
|
||||
getSuggestedNames(candidateBean, currentProperty, existingNames) { returnType }
|
||||
}
|
||||
builder.buildInlineTemplate()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun createAutowiredDependency(
|
||||
klass: KtLightClass,
|
||||
candidateBean: SpringBeanPointer<CommonSpringBean>,
|
||||
model: CommonSpringModel
|
||||
): BatchTemplateRunner? {
|
||||
val candidateBeanClasses = candidateBean.effectiveBeanType.ifEmpty { return null }
|
||||
if (!GenerateSpringBeanDependenciesUtil.ensureFileWritable(klass)) return null
|
||||
val property = createAutowiredProperty(klass, candidateBean, candidateBeanClasses, model) ?: return null
|
||||
return addCreatePropertyTemplate(property, candidateBean, candidateBeanClasses)
|
||||
}
|
||||
|
||||
fun generateAutowiredDependenciesFor(klass: KtLightClass): List<BatchTemplateRunner> {
|
||||
val model = SpringModelUtils.getInstance().getPsiClassSpringModel(klass)
|
||||
val candidates = GenerateSpringBeanDependenciesUtil.getAutowiredBeanCandidates(model) { it.containingFile != klass.containingFile }
|
||||
val dependencies = if (ApplicationManager.getApplication().isUnitTestMode) {
|
||||
candidates.map { it.springBean }.filter(klass.project.beanFilter).sortedBy { it.name }
|
||||
} else {
|
||||
GenerateSpringBeanDependenciesUtil.chooseDependentBeans(candidates, klass.project, true)
|
||||
}
|
||||
return dependencies.mapNotNull { createAutowiredDependency(klass, it, model) }
|
||||
}
|
||||
@@ -0,0 +1,500 @@
|
||||
/*
|
||||
* Copyright 2010-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.idea.spring.generate
|
||||
|
||||
import com.intellij.codeInsight.lookup.LookupElement
|
||||
import com.intellij.codeInsight.lookup.LookupElementBuilder
|
||||
import com.intellij.codeInsight.template.Expression
|
||||
import com.intellij.codeInsight.template.ExpressionContext
|
||||
import com.intellij.codeInsight.template.TemplateBuilderImpl
|
||||
import com.intellij.codeInsight.template.TextResult
|
||||
import com.intellij.codeInspection.SmartHashMap
|
||||
import com.intellij.openapi.application.ApplicationManager
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.util.Key
|
||||
import com.intellij.psi.*
|
||||
import com.intellij.psi.codeStyle.CodeStyleManager
|
||||
import com.intellij.psi.util.PropertyUtil
|
||||
import com.intellij.psi.util.PsiTypesUtil
|
||||
import com.intellij.spring.CommonSpringModel
|
||||
import com.intellij.spring.model.CommonSpringBean
|
||||
import com.intellij.spring.model.SpringBeanPointer
|
||||
import com.intellij.spring.model.SpringModelSearchParameters
|
||||
import com.intellij.spring.model.actions.generate.GenerateSpringBeanDependenciesUtil
|
||||
import com.intellij.spring.model.actions.generate.GenerateSpringBeanDependenciesUtil.*
|
||||
import com.intellij.spring.model.actions.generate.SpringBeanClassMember
|
||||
import com.intellij.spring.model.highlighting.SpringConstructorArgResolveUtil
|
||||
import com.intellij.spring.model.utils.SpringBeanCoreUtils
|
||||
import com.intellij.spring.model.utils.SpringBeanUtils
|
||||
import com.intellij.spring.model.utils.SpringModelSearchers
|
||||
import com.intellij.spring.model.utils.SpringModelUtils
|
||||
import com.intellij.spring.model.xml.DomSpringBean
|
||||
import com.intellij.spring.model.xml.beans.Beans
|
||||
import com.intellij.spring.model.xml.beans.SpringBean
|
||||
import com.intellij.util.IncorrectOperationException
|
||||
import com.intellij.util.xml.DomElement
|
||||
import com.intellij.util.xml.DomUtil
|
||||
import org.jetbrains.annotations.NotNull
|
||||
import org.jetbrains.annotations.TestOnly
|
||||
import org.jetbrains.kotlin.asJava.KtLightClass
|
||||
import org.jetbrains.kotlin.asJava.KtLightMethod
|
||||
import org.jetbrains.kotlin.descriptors.CallableDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.ClassDescriptor
|
||||
import org.jetbrains.kotlin.idea.caches.resolve.*
|
||||
import org.jetbrains.kotlin.idea.completion.BasicLookupElementFactory
|
||||
import org.jetbrains.kotlin.idea.completion.InsertHandlerProvider
|
||||
import org.jetbrains.kotlin.idea.core.KotlinNameSuggester
|
||||
import org.jetbrains.kotlin.idea.core.NewDeclarationNameValidator
|
||||
import org.jetbrains.kotlin.idea.core.getOrCreateCompanionObject
|
||||
import org.jetbrains.kotlin.idea.editor.BatchTemplateRunner
|
||||
import org.jetbrains.kotlin.idea.util.CallType
|
||||
import org.jetbrains.kotlin.idea.util.IdeDescriptorRenderers
|
||||
import org.jetbrains.kotlin.idea.util.ShortenReferences
|
||||
import org.jetbrains.kotlin.load.java.propertyNameBySetMethodName
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.psi.*
|
||||
import org.jetbrains.kotlin.types.KotlinType
|
||||
import org.jetbrains.kotlin.types.expressions.TypeReconstructionUtil
|
||||
import org.jetbrains.kotlin.utils.SmartList
|
||||
import org.jetbrains.kotlin.utils.ifEmpty
|
||||
import java.util.*
|
||||
|
||||
// TODO: GenerateSpringBeanDependenciesUtil.ensureFileWritable() is not accessible here
|
||||
private fun DomElement.ensureFileWritable() = ensureFileWritable(DomUtil.getFile(this).virtualFile, manager.project)
|
||||
|
||||
// TODO: GenerateSpringBeanDependenciesUtil.getReferenceName() is not accessible here
|
||||
private fun getReferencedName(currentBean: SpringBean, bean: SpringBeanPointer<CommonSpringBean>): String? {
|
||||
val model = SpringModelUtils.getInstance().getSpringModel(currentBean)
|
||||
return SpringBeanCoreUtils.getReferencedName(bean, model.allCommonBeans)
|
||||
}
|
||||
|
||||
// TODO: GenerateSpringBeanDependenciesUtil.getExistedSetter() is not accessible here
|
||||
private fun getExistedSetter(currentBeanClass: PsiClass, setterPsiClass: PsiClass): PsiMethod? {
|
||||
val psiClassType = JavaPsiFacade.getInstance(setterPsiClass.project).elementFactory.createType(setterPsiClass)
|
||||
return currentBeanClass.allMethods.firstOrNull {
|
||||
PropertyUtil.isSimplePropertySetter(it) && it.parameterList.parameters.first().type.isAssignableFrom(psiClassType)
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: GenerateSpringBeanDependenciesUtil.findConstructor() is not accessible here
|
||||
private fun findConstructor(constructors: Array<PsiMethod>, psiParameterTypes: List<PsiType>): PsiMethod? {
|
||||
return constructors.firstOrNull {
|
||||
val parameters = it.parameterList.parameters
|
||||
if (it.parameterList.parametersCount != psiParameterTypes.size) return@firstOrNull false
|
||||
(psiParameterTypes zip parameters).all { it.first.isAssignableFrom(it.second.type) }
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: GenerateSpringBeanDependenciesUtil.findExistedConstructor() is not accessible here
|
||||
private fun findExistedConstructor(
|
||||
currentBean: SpringBean,
|
||||
currentBeanClass: PsiClass,
|
||||
candidateParameterClasses: Array<out PsiClass>
|
||||
): PsiMethod? {
|
||||
val constructors = SpringConstructorArgResolveUtil.findMatchingMethods(currentBean)
|
||||
for (candidateBeanClass in candidateParameterClasses) {
|
||||
for (constructor in constructors) {
|
||||
val psiParameterTypes = SmartList<PsiType>().apply {
|
||||
constructor.parameterList.parameters.mapTo(this) { it.type }
|
||||
add(PsiTypesUtil.getClassType(candidateBeanClass))
|
||||
}
|
||||
findConstructor(currentBeanClass.constructors, psiParameterTypes)?.let { return it }
|
||||
}
|
||||
}
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
// TODO: GenerateSpringBeanDependenciesUtil.createSpringBean() is not accessible here
|
||||
private fun createSpringBean(parentBeans: Beans, psiClass: PsiClass): SpringBean? {
|
||||
if (!((parentBeans as DomElement)).ensureFileWritable()) return null
|
||||
|
||||
return parentBeans.addBean().apply {
|
||||
clazz.stringValue = psiClass.qualifiedName
|
||||
id.stringValue = SpringBeanCoreUtils.suggestBeanNames(this).firstOrNull() ?: ""
|
||||
}
|
||||
}
|
||||
|
||||
private fun SpringBean.getFactoryFunctionName(factoryBeanClass: KtClass): String {
|
||||
factoryMethod.stringValue?.let { if (!it.isBlank()) return it }
|
||||
|
||||
val existingNames = factoryBeanClass.declarations.mapNotNull { if (it is KtFunction || it is KtClassOrObject) it.name else null }
|
||||
return KotlinNameSuggester.suggestNameByName("create${beanClass!!.name}") { it !in existingNames }
|
||||
}
|
||||
|
||||
internal val PsiClass.defaultTypeText: String
|
||||
get() {
|
||||
val qName = qualifiedName ?: return "Any"
|
||||
val typeParameters = typeParameters
|
||||
if (typeParameters.isEmpty()) return qName
|
||||
return TypeReconstructionUtil.getTypeNameAndStarProjectionsString(qName, typeParameters.size)
|
||||
}
|
||||
|
||||
private fun createSettable(
|
||||
candidateBean: SpringBeanPointer<CommonSpringBean>,
|
||||
currentBeanClass: KtLightClass,
|
||||
candidateBeanClasses: Array<out PsiClass>,
|
||||
injectionKind: SpringDependencyInjectionKind
|
||||
): KtNamedDeclaration {
|
||||
val project = currentBeanClass.project
|
||||
val psiFactory = KtPsiFactory(project)
|
||||
val beanName = candidateBean.name
|
||||
try {
|
||||
val candidateClass = candidateBeanClasses.first()
|
||||
val propertyName = if (beanName != null && KotlinNameSuggester.isIdentifier(beanName)) beanName else candidateClass.name!!
|
||||
|
||||
val prototype: KtNamedDeclaration = when (injectionKind) {
|
||||
SpringDependencyInjectionKind.SETTER -> {
|
||||
psiFactory.createFunction("fun set${propertyName.capitalize()}(${propertyName.decapitalize()}: ${candidateClass.defaultTypeText}) { }")
|
||||
}
|
||||
|
||||
SpringDependencyInjectionKind.LATEINIT_PROPERTY -> {
|
||||
psiFactory.createProperty("lateinit var ${propertyName.decapitalize()}: ${candidateClass.defaultTypeText}")
|
||||
}
|
||||
|
||||
else -> error("Unexpected injection kind: $injectionKind")
|
||||
}
|
||||
return currentBeanClass.kotlinOrigin!!.addDeclaration(prototype).apply { ShortenReferences.DEFAULT.process(this) }
|
||||
}
|
||||
catch (e: IncorrectOperationException) {
|
||||
throw RuntimeException(e)
|
||||
}
|
||||
}
|
||||
|
||||
internal fun getSuggestedNames(
|
||||
beanPointer: SpringBeanPointer<CommonSpringBean>,
|
||||
declaration: KtCallableDeclaration,
|
||||
existingNames: Collection<String> = emptyList(),
|
||||
getType: CallableDescriptor.() -> KotlinType?
|
||||
): Collection<String> {
|
||||
val names = LinkedHashSet<String>()
|
||||
|
||||
val newDeclarationNameValidator =
|
||||
NewDeclarationNameValidator(declaration.parent, null, NewDeclarationNameValidator.Target.VARIABLES, listOf(declaration))
|
||||
fun validate(name: String) = name !in existingNames && newDeclarationNameValidator(name)
|
||||
|
||||
SpringBeanUtils.getInstance()
|
||||
.findBeanNames(beanPointer.springBean)
|
||||
.asSequence()
|
||||
.filter { KotlinNameSuggester.isIdentifier(it) }
|
||||
.mapTo(names) { KotlinNameSuggester.suggestNameByName(it, ::validate) }
|
||||
|
||||
(declaration.resolveToDescriptor() as CallableDescriptor).getType()?.let {
|
||||
names += KotlinNameSuggester.suggestNamesByType(it, ::validate)
|
||||
}
|
||||
|
||||
return names
|
||||
}
|
||||
|
||||
internal fun TemplateBuilderImpl.appendVariableTemplate(
|
||||
variable: KtCallableDeclaration,
|
||||
candidateBeanClasses: Array<out PsiClass>,
|
||||
computeSuggestions: (() -> Collection<String>)?
|
||||
) {
|
||||
if (computeSuggestions != null) {
|
||||
val suggestedNames = computeSuggestions()
|
||||
val defaultName = variable.name ?: ""
|
||||
val nameExpression = object : Expression() {
|
||||
override fun calculateResult(context: ExpressionContext) = TextResult(defaultName)
|
||||
|
||||
override fun calculateQuickResult(context: ExpressionContext) = calculateResult(context)
|
||||
|
||||
override fun calculateLookupItems(context: ExpressionContext): Array<LookupElement>? {
|
||||
PsiDocumentManager.getInstance(context.project).commitAllDocuments()
|
||||
return suggestedNames.map { LookupElementBuilder.create(it) }.toTypedArray()
|
||||
|
||||
}
|
||||
}
|
||||
replaceElement(variable.nameIdentifier, "names", nameExpression, true)
|
||||
}
|
||||
|
||||
val superTypeVariants = getSuperTypeVariants(candidateBeanClasses)
|
||||
if (superTypeVariants.size > 1) {
|
||||
val lookupFactory = BasicLookupElementFactory(variable.project, InsertHandlerProvider(CallType.TYPE) { emptyList() })
|
||||
val typeReferenceExpression = object : Expression() {
|
||||
override fun calculateResult(context: ExpressionContext) = TextResult(candidateBeanClasses.first().qualifiedName ?: "")
|
||||
|
||||
override fun calculateQuickResult(context: ExpressionContext) = calculateResult(context)
|
||||
|
||||
override fun calculateLookupItems(context: ExpressionContext): Array<LookupElement>? {
|
||||
return superTypeVariants
|
||||
.mapTo(LinkedHashSet()) { lookupFactory.createLookupElementForJavaClass(it, qualifyNestedClasses = true) }
|
||||
.toTypedArray()
|
||||
}
|
||||
}
|
||||
replaceElement(variable.typeReference, "type", typeReferenceExpression, true)
|
||||
}
|
||||
}
|
||||
|
||||
private fun BatchTemplateRunner.addCreateFunctionTemplate(
|
||||
function: KtFunction,
|
||||
candidateBeanClasses: Map<Int, Array<out PsiClass>>,
|
||||
dependency: SpringBeanPointer<CommonSpringBean>
|
||||
) {
|
||||
val parameterList = function.valueParameterList!!
|
||||
val builder = TemplateBuilderImpl(parameterList)
|
||||
addTemplateFactory(parameterList) {
|
||||
for ((paramIndex, candidateBeanClassesForParam) in candidateBeanClasses) {
|
||||
builder.appendVariableTemplate(function.valueParameters[paramIndex], candidateBeanClassesForParam) {
|
||||
getSuggestedNames(dependency, function) { valueParameters[paramIndex].type }
|
||||
}
|
||||
}
|
||||
|
||||
builder.buildInlineTemplate()
|
||||
}
|
||||
}
|
||||
|
||||
private fun BatchTemplateRunner.addCreatePropertyTemplate(property: KtProperty, candidateBeanClasses: Array<out PsiClass>) {
|
||||
val builder = TemplateBuilderImpl(property)
|
||||
addTemplateFactory(property) {
|
||||
builder.appendVariableTemplate(property, candidateBeanClasses, null)
|
||||
builder.buildInlineTemplate()
|
||||
}
|
||||
}
|
||||
|
||||
private fun BatchTemplateRunner.addCreateFunctionTemplate(
|
||||
function: KtFunction,
|
||||
paramIndex: Int,
|
||||
candidateBeanClasses: Array<out PsiClass>,
|
||||
dependency: SpringBeanPointer<CommonSpringBean>
|
||||
) {
|
||||
addCreateFunctionTemplate(function, mapOf(paramIndex to candidateBeanClasses), dependency)
|
||||
}
|
||||
|
||||
private fun getOrCreateSetter(
|
||||
candidateBean: SpringBeanPointer<CommonSpringBean>,
|
||||
currentBeanClass: KtLightClass,
|
||||
candidateBeanClasses: Array<out PsiClass>,
|
||||
templatesHolder: BatchTemplateRunner,
|
||||
injectionKind: SpringDependencyInjectionKind
|
||||
): PsiNamedElement? {
|
||||
for (candidateBeanClass in candidateBeanClasses) {
|
||||
getExistedSetter(currentBeanClass, candidateBeanClass)?.let { return it }
|
||||
}
|
||||
|
||||
if (!ensureFileWritable(currentBeanClass)) return null
|
||||
val settable = createSettable(candidateBean, currentBeanClass, candidateBeanClasses, injectionKind)
|
||||
when (settable) {
|
||||
is KtNamedFunction -> templatesHolder.addCreateFunctionTemplate(settable, 0, candidateBeanClasses, candidateBean)
|
||||
is KtProperty -> templatesHolder.addCreatePropertyTemplate(settable, candidateBeanClasses)
|
||||
}
|
||||
|
||||
return settable
|
||||
}
|
||||
|
||||
private fun createSetterDependency(
|
||||
currentBean: SpringBean,
|
||||
dependency: SpringBeanPointer<CommonSpringBean>,
|
||||
injectionKind: SpringDependencyInjectionKind
|
||||
): BatchTemplateRunner? {
|
||||
val templatesHolder = BatchTemplateRunner(currentBean.manager.project)
|
||||
val currentBeanClass = currentBean.beanClass as? KtLightClass ?: return null
|
||||
val candidateBeanClasses = dependency.effectiveBeanType.ifEmpty { return null }
|
||||
val setter = getOrCreateSetter(dependency, currentBeanClass, candidateBeanClasses, templatesHolder, injectionKind) ?: return null
|
||||
currentBean.addProperty().apply {
|
||||
name.ensureXmlElementExists()
|
||||
name.stringValue = when (setter) {
|
||||
is PsiMethod, is KtFunction -> propertyNameBySetMethodName(Name.identifier(setter.name!!), false)!!.asString()
|
||||
else -> setter.name
|
||||
}
|
||||
refAttr.setStringValue(getReferencedName(currentBean, dependency))
|
||||
}
|
||||
return templatesHolder
|
||||
}
|
||||
|
||||
private fun addConstructorParameter(
|
||||
currentBeanClass: KtLightClass,
|
||||
candidateBeanClass: PsiClass,
|
||||
constructor: KtFunction
|
||||
) {
|
||||
val psiFactory = KtPsiFactory(currentBeanClass)
|
||||
|
||||
val validator = NewDeclarationNameValidator(constructor, null, NewDeclarationNameValidator.Target.VARIABLES)
|
||||
val resolutionFacade = currentBeanClass.kotlinOrigin!!.getResolutionFacade()
|
||||
val defaultType = (candidateBeanClass.getJavaOrKotlinMemberDescriptor(resolutionFacade) as ClassDescriptor).defaultType
|
||||
val name = KotlinNameSuggester.suggestNamesByType(defaultType, validator).first()
|
||||
|
||||
val parameter = psiFactory.createParameter("$name: ${candidateBeanClass.defaultTypeText}")
|
||||
constructor.getValueParameterList()!!.addParameter(parameter).apply { ShortenReferences.DEFAULT.process(this) }
|
||||
}
|
||||
|
||||
private fun findProperConstructorAndAddParameter(
|
||||
currentBean: SpringBean,
|
||||
dependency: SpringBeanPointer<CommonSpringBean>,
|
||||
currentBeanClass: KtLightClass,
|
||||
candidateBeanClass: PsiClass,
|
||||
holder: BatchTemplateRunner
|
||||
): PsiMethod? {
|
||||
val lightConstructor = currentBean.resolvedConstructorArgs.resolvedMethod as? KtLightMethod ?: return null
|
||||
val constructorOrigin = lightConstructor.kotlinOrigin
|
||||
val properConstructor = when (constructorOrigin) {
|
||||
is KtFunction -> constructorOrigin
|
||||
is KtClass -> constructorOrigin.createPrimaryConstructorIfAbsent()
|
||||
else -> return null
|
||||
}
|
||||
addConstructorParameter(currentBeanClass, candidateBeanClass, properConstructor)
|
||||
holder.addCreateFunctionTemplate(properConstructor, properConstructor.getValueParameters().lastIndex, arrayOf(candidateBeanClass), dependency)
|
||||
return lightConstructor
|
||||
}
|
||||
|
||||
private fun createConstructorWithTemplate(
|
||||
currentBean: SpringBean,
|
||||
dependency: SpringBeanPointer<CommonSpringBean>,
|
||||
templatesHolder: BatchTemplateRunner
|
||||
) {
|
||||
val beanClass = currentBean.beanClass as? KtLightClass ?: return
|
||||
val ktBeanClass = beanClass.kotlinOrigin as? KtClass ?: return
|
||||
|
||||
try {
|
||||
val psiFactory = KtPsiFactory(beanClass)
|
||||
val factoryFunction = when {
|
||||
currentBean.factoryBean.exists() -> {
|
||||
// TODO: Support non-Kotlin factory beans
|
||||
val factoryClass = currentBean.factoryBean.value?.beanClass as? KtLightClass ?: return
|
||||
val ktFactoryClass = factoryClass.kotlinOrigin as? KtClass ?: return
|
||||
val funName = currentBean.getFactoryFunctionName(ktFactoryClass)
|
||||
val funText = "fun $funName(): ${beanClass.defaultTypeText} {\n return null \n}"
|
||||
ktFactoryClass.addDeclaration(psiFactory.createFunction(funText))
|
||||
}
|
||||
currentBean.factoryMethod.exists() -> {
|
||||
val funName = currentBean.getFactoryFunctionName(ktBeanClass)
|
||||
val funText = "@JvmStatic fun $funName(): ${beanClass.defaultTypeText} {\n return null \n}"
|
||||
ktBeanClass.getOrCreateCompanionObject().addDeclaration(psiFactory.createFunction(funText))
|
||||
}
|
||||
else -> {
|
||||
if (ktBeanClass.hasPrimaryConstructor() || ktBeanClass.getSecondaryConstructors().isNotEmpty()) {
|
||||
ktBeanClass.addDeclaration(psiFactory.createSecondaryConstructor("constructor()"))
|
||||
}
|
||||
else {
|
||||
ktBeanClass.createPrimaryConstructorIfAbsent()
|
||||
}
|
||||
}
|
||||
} as KtFunction
|
||||
|
||||
ShortenReferences.DEFAULT.process(factoryFunction)
|
||||
|
||||
val dummyMethod = JavaPsiFacade.getElementFactory(beanClass.project).createMethod("foo", PsiType.VOID)
|
||||
dummyMethod.containingFile.moduleInfo = ktBeanClass.getModuleInfo()
|
||||
SpringConstructorArgResolveUtil.suggestParamsForConstructorArgs(currentBean).forEach { dummyMethod.parameterList.add(it) }
|
||||
|
||||
val parameterList = factoryFunction.valueParameterList!!
|
||||
val indexOffset = parameterList.parameters.size
|
||||
val candidateClassMap = SmartHashMap<Int, Array<PsiClass>>()
|
||||
val resolutionFacade = ktBeanClass.getResolutionFacade()
|
||||
for ((i, psiParam) in dummyMethod.parameterList.parameters.withIndex()) {
|
||||
val descriptor = psiParam.getParameterDescriptor(resolutionFacade)!!
|
||||
val ktParameter = psiFactory.createParameter(
|
||||
"${psiParam.name}: ${IdeDescriptorRenderers.SOURCE_CODE_NOT_NULL_TYPE_APPROXIMATION.renderType(descriptor.type)}"
|
||||
)
|
||||
parameterList.addParameter(ktParameter)
|
||||
(psiParam.type as? PsiClassType)?.resolve()?.let { candidateClassMap[i + indexOffset] = arrayOf(it) }
|
||||
}
|
||||
|
||||
templatesHolder.addCreateFunctionTemplate(factoryFunction, candidateClassMap, dependency)
|
||||
}
|
||||
catch (e: IncorrectOperationException) {
|
||||
throw RuntimeException(e)
|
||||
}
|
||||
}
|
||||
|
||||
private fun createConstructorDependency(
|
||||
currentBean: SpringBean,
|
||||
dependency: SpringBeanPointer<CommonSpringBean>
|
||||
): BatchTemplateRunner? {
|
||||
val templatesHolder = BatchTemplateRunner(currentBean.manager.project)
|
||||
val currentBeanClass = currentBean.beanClass as? KtLightClass ?: return null
|
||||
val candidateBeanClasses = dependency.effectiveBeanType.ifEmpty { return null }
|
||||
var existedConstructor = findExistedConstructor(currentBean, currentBeanClass, candidateBeanClasses)
|
||||
if (existedConstructor == null) {
|
||||
if (!ensureFileWritable(currentBeanClass)) return null
|
||||
existedConstructor = findProperConstructorAndAddParameter(currentBean, dependency, currentBeanClass, candidateBeanClasses.first(), templatesHolder)
|
||||
}
|
||||
|
||||
val newConstructorArg = currentBean.addConstructorArg()
|
||||
newConstructorArg.refAttr.stringValue = getReferencedName(currentBean, dependency)
|
||||
if (existedConstructor == null && SpringConstructorArgResolveUtil.findMatchingMethods(currentBean).isEmpty()) {
|
||||
createConstructorWithTemplate(currentBean, dependency, templatesHolder)
|
||||
}
|
||||
|
||||
return templatesHolder
|
||||
}
|
||||
|
||||
private fun generateDependency(
|
||||
springBean: SpringBean,
|
||||
dependency: SpringBeanPointer<CommonSpringBean>,
|
||||
injectionKind: SpringDependencyInjectionKind
|
||||
): BatchTemplateRunner? {
|
||||
return if (injectionKind.isSetter) {
|
||||
createSetterDependency(springBean, dependency, injectionKind)
|
||||
}
|
||||
else {
|
||||
createConstructorDependency(springBean, dependency)
|
||||
}
|
||||
}
|
||||
|
||||
enum class SpringDependencyInjectionKind(val isSetter: Boolean) {
|
||||
CONSTRUCTOR(false),
|
||||
SETTER(true),
|
||||
LATEINIT_PROPERTY(true)
|
||||
}
|
||||
|
||||
@set:TestOnly
|
||||
var Project.beanFilter: (SpringBeanPointer<CommonSpringBean>) -> Boolean
|
||||
by NotNullableUserDataProperty(Key.create("BEAN_CHOOSER")) { true }
|
||||
|
||||
@NotNull
|
||||
private fun chooseDependentBeans(
|
||||
candidates: Set<SpringBeanClassMember>,
|
||||
project: Project,
|
||||
isSetterDependency: Boolean
|
||||
): List<SpringBeanPointer<CommonSpringBean>> {
|
||||
return if (ApplicationManager.getApplication().isUnitTestMode) {
|
||||
candidates.map { it.springBean }.filter(project.beanFilter)
|
||||
}
|
||||
else {
|
||||
GenerateSpringBeanDependenciesUtil.chooseDependentBeans(candidates, project, isSetterDependency)
|
||||
}
|
||||
}
|
||||
|
||||
fun generateDependenciesFor(
|
||||
springModel: CommonSpringModel,
|
||||
klass: KtLightClass,
|
||||
injectionKind: SpringDependencyInjectionKind
|
||||
): List<BatchTemplateRunner> {
|
||||
val project = klass.project
|
||||
val isSetter = injectionKind.isSetter
|
||||
|
||||
SpringModelSearchers
|
||||
.findBeans(springModel, SpringModelSearchParameters.byClass(klass))
|
||||
.asSequence()
|
||||
.map { it.springBean }
|
||||
.filterIsInstance<SpringBean>()
|
||||
.firstOrNull { acceptBean(it, false) }
|
||||
?.let { springBean ->
|
||||
if (!springBean.ensureFileWritable()) return emptyList()
|
||||
if (springBean.beanClass == null) return emptyList()
|
||||
val dependencies = chooseDependentBeans(getCandidates(springBean, isSetter), project, isSetter)
|
||||
return dependencies.mapNotNull { generateDependency(springBean, it, injectionKind) }
|
||||
}
|
||||
|
||||
val dependencies = chooseDependentBeans(getCandidates(springModel, klass, isSetter), project, isSetter)
|
||||
val beanXml = dependencies.singleOrNull()?.springBean as? DomSpringBean ?: return emptyList()
|
||||
val beansXml = beanXml.getParentOfType(Beans::class.java, false) ?: return emptyList()
|
||||
val newBean = createSpringBean(beansXml, klass) ?: return emptyList()
|
||||
|
||||
return dependencies.mapNotNull { generateDependency(newBean, it, injectionKind) }
|
||||
}
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* Copyright 2010-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.idea.spring.inspections
|
||||
|
||||
import com.intellij.codeInsight.highlighting.HighlightUsagesDescriptionLocation
|
||||
import com.intellij.codeInspection.LocalQuickFix
|
||||
import com.intellij.codeInspection.ProblemDescriptor
|
||||
import com.intellij.codeInspection.ProblemHighlightType
|
||||
import com.intellij.codeInspection.ProblemsHolder
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.psi.ElementDescriptionUtil
|
||||
import com.intellij.psi.PsiElementVisitor
|
||||
import com.intellij.spring.constants.SpringAnnotationsConstants
|
||||
import com.intellij.spring.model.jam.stereotype.SpringComponent
|
||||
import com.intellij.spring.model.jam.stereotype.SpringConfiguration
|
||||
import org.jetbrains.kotlin.asJava.toLightClass
|
||||
import org.jetbrains.kotlin.asJava.toLightMethods
|
||||
import org.jetbrains.kotlin.idea.inspections.AbstractKotlinInspection
|
||||
import org.jetbrains.kotlin.idea.spring.isAnnotatedWith
|
||||
import org.jetbrains.kotlin.lexer.KtTokens
|
||||
import org.jetbrains.kotlin.psi.*
|
||||
import org.jetbrains.kotlin.psi.psiUtil.containingClassOrObject
|
||||
import org.jetbrains.kotlin.psi.psiUtil.isInheritable
|
||||
import org.jetbrains.kotlin.psi.psiUtil.isOverridable
|
||||
|
||||
class KotlinFinalClassOrFunSpringInspection : AbstractKotlinInspection() {
|
||||
class QuickFix<T: KtModifierListOwner>(private val element: T) : LocalQuickFix {
|
||||
override fun getName(): String {
|
||||
return "Make ${ElementDescriptionUtil.getElementDescription(element, HighlightUsagesDescriptionLocation.INSTANCE)} open"
|
||||
}
|
||||
|
||||
override fun getFamilyName() = "Make declaration open"
|
||||
|
||||
override fun applyFix(project: Project, problemDescriptor: ProblemDescriptor) {
|
||||
(element as? KtNamedDeclaration)?.containingClassOrObject?.addModifier(KtTokens.OPEN_KEYWORD)
|
||||
element.addModifier(KtTokens.OPEN_KEYWORD)
|
||||
}
|
||||
}
|
||||
|
||||
private fun getMessage(declaration: KtNamedDeclaration): String? {
|
||||
when (declaration) {
|
||||
is KtClass -> {
|
||||
val lightClass = declaration.toLightClass() ?: return null
|
||||
when {
|
||||
SpringConfiguration.META.getJamElement(lightClass) != null -> return "@Configuration class should be declared open"
|
||||
SpringComponent.META.getJamElement(lightClass) != null -> return "@Component class should be declared open"
|
||||
}
|
||||
}
|
||||
|
||||
is KtNamedFunction -> {
|
||||
val lightMethod = declaration.toLightMethods().firstOrNull() ?: return null
|
||||
if (lightMethod.isAnnotatedWith(SpringAnnotationsConstants.JAVA_SPRING_BEAN)) return "@Bean function should be declared open"
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
override fun buildVisitor(holder: ProblemsHolder, isOnTheFly: Boolean): PsiElementVisitor {
|
||||
return object: KtVisitorVoid() {
|
||||
override fun visitNamedDeclaration(declaration: KtNamedDeclaration) {
|
||||
when (declaration) {
|
||||
is KtClass -> if (declaration.isInheritable()) return
|
||||
is KtNamedFunction -> if (declaration.isOverridable()) return
|
||||
else -> return
|
||||
}
|
||||
|
||||
val message = getMessage(declaration) ?: return
|
||||
|
||||
holder.registerProblem(
|
||||
declaration.nameIdentifier ?: declaration,
|
||||
message,
|
||||
ProblemHighlightType.GENERIC_ERROR_OR_WARNING,
|
||||
QuickFix(declaration)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Copyright 2010-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.idea.spring.inspections
|
||||
|
||||
import com.intellij.codeInspection.LocalQuickFix
|
||||
import com.intellij.codeInspection.ProblemsHolder
|
||||
import com.intellij.psi.PsiElementVisitor
|
||||
import com.intellij.spring.model.highlighting.config.SpringFacetCodeInspection
|
||||
import org.jetbrains.kotlin.asJava.toLightClass
|
||||
import org.jetbrains.kotlin.idea.inspections.AbstractKotlinInspection
|
||||
import org.jetbrains.kotlin.psi.KtClassOrObject
|
||||
import org.jetbrains.kotlin.psi.KtVisitorVoid
|
||||
|
||||
class KotlinSpringFacetCodeInspection : AbstractKotlinInspection() {
|
||||
private val javaInspection by lazy { SpringFacetCodeInspection() }
|
||||
|
||||
override fun getDisplayName() = "Spring Facet Code Configuration (Kotlin)"
|
||||
|
||||
override fun getGroupDisplayName() = "Code"
|
||||
|
||||
override fun buildVisitor(holder: ProblemsHolder, isOnTheFly: Boolean): PsiElementVisitor {
|
||||
return object: KtVisitorVoid() {
|
||||
override fun visitClassOrObject(classOrObject: KtClassOrObject) {
|
||||
val lightClass = classOrObject.toLightClass() ?: return
|
||||
javaInspection.checkClass(lightClass, holder.manager, isOnTheFly)?.forEach {
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
val descriptor = holder.manager.createProblemDescriptor(
|
||||
classOrObject.nameIdentifier ?: classOrObject,
|
||||
it.descriptionTemplate,
|
||||
isOnTheFly,
|
||||
it.fixes as Array<LocalQuickFix>,
|
||||
it.highlightType
|
||||
)
|
||||
holder.registerProblem(descriptor)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* Copyright 2010-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.idea.spring.lineMarking
|
||||
|
||||
import com.intellij.codeInsight.daemon.RelatedItemLineMarkerInfo
|
||||
import com.intellij.psi.PsiElement
|
||||
import com.intellij.psi.PsiNameIdentifierOwner
|
||||
import com.intellij.spring.gutter.SpringClassAnnotator
|
||||
import org.jetbrains.kotlin.asJava.*
|
||||
import org.jetbrains.kotlin.idea.caches.resolve.resolveToDescriptor
|
||||
import org.jetbrains.kotlin.psi.*
|
||||
import org.jetbrains.kotlin.psi.psiUtil.containingClassOrObject
|
||||
import org.jetbrains.kotlin.psi.psiUtil.getParentOfTypeAndBranch
|
||||
import org.jetbrains.kotlin.resolve.annotations.hasJvmStaticAnnotation
|
||||
|
||||
class KotlinSpringClassAnnotator : SpringClassAnnotator() {
|
||||
override fun getElementToProcess(psiElement: PsiElement): PsiElement? {
|
||||
if (psiElement is KtLightIdentifier) return psiElement.parent
|
||||
psiElement.getParentOfTypeAndBranch<KtClass> { nameIdentifier }?.let { return it.toLightClass() }
|
||||
psiElement.getParentOfTypeAndBranch<KtNamedFunction> { nameIdentifier }?.let { function ->
|
||||
val containingClassOrObject = function.containingClassOrObject
|
||||
val classForLightMethod = if (containingClassOrObject is KtObjectDeclaration
|
||||
&& containingClassOrObject.isCompanion()
|
||||
&& function.resolveToDescriptor().hasJvmStaticAnnotation()) {
|
||||
containingClassOrObject.containingClassOrObject
|
||||
}
|
||||
else {
|
||||
containingClassOrObject
|
||||
}
|
||||
return classForLightMethod?.toLightClass()?.methods?.firstOrNull { (it as? KtLightMethod)?.kotlinOrigin == function }
|
||||
}
|
||||
psiElement.getParentOfTypeAndBranch<KtProperty> { nameIdentifier }?.let { return it }
|
||||
psiElement.getParentOfTypeAndBranch<KtAnnotationEntry> {
|
||||
(typeReference?.typeElement as? KtUserType)?.referenceExpression?.getReferencedNameElement()
|
||||
}?.let { return it.toLightAnnotation() }
|
||||
return null
|
||||
}
|
||||
|
||||
override fun collectNavigationMarkers(psiElement: PsiElement, result: MutableCollection<in RelatedItemLineMarkerInfo<PsiElement>>?) {
|
||||
if (psiElement is KtProperty) {
|
||||
for (it in psiElement.toLightElements()) {
|
||||
val nameIdentifier = (it as? PsiNameIdentifierOwner)?.nameIdentifier ?: continue
|
||||
super.collectNavigationMarkers(nameIdentifier, result)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// Workaround for SpringClassAnnotator
|
||||
(getElementToProcess(psiElement) as? KtLightAnnotation)?.let { return super.collectNavigationMarkers(it, result) }
|
||||
|
||||
super.collectNavigationMarkers(psiElement, result)
|
||||
}
|
||||
}
|
||||
+129
@@ -0,0 +1,129 @@
|
||||
/*
|
||||
* Copyright 2010-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.idea.spring.references
|
||||
|
||||
import com.intellij.openapi.util.TextRange
|
||||
import com.intellij.psi.PsiReference
|
||||
import com.intellij.psi.PsiReferenceRegistrar
|
||||
import com.intellij.spring.constants.SpringAnnotationsConstants
|
||||
import com.intellij.spring.constants.SpringConstants
|
||||
import com.intellij.spring.model.utils.resources.SpringResourcesBuilder
|
||||
import com.intellij.spring.model.utils.resources.SpringResourcesUtil
|
||||
import com.intellij.spring.references.SpringBeanNamesReferenceProvider
|
||||
import com.intellij.spring.references.SpringBeanReference
|
||||
import org.jetbrains.kotlin.asJava.toLightClass
|
||||
import org.jetbrains.kotlin.descriptors.CallableDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.CallableMemberDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.ConstructorDescriptor
|
||||
import org.jetbrains.kotlin.idea.caches.resolve.analyze
|
||||
import org.jetbrains.kotlin.idea.caches.resolve.resolveToDescriptor
|
||||
import org.jetbrains.kotlin.idea.imports.importableFqName
|
||||
import org.jetbrains.kotlin.idea.references.AbstractKotlinReferenceContributor
|
||||
import org.jetbrains.kotlin.psi.*
|
||||
import org.jetbrains.kotlin.psi.psiUtil.getContentRange
|
||||
import org.jetbrains.kotlin.psi.psiUtil.getStrictParentOfType
|
||||
import org.jetbrains.kotlin.psi.psiUtil.isPlain
|
||||
import org.jetbrains.kotlin.psi.psiUtil.plainContent
|
||||
import org.jetbrains.kotlin.resolve.calls.callUtil.getResolvedCall
|
||||
import org.jetbrains.kotlin.resolve.descriptorUtil.overriddenTreeAsSequence
|
||||
import org.jetbrains.kotlin.resolve.lazy.BodyResolveMode
|
||||
import org.jetbrains.kotlin.resolve.source.getPsi
|
||||
|
||||
class KotlinSpringReferenceContributor : AbstractKotlinReferenceContributor() {
|
||||
override fun registerReferenceProviders(registrar: PsiReferenceRegistrar) {
|
||||
registrar.registerProvider<KtStringTemplateExpression> {
|
||||
if (!it.isPlain()) return@registerProvider null
|
||||
|
||||
val callExpression = (it.parent as? KtValueArgument)?.getStrictParentOfType<KtCallExpression>() ?: return@registerProvider null
|
||||
val context = callExpression.analyze(BodyResolveMode.PARTIAL)
|
||||
val resolvedCall = callExpression.getResolvedCall(context) ?: return@registerProvider null
|
||||
val callable = resolvedCall.resultingDescriptor as? CallableMemberDescriptor ?: return@registerProvider null
|
||||
if (!callable.overriddenTreeAsSequence(true).any {
|
||||
it.containingDeclaration.importableFqName?.asString() == SpringConstants.BEAN_FACTORY_CLASS
|
||||
}) return@registerProvider null
|
||||
if (callable.name.asString() !in SpringBeanNamesReferenceProvider.METHODS) return@registerProvider null
|
||||
|
||||
SpringBeanReference(it, it.getContentRange())
|
||||
}
|
||||
|
||||
registrar.registerProvider<KtStringTemplateExpression>(PsiReferenceRegistrar.HIGHER_PRIORITY) {
|
||||
if (!it.isPlain()) return@registerProvider null
|
||||
|
||||
val argument = it.parent as? KtValueArgument ?: return@registerProvider null
|
||||
val argumentName = argument.getArgumentName() ?: return@registerProvider null
|
||||
if (argumentName.asName.asString() != "name") return@registerProvider null
|
||||
|
||||
val entry = argument.getStrictParentOfType<KtAnnotationEntry>() ?: return@registerProvider null
|
||||
val context = entry.analyze(BodyResolveMode.PARTIAL)
|
||||
val resolvedCall = entry.getResolvedCall(context) ?: return@registerProvider null
|
||||
val annotation = (resolvedCall.resultingDescriptor as? ConstructorDescriptor)?.containingDeclaration ?: return@registerProvider null
|
||||
if (annotation.importableFqName?.asString() != SpringAnnotationsConstants.JAVAX_RESOURCE) return@registerProvider null
|
||||
|
||||
val contentRange = it.getContentRange()
|
||||
var startOffset = contentRange.startOffset
|
||||
val isFactoryBeanRef: Boolean
|
||||
if (it.plainContent.startsWith("&")) {
|
||||
startOffset++
|
||||
isFactoryBeanRef = true
|
||||
}
|
||||
else {
|
||||
isFactoryBeanRef = false
|
||||
}
|
||||
|
||||
val callable = (it.getStrictParentOfType<KtAnnotationEntry>()?.parent as? KtModifierList)?.parent as? KtCallableDeclaration
|
||||
val callableType = (callable?.resolveToDescriptor() as? CallableDescriptor)?.returnType
|
||||
val requiredSuperClass = callableType?.constructor?.declarationDescriptor?.source?.getPsi() as? KtClass
|
||||
|
||||
SpringBeanReference(it, TextRange(startOffset, contentRange.endOffset), requiredSuperClass?.toLightClass(), isFactoryBeanRef)
|
||||
}
|
||||
|
||||
registrar.registerProvider<KtStringTemplateExpression>(PsiReferenceRegistrar.HIGHER_PRIORITY) {
|
||||
if (!it.isPlain()) return@registerProvider null
|
||||
|
||||
val argument = it.parent as? KtValueArgument ?: return@registerProvider null
|
||||
val argumentName = argument.getArgumentName()
|
||||
if (argumentName != null && argumentName.asName.asString() != "value") return@registerProvider null
|
||||
|
||||
val entry = argument.getStrictParentOfType<KtAnnotationEntry>() ?: return@registerProvider null
|
||||
val context = entry.analyze(BodyResolveMode.PARTIAL)
|
||||
val resolvedCall = entry.getResolvedCall(context) ?: return@registerProvider null
|
||||
val annotation = (resolvedCall.resultingDescriptor as? ConstructorDescriptor)?.containingDeclaration ?: return@registerProvider null
|
||||
if (annotation.importableFqName?.asString() != SpringAnnotationsConstants.SCOPE) return@registerProvider null
|
||||
|
||||
KtSpringBeanScopeReference(it)
|
||||
}
|
||||
|
||||
registrar.registerMultiProvider<KtStringTemplateExpression> {
|
||||
if (!it.isPlain()) return@registerMultiProvider PsiReference.EMPTY_ARRAY
|
||||
|
||||
val callExpression = (it.parent as? KtValueArgument)?.getStrictParentOfType<KtCallExpression>()
|
||||
?: return@registerMultiProvider PsiReference.EMPTY_ARRAY
|
||||
val context = callExpression.analyze(BodyResolveMode.PARTIAL)
|
||||
val resolvedCall = callExpression.getResolvedCall(context) ?: return@registerMultiProvider PsiReference.EMPTY_ARRAY
|
||||
val classDescriptor = (resolvedCall.resultingDescriptor as? ConstructorDescriptor)?.containingDeclaration
|
||||
?: return@registerMultiProvider PsiReference.EMPTY_ARRAY
|
||||
val qName = classDescriptor.importableFqName?.asString()
|
||||
if (qName != SpringConstants.CLASS_PATH_XML_APP_CONTEXT && qName != SpringConstants.CLASS_PATH_RESOURCE) {
|
||||
return@registerMultiProvider PsiReference.EMPTY_ARRAY
|
||||
}
|
||||
|
||||
val content = it.plainContent
|
||||
val resourcesBuilder = SpringResourcesBuilder.create(it, content).fromRoot(content.startsWith("/")).soft(false)
|
||||
SpringResourcesUtil.getInstance().getClassPathReferences(resourcesBuilder)
|
||||
}
|
||||
}
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright 2010-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.idea.spring.references
|
||||
|
||||
import com.intellij.codeInsight.lookup.LookupElementBuilder
|
||||
import com.intellij.ide.TypePresentationService
|
||||
import com.intellij.psi.ElementManipulators
|
||||
import com.intellij.psi.PsiReferenceBase
|
||||
import com.intellij.spring.model.scope.SpringBeanScope
|
||||
import com.intellij.spring.model.scope.SpringBeanScopeManager
|
||||
import org.jetbrains.kotlin.psi.KtStringTemplateExpression
|
||||
import org.jetbrains.kotlin.psi.psiUtil.plainContent
|
||||
|
||||
class KtSpringBeanScopeReference(
|
||||
element: KtStringTemplateExpression
|
||||
) : PsiReferenceBase<KtStringTemplateExpression>(element, ElementManipulators.getManipulator(element).getRangeInElement(element)) {
|
||||
private fun getScopes(): Sequence<SpringBeanScope> {
|
||||
return SpringBeanScope.getDefaultScopes().asSequence() + SpringBeanScopeManager.getInstance().getCustomBeanScopes(element)
|
||||
}
|
||||
|
||||
private fun getLookupElement(scope: String): LookupElementBuilder {
|
||||
return LookupElementBuilder
|
||||
.create(scope)
|
||||
.withIcon(TypePresentationService.getService().getTypeIcon(SpringBeanScope::class.java))
|
||||
}
|
||||
|
||||
override fun resolve() = if (element.plainContent in getScopes().map { it.value }) element else null
|
||||
|
||||
override fun getVariants() = getScopes().map { getLookupElement(it.value) }.toList().toTypedArray()
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright 2010-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.idea.spring
|
||||
|
||||
import com.intellij.codeInsight.AnnotationUtil
|
||||
import com.intellij.openapi.module.ModuleUtilCore
|
||||
import com.intellij.psi.PsiModifierListOwner
|
||||
import com.intellij.spring.model.jam.utils.JamAnnotationTypeUtil
|
||||
|
||||
internal fun PsiModifierListOwner.isAnnotatedWith(annotationFqName: String): Boolean {
|
||||
val module = ModuleUtilCore.findModuleForPsiElement(this) ?: return false
|
||||
return JamAnnotationTypeUtil.getInstance(module)
|
||||
.getAnnotationTypesWithChildren(annotationFqName)
|
||||
.mapNotNull { it.qualifiedName }
|
||||
.any { AnnotationUtil.isAnnotated(this, it, true) }
|
||||
}
|
||||
Vendored
+74
@@ -0,0 +1,74 @@
|
||||
<problems>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>18</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Final Kotlin class or function with Spring annotation</problem_class>
|
||||
<description>@Configuration class should be declared open</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>21</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Final Kotlin class or function with Spring annotation</problem_class>
|
||||
<description>@Configuration class should be declared open</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>32</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Final Kotlin class or function with Spring annotation</problem_class>
|
||||
<description>@Component class should be declared open</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>41</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Final Kotlin class or function with Spring annotation</problem_class>
|
||||
<description>@Bean function should be declared open</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>44</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Final Kotlin class or function with Spring annotation</problem_class>
|
||||
<description>@Bean function should be declared open</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>47</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Final Kotlin class or function with Spring annotation</problem_class>
|
||||
<description>@Bean function should be declared open</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>50</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Final Kotlin class or function with Spring annotation</problem_class>
|
||||
<description>@Bean function should be declared open</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>55</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Final Kotlin class or function with Spring annotation</problem_class>
|
||||
<description>@Bean function should be declared open</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>58</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Final Kotlin class or function with Spring annotation</problem_class>
|
||||
<description>@Bean function should be declared open</description>
|
||||
</problem>
|
||||
</problems>
|
||||
ultimate/testData/inspections/spring/finalSpringAnnotatedDeclaration/inspectionData/inspections.test
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
// INSPECTION_CLASS: org.jetbrains.kotlin.idea.spring.inspections.KotlinFinalClassOrFunSpringInspection
|
||||
// FIXTURE_CLASS: org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension
|
||||
@@ -0,0 +1,65 @@
|
||||
|
||||
// WITH_RUNTIME
|
||||
|
||||
import org.springframework.context.annotation.Bean
|
||||
import org.springframework.context.annotation.ComponentScan
|
||||
import org.springframework.context.annotation.Configuration
|
||||
import org.springframework.stereotype.Component
|
||||
|
||||
@Configuration
|
||||
annotation class MyConfiguration
|
||||
|
||||
@Bean
|
||||
annotation class MyBean
|
||||
|
||||
// @Configuration
|
||||
|
||||
@Configuration
|
||||
class Application1
|
||||
|
||||
@MyConfiguration
|
||||
class Application2
|
||||
|
||||
@Configuration
|
||||
open class Application3
|
||||
|
||||
@MyConfiguration
|
||||
open class Application4
|
||||
|
||||
// @Component
|
||||
|
||||
@Component
|
||||
class Component1
|
||||
|
||||
@Component
|
||||
open class Component2
|
||||
|
||||
// @Bean
|
||||
|
||||
class Utils1 {
|
||||
@Bean
|
||||
fun foo1() = Component1()
|
||||
|
||||
@MyBean
|
||||
fun foo2() = Component2()
|
||||
|
||||
@Bean
|
||||
open fun foo3() = Component3()
|
||||
|
||||
@MyBean
|
||||
open fun foo4() = Component4()
|
||||
}
|
||||
|
||||
open class Utils2 {
|
||||
@Bean
|
||||
fun foo1() = Component1()
|
||||
|
||||
@MyBean
|
||||
fun foo2() = Component2()
|
||||
|
||||
@Bean
|
||||
open fun foo3() = Component3()
|
||||
|
||||
@MyBean
|
||||
open fun foo4() = Component4()
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
<problems>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>12</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Spring Facet Code Configuration (Kotlin)</problem_class>
|
||||
<description>Application context not configured for this file</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>15</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Spring Facet Code Configuration (Kotlin)</problem_class>
|
||||
<description>Application context not configured for this file</description>
|
||||
</problem>
|
||||
</problems>
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
// INSPECTION_CLASS: org.jetbrains.kotlin.idea.spring.inspections.KotlinSpringFacetCodeInspection
|
||||
// FIXTURE_CLASS: org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension
|
||||
@@ -0,0 +1,15 @@
|
||||
|
||||
// WITH_RUNTIME
|
||||
|
||||
import org.springframework.context.annotation.ComponentScan
|
||||
import org.springframework.context.annotation.Configuration
|
||||
|
||||
@Configuration
|
||||
@ComponentScan
|
||||
annotation class MyConfiguration
|
||||
|
||||
@Configuration
|
||||
class Application1
|
||||
|
||||
@MyConfiguration
|
||||
class Application2
|
||||
+1
@@ -0,0 +1 @@
|
||||
org.jetbrains.kotlin.idea.spring.inspections.KotlinFinalClassOrFunSpringInspection
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
// "Make class Bean open" "true"
|
||||
// FIXTURE_CLASS: org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension
|
||||
// DISABLE-ERRORS
|
||||
import org.springframework.stereotype.Component
|
||||
|
||||
@Component
|
||||
class <caret>Bean
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Make class Bean open" "true"
|
||||
// FIXTURE_CLASS: org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension
|
||||
// DISABLE-ERRORS
|
||||
import org.springframework.stereotype.Component
|
||||
|
||||
@Component
|
||||
open class <caret>Bean
|
||||
ultimate/testData/quickFixes/spring/finalSpringAnnotatedDeclaration/classWithConfigurationRuntime.kt
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
// "Make class Application open" "true"
|
||||
// FIXTURE_CLASS: org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension
|
||||
// DISABLE-ERRORS
|
||||
import org.springframework.context.annotation.Configuration
|
||||
|
||||
@Configuration
|
||||
class <caret>Application
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Make class Application open" "true"
|
||||
// FIXTURE_CLASS: org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension
|
||||
// DISABLE-ERRORS
|
||||
import org.springframework.context.annotation.Configuration
|
||||
|
||||
@Configuration
|
||||
open class <caret>Application
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// "Make class Application open" "true"
|
||||
// FIXTURE_CLASS: org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension
|
||||
// DISABLE-ERRORS
|
||||
import org.springframework.context.annotation.Configuration
|
||||
|
||||
@Configuration
|
||||
annotation class MyConfiguration
|
||||
|
||||
@MyConfiguration
|
||||
class <caret>Application
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// "Make class Application open" "true"
|
||||
// FIXTURE_CLASS: org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension
|
||||
// DISABLE-ERRORS
|
||||
import org.springframework.context.annotation.Configuration
|
||||
|
||||
@Configuration
|
||||
annotation class MyConfiguration
|
||||
|
||||
@MyConfiguration
|
||||
open class <caret>Application
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
// "Make function foo open" "true"
|
||||
// FIXTURE_CLASS: org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension
|
||||
// DISABLE-ERRORS
|
||||
import org.springframework.context.annotation.Bean
|
||||
|
||||
class Foo {
|
||||
@Bean
|
||||
fun <caret>foo() = ""
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Make function foo open" "true"
|
||||
// FIXTURE_CLASS: org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension
|
||||
// DISABLE-ERRORS
|
||||
import org.springframework.context.annotation.Bean
|
||||
|
||||
open class Foo {
|
||||
@Bean
|
||||
open fun <caret>foo() = ""
|
||||
}
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
// "Make function foo open" "true"
|
||||
// FIXTURE_CLASS: org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension
|
||||
// DISABLE-ERRORS
|
||||
import org.springframework.context.annotation.Bean
|
||||
|
||||
open class Foo {
|
||||
@Bean
|
||||
fun <caret>foo() = ""
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Make function foo open" "true"
|
||||
// FIXTURE_CLASS: org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension
|
||||
// DISABLE-ERRORS
|
||||
import org.springframework.context.annotation.Bean
|
||||
|
||||
open class Foo {
|
||||
@Bean
|
||||
open fun <caret>foo() = ""
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// "Make function foo open" "true"
|
||||
// FIXTURE_CLASS: org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension
|
||||
// DISABLE-ERRORS
|
||||
import org.springframework.context.annotation.Bean
|
||||
|
||||
@Bean
|
||||
annotation class MyBean
|
||||
|
||||
class Foo {
|
||||
@MyBean
|
||||
fun <caret>foo() = ""
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// "Make function foo open" "true"
|
||||
// FIXTURE_CLASS: org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension
|
||||
// DISABLE-ERRORS
|
||||
import org.springframework.context.annotation.Bean
|
||||
|
||||
@Bean
|
||||
annotation class MyBean
|
||||
|
||||
open class Foo {
|
||||
@MyBean
|
||||
open fun <caret>foo() = ""
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// "Make function foo open" "true"
|
||||
// FIXTURE_CLASS: org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension
|
||||
// DISABLE-ERRORS
|
||||
import org.springframework.context.annotation.Bean
|
||||
|
||||
@Bean
|
||||
annotation class MyBean
|
||||
|
||||
open class Foo {
|
||||
@MyBean
|
||||
fun <caret>foo() = ""
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// "Make function foo open" "true"
|
||||
// FIXTURE_CLASS: org.jetbrains.kotlin.idea.spring.tests.SpringTestFixtureExtension
|
||||
// DISABLE-ERRORS
|
||||
import org.springframework.context.annotation.Bean
|
||||
|
||||
@Bean
|
||||
annotation class MyBean
|
||||
|
||||
open class Foo {
|
||||
@MyBean
|
||||
open fun <caret>foo() = ""
|
||||
}
|
||||
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
// ACTION_CLASS: org.jetbrains.kotlin.idea.spring.generate.GenerateKotlinAutowiredDependencyAction
|
||||
// CHOOSE_BEAN: barBean
|
||||
package a
|
||||
|
||||
import org.springframework.stereotype.Component
|
||||
import org.springframework.context.annotation.Configuration
|
||||
import org.springframework.beans.factory.annotation.Autowired
|
||||
|
||||
@Component
|
||||
open class FooBean {
|
||||
@Autowired lateinit var bean: BarBean<caret>
|
||||
}
|
||||
|
||||
@Component
|
||||
open class BarBean
|
||||
|
||||
@Configuration
|
||||
@ComponentScan
|
||||
open class Application
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
// ACTION_CLASS: org.jetbrains.kotlin.idea.spring.generate.GenerateKotlinAutowiredDependencyAction
|
||||
// CHOOSE_BEAN: barBean
|
||||
package a
|
||||
|
||||
import org.springframework.stereotype.Component
|
||||
import org.springframework.context.annotation.Configuration
|
||||
import org.springframework.beans.factory.annotation.Autowired
|
||||
|
||||
@Component
|
||||
open class FooBean {
|
||||
@Autowired lateinit var bean: BarBean
|
||||
@Autowired lateinit var barBean<caret>: BarBean
|
||||
}
|
||||
|
||||
@Component
|
||||
open class BarBean
|
||||
|
||||
@Configuration
|
||||
@ComponentScan
|
||||
open class Application
|
||||
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
// ACTION_CLASS: org.jetbrains.kotlin.idea.spring.generate.GenerateKotlinAutowiredDependencyAction
|
||||
// CONFIG_FILE: spring-config.xml
|
||||
// CHOOSE_BEAN: barBean
|
||||
package a
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired
|
||||
|
||||
open class FooBean {
|
||||
@Autowired lateinit var bean: BarBean<caret>
|
||||
}
|
||||
|
||||
open class BarBean
|
||||
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
// ACTION_CLASS: org.jetbrains.kotlin.idea.spring.generate.GenerateKotlinAutowiredDependencyAction
|
||||
// CONFIG_FILE: spring-config.xml
|
||||
// CHOOSE_BEAN: barBean
|
||||
package a
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired
|
||||
|
||||
open class FooBean {
|
||||
@Autowired lateinit var bean: BarBean
|
||||
@Autowired lateinit var barBean<caret>: BarBean
|
||||
}
|
||||
|
||||
open class BarBean
|
||||
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
// ACTION_CLASS: org.jetbrains.kotlin.idea.spring.generate.GenerateKotlinAutowiredDependencyAction
|
||||
// CHOOSE_BEAN: barBean, application
|
||||
package a
|
||||
|
||||
import org.springframework.stereotype.Component
|
||||
import org.springframework.context.annotation.Configuration
|
||||
|
||||
@Component
|
||||
open class FooBean {
|
||||
<caret>
|
||||
}
|
||||
|
||||
@Component
|
||||
open class BarBean
|
||||
|
||||
@Configuration
|
||||
@ComponentScan
|
||||
open class Application
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
// ACTION_CLASS: org.jetbrains.kotlin.idea.spring.generate.GenerateKotlinAutowiredDependencyAction
|
||||
// CHOOSE_BEAN: barBean, application
|
||||
package a
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired
|
||||
import org.springframework.stereotype.Component
|
||||
import org.springframework.context.annotation.Configuration
|
||||
|
||||
@Component
|
||||
open class FooBean {
|
||||
@Autowired lateinit var application: Application
|
||||
@Autowired lateinit var barBean<caret>: BarBean
|
||||
|
||||
}
|
||||
|
||||
@Component
|
||||
open class BarBean
|
||||
|
||||
@Configuration
|
||||
@ComponentScan
|
||||
open class Application
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
// ACTION_CLASS: org.jetbrains.kotlin.idea.spring.generate.GenerateKotlinAutowiredDependencyAction
|
||||
// CONFIG_FILE: spring-config.xml
|
||||
// CHOOSE_BEAN: barBean, fooBean
|
||||
package a
|
||||
|
||||
open class FooBean {
|
||||
<caret>
|
||||
}
|
||||
|
||||
open class BarBean
|
||||
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
// ACTION_CLASS: org.jetbrains.kotlin.idea.spring.generate.GenerateKotlinAutowiredDependencyAction
|
||||
// CONFIG_FILE: spring-config.xml
|
||||
// CHOOSE_BEAN: barBean, fooBean
|
||||
package a
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired
|
||||
|
||||
open class FooBean {
|
||||
@Autowired lateinit var barBean: BarBean
|
||||
@Autowired lateinit var fooBean: FooBean
|
||||
|
||||
}
|
||||
|
||||
open class BarBean
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
// ACTION_CLASS: org.jetbrains.kotlin.idea.spring.generate.GenerateKotlinAutowiredDependencyAction
|
||||
// CHOOSE_BEAN: barBean
|
||||
package a
|
||||
|
||||
import org.springframework.stereotype.Component
|
||||
import org.springframework.context.annotation.Configuration
|
||||
|
||||
@Component
|
||||
open class FooBean {
|
||||
<caret>
|
||||
}
|
||||
|
||||
@Component
|
||||
open class BarBean
|
||||
|
||||
@Component
|
||||
open class BarBeanChild : BarBean()
|
||||
|
||||
@Configuration
|
||||
@ComponentScan
|
||||
open class Application
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
// ACTION_CLASS: org.jetbrains.kotlin.idea.spring.generate.GenerateKotlinAutowiredDependencyAction
|
||||
// CHOOSE_BEAN: barBean
|
||||
package a
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired
|
||||
import org.springframework.beans.factory.annotation.Qualifier
|
||||
import org.springframework.stereotype.Component
|
||||
import org.springframework.context.annotation.Configuration
|
||||
|
||||
@Component
|
||||
open class FooBean {
|
||||
@Qualifier("barBean") @Autowired lateinit var barBean<caret>: BarBean
|
||||
|
||||
}
|
||||
|
||||
@Component
|
||||
open class BarBean
|
||||
|
||||
@Component
|
||||
open class BarBeanChild : BarBean()
|
||||
|
||||
@Configuration
|
||||
@ComponentScan
|
||||
open class Application
|
||||
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
// ACTION_CLASS: org.jetbrains.kotlin.idea.spring.generate.GenerateKotlinAutowiredDependencyAction
|
||||
// CONFIG_FILE:
|
||||
// CHOOSE_BEAN: barBean
|
||||
package a
|
||||
|
||||
open class FooBean {
|
||||
<caret>
|
||||
}
|
||||
|
||||
open class BarBean
|
||||
|
||||
open class BarBeanChild : BarBean()
|
||||
ultimate/testData/spring/core/generate/autowiredDependencies/propertyWithQualifierXmlConfig.kt.after
Vendored
+16
@@ -0,0 +1,16 @@
|
||||
// ACTION_CLASS: org.jetbrains.kotlin.idea.spring.generate.GenerateKotlinAutowiredDependencyAction
|
||||
// CONFIG_FILE:
|
||||
// CHOOSE_BEAN: barBean
|
||||
package a
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired
|
||||
import org.springframework.beans.factory.annotation.Qualifier
|
||||
|
||||
open class FooBean {
|
||||
@Qualifier("barBean") @Autowired lateinit var barBean: BarBean
|
||||
|
||||
}
|
||||
|
||||
open class BarBean
|
||||
|
||||
open class BarBeanChild : BarBean()
|
||||
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
// ACTION_CLASS: org.jetbrains.kotlin.idea.spring.generate.GenerateKotlinAutowiredDependencyAction
|
||||
// CHOOSE_BEAN: barBean
|
||||
package a
|
||||
|
||||
import org.springframework.stereotype.Component
|
||||
import org.springframework.context.annotation.Configuration
|
||||
|
||||
@Component
|
||||
open class FooBean {
|
||||
<caret>
|
||||
}
|
||||
|
||||
@Component
|
||||
open class BarBean
|
||||
|
||||
@Configuration
|
||||
@ComponentScan
|
||||
open class Application
|
||||
ultimate/testData/spring/core/generate/autowiredDependencies/singlePropertyAnnotationConfig.kt.after
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
// ACTION_CLASS: org.jetbrains.kotlin.idea.spring.generate.GenerateKotlinAutowiredDependencyAction
|
||||
// CHOOSE_BEAN: barBean
|
||||
package a
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired
|
||||
import org.springframework.stereotype.Component
|
||||
import org.springframework.context.annotation.Configuration
|
||||
|
||||
@Component
|
||||
open class FooBean {
|
||||
@Autowired lateinit var barBean<caret>: BarBean
|
||||
|
||||
}
|
||||
|
||||
@Component
|
||||
open class BarBean
|
||||
|
||||
@Configuration
|
||||
@ComponentScan
|
||||
open class Application
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// ACTION_CLASS: org.jetbrains.kotlin.idea.spring.generate.GenerateKotlinAutowiredDependencyAction
|
||||
// CONFIG_FILE: spring-config.xml
|
||||
// CHOOSE_BEAN: barBean
|
||||
package a
|
||||
|
||||
open class FooBean {
|
||||
<caret>
|
||||
}
|
||||
|
||||
open class BarBean
|
||||
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
// ACTION_CLASS: org.jetbrains.kotlin.idea.spring.generate.GenerateKotlinAutowiredDependencyAction
|
||||
// CONFIG_FILE: spring-config.xml
|
||||
// CHOOSE_BEAN: barBean
|
||||
package a
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired
|
||||
|
||||
open class FooBean {
|
||||
@Autowired lateinit var barBean<caret>: BarBean
|
||||
|
||||
}
|
||||
|
||||
open class BarBean
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user