From d81030be6e8a1c8165096b9fb1893ee7a31bb149 Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Tue, 23 Aug 2011 13:32:54 +0400 Subject: [PATCH 1/6] don't register resource for XSLT in Relax-NG test --- .../org/intellij/plugins/relaxNG/RngXmlHighlightingTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/relaxng/test/org/intellij/plugins/relaxNG/RngXmlHighlightingTest.java b/xml/relaxng/test/org/intellij/plugins/relaxNG/RngXmlHighlightingTest.java index b21f37c0ee78..25b6c10a400f 100644 --- a/xml/relaxng/test/org/intellij/plugins/relaxNG/RngXmlHighlightingTest.java +++ b/xml/relaxng/test/org/intellij/plugins/relaxNG/RngXmlHighlightingTest.java @@ -42,7 +42,7 @@ public class RngXmlHighlightingTest extends HighlightingTestBase { final ExternalResourceManagerEx m = ExternalResourceManagerEx.getInstanceEx(); m.addResource("urn:test:simple.rng", toAbsolutePath("highlighting/simple.rng")); m.addResource("urn:test:addressBook", toAbsolutePath("highlighting/rnc/addressbook.rnc")); - m.addResource("http://www.w3.org/1999/XSL/Transform", toAbsolutePath("highlighting/relaxng.rng")); + //m.addResource("http://www.w3.org/1999/XSL/Transform", toAbsolutePath("highlighting/relaxng.rng")); m.addResource("http://www.w3.org/1999/XSL/Format", toAbsolutePath("highlighting/rnc/fo/main.rnc")); m.addResource("http://docbook.org/ns/docbook", toAbsolutePath("highlighting/docbook.rng")); m.addResource("urn:intelliForm:AttachmentFilter", toAbsolutePath("highlighting/attachment-filter.rng")); From e5f988b078bde907cf41ee60c8950aac5eb44626 Mon Sep 17 00:00:00 2001 From: Evgeny Zakrevsky Date: Tue, 23 Aug 2011 14:06:15 +0400 Subject: [PATCH 2/6] UIUtil. applyStyle fix. font size for borders. --- .../util/src/com/intellij/util/ui/UIUtil.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/platform/util/src/com/intellij/util/ui/UIUtil.java b/platform/util/src/com/intellij/util/ui/UIUtil.java index 0fc33f329d8d..7c144205fe6a 100644 --- a/platform/util/src/com/intellij/util/ui/UIUtil.java +++ b/platform/util/src/com/intellij/util/ui/UIUtil.java @@ -74,10 +74,9 @@ public class UIUtil { JComponent c = (JComponent)comp; - if (SystemInfo.isMac) { + if (isUnderAquaLookAndFeel()) { c.putClientProperty("JComponent.sizeVariant", style == Style.REGULAR ? "regular" : style == Style.SMALL ? "small" : "mini"); - } - else { + } else { c.setFont(getFont(style == Style.REGULAR ? FontSize.NORMAL : style == Style.SMALL ? FontSize.SMALL : FontSize.MINI, c.getFont())); } Container p = c.getParent(); @@ -260,9 +259,9 @@ public class UIUtil { switch (size) { case SMALL: - return base.deriveFont(defFont.getSize() * (SystemInfo.isMac ? 0.85f: 0.8f)); + return base.deriveFont(defFont.getSize() - 2f); case MINI: - return base.deriveFont(defFont.getSize() * 0.7f); + return base.deriveFont(defFont.getSize() - 4f); default: return base.deriveFont(defFont.getSize()); } @@ -270,12 +269,13 @@ public class UIUtil { @NotNull public static Font getBorderFont(@NotNull UIUtil.FontSize size, boolean isBold) { - Font defFont = UIUtil.getBorderFont(); + Font defFont = getBorderFont(); if (size == UIUtil.FontSize.SMALL) { + defFont = defFont.deriveFont(defFont.getSize() - 2f); if (isBold) { - return defFont.deriveFont((float)Math.max(defFont.getSize() - 2, 11)).deriveFont(Font.BOLD); + defFont = defFont.deriveFont(Font.BOLD); } - return defFont.deriveFont((float)Math.max(defFont.getSize() - 2, 11)); + return defFont; } if (isBold) { return defFont.deriveFont(Font.BOLD); From 9cdeb66be9a7296d2bd38e590e708c5c9838711e Mon Sep 17 00:00:00 2001 From: Evgeny Zakrevsky Date: Tue, 23 Aug 2011 14:14:09 +0400 Subject: [PATCH 3/6] Run configaration's form refactored and some other forms too --- .../execution/applet/AppletConfigurable.form | 21 ++++--- .../application/ApplicationConfigurable.form | 17 +++--- .../execution/ui/AlternativeJREPanel.java | 17 ++++-- .../ui/CommonJavaParametersPanel.java | 8 ++- .../ExtractMethodObjectPanel.form | 4 +- .../application/options/CodeCompletion.form | 56 ++++++++++--------- .../ConfigurationSettingsEditorWrapper.form | 2 +- .../ui/CommonProgramParametersPanel.java | 25 ++++++++- .../intellij/openapi/ui/LabeledComponent.java | 9 ++- .../src/com/intellij/ui/TitledSeparator.java | 15 ++--- .../pathMacros/PathMacroListEditor.form | 26 ++++----- .../run/AndroidRunConfigurationEditor.form | 4 +- .../run/testing/TestRunParameters.form | 19 +++---- .../src/run/PluginRunConfigurationEditor.java | 4 +- .../groovy/mvc/MvcRunConfigurationEditor.form | 3 +- .../runner/GroovyRunConfigurationEditor.form | 16 ++---- .../configuration/JUnitConfigurable.form | 9 ++- .../maven/project/MavenEnvironmentForm.form | 40 ++++++++++--- .../project/MavenGeneralConfigurable.form | 17 +++--- .../TestNGConfigurationEditor.form | 16 ++++-- .../TestNGConfigurationEditor.java | 1 + 21 files changed, 206 insertions(+), 123 deletions(-) diff --git a/java/execution/impl/src/com/intellij/execution/applet/AppletConfigurable.form b/java/execution/impl/src/com/intellij/execution/applet/AppletConfigurable.form index 6a0c22b8ae78..0e182b599bb7 100644 --- a/java/execution/impl/src/com/intellij/execution/applet/AppletConfigurable.form +++ b/java/execution/impl/src/com/intellij/execution/applet/AppletConfigurable.form @@ -3,7 +3,7 @@ - + @@ -43,7 +43,7 @@ - + @@ -57,7 +57,7 @@ - + @@ -69,6 +69,7 @@ + @@ -260,18 +261,20 @@ - - - - - - + + + + + + + + diff --git a/java/execution/impl/src/com/intellij/execution/application/ApplicationConfigurable.form b/java/execution/impl/src/com/intellij/execution/application/ApplicationConfigurable.form index d3c691ce357d..2eb76848a983 100644 --- a/java/execution/impl/src/com/intellij/execution/application/ApplicationConfigurable.form +++ b/java/execution/impl/src/com/intellij/execution/application/ApplicationConfigurable.form @@ -3,7 +3,7 @@ - + @@ -17,17 +17,17 @@ - + + + - - - + - + @@ -38,6 +38,7 @@ + @@ -45,7 +46,9 @@ - + + + diff --git a/java/execution/impl/src/com/intellij/execution/ui/AlternativeJREPanel.java b/java/execution/impl/src/com/intellij/execution/ui/AlternativeJREPanel.java index 973cc74c180b..f7a081f79cc7 100644 --- a/java/execution/impl/src/com/intellij/execution/ui/AlternativeJREPanel.java +++ b/java/execution/impl/src/com/intellij/execution/ui/AlternativeJREPanel.java @@ -45,9 +45,8 @@ public class AlternativeJREPanel extends JPanel { super(new GridBagLayout()); myCbEnabled = new JCheckBox(ExecutionBundle.message("run.configuration.use.alternate.jre.checkbox")); - myCbEnabled.setPreferredSize(new Dimension(154, 16)); final GridBagConstraints gc = new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.WEST, - GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0); + GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0); add(myCbEnabled, gc); myFieldWithHistory = new TextFieldWithHistory(); @@ -64,11 +63,13 @@ public class AlternativeJREPanel extends JPanel { TextComponentAccessor.TEXT_FIELD_WITH_HISTORY_WHOLE_TEXT); gc.gridx = 1; gc.weightx = 1; + gc.fill = GridBagConstraints.HORIZONTAL; + gc.insets.left = 10; add(myPathField, gc); InsertPathAction.addTo(myFieldWithHistory.getTextEditor()); - gc.weighty = 1; - add(Box.createVerticalBox(), gc); + //gc.weighty = 1; + //add(Box.createVerticalBox(), gc); myCbEnabled.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { @@ -105,4 +106,12 @@ public class AlternativeJREPanel extends JPanel { setPathEnabled(isEnabled); setPath(path); } + + public void setCheckBoxPreferredSize(Dimension d) { + myCbEnabled.setPreferredSize(d); + } + + public Dimension getCheckBoxPreferredSize() { + return myCbEnabled.getPreferredSize(); + } } diff --git a/java/execution/impl/src/com/intellij/execution/ui/CommonJavaParametersPanel.java b/java/execution/impl/src/com/intellij/execution/ui/CommonJavaParametersPanel.java index 35442ec0d697..de2122fdaae2 100644 --- a/java/execution/impl/src/com/intellij/execution/ui/CommonJavaParametersPanel.java +++ b/java/execution/impl/src/com/intellij/execution/ui/CommonJavaParametersPanel.java @@ -19,6 +19,7 @@ import com.intellij.execution.CommonJavaRunConfigurationParameters; import com.intellij.execution.ExecutionBundle; import com.intellij.openapi.ui.LabeledComponent; import com.intellij.ui.RawCommandLineEditor; +import org.jetbrains.annotations.Nullable; import java.awt.*; @@ -36,12 +37,17 @@ public class CommonJavaParametersPanel extends CommonProgramParametersPanel { copyDialogCaption(myVMParameters); myVMParameters.setLabelLocation(BorderLayout.WEST); - myVMParameters.setLabelPreferredSize(super.getProgramParametersComponent().getLabelPreferredSize()); add(myVMParameters); super.addComponents(); } + @Override + public void setLabelsPreferredSize(Dimension d) { + super.setLabelsPreferredSize(d); + myVMParameters.setLabelPreferredSize(d); + } + public void setVMParameters(String text) { myVMParameters.getComponent().setText(text); } diff --git a/java/java-impl/src/com/intellij/refactoring/extractMethodObject/ExtractMethodObjectPanel.form b/java/java-impl/src/com/intellij/refactoring/extractMethodObject/ExtractMethodObjectPanel.form index 361e2292b919..cc1201f81c73 100644 --- a/java/java-impl/src/com/intellij/refactoring/extractMethodObject/ExtractMethodObjectPanel.form +++ b/java/java-impl/src/com/intellij/refactoring/extractMethodObject/ExtractMethodObjectPanel.form @@ -3,7 +3,7 @@ - + @@ -170,6 +170,7 @@ + @@ -186,6 +187,7 @@ + diff --git a/platform/lang-impl/src/com/intellij/application/options/CodeCompletion.form b/platform/lang-impl/src/com/intellij/application/options/CodeCompletion.form index 2506873a81ce..d2ad379b5095 100644 --- a/platform/lang-impl/src/com/intellij/application/options/CodeCompletion.form +++ b/platform/lang-impl/src/com/intellij/application/options/CodeCompletion.form @@ -18,7 +18,7 @@ - + @@ -135,38 +135,44 @@ - - - - - - - - - - - - - - - -