CLion/AppCode: Re-enable specific EPs for Kotlin/Native

Issue #KT-26717
This commit is contained in:
Dmitriy Dolovov
2018-11-07 15:27:24 +03:00
parent 8ed63d1c18
commit 5dca9b3de5
2 changed files with 0 additions and 42 deletions
@@ -1,34 +0,0 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.ide.konan.gradle;
import com.intellij.codeInspection.LocalInspectionEP;
import com.intellij.openapi.components.ApplicationComponent;
import com.intellij.openapi.extensions.ExtensionPoint;
import com.intellij.openapi.extensions.Extensions;
public class KotlinNativeIdeInitializer implements ApplicationComponent {
@Override
public void initComponent() {
// TODO: Move this to Kotlin/Native plugin for CLion and AppCode (see KT-26717):
//unregisterGroovyInspections();
}
// There are groovy local inspections which should not be loaded w/o groovy plugin enabled.
// Those plugin definitions should become optional and dependant on groovy plugin.
// This is a temp workaround before it happens.
private static void unregisterGroovyInspections() {
ExtensionPoint<LocalInspectionEP> extensionPoint =
Extensions.getRootArea().getExtensionPoint(LocalInspectionEP.LOCAL_INSPECTION);
for (LocalInspectionEP ep : extensionPoint.getExtensions()) {
if ("Kotlin".equals(ep.groupDisplayName) && "Groovy".equals(ep.language)) {
extensionPoint.unregisterExtension(ep);
}
}
}
}
-8
View File
@@ -20,12 +20,4 @@
<externalProjectDataService implementation="org.jetbrains.kotlin.idea.configuration.KotlinSourceSetDataService"/>
<externalProjectDataService implementation="org.jetbrains.kotlin.idea.configuration.KotlinGradleProjectSettingsDataService"/>
</extensions>
<!-- NATIVE PART -->
<application-components>
<component>
<implementation-class>org.jetbrains.kotlin.ide.konan.gradle.KotlinNativeIdeInitializer</implementation-class>
</component>
</application-components>
<!-- /NATIVE PART -->
</idea-plugin>