diff --git a/annotations/com/intellij/openapi/project/annotations.xml b/annotations/com/intellij/openapi/project/annotations.xml new file mode 100644 index 00000000000..b6cd1dc558f --- /dev/null +++ b/annotations/com/intellij/openapi/project/annotations.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/idea/src/org/jetbrains/jet/plugin/codeInsight/KotlinCopyPasteReferenceProcessor.kt b/idea/src/org/jetbrains/jet/plugin/codeInsight/KotlinCopyPasteReferenceProcessor.kt index f871ce186e3..291e292c2e5 100644 --- a/idea/src/org/jetbrains/jet/plugin/codeInsight/KotlinCopyPasteReferenceProcessor.kt +++ b/idea/src/org/jetbrains/jet/plugin/codeInsight/KotlinCopyPasteReferenceProcessor.kt @@ -68,7 +68,7 @@ import org.jetbrains.jet.lang.resolve.descriptorUtil.isExtension public class KotlinCopyPasteReferenceProcessor() : CopyPastePostProcessor() { override fun extractTransferableData(content: Transferable): List { - if (CodeInsightSettings.getInstance()!!.ADD_IMPORTS_ON_PASTE != CodeInsightSettings.NO) { + if (CodeInsightSettings.getInstance().ADD_IMPORTS_ON_PASTE != CodeInsightSettings.NO) { try { val flavor = ReferenceData.getDataFlavor() if (flavor != null) { @@ -94,7 +94,7 @@ public class KotlinCopyPasteReferenceProcessor() : CopyPastePostProcessor { - if (file !is JetFile) { + if (file !is JetFile || DumbService.getInstance(file.getProject()).isDumb()) { return listOf() } @@ -184,7 +184,7 @@ public class KotlinCopyPasteReferenceProcessor() : CopyPastePostProcessor, values: List ) { - if (DumbService.getInstance(project)!!.isDumb()) { + if (DumbService.getInstance(project).isDumb()) { return } val document = editor.getDocument() @@ -289,7 +289,7 @@ public class KotlinCopyPasteReferenceProcessor() : CopyPastePostProcessor): Collection { - val shouldShowDialog = CodeInsightSettings.getInstance()!!.ADD_IMPORTS_ON_PASTE == CodeInsightSettings.ASK + val shouldShowDialog = CodeInsightSettings.getInstance().ADD_IMPORTS_ON_PASTE == CodeInsightSettings.ASK if (!shouldShowDialog || referencesToRestore.isEmpty()) { return referencesToRestore }