Remove GradleProjectImportProvider and GradleProjectOpenProcessor

This commit is contained in:
Vyacheslav Gerasimov
2017-10-24 19:44:04 +03:00
parent 1fa5152cb7
commit b27334d2a0
3 changed files with 0 additions and 66 deletions
@@ -1,31 +0,0 @@
/*
* Copyright 2010-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* 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.gradle.kdsl
import com.intellij.openapi.externalSystem.service.project.wizard.AbstractExternalProjectImportProvider
import com.intellij.openapi.vfs.VirtualFile
import org.jetbrains.plugins.gradle.service.project.wizard.GradleProjectImportBuilder
import org.jetbrains.plugins.gradle.util.GradleConstants
class GradleProjectImportProvider(builder: GradleProjectImportBuilder)
: AbstractExternalProjectImportProvider(builder, GradleConstants.SYSTEM_ID) {
override fun canImportFromFile(file: VirtualFile): Boolean = file.name.endsWith(".${GradleConstants.EXTENSION}.kts")
override fun getFileSample(): String? = "<b>Gradle (Kotlin DSL)</b> build script (*.gradle.kts)"
override fun getName(): String = "Gradle (Kotlin DSL)"
}
@@ -1,33 +0,0 @@
/*
* Copyright 2010-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* 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.gradle.kdsl
import com.intellij.openapi.vfs.VirtualFile
import org.jetbrains.plugins.gradle.service.project.wizard.GradleProjectImportBuilder
import org.jetbrains.plugins.gradle.service.project.wizard.GradleProjectOpenProcessor
import org.jetbrains.plugins.gradle.util.GradleConstants
class GradleProjectOpenProcessor(builder: GradleProjectImportBuilder) : GradleProjectOpenProcessor(builder) {
override fun canOpenProject(file: VirtualFile): Boolean = when {
!file.isDirectory -> file.name.endsWith(".gradle.kts")
supportedExtensions.any { file.findChild(it) != null } -> true
else -> super.canOpenProject(file)
}
override fun getSupportedExtensions(): Array<String> =
arrayOf("${GradleConstants.DEFAULT_SCRIPT_NAME}.kts", GradleConstants.SETTINGS_FILE_NAME)
}
-2
View File
@@ -2646,8 +2646,6 @@
<psi.clsCustomNavigationPolicy implementation="org.jetbrains.kotlin.idea.core.script.dependencies.ScriptDependencySourceNavigationPolicyForJavaClasses"/>
<resolveScopeProvider implementation="org.jetbrains.kotlin.idea.core.script.dependencies.KotlinScriptResolveScopeProvider"/>
<resolveScopeProvider implementation="org.jetbrains.kotlin.idea.core.script.dependencies.ScriptDependenciesResolveScopeProvider"/>
<projectOpenProcessor implementation="org.jetbrains.kotlin.gradle.kdsl.GradleProjectOpenProcessor"/>
<projectImportProvider implementation="org.jetbrains.kotlin.gradle.kdsl.GradleProjectImportProvider"/>
<codeInsight.intention.jvmCommonIntentionActionsFactory language="kotlin" implementationClass="org.jetbrains.kotlin.idea.intentions.KotlinCommonIntentionActionsFactory"/>