From 431cdd224564ccc966d861458f5d1b3c24c2eabc Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Tue, 20 Jan 2015 19:51:24 +0100 Subject: [PATCH] delete unused OperationModeProvider class --- .../cli/jvm/compiler/JetCoreEnvironment.java | 3 -- .../kotlin/CompilerModeProvider.java | 26 --------------- .../org/jetbrains/kotlin/OperationMode.java | 32 ------------------- .../kotlin/OperationModeProvider.java | 32 ------------------- idea/src/META-INF/plugin.xml | 3 -- .../kotlin/idea/IdeModeProvider.java | 29 ----------------- 6 files changed, 125 deletions(-) delete mode 100644 compiler/frontend/src/org/jetbrains/kotlin/CompilerModeProvider.java delete mode 100644 compiler/frontend/src/org/jetbrains/kotlin/OperationMode.java delete mode 100644 compiler/frontend/src/org/jetbrains/kotlin/OperationModeProvider.java delete mode 100644 idea/src/org/jetbrains/kotlin/idea/IdeModeProvider.java diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/JetCoreEnvironment.java b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/JetCoreEnvironment.java index 74117f53e36..a31ab3f9707 100644 --- a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/JetCoreEnvironment.java +++ b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/JetCoreEnvironment.java @@ -40,8 +40,6 @@ import kotlin.Function1; import kotlin.Unit; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.TestOnly; -import org.jetbrains.kotlin.CompilerModeProvider; -import org.jetbrains.kotlin.OperationModeProvider; import org.jetbrains.kotlin.asJava.JavaElementFinder; import org.jetbrains.kotlin.asJava.KotlinLightClassForPackage; import org.jetbrains.kotlin.asJava.LightClassGenerationSupport; @@ -193,7 +191,6 @@ public class JetCoreEnvironment { applicationEnvironment.registerFileType(JetFileType.INSTANCE, JetParserDefinition.STD_SCRIPT_SUFFIX); // should be renamed to kts applicationEnvironment.registerParserDefinition(new JetParserDefinition()); - applicationEnvironment.getApplication().registerService(OperationModeProvider.class, new CompilerModeProvider()); applicationEnvironment.getApplication().registerService(KotlinBinaryClassCache.class, new KotlinBinaryClassCache()); } diff --git a/compiler/frontend/src/org/jetbrains/kotlin/CompilerModeProvider.java b/compiler/frontend/src/org/jetbrains/kotlin/CompilerModeProvider.java deleted file mode 100644 index dd58cdf61ec..00000000000 --- a/compiler/frontend/src/org/jetbrains/kotlin/CompilerModeProvider.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2010-2015 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; - -public class CompilerModeProvider implements OperationModeProvider { - public static final OperationMode COMPILER_MODE = new OperationMode("compiler mode"); - - @Override - public OperationMode getMode() { - return COMPILER_MODE; - } -} diff --git a/compiler/frontend/src/org/jetbrains/kotlin/OperationMode.java b/compiler/frontend/src/org/jetbrains/kotlin/OperationMode.java deleted file mode 100644 index b7b0f161fb2..00000000000 --- a/compiler/frontend/src/org/jetbrains/kotlin/OperationMode.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2010-2015 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; - -import org.jetbrains.annotations.NotNull; - -public final class OperationMode { - private final String id; - - public OperationMode(@NotNull String id) { - this.id = id; - } - - @Override - public String toString() { - return id; - } -} diff --git a/compiler/frontend/src/org/jetbrains/kotlin/OperationModeProvider.java b/compiler/frontend/src/org/jetbrains/kotlin/OperationModeProvider.java deleted file mode 100644 index 7de7ab3592d..00000000000 --- a/compiler/frontend/src/org/jetbrains/kotlin/OperationModeProvider.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2010-2015 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; - -import com.intellij.openapi.components.ServiceManager; - -public interface OperationModeProvider { - class SERVICE { - private SERVICE() { - } - - public static OperationMode getMode() { - return ServiceManager.getService(OperationModeProvider.class).getMode(); - } - } - - OperationMode getMode(); -} diff --git a/idea/src/META-INF/plugin.xml b/idea/src/META-INF/plugin.xml index e9d09d93272..bc7f8b27da3 100644 --- a/idea/src/META-INF/plugin.xml +++ b/idea/src/META-INF/plugin.xml @@ -136,9 +136,6 @@ - - diff --git a/idea/src/org/jetbrains/kotlin/idea/IdeModeProvider.java b/idea/src/org/jetbrains/kotlin/idea/IdeModeProvider.java deleted file mode 100644 index 12b74357ee4..00000000000 --- a/idea/src/org/jetbrains/kotlin/idea/IdeModeProvider.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2010-2015 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; - -import org.jetbrains.kotlin.OperationMode; -import org.jetbrains.kotlin.OperationModeProvider; - -public class IdeModeProvider implements OperationModeProvider { - public static final OperationMode IDE_MODE = new OperationMode("IDE mode"); - - @Override - public OperationMode getMode() { - return IDE_MODE; - } -}