diff --git a/idea/src/org/jetbrains/jet/plugin/framework/JSFrameworkSupportProvider.java b/idea/src/org/jetbrains/jet/plugin/framework/JSFrameworkSupportProvider.java index 13fa1992bd5..e5268b392cc 100644 --- a/idea/src/org/jetbrains/jet/plugin/framework/JSFrameworkSupportProvider.java +++ b/idea/src/org/jetbrains/jet/plugin/framework/JSFrameworkSupportProvider.java @@ -28,7 +28,6 @@ import com.intellij.openapi.roots.ModifiableRootModel; import com.intellij.openapi.roots.ui.configuration.libraries.CustomLibraryDescription; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import org.jetbrains.jet.plugin.framework.ui.FrameworkSourcePanel; import javax.swing.*; @@ -43,25 +42,16 @@ public class JSFrameworkSupportProvider extends FrameworkSupportInModuleProvider @Override public FrameworkSupportInModuleConfigurable createConfigurable(@NotNull FrameworkSupportModel model) { return new FrameworkSupportInModuleConfigurable() { - private FrameworkSourcePanel sourcePanel = null; - @Nullable @Override public CustomLibraryDescription createLibraryDescription() { - JSLibraryDescription description = new JSLibraryDescription(); - description.setConfigurationPanel(getConfigurationPanel()); - return description; + return new JSLibraryDescription(); } @Nullable @Override public JComponent createComponent() { - return getConfigurationPanel().getPanel(); - } - - @Override - public void onFrameworkSelectionChanged(boolean selected) { - getConfigurationPanel().onFrameworkSelectionChanged(selected); + return null; } @Override @@ -74,13 +64,6 @@ public class JSFrameworkSupportProvider extends FrameworkSupportInModuleProvider new JavaRuntimeLibraryDescription(), JavaFrameworkType.getInstance()); } - - private FrameworkSourcePanel getConfigurationPanel() { - if (sourcePanel == null) { - sourcePanel = new FrameworkSourcePanel(); - } - return sourcePanel; - } }; } diff --git a/idea/src/org/jetbrains/jet/plugin/framework/JSLibraryDescription.java b/idea/src/org/jetbrains/jet/plugin/framework/JSLibraryDescription.java index 7f62c8ca7d6..02e290ff617 100644 --- a/idea/src/org/jetbrains/jet/plugin/framework/JSLibraryDescription.java +++ b/idea/src/org/jetbrains/jet/plugin/framework/JSLibraryDescription.java @@ -29,7 +29,6 @@ import com.intellij.openapi.vfs.VirtualFile; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.jet.plugin.framework.ui.FileUIUtils; -import org.jetbrains.jet.plugin.framework.ui.FrameworkSourcePanel; import org.jetbrains.jet.utils.PathUtil; import javax.swing.*; @@ -42,13 +41,6 @@ public class JSLibraryDescription extends CustomLibraryDescription { private static final String JAVA_SCRIPT_LIBRARY_CREATION = "JavaScript Library Creation"; - @Nullable - private FrameworkSourcePanel configurationPanel; - - public void setConfigurationPanel(@Nullable FrameworkSourcePanel configurationPanel) { - this.configurationPanel = configurationPanel; - } - @NotNull @Override public Set getSuitableLibraryKinds() { @@ -58,13 +50,8 @@ public class JSLibraryDescription extends CustomLibraryDescription { @Nullable @Override public NewLibraryConfiguration createNewLibrary(@NotNull JComponent parentComponent, @Nullable VirtualFile contextDirectory) { - if (configurationPanel == null || configurationPanel.isConfigureFromBundled()) { - return createFromPlugin(parentComponent, contextDirectory); - } - else { - throw new IllegalStateException("Feature isn't ready yet"); - } - } + return createFromPlugin(parentComponent, contextDirectory); + } private NewLibraryConfiguration createFromPlugin(JComponent parentComponent, VirtualFile contextDirectory) { File runtimePath = PathUtil.getKotlinPathsForIdeaPlugin().getJsLibJarPath(); diff --git a/idea/src/org/jetbrains/jet/plugin/framework/JavaFrameworkSupportProvider.java b/idea/src/org/jetbrains/jet/plugin/framework/JavaFrameworkSupportProvider.java index 2f4a10b171a..60c0554aba8 100644 --- a/idea/src/org/jetbrains/jet/plugin/framework/JavaFrameworkSupportProvider.java +++ b/idea/src/org/jetbrains/jet/plugin/framework/JavaFrameworkSupportProvider.java @@ -28,7 +28,6 @@ import com.intellij.openapi.roots.ModifiableRootModel; import com.intellij.openapi.roots.ui.configuration.libraries.CustomLibraryDescription; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import org.jetbrains.jet.plugin.framework.ui.FrameworkSourcePanel; import javax.swing.*; @@ -43,20 +42,16 @@ public class JavaFrameworkSupportProvider extends FrameworkSupportInModuleProvid @Override public FrameworkSupportInModuleConfigurable createConfigurable(@NotNull FrameworkSupportModel model) { return new FrameworkSupportInModuleConfigurable() { - public FrameworkSourcePanel panel = null; - @Nullable @Override public CustomLibraryDescription createLibraryDescription() { - JavaRuntimeLibraryDescription description = new JavaRuntimeLibraryDescription(); - description.setFrameworkSourcePanel(getConfigurationPanel()); - return description; + return new JavaRuntimeLibraryDescription(); } @Nullable @Override public JComponent createComponent() { - return getConfigurationPanel().getPanel(); + return null; } @Override @@ -64,11 +59,6 @@ public class JavaFrameworkSupportProvider extends FrameworkSupportInModuleProvid return true; } - @Override - public void onFrameworkSelectionChanged(boolean selected) { - getConfigurationPanel().onFrameworkSelectionChanged(selected); - } - @Override public void addSupport( @NotNull Module module, @@ -79,13 +69,6 @@ public class JavaFrameworkSupportProvider extends FrameworkSupportInModuleProvid new JSLibraryDescription(), JSFrameworkType.getInstance()); } - - private FrameworkSourcePanel getConfigurationPanel() { - if (panel == null) { - panel = new FrameworkSourcePanel(); - } - return panel; - } }; } diff --git a/idea/src/org/jetbrains/jet/plugin/framework/JavaRuntimeLibraryDescription.java b/idea/src/org/jetbrains/jet/plugin/framework/JavaRuntimeLibraryDescription.java index db5a03a6423..d53ac7f2c4f 100644 --- a/idea/src/org/jetbrains/jet/plugin/framework/JavaRuntimeLibraryDescription.java +++ b/idea/src/org/jetbrains/jet/plugin/framework/JavaRuntimeLibraryDescription.java @@ -29,7 +29,6 @@ import com.intellij.openapi.vfs.VirtualFile; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.jet.plugin.framework.ui.FileUIUtils; -import org.jetbrains.jet.plugin.framework.ui.FrameworkSourcePanel; import org.jetbrains.jet.plugin.versions.KotlinRuntimeLibraryUtil; import org.jetbrains.jet.utils.PathUtil; @@ -44,13 +43,6 @@ public class JavaRuntimeLibraryDescription extends CustomLibraryDescription { private static final String JAVA_RUNTIME_LIBRARY_CREATION = "Java Runtime Library Creation"; - @Nullable - private FrameworkSourcePanel frameworkSourcePanel; - - public void setFrameworkSourcePanel(@Nullable FrameworkSourcePanel frameworkSourcePanel) { - this.frameworkSourcePanel = frameworkSourcePanel; - } - @NotNull @Override public Set getSuitableLibraryKinds() { @@ -60,12 +52,7 @@ public class JavaRuntimeLibraryDescription extends CustomLibraryDescription { @Nullable @Override public NewLibraryConfiguration createNewLibrary(@NotNull JComponent parentComponent, @Nullable VirtualFile contextDirectory) { - if (frameworkSourcePanel == null || frameworkSourcePanel.isConfigureFromBundled()) { - return createFromPlugin(parentComponent, contextDirectory); - } - else { - throw new InvalidOpenTypeException("Isn't supported yet"); - } + return createFromPlugin(parentComponent, contextDirectory); } private NewLibraryConfiguration createFromPlugin(JComponent parentComponent, VirtualFile contextDirectory) { diff --git a/idea/src/org/jetbrains/jet/plugin/framework/ui/FrameworkSourcePanel.form b/idea/src/org/jetbrains/jet/plugin/framework/ui/FrameworkSourcePanel.form deleted file mode 100644 index 08e8098a683..00000000000 --- a/idea/src/org/jetbrains/jet/plugin/framework/ui/FrameworkSourcePanel.form +++ /dev/null @@ -1,42 +0,0 @@ - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/idea/src/org/jetbrains/jet/plugin/framework/ui/FrameworkSourcePanel.java b/idea/src/org/jetbrains/jet/plugin/framework/ui/FrameworkSourcePanel.java deleted file mode 100644 index 235bc59bf32..00000000000 --- a/idea/src/org/jetbrains/jet/plugin/framework/ui/FrameworkSourcePanel.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2010-2013 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.jet.plugin.framework.ui; - -import javax.swing.*; - -public class FrameworkSourcePanel { - private JRadioButton configureFromStandaloneKotlinRadioButton; - private JRadioButton configureFromFilesBundledRadioButton; - private JPanel contentPanel; - - public JPanel getPanel() { - return contentPanel; - } - - public boolean isConfigureFromBundled() { - return configureFromFilesBundledRadioButton.isSelected(); - } - - public void onFrameworkSelectionChanged(boolean selected) { - // Don't enable for now - configureFromStandaloneKotlinRadioButton.setEnabled(false); - } -}