Configuration: Collapse empty nullable strings to null
This commit is contained in:
Generated
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<resourceExtensions />
|
||||
<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" />
|
||||
<entry name="!?*.aj" />
|
||||
</wildcardResourcePatterns>
|
||||
<annotationProcessing>
|
||||
<profile default="true" name="Default" enabled="false">
|
||||
<processorPath useClasspath="true" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
</component>
|
||||
</project>
|
||||
Generated
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
<component name="CopyrightManager">
|
||||
<settings default="" />
|
||||
</component>
|
||||
Generated
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
<component name="libraryTable">
|
||||
<library name="KotlinJavaRuntime">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/lib/kotlin-runtime.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
idea/testData/configuration/noKotlincExistsNoSettingsLatestRuntimeNullizeEmptyStrings/.idea/misc.xml
Generated
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
Generated
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/module.iml" filepath="$PROJECT_DIR$/module.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
BIN
Binary file not shown.
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
<?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" />
|
||||
</content>
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="KotlinJavaRuntime" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
Vendored
@@ -22,6 +22,7 @@ import com.intellij.openapi.util.io.FileUtil
|
||||
import org.jetbrains.kotlin.config.ApiVersion
|
||||
import org.jetbrains.kotlin.config.KotlinFacetSettingsProvider
|
||||
import org.jetbrains.kotlin.config.LanguageVersion
|
||||
import org.jetbrains.kotlin.idea.compiler.configuration.Kotlin2JsCompilerArgumentsHolder
|
||||
import org.jetbrains.kotlin.idea.compiler.configuration.KotlinCommonCompilerArgumentsHolder
|
||||
import org.jetbrains.kotlin.idea.project.getLanguageVersionSettings
|
||||
import org.jetbrains.kotlin.idea.project.languageVersionSettings
|
||||
@@ -112,6 +113,17 @@ open class ConfigureKotlinInTempDirTest : AbstractConfigureKotlinInTempDirTest()
|
||||
Assert.assertEquals(ApiVersion.KOTLIN_1_1, settings.apiVersion)
|
||||
}
|
||||
|
||||
fun testNoKotlincExistsNoSettingsLatestRuntimeNullizeEmptyStrings() {
|
||||
val application = ApplicationManager.getApplication() as ApplicationImpl
|
||||
application.isSaveAllowed = true
|
||||
Kotlin2JsCompilerArgumentsHolder.getInstance(project).update {
|
||||
sourceMapPrefix = ""
|
||||
sourceMapEmbedSources = ""
|
||||
}
|
||||
application.saveAll()
|
||||
Assert.assertTrue(project.baseDir.findFileByRelativePath(".idea/kotlinc.xml") == null)
|
||||
}
|
||||
|
||||
//todo[Sedunov]: wait for fix in platform to avoid misunderstood from Java newbies (also PluginStartupComponent)
|
||||
/*fun testKotlinSdkAdded() {
|
||||
Assert.assertTrue(ProjectJdkTable.getInstance().allJdks.any { it.sdkType is KotlinSdkType })
|
||||
|
||||
+11
@@ -109,6 +109,17 @@ open class ConfigureKotlinInTempDirTest : AbstractConfigureKotlinInTempDirTest()
|
||||
Assert.assertEquals(ApiVersion.KOTLIN_1_1, settings.apiVersion)
|
||||
}
|
||||
|
||||
fun testNoKotlincExistsNoSettingsLatestRuntimeNullizeEmptyStrings() {
|
||||
val application = ApplicationManager.getApplication() as ApplicationImpl
|
||||
application.doNotSave(false)
|
||||
Kotlin2JsCompilerArgumentsHolder.getInstance(project).update {
|
||||
sourceMapPrefix = ""
|
||||
sourceMapEmbedSources = ""
|
||||
}
|
||||
application.saveAll()
|
||||
Assert.assertTrue(project.baseDir.findFileByRelativePath(".idea/kotlinc.xml") == null)
|
||||
}
|
||||
|
||||
//todo[Sedunov]: wait for fix in platform to avoid misunderstood from Java newbies (also PluginStartupComponent)
|
||||
/*fun testKotlinSdkAdded() {
|
||||
Assert.assertTrue(ProjectJdkTable.getInstance().allJdks.any { it.sdkType is KotlinSdkType })
|
||||
|
||||
Reference in New Issue
Block a user