From 8f674128e1c9789ecf9dce0be14ad9e6fa0624ad Mon Sep 17 00:00:00 2001 From: "Rustam.Vishnyakov" Date: Fri, 14 Oct 2011 18:38:06 +0400 Subject: [PATCH] UI for copying code style settings from other languages and predefined styles --- .../codeStyle/CodeStyleSchemesPanel.form | 11 +-------- .../codeStyle/CodeStyleSchemesPanel.java | 24 +------------------ 2 files changed, 2 insertions(+), 33 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/application/options/codeStyle/CodeStyleSchemesPanel.form b/platform/lang-impl/src/com/intellij/application/options/codeStyle/CodeStyleSchemesPanel.form index 22412380bc57..5847870ea54f 100644 --- a/platform/lang-impl/src/com/intellij/application/options/codeStyle/CodeStyleSchemesPanel.form +++ b/platform/lang-impl/src/com/intellij/application/options/codeStyle/CodeStyleSchemesPanel.form @@ -19,7 +19,7 @@ - + @@ -103,15 +103,6 @@ - - - - - - - - - diff --git a/platform/lang-impl/src/com/intellij/application/options/codeStyle/CodeStyleSchemesPanel.java b/platform/lang-impl/src/com/intellij/application/options/codeStyle/CodeStyleSchemesPanel.java index 362a5e9f2540..e70cbf5b75bb 100644 --- a/platform/lang-impl/src/com/intellij/application/options/codeStyle/CodeStyleSchemesPanel.java +++ b/platform/lang-impl/src/com/intellij/application/options/codeStyle/CodeStyleSchemesPanel.java @@ -50,7 +50,6 @@ public class CodeStyleSchemesPanel{ private JPanel myPanel; private JButton myExportAsGlobalButton; private JButton myCopyToProjectButton; - public JButton myPredefinedButton; private JBScrollPane myJBScrollPane; private boolean myIsReset = false; private NewCodeStyleSettingsPanel mySettingsPanel; @@ -153,14 +152,6 @@ public class CodeStyleSchemesPanel{ } }); - myPredefinedButton.addActionListener(new ActionListener() { - - @Override - public void actionPerformed(ActionEvent e) { - selectPredefinedStyle(); - } - }); - myJBScrollPane.setBorder(null); } @@ -321,18 +312,5 @@ public class CodeStyleSchemesPanel{ mySettingsPanel = settingsPanel; } - public void setPredefinedEnabled(boolean isEnabled) { - myPredefinedButton.setEnabled(isEnabled); - } - - private void selectPredefinedStyle() { - Language selectedLanguage = mySettingsPanel.getSelectedLanguage(); - if (selectedLanguage == null) return; - PredefinedCodeStylesDialog dialog = new PredefinedCodeStylesDialog(myPredefinedButton, selectedLanguage); - dialog.show(); - if (dialog.isOK()) { - PredefinedCodeStyle codeStyle = dialog.getSelectedStyle(); - if (codeStyle != null) mySettingsPanel.applyPredefinedSettings(codeStyle); - } - } + }