mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge remote branch 'origin/master'
This commit is contained in:
@@ -41,7 +41,7 @@ import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
public class CompilerConfigurable implements SearchableConfigurable.Parent {
|
||||
public class CompilerConfigurable implements SearchableConfigurable.Parent, Configurable.NoScroll {
|
||||
private static final Logger LOG = Logger.getInstance("#com.intellij.compiler.options.CompilerConfigurable");
|
||||
|
||||
private final Project myProject;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.intellij.compiler.options.CompilerUIConfigurable">
|
||||
<grid id="1663f" binding="myPanel" layout-manager="GridLayoutManager" row-count="2" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<grid id="1663f" binding="myPanel" layout-manager="GridLayoutManager" row-count="7" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<xy x="28" y="24" width="883" height="379"/>
|
||||
@@ -8,109 +8,91 @@
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="d5f42" layout-manager="GridLayoutManager" row-count="6" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<vspacer id="67edf">
|
||||
<constraints>
|
||||
<grid row="6" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
</vspacer>
|
||||
<grid id="b341d" layout-manager="GridLayoutManager" row-count="2" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="5" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="889a8" class="javax.swing.JCheckBox" binding="myCbClearOutputDirectory">
|
||||
<component id="b0748" class="javax.swing.JLabel">
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text resource-bundle="messages/CompilerBundle" key="label.option.clear.output.directory.on.rebuild"/>
|
||||
<text resource-bundle="messages/CompilerBundle" key="label.option.resource.patterns.text"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="366e" class="javax.swing.JCheckBox" binding="myCbAssertNotNull">
|
||||
<component id="263f1" class="javax.swing.JTextField" binding="myResourcePatternsField">
|
||||
<constraints>
|
||||
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text resource-bundle="messages/CompilerBundle" key="add.notnull.assertions"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="660fd" class="javax.swing.JCheckBox" binding="myCbCompileInBackground">
|
||||
<constraints>
|
||||
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text resource-bundle="messages/CompilerBundle" key="label.option.compile.in.background"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="348ee" class="javax.swing.JCheckBox" binding="myCbAutoShowFirstError">
|
||||
<constraints>
|
||||
<grid row="4" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text resource-bundle="messages/CompilerBundle" key="label.option.autoshow.first.error"/>
|
||||
</properties>
|
||||
</component>
|
||||
<grid id="21dd4" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="5" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="2dbd6" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<clientProperties>
|
||||
<BorderFactoryClass class="java.lang.String" value="com.intellij.ui.IdeBorderFactory$PlainSmallWithIndent"/>
|
||||
</clientProperties>
|
||||
<border type="none" title-resource-bundle="messages/CompilerBundle" title-key="label.option.resource.patterns.text"/>
|
||||
<children>
|
||||
<component id="263f1" class="javax.swing.JTextField" binding="myResourcePatternsField">
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="9" fill="1" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="150" height="-1"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties>
|
||||
<focusable value="true"/>
|
||||
<margin top="0" left="2" bottom="0" right="0"/>
|
||||
<text value="" noi18n="true"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="316d6" class="javax.swing.JLabel" binding="myPatternLegendLabel">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value=""/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="9" fill="1" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="150" height="-1"/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<component id="ce617" class="javax.swing.JCheckBox" binding="myCbUseCompileServer" default-binding="true">
|
||||
<constraints>
|
||||
<grid row="5" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="Use compile server for project compilation"/>
|
||||
<focusable value="true"/>
|
||||
<margin top="0" left="2" bottom="0" right="0"/>
|
||||
<text value="" noi18n="true"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="1337" class="javax.swing.JLabel" binding="myPatternLegendLabel">
|
||||
<constraints>
|
||||
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="8" fill="0" indent="1" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<font size="11"/>
|
||||
<foreground color="-13487566"/>
|
||||
<text value="label"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
<vspacer id="67edf">
|
||||
<component id="889a8" class="javax.swing.JCheckBox" binding="myCbClearOutputDirectory">
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
</vspacer>
|
||||
<hspacer id="71752">
|
||||
<properties>
|
||||
<text resource-bundle="messages/CompilerBundle" key="label.option.clear.output.directory.on.rebuild"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="366e" class="javax.swing.JCheckBox" binding="myCbAssertNotNull">
|
||||
<constraints>
|
||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
</hspacer>
|
||||
<properties>
|
||||
<text resource-bundle="messages/CompilerBundle" key="add.notnull.assertions"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="660fd" class="javax.swing.JCheckBox" binding="myCbCompileInBackground">
|
||||
<constraints>
|
||||
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text resource-bundle="messages/CompilerBundle" key="label.option.compile.in.background"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="348ee" class="javax.swing.JCheckBox" binding="myCbAutoShowFirstError">
|
||||
<constraints>
|
||||
<grid row="4" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text resource-bundle="messages/CompilerBundle" key="label.option.autoshow.first.error"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="ce617" class="javax.swing.JCheckBox" binding="myCbUseCompileServer" default-binding="true">
|
||||
<constraints>
|
||||
<grid row="5" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="Use compile server for project compilation"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
</form>
|
||||
|
||||
@@ -49,10 +49,10 @@ public class CompilerUIConfigurable implements SearchableConfigurable, Configura
|
||||
myProject = project;
|
||||
myCbUseCompileServer.setVisible(ApplicationManager.getApplication().isInternal());
|
||||
myPatternLegendLabel.setText("<html>" +
|
||||
"Use <b>;</b> to separate patterns and <b>!</b> to negate a pattern.<br/>" +
|
||||
"Accepted wildcards: <b>?</b> — exactly one symbol; <b>*</b> — zero or more symbols;<br/>" +
|
||||
" <b>/</b> — path separator; <b>/**/</b> — any number of directories;<br>" +
|
||||
" <i><dir_name></i>:<pattern> — restrict to source roots with the specified name" +
|
||||
"Use <b>;</b> to separate patterns and <b>!</b> to negate a pattern. " +
|
||||
"Accepted wildcards: <b>?</b> — exactly one symbol; <b>*</b> — zero or more symbols; " +
|
||||
"<b>/</b> — path separator; <b>/**/</b> — any number of directories; " +
|
||||
"<i><dir_name></i>:<i><pattern></i> — restrict to source roots with the specified name" +
|
||||
"</html>");
|
||||
}
|
||||
|
||||
|
||||
@@ -80,8 +80,8 @@ public class ExpressionEvaluationDialog extends EvaluationDialog {
|
||||
final JPanel panel = new JPanel(new GridBagLayout());
|
||||
|
||||
final JLabel expressionLabel = new JLabel(DebuggerBundle.message("label.evaluate.dialog.expression"));
|
||||
panel.add(expressionLabel, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 0, 0, 0), 0, 0));
|
||||
panel.add(getExpressionCombo(), new GridBagConstraints(1, GridBagConstraints.RELATIVE, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 0, 0, 0), 0, 0));
|
||||
panel.add(expressionLabel, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 0.0, 0.0, GridBagConstraints.BASELINE_LEADING, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
|
||||
panel.add(getExpressionCombo(), new GridBagConstraints(1, GridBagConstraints.RELATIVE, 1, 1, 1.0, 0.0, GridBagConstraints.BASELINE_LEADING, GridBagConstraints.HORIZONTAL, new Insets(0, 10, 0, 0), 0, 0));
|
||||
|
||||
final JLabel resultLabel = new JLabel(DebuggerBundle.message("label.evaluate.dialog.result"));
|
||||
panel.add(resultLabel, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 2, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 0, 0, 0), 0, 0));
|
||||
|
||||
@@ -28,6 +28,7 @@ import com.intellij.openapi.options.UnnamedConfigurable;
|
||||
import com.intellij.openapi.options.UnnamedConfigurableGroup;
|
||||
import com.intellij.openapi.util.Disposer;
|
||||
import com.intellij.ui.TabbedPaneWrapper;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -77,7 +78,11 @@ public class FacetEditorImpl extends UnnamedConfigurableGroup implements Unnamed
|
||||
if (myEditorTabs.length > 1) {
|
||||
final TabbedPaneWrapper tabbedPane = new TabbedPaneWrapper(myDisposable);
|
||||
for (FacetEditorTab editorTab : myEditorTabs) {
|
||||
tabbedPane.addTab(editorTab.getDisplayName(), editorTab.getIcon(), editorTab.createComponent(), null);
|
||||
JComponent c = editorTab.createComponent();
|
||||
if (c != null) {
|
||||
UIUtil.addInsets(c, UIUtil.PANEL_SMALL_INSETS);
|
||||
}
|
||||
tabbedPane.addTab(editorTab.getDisplayName(), editorTab.getIcon(), c, null);
|
||||
}
|
||||
tabbedPane.addChangeListener(new ChangeListener() {
|
||||
public void stateChanged(ChangeEvent e) {
|
||||
|
||||
@@ -20,15 +20,16 @@ import com.intellij.openapi.fileChooser.FileChooserDescriptor;
|
||||
import com.intellij.openapi.fileChooser.FileChooserDescriptorFactory;
|
||||
import com.intellij.openapi.project.ProjectBundle;
|
||||
import com.intellij.openapi.roots.AnnotationOrderRootType;
|
||||
import com.intellij.openapi.ui.PanelWithText;
|
||||
import com.intellij.openapi.util.IconLoader;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.ui.ColoredTableCellRenderer;
|
||||
import com.intellij.ui.ScrollPaneFactory;
|
||||
import com.intellij.ui.TableUtil;
|
||||
import com.intellij.ui.components.JBLabel;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import com.intellij.util.ui.ItemRemovable;
|
||||
import com.intellij.util.ui.Table;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.border.Border;
|
||||
@@ -81,8 +82,7 @@ public class AnnotationsEditor extends ModuleElementsEditor {
|
||||
}
|
||||
|
||||
public JComponent createComponentImpl() {
|
||||
final JPanel mainPanel = new JPanel(new BorderLayout());
|
||||
mainPanel.setBorder(BorderFactory.createEmptyBorder(6, 6, 6, 6));
|
||||
final JPanel mainPanel = new JPanel(new BorderLayout(5, 10));
|
||||
mainPanel.setPreferredSize(new Dimension(-1, 200));
|
||||
final DefaultTableModel tableModel = createModel();
|
||||
myTable = new Table(tableModel);
|
||||
@@ -109,14 +109,12 @@ public class AnnotationsEditor extends ModuleElementsEditor {
|
||||
});
|
||||
|
||||
final JPanel panel = new JPanel(new GridBagLayout());
|
||||
panel.add(myAddPathButton, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1.0, 0.0, GridBagConstraints.NORTH, GridBagConstraints.HORIZONTAL, new Insets(0, 6, 0, 0), 0, 0));
|
||||
panel.add(myRemoveButton, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1.0, 1.0, GridBagConstraints.NORTH, GridBagConstraints.HORIZONTAL, new Insets(6, 6, 0, 0), 0, 0));
|
||||
panel.add(myAddPathButton, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1.0, 0.0, GridBagConstraints.NORTH, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
|
||||
panel.add(myRemoveButton, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1.0, 1.0, GridBagConstraints.NORTH, GridBagConstraints.HORIZONTAL, new Insets(4, 0, 0, 0), 0, 0));
|
||||
|
||||
mainPanel.add(ScrollPaneFactory.createScrollPane(myTable), BorderLayout.CENTER);
|
||||
mainPanel.add(panel, BorderLayout.EAST);
|
||||
final PanelWithText panelWithText = new PanelWithText(ProjectBundle.message("project.roots.external.annotations.description"));
|
||||
panelWithText.setBorder(null);
|
||||
mainPanel.add(panelWithText, BorderLayout.NORTH);
|
||||
mainPanel.add(new JBLabel(ProjectBundle.message("project.roots.external.annotations.description"), UIUtil.ComponentStyle.SMALL, UIUtil.FontColor.BRIGHTER), BorderLayout.NORTH);
|
||||
|
||||
myTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
|
||||
public void valueChanged(ListSelectionEvent e) {
|
||||
|
||||
+3
-2
@@ -135,6 +135,7 @@ public class ConfigurationErrorsComponent extends JPanel implements Disposable,
|
||||
|
||||
add(myCurrentView.self(), BorderLayout.CENTER);
|
||||
myCurrentView.updateView();
|
||||
UIUtil.adjustWindowToMinimumSize(SwingUtilities.getWindowAncestor(this));
|
||||
revalidate();
|
||||
repaint();
|
||||
}
|
||||
@@ -282,8 +283,8 @@ public class ConfigurationErrorsComponent extends JPanel implements Disposable,
|
||||
if (window != null) {
|
||||
final Dimension d = window.getSize();
|
||||
final Dimension preferredSize = getPreferredSize();
|
||||
setPreferredSize(new Dimension(preferredSize.width, d.height / 4));
|
||||
setMinimumSize(new Dimension(preferredSize.width, 100));
|
||||
setPreferredSize(new Dimension(preferredSize.width, 200));
|
||||
setMinimumSize(getPreferredSize());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,15 +21,16 @@ import com.intellij.openapi.fileChooser.FileChooserDescriptorFactory;
|
||||
import com.intellij.openapi.project.ProjectBundle;
|
||||
import com.intellij.openapi.projectRoots.ui.Util;
|
||||
import com.intellij.openapi.roots.JavadocOrderRootType;
|
||||
import com.intellij.openapi.ui.PanelWithText;
|
||||
import com.intellij.openapi.util.IconLoader;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.ui.ColoredTableCellRenderer;
|
||||
import com.intellij.ui.ScrollPaneFactory;
|
||||
import com.intellij.ui.TableUtil;
|
||||
import com.intellij.ui.components.JBLabel;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import com.intellij.util.ui.ItemRemovable;
|
||||
import com.intellij.util.ui.Table;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.border.Border;
|
||||
@@ -83,9 +84,7 @@ public class JavadocEditor extends ModuleElementsEditor {
|
||||
}
|
||||
|
||||
public JComponent createComponentImpl() {
|
||||
final JPanel mainPanel = new JPanel(new BorderLayout());
|
||||
mainPanel.setBorder(BorderFactory.createEmptyBorder(6, 6, 6, 6));
|
||||
mainPanel.setPreferredSize(new Dimension(-1, 200));
|
||||
final JPanel mainPanel = new JPanel(new BorderLayout(5, 10));
|
||||
final DefaultTableModel tableModel = createModel();
|
||||
myTable = new Table(tableModel);
|
||||
myTable.setIntercellSpacing(new Dimension(0, 0));
|
||||
@@ -113,15 +112,13 @@ public class JavadocEditor extends ModuleElementsEditor {
|
||||
});
|
||||
|
||||
final JPanel panel = new JPanel(new GridBagLayout());
|
||||
panel.add(myAddPathButton, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1.0, 0.0, GridBagConstraints.NORTH, GridBagConstraints.HORIZONTAL, new Insets(0, 6, 0, 0), 0, 0));
|
||||
panel.add(myAddUrlButton, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1.0, 0.0, GridBagConstraints.NORTH, GridBagConstraints.HORIZONTAL, new Insets(6, 6, 0, 0), 0, 0));
|
||||
panel.add(myRemoveButton, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1.0, 1.0, GridBagConstraints.NORTH, GridBagConstraints.HORIZONTAL, new Insets(6, 6, 0, 0), 0, 0));
|
||||
panel.add(myAddPathButton, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1.0, 0.0, GridBagConstraints.NORTH, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
|
||||
panel.add(myAddUrlButton, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1.0, 0.0, GridBagConstraints.NORTH, GridBagConstraints.HORIZONTAL, new Insets(4, 0, 0, 0), 0, 0));
|
||||
panel.add(myRemoveButton, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1.0, 1.0, GridBagConstraints.NORTH, GridBagConstraints.HORIZONTAL, new Insets(4, 0, 0, 0), 0, 0));
|
||||
|
||||
mainPanel.add(ScrollPaneFactory.createScrollPane(myTable), BorderLayout.CENTER);
|
||||
mainPanel.add(panel, BorderLayout.EAST);
|
||||
final PanelWithText panelWithText = new PanelWithText(ProjectBundle.message("project.roots.javadoc.tab.description"));
|
||||
panelWithText.setBorder(null);
|
||||
mainPanel.add(panelWithText, BorderLayout.NORTH);
|
||||
mainPanel.add(new JBLabel(ProjectBundle.message("project.roots.javadoc.tab.description"), UIUtil.ComponentStyle.SMALL, UIUtil.FontColor.BRIGHTER), BorderLayout.NORTH);
|
||||
|
||||
myTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
|
||||
public void valueChanged(ListSelectionEvent e) {
|
||||
|
||||
@@ -24,10 +24,12 @@ package com.intellij.openapi.roots.ui.configuration;
|
||||
|
||||
import com.intellij.openapi.project.ProjectBundle;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.border.EmptyBorder;
|
||||
import java.awt.*;
|
||||
|
||||
public class OutputEditor extends ModuleElementsEditor {
|
||||
@@ -44,18 +46,17 @@ public class OutputEditor extends ModuleElementsEditor {
|
||||
|
||||
protected JComponent createComponentImpl() {
|
||||
final JPanel panel = new JPanel(new GridBagLayout());
|
||||
panel.setBorder(new EmptyBorder(UIUtil.PANEL_SMALL_INSETS));
|
||||
final GridBagConstraints gc =
|
||||
new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0);
|
||||
new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0);
|
||||
panel.add(myCompilerOutputEditor.createComponentImpl(), gc);
|
||||
final JPanel javadocPanel = (JPanel)myJavadocEditor.createComponentImpl();
|
||||
javadocPanel.setBorder(IdeBorderFactory.createTitledBorder(myJavadocEditor.getDisplayName(), false, false, true));
|
||||
gc.weighty = 1;
|
||||
panel.add(javadocPanel, gc);
|
||||
final JPanel annotationsPanel = (JPanel)myAnnotationsEditor.createComponentImpl();
|
||||
annotationsPanel.setBorder(IdeBorderFactory.createTitledBorder(myAnnotationsEditor.getDisplayName(), false, false, true));
|
||||
panel.add(annotationsPanel, gc);
|
||||
panel.add(Box.createVerticalBox(), new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1, 1, GridBagConstraints.CENTER,
|
||||
GridBagConstraints.BOTH, new Insets(0,0,0,0), 0, 0));
|
||||
panel.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
|
||||
return panel;
|
||||
}
|
||||
|
||||
|
||||
+2
-4
@@ -61,7 +61,6 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.border.Border;
|
||||
import javax.swing.event.HyperlinkEvent;
|
||||
import javax.swing.event.HyperlinkListener;
|
||||
import java.awt.*;
|
||||
@@ -198,8 +197,7 @@ public class ArtifactEditorImpl implements ArtifactEditorEx {
|
||||
Splitter splitter = new Splitter(false);
|
||||
final JPanel leftPanel = new JPanel(new BorderLayout());
|
||||
leftPanel.add(myLayoutTreeComponent.getTreePanel(), BorderLayout.CENTER);
|
||||
final Border border = BorderFactory.createEmptyBorder(3, 3, 3, 3);
|
||||
leftPanel.setBorder(border);
|
||||
leftPanel.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 0));
|
||||
splitter.setFirstComponent(leftPanel);
|
||||
|
||||
final JPanel rightPanel = new JPanel(new BorderLayout());
|
||||
@@ -224,7 +222,7 @@ public class ArtifactEditorImpl implements ArtifactEditorEx {
|
||||
rightTopPanel.add(labelPanel, BorderLayout.SOUTH);
|
||||
rightPanel.add(rightTopPanel, BorderLayout.NORTH);
|
||||
rightPanel.add(ScrollPaneFactory.createScrollPane(mySourceItemsTree), BorderLayout.CENTER);
|
||||
rightPanel.setBorder(border);
|
||||
rightPanel.setBorder(BorderFactory.createEmptyBorder(3, 0, 3, 3));
|
||||
splitter.setSecondComponent(rightPanel);
|
||||
|
||||
|
||||
|
||||
@@ -120,6 +120,14 @@ public class RunConfigurationAction extends ComboBoxAction implements DumbAware
|
||||
LOG.assertTrue(frame != null);
|
||||
frame.getComponent().getRootPane().putClientProperty(BUTTON_KEY, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeNotify() {
|
||||
final IdeFrame frame = findFrame(this);
|
||||
LOG.assertTrue(frame != null);
|
||||
frame.getComponent().getRootPane().putClientProperty(BUTTON_KEY, null);
|
||||
super.removeNotify();
|
||||
}
|
||||
};
|
||||
|
||||
final JPanel panel = new JPanel(new BorderLayout());
|
||||
|
||||
@@ -806,7 +806,12 @@ public class FindDialog extends DialogWrapper {
|
||||
gbConstraints.gridx++;
|
||||
gbConstraints.weightx = 1;
|
||||
gbConstraints.gridwidth = 2;
|
||||
myScopeCombo = new ScopeChooserCombo(myProject, true, true, FindSettings.getInstance().getDefaultScopeName());
|
||||
myScopeCombo = new ScopeChooserCombo(myProject, true, true, FindSettings.getInstance().getDefaultScopeName()) {
|
||||
@Override
|
||||
public Dimension getMinimumSize() {
|
||||
return new Dimension(200, super.getMinimumSize().height);
|
||||
}
|
||||
};
|
||||
Disposer.register(myDisposable, myScopeCombo);
|
||||
scopePanel.add(myScopeCombo, gbConstraints);
|
||||
|
||||
|
||||
+3
-8
@@ -534,9 +534,6 @@ public class SingleInspectionProfilePanel extends JPanel {
|
||||
final JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myTree);
|
||||
scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
||||
TreeUtil.collapseAll(myTree, 1);
|
||||
final Dimension preferredSize = new Dimension(myTree.getPreferredSize().width + 20, scrollPane.getPreferredSize().height);
|
||||
//scrollPane.setPreferredSize(preferredSize);
|
||||
//scrollPane.setMinimumSize(preferredSize);
|
||||
|
||||
myTree.addTreeExpansionListener(new TreeExpansionListener() {
|
||||
|
||||
@@ -566,7 +563,6 @@ public class SingleInspectionProfilePanel extends JPanel {
|
||||
|
||||
myTreeExpander = new DefaultTreeExpander(myTree);
|
||||
myProfileFilter = new MyFilterComponent();
|
||||
myProfileFilter.setPreferredSize(new Dimension(100, -1));
|
||||
|
||||
return scrollPane;
|
||||
}
|
||||
@@ -905,10 +901,10 @@ public class SingleInspectionProfilePanel extends JPanel {
|
||||
final JScrollPane tree = initTreeScrollPane();
|
||||
treePanel.add(tree, BorderLayout.CENTER);
|
||||
|
||||
final JPanel northPanel = new JPanel(new BorderLayout());
|
||||
final JPanel northPanel = new JPanel(new GridBagLayout());
|
||||
northPanel.setBorder(IdeBorderFactory.createEmptyBorder(2, 0, 2, 0));
|
||||
northPanel.add(createTreeToolbarPanel().getComponent(), BorderLayout.CENTER);
|
||||
northPanel.add(myProfileFilter, BorderLayout.EAST);
|
||||
northPanel.add(createTreeToolbarPanel().getComponent(), new GridBagConstraints(0, 0, 1, 1, 0.5, 1, GridBagConstraints.BASELINE_LEADING, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
|
||||
northPanel.add(myProfileFilter, new GridBagConstraints(1, 0, 1, 1, 1, 1, GridBagConstraints.BASELINE_TRAILING, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
|
||||
treePanel.add(northPanel, BorderLayout.NORTH);
|
||||
|
||||
myMainSplitter = new Splitter(false);
|
||||
@@ -919,7 +915,6 @@ public class SingleInspectionProfilePanel extends JPanel {
|
||||
|
||||
final JPanel panel = new JPanel(new BorderLayout());
|
||||
panel.add(myMainSplitter, BorderLayout.CENTER);
|
||||
panel.setBorder(IdeBorderFactory.createEmptyBorder(2, 2, 0, 2));
|
||||
return panel;
|
||||
}
|
||||
|
||||
|
||||
@@ -180,12 +180,7 @@ public class ToolEditorDialog extends DialogWrapper {
|
||||
|
||||
private JPanel createCommandPane() {
|
||||
JPanel pane = new JPanel(new GridBagLayout());
|
||||
//pane.setBorder(
|
||||
// BorderFactory.createCompoundBorder(
|
||||
// BorderFactory.createEtchedBorder(),
|
||||
// BorderFactory.createEmptyBorder(5, 5, 5, 5)
|
||||
// )
|
||||
//);
|
||||
pane.setBorder(IdeBorderFactory.createTitledBorder(ToolsBundle.message("tools.tool.group"), false, true, true));
|
||||
GridBagConstraints constr;
|
||||
|
||||
// program
|
||||
@@ -193,8 +188,8 @@ public class ToolEditorDialog extends DialogWrapper {
|
||||
constr = new GridBagConstraints();
|
||||
constr.gridx = 0;
|
||||
constr.gridy = 0;
|
||||
constr.insets = new Insets(5, 0, 0, 10);
|
||||
constr.anchor = GridBagConstraints.WEST;
|
||||
constr.insets = new Insets(0, 0, 0, 10);
|
||||
constr.anchor = GridBagConstraints.BASELINE_LEADING;
|
||||
pane.add(new JLabel(ToolsBundle.message("tools.program.label")), constr);
|
||||
|
||||
FixedSizeButton browseCommandButton = new FixedSizeButton(myTfCommand);
|
||||
@@ -224,18 +219,18 @@ public class ToolEditorDialog extends DialogWrapper {
|
||||
constr = new GridBagConstraints();
|
||||
constr.gridx = 1;
|
||||
constr.gridy = 0;
|
||||
constr.insets = new Insets(5, 10, 0, 0);
|
||||
constr.insets = new Insets(0, 0, 0, 10);
|
||||
constr.fill = GridBagConstraints.HORIZONTAL;
|
||||
constr.anchor = GridBagConstraints.WEST;
|
||||
constr.anchor = GridBagConstraints.BASELINE_LEADING;
|
||||
constr.weightx = 1.0;
|
||||
pane.add(_pane0, constr);
|
||||
|
||||
constr = new GridBagConstraints();
|
||||
constr.gridx = 2;
|
||||
constr.gridy = 0;
|
||||
constr.insets = new Insets(5, 10, 0, 0);
|
||||
constr.insets = new Insets(0, 0, 0, 0);
|
||||
constr.fill = GridBagConstraints.HORIZONTAL;
|
||||
constr.anchor = GridBagConstraints.WEST;
|
||||
constr.anchor = GridBagConstraints.BASELINE_LEADING;
|
||||
myInsertCommandMacroButton = new JButton(ToolsBundle.message("tools.insert.macro.button"));
|
||||
pane.add(myInsertCommandMacroButton, constr);
|
||||
|
||||
@@ -244,25 +239,25 @@ public class ToolEditorDialog extends DialogWrapper {
|
||||
constr = new GridBagConstraints();
|
||||
constr.gridx = 0;
|
||||
constr.gridy = 1;
|
||||
constr.insets = new Insets(5, 0, 0, 0);
|
||||
constr.anchor = GridBagConstraints.WEST;
|
||||
constr.insets = new Insets(5, 0, 0, 10);
|
||||
constr.anchor = GridBagConstraints.BASELINE_LEADING;
|
||||
pane.add(new JLabel(ToolsBundle.message("tools.parameters.label")), constr);
|
||||
|
||||
constr = new GridBagConstraints();
|
||||
constr.gridx = 1;
|
||||
constr.gridy = 1;
|
||||
constr.insets = new Insets(5, 10, 0, 0);
|
||||
constr.insets = new Insets(5, 0, 0, 10);
|
||||
constr.fill = GridBagConstraints.HORIZONTAL;
|
||||
constr.anchor = GridBagConstraints.WEST;
|
||||
constr.anchor = GridBagConstraints.BASELINE_LEADING;
|
||||
constr.weightx = 1.0;
|
||||
pane.add(myParametersField, constr);
|
||||
|
||||
constr = new GridBagConstraints();
|
||||
constr.gridx = 2;
|
||||
constr.gridy = 1;
|
||||
constr.insets = new Insets(5, 10, 0, 0);
|
||||
constr.insets = new Insets(5, 0, 0, 0);
|
||||
constr.fill = GridBagConstraints.HORIZONTAL;
|
||||
constr.anchor = GridBagConstraints.WEST;
|
||||
constr.anchor = GridBagConstraints.BASELINE_LEADING;
|
||||
myInsertParametersMacroButton = new JButton(ToolsBundle.message("tools.insert.macro.button.a"));
|
||||
pane.add(myInsertParametersMacroButton, constr);
|
||||
|
||||
@@ -271,8 +266,8 @@ public class ToolEditorDialog extends DialogWrapper {
|
||||
constr = new GridBagConstraints();
|
||||
constr.gridx = 0;
|
||||
constr.gridy = 2;
|
||||
constr.insets = new Insets(5, 0, 5, 10);
|
||||
constr.anchor = GridBagConstraints.WEST;
|
||||
constr.insets = new Insets(5, 0, 0, 10);
|
||||
constr.anchor = GridBagConstraints.BASELINE_LEADING;
|
||||
pane.add(new JLabel(ToolsBundle.message("tools.working.directory.label")), constr);
|
||||
|
||||
FixedSizeButton browseDirectoryButton = new FixedSizeButton(myTfCommandWorkingDirectory);
|
||||
@@ -296,7 +291,7 @@ public class ToolEditorDialog extends DialogWrapper {
|
||||
constr.gridx = 1;
|
||||
constr.gridy = 2;
|
||||
constr.gridwidth = 1;
|
||||
constr.insets = new Insets(5, 10, 5, 0);
|
||||
constr.insets = new Insets(5, 0, 0, 10);
|
||||
constr.fill = GridBagConstraints.HORIZONTAL;
|
||||
constr.anchor = GridBagConstraints.WEST;
|
||||
constr.weightx = 1.0;
|
||||
@@ -305,7 +300,7 @@ public class ToolEditorDialog extends DialogWrapper {
|
||||
constr = new GridBagConstraints();
|
||||
constr.gridx = 2;
|
||||
constr.gridy = 2;
|
||||
constr.insets = new Insets(5, 10, 0, 0);
|
||||
constr.insets = new Insets(5, 0, 0, 0);
|
||||
constr.fill = GridBagConstraints.HORIZONTAL;
|
||||
constr.anchor = GridBagConstraints.WEST;
|
||||
myInsertWorkingDirectoryMacroButton = new JButton(ToolsBundle.message("tools.insert.macro.button.c"));
|
||||
@@ -318,8 +313,6 @@ public class ToolEditorDialog extends DialogWrapper {
|
||||
constr.weighty = 1.0;
|
||||
pane.add(new JLabel(), constr);
|
||||
|
||||
pane.setPreferredSize(new Dimension(600, 100));
|
||||
|
||||
return pane;
|
||||
}
|
||||
|
||||
@@ -434,7 +427,7 @@ public class ToolEditorDialog extends DialogWrapper {
|
||||
}
|
||||
|
||||
private JPanel getShowInPanel() {
|
||||
JPanel panel = new JPanel(new GridLayout(1, 4, 10, 0));
|
||||
JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT, 10, 0));
|
||||
panel.setBorder(IdeBorderFactory.createTitledBorder(ToolsBundle.message("tools.menu.group"), false, true, true));
|
||||
panel.add(myShowInMainMenuCheckbox);
|
||||
panel.add(myShowInEditorCheckbox);
|
||||
@@ -444,7 +437,8 @@ public class ToolEditorDialog extends DialogWrapper {
|
||||
}
|
||||
|
||||
private JPanel getOptionsPanel() {
|
||||
JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT));
|
||||
JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT, 10, 0));
|
||||
panel.setBorder(IdeBorderFactory.createTitledBorder(ToolsBundle.message("tools.options.group"), false, true, true));
|
||||
panel.add(mySynchronizedAfterRunCheckbox);
|
||||
panel.add(myUseConsoleCheckbox);
|
||||
panel.add(myOutputFiltersButton);
|
||||
|
||||
@@ -167,9 +167,6 @@ public class AbstractTreeUpdater implements Disposable, Activatable {
|
||||
if (eachNode.isNodeAncestor(toAdd.getNode())) {
|
||||
eachYielding.setUpdateStamp(newUpdateCount);
|
||||
}
|
||||
else {
|
||||
toAdd.expire();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ import com.intellij.openapi.fileTypes.INativeFileType;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.TextRange;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.openapi.wm.IdeFocusManager;
|
||||
import com.intellij.pom.Navigatable;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -146,6 +147,9 @@ public class OpenFileDescriptor implements Navigatable {
|
||||
if (editor instanceof TextEditor) {
|
||||
Editor e = ((TextEditor)editor).getEditor();
|
||||
unfoldCurrentLine(e);
|
||||
if (focusEditor) {
|
||||
IdeFocusManager.getInstance(myProject).requestFocus(e.getContentComponent(), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
return !editors.isEmpty();
|
||||
@@ -205,7 +209,7 @@ public class OpenFileDescriptor implements Navigatable {
|
||||
}
|
||||
}
|
||||
|
||||
private static void unfoldCurrentLine(@NotNull final Editor editor) {
|
||||
private void unfoldCurrentLine(@NotNull final Editor editor) {
|
||||
final FoldRegion[] allRegions = editor.getFoldingModel().getAllFoldRegions();
|
||||
final int offset = editor.getCaretModel().getOffset();
|
||||
int line = editor.getDocument().getLineNumber(offset);
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.awt.*;
|
||||
* @author evgeny.zakrevsky
|
||||
*/
|
||||
public class JBCheckBox extends JCheckBox implements AnchorableComponent {
|
||||
private JComponent anchor;
|
||||
private JComponent myAnchor;
|
||||
|
||||
public JBCheckBox() {
|
||||
super();
|
||||
@@ -46,18 +46,23 @@ public class JBCheckBox extends JCheckBox implements AnchorableComponent {
|
||||
|
||||
@Override
|
||||
public JComponent getAnchor() {
|
||||
return anchor;
|
||||
return myAnchor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAnchor(JComponent anchor) {
|
||||
if (this != anchor) {
|
||||
this.anchor = anchor;
|
||||
this.myAnchor = anchor;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dimension getPreferredSize() {
|
||||
return anchor == null ? super.getPreferredSize() : anchor.getPreferredSize();
|
||||
return myAnchor == null ? super.getPreferredSize() : myAnchor.getPreferredSize();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dimension getMinimumSize() {
|
||||
return myAnchor == null ? super.getMinimumSize() : myAnchor.getMinimumSize();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,9 +30,11 @@ public class JBLabel extends JLabel implements AnchorableComponent {
|
||||
private JComponent myAnchor = null;
|
||||
|
||||
public JBLabel() {
|
||||
super();
|
||||
}
|
||||
|
||||
public JBLabel(@NotNull UIUtil.ComponentStyle componentStyle) {
|
||||
super();
|
||||
setComponentStyle(componentStyle);
|
||||
}
|
||||
|
||||
@@ -49,6 +51,12 @@ public class JBLabel extends JLabel implements AnchorableComponent {
|
||||
setComponentStyle(componentStyle);
|
||||
}
|
||||
|
||||
public JBLabel(@NotNull String text, @NotNull UIUtil.ComponentStyle componentStyle, @NotNull UIUtil.FontColor fontColor) {
|
||||
super(text);
|
||||
setComponentStyle(componentStyle);
|
||||
setFontColor(fontColor);
|
||||
}
|
||||
|
||||
public JBLabel(@NotNull String text, int horizontalAlignment) {
|
||||
super(text, horizontalAlignment);
|
||||
}
|
||||
@@ -101,4 +109,9 @@ public class JBLabel extends JLabel implements AnchorableComponent {
|
||||
public Dimension getPreferredSize() {
|
||||
return myAnchor == null ? super.getPreferredSize() : myAnchor.getPreferredSize();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dimension getMinimumSize() {
|
||||
return myAnchor == null ? super.getMinimumSize() : myAnchor.getMinimumSize();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.awt.*;
|
||||
* @author evgeny.zakrevsky
|
||||
*/
|
||||
public class JBRadioButton extends JRadioButton implements AnchorableComponent {
|
||||
private JComponent anchor;
|
||||
private JComponent myAnchor;
|
||||
|
||||
public JBRadioButton() {
|
||||
}
|
||||
@@ -45,18 +45,23 @@ public class JBRadioButton extends JRadioButton implements AnchorableComponent {
|
||||
|
||||
@Override
|
||||
public JComponent getAnchor() {
|
||||
return anchor;
|
||||
return myAnchor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAnchor(@Nullable JComponent anchor) {
|
||||
if (anchor != this) {
|
||||
this.anchor = anchor;
|
||||
this.myAnchor = anchor;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dimension getPreferredSize() {
|
||||
return anchor == null ? super.getPreferredSize() : anchor.getPreferredSize();
|
||||
return myAnchor == null ? super.getPreferredSize() : myAnchor.getPreferredSize();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dimension getMinimumSize() {
|
||||
return myAnchor == null ? super.getMinimumSize() : myAnchor.getMinimumSize();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,6 @@ import com.intellij.openapi.actionSystem.ActionToolbar;
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||
import com.intellij.openapi.application.PathManager;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.options.Configurable;
|
||||
import com.intellij.openapi.progress.ProgressManager;
|
||||
import com.intellij.openapi.project.DumbAwareAction;
|
||||
import com.intellij.openapi.ui.Messages;
|
||||
|
||||
@@ -40,6 +40,7 @@ class DiffSplitter extends Splitter implements DiffSplitterI {
|
||||
setDividerWidth(30);
|
||||
setFirstComponent(component1);
|
||||
setSecondComponent(component2);
|
||||
setHonorComponentsMinimumSize(false);
|
||||
}
|
||||
|
||||
protected Splitter.Divider createDivider() {
|
||||
|
||||
+1
-1
@@ -207,12 +207,12 @@ public class OptionsEditor extends JPanel implements DataProvider, Place.Navigat
|
||||
|
||||
myLeftSide.add(mySearchWrapper, BorderLayout.NORTH);
|
||||
myLeftSide.add(myTree, BorderLayout.CENTER);
|
||||
myLeftSide.setMinimumSize(new Dimension(150, -1));
|
||||
|
||||
setLayout(new BorderLayout());
|
||||
|
||||
myMainSplitter = new Splitter(false);
|
||||
myMainSplitter.setFirstComponent(myLeftSide);
|
||||
myMainSplitter.setHonorComponentsMinimumSize(false);
|
||||
|
||||
myLoadingDecorator = new LoadingDecorator(myOwnDetails.getComponent(), this, 150);
|
||||
myMainSplitter.setSecondComponent(myLoadingDecorator.getComponent());
|
||||
|
||||
@@ -937,27 +937,7 @@ public class DialogWrapperPeerImpl extends DialogWrapperPeer implements FocusTra
|
||||
private class MyComponentListener extends ComponentAdapter {
|
||||
@SuppressWarnings({"RefusedBequest"})
|
||||
public void componentResized(ComponentEvent e) {
|
||||
final JRootPane pane = getRootPane();
|
||||
if (pane == null) return;
|
||||
final Dimension minSize = pane.getMinimumSize();
|
||||
final Dimension size = pane.getSize();
|
||||
final Dimension winSize = getSize();
|
||||
if (minSize.width > size.width) {
|
||||
winSize.width += minSize.width - size.width;
|
||||
}
|
||||
if (minSize.height > size.height) {
|
||||
winSize.height += minSize.height - size.height;
|
||||
}
|
||||
|
||||
if (!winSize.equals(getSize())) {
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
public void run() {
|
||||
if (isShowing()) {
|
||||
setSize(winSize);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
UIUtil.adjustWindowToMinimumSize(getWindow());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -70,7 +70,7 @@ public class ToolWindowContentUi extends JPanel implements ContentUI, PropertyCh
|
||||
ContentLayout myComboLayout = new ComboContentLayout(this);
|
||||
|
||||
private ToolWindowContentUiType myType = ToolWindowContentUiType.TABBED;
|
||||
private static DefaultActionGroup myGroup;
|
||||
private DefaultActionGroup myGroup;
|
||||
|
||||
public ToolWindowContentUi(ToolWindowImpl window) {
|
||||
myWindow = window;
|
||||
@@ -252,7 +252,7 @@ public class ToolWindowContentUi extends JPanel implements ContentUI, PropertyCh
|
||||
return true;
|
||||
}
|
||||
|
||||
static void initMouseListeners(final JComponent c, final ToolWindowContentUi ui) {
|
||||
void initMouseListeners(final JComponent c, final ToolWindowContentUi ui) {
|
||||
if (c.getClientProperty(ui) != null) return;
|
||||
|
||||
|
||||
|
||||
@@ -257,6 +257,11 @@ public class IdeStatusBarImpl extends JComponent implements StatusBarEx {
|
||||
|
||||
public void dispose() {
|
||||
myWidgetMap.clear();
|
||||
myChildren.clear();
|
||||
|
||||
myLeftPanel.removeAll();
|
||||
myRightPanel.removeAll();
|
||||
myCenterPanel.removeAll();
|
||||
}
|
||||
|
||||
private void addWidget(@NotNull final StatusBarWidget widget, @NotNull final Position pos, @NotNull final String anchor) {
|
||||
|
||||
@@ -201,7 +201,43 @@ public class TreeUiTest extends AbstractTreeBuilderTest {
|
||||
" +org\n" +
|
||||
" +xunit\n");
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void testMoveElementToAdjacentEmptyParentWithSmartExpandAndSerialUpdateSubtrees() throws Exception {
|
||||
Node com = myRoot.addChild("com");
|
||||
Node folder1 = com.addChild("folder1");
|
||||
Node folder2 = com.addChild("folder2");
|
||||
|
||||
Node file21 = folder2.addChild("file21");
|
||||
folder2.addChild("file22");
|
||||
|
||||
mySmartExpand = true;
|
||||
activate();
|
||||
|
||||
buildNode(file21, true);
|
||||
|
||||
assertTree("-/\n" +
|
||||
" -com\n" +
|
||||
" folder1\n" +
|
||||
" -folder2\n" +
|
||||
" [file21]\n" +
|
||||
" file22\n");
|
||||
|
||||
folder2.myChildElements.remove(file21);
|
||||
folder1.addChild(file21);
|
||||
|
||||
getBuilder().queueUpdateFrom(folder2.getElement(), false);
|
||||
getBuilder().queueUpdateFrom(folder1.getElement(), false);
|
||||
|
||||
assertTree("-/\n" +
|
||||
" -com\n" +
|
||||
" -folder1\n" +
|
||||
" [file21]\n" +
|
||||
" -folder2\n" +
|
||||
" file22\n");
|
||||
|
||||
}
|
||||
|
||||
public void testReadyCallbackWhenReleased() throws Exception {
|
||||
buildStructure(myRoot);
|
||||
|
||||
@@ -2568,6 +2604,10 @@ public class TreeUiTest extends AbstractTreeBuilderTest {
|
||||
//todo
|
||||
}
|
||||
|
||||
@Override
|
||||
public void testMoveElementToAdjacentEmptyParentWithSmartExpandAndSerialUpdateSubtrees() throws Exception {
|
||||
// doesn't make sense since passthrough mode is always serial, it doesn't queue for updates
|
||||
}
|
||||
|
||||
@Override
|
||||
public void testElementMove1() throws Exception {
|
||||
|
||||
@@ -316,7 +316,7 @@ project.roots.tooltip.library.has.broken.paths=Library ''{0}'' has broken {1, ch
|
||||
project.roots.error.message.invalid.roots=invalid {0} {1, choice, 1#root|2#roots}
|
||||
choose.modules.dialog.title=Choose Modules
|
||||
choose.modules.dialog.description=Library ''{0}'' will be added to the selected modules.
|
||||
project.roots.javadoc.tab.description=Manage external JavaDocs attached to this module. External JavaDoc override JavaDoc annotations you might have in your module.
|
||||
project.roots.javadoc.tab.description=<html>Manage external JavaDocs attached to this module. External JavaDoc override JavaDoc annotations you might have in your module.</html>
|
||||
project.roots.output.compiler.title=Compiler output
|
||||
project.roots.module.jdk.problem.message=Module SDK is not defined.
|
||||
project.roots.module.duplicate.name.message=duplicate module name
|
||||
@@ -338,7 +338,7 @@ external.annotations.suggestion.message=<html><body>If you do not want annotatio
|
||||
sdk.configure.annotations.tab=Annotations
|
||||
project.roots.path.tab.title=Paths
|
||||
project.roots.external.annotations.tab.title=External Annotations
|
||||
project.roots.external.annotations.description=Manage external annotations attached to this module.
|
||||
project.roots.external.annotations.description=<html>Manage external annotations attached to this module.</html>
|
||||
add.external.annotations.path.title=Add path to external annotations
|
||||
add.external.annotations.path.description=Select path in which external annotations for module sources is located
|
||||
|
||||
|
||||
@@ -35,6 +35,8 @@ tools.insert.macro.button.a=Insert m&acro...
|
||||
tools.working.directory.label=Working directory:
|
||||
tools.insert.macro.button.c=Insert ma&cro...
|
||||
tools.menu.group=Menu
|
||||
tools.options.group=Options
|
||||
tools.tool.group=Tool Options
|
||||
tools.settings=Tools
|
||||
tools.completed.message=External tool ''{0}'' completed with exit code {1}
|
||||
tools.add.button=&Add...
|
||||
|
||||
@@ -2555,5 +2555,22 @@ public class UIUtil {
|
||||
|
||||
return ans;
|
||||
}
|
||||
|
||||
public static void adjustWindowToMinimumSize(final Window window) {
|
||||
if (window == null) return;
|
||||
final Dimension minSize = window.getMinimumSize();
|
||||
final Dimension size = window.getSize();
|
||||
final Dimension newSize = new Dimension(Math.max(size.width, minSize.width), Math.max(size.height, minSize.height));
|
||||
|
||||
if (!newSize.equals(size)) {
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
public void run() {
|
||||
if (window.isShowing()) {
|
||||
window.setSize(newSize);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -313,7 +313,6 @@ public class ChangesViewManager implements ChangesViewI, JDOMExternalizable, Pro
|
||||
final JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myView);
|
||||
final JPanel wrapper = new JPanel(new BorderLayout());
|
||||
wrapper.add(scrollPane, BorderLayout.CENTER);
|
||||
mySplitter.setShowDividerControls(true);
|
||||
mySplitter.setFirstComponent(wrapper);
|
||||
content.add(mySplitter, BorderLayout.CENTER);
|
||||
content.add(myProgressLabel, BorderLayout.SOUTH);
|
||||
|
||||
@@ -165,7 +165,6 @@ public class ChangeListViewerDialog extends DialogWrapper implements DataProvide
|
||||
commitPanel.add(commitMessageScroll, BorderLayout.CENTER);
|
||||
|
||||
splitter.setSecondComponent(commitPanel);
|
||||
splitter.setShowDividerControls(true);
|
||||
}
|
||||
mainPanel.add(splitter, BorderLayout.CENTER);
|
||||
|
||||
|
||||
@@ -149,9 +149,9 @@ android.manifest.not.found.error=AndroidManifest.xml doesn't exist or has incorr
|
||||
android.apt.settings.title=AAPT Compiler
|
||||
android.aidl.settings.title=AIDL Compiler
|
||||
android.generate.r.java.checkbox=Re&generate R.java file when resources are changed
|
||||
android.dest.directory.title=De&stination directory
|
||||
android.dest.directory.title=De&stination directory\:
|
||||
android.generate.r.java.by.res.dir=Use res&ource directory specified at "Structure" section
|
||||
android.use.custom.r.java.source.dir=Use custo&m resource directory
|
||||
android.use.custom.r.java.source.dir=Use custo&m resource directory\:
|
||||
android.regenerate.idl.when.changed.checkbox=Regenerate &Java files when AIDL files are changed
|
||||
android.wizard.application.project.button=&Application
|
||||
android.wizard.lib.project.button=&Library
|
||||
|
||||
@@ -19,11 +19,15 @@ import com.intellij.openapi.compiler.CompilerManager;
|
||||
import com.intellij.openapi.components.AbstractProjectComponent;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import org.jetbrains.android.compiler.AndroidPrecompileTask;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* @author Eugene.Kudelevsky
|
||||
*/
|
||||
public class AndroidProjectComponent extends AbstractProjectComponent {
|
||||
private volatile boolean myCompilationRunning = false;
|
||||
private final Object COMPILATION_FLAG_LOCK = new Object();
|
||||
|
||||
protected AndroidProjectComponent(Project project) {
|
||||
super(project);
|
||||
}
|
||||
@@ -31,6 +35,26 @@ public class AndroidProjectComponent extends AbstractProjectComponent {
|
||||
@Override
|
||||
public void projectOpened() {
|
||||
final CompilerManager manager = CompilerManager.getInstance(myProject);
|
||||
manager.addBeforeTask(new AndroidPrecompileTask());
|
||||
manager.addBeforeTask(new AndroidPrecompileTask(this));
|
||||
}
|
||||
|
||||
public void setCompilationStarted() {
|
||||
synchronized (COMPILATION_FLAG_LOCK) {
|
||||
myCompilationRunning = true;
|
||||
}
|
||||
}
|
||||
|
||||
public void setCompilationFinished() {
|
||||
synchronized (COMPILATION_FLAG_LOCK) {
|
||||
myCompilationRunning = false;
|
||||
}
|
||||
}
|
||||
|
||||
public void runIfNotInCompilation(@NotNull Runnable r) {
|
||||
synchronized (COMPILATION_FLAG_LOCK) {
|
||||
if (!myCompilationRunning) {
|
||||
r.run();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,6 +44,7 @@ import com.intellij.psi.PsiFile;
|
||||
import com.intellij.psi.search.GlobalSearchScope;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import com.intellij.util.containers.HashSet;
|
||||
import org.jetbrains.android.AndroidProjectComponent;
|
||||
import org.jetbrains.android.dom.resources.Attr;
|
||||
import org.jetbrains.android.dom.resources.DeclareStyleable;
|
||||
import org.jetbrains.android.dom.resources.ResourceElement;
|
||||
@@ -340,19 +341,24 @@ public class AndroidCompileUtil {
|
||||
}
|
||||
}
|
||||
|
||||
public static void generate(final Module module, GeneratingCompiler compiler) {
|
||||
assert !ApplicationManager.getApplication().isDispatchThread();
|
||||
final CompileContext[] contextWrapper = new CompileContext[1];
|
||||
ApplicationManager.getApplication().runReadAction(new Runnable() {
|
||||
public static void generate(final Module module, final GeneratingCompiler compiler) {
|
||||
module.getProject().getComponent(AndroidProjectComponent.class).runIfNotInCompilation(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Project project = module.getProject();
|
||||
if (project.isDisposed()) return;
|
||||
CompilerTask task = new CompilerTask(project, true, "Android auto-generation", true);
|
||||
CompileScope scope = new ModuleCompileScope(module, false);
|
||||
contextWrapper[0] = new CompileContextImpl(project, task, scope, null, false, false);
|
||||
assert !ApplicationManager.getApplication().isDispatchThread();
|
||||
final CompileContext[] contextWrapper = new CompileContext[1];
|
||||
ApplicationManager.getApplication().runReadAction(new Runnable() {
|
||||
public void run() {
|
||||
Project project = module.getProject();
|
||||
if (project.isDisposed()) return;
|
||||
CompilerTask task = new CompilerTask(project, true, "Android auto-generation", true);
|
||||
CompileScope scope = new ModuleCompileScope(module, false);
|
||||
contextWrapper[0] = new CompileContextImpl(project, task, scope, null, false, false);
|
||||
}
|
||||
});
|
||||
generate(compiler, contextWrapper[0]);
|
||||
}
|
||||
});
|
||||
generate(compiler, contextWrapper[0]);
|
||||
}
|
||||
|
||||
public static boolean isModuleAffected(CompileContext context, Module module) {
|
||||
|
||||
@@ -34,6 +34,7 @@ import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.openapi.vfs.LocalFileSystem;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.util.containers.hash.HashSet;
|
||||
import org.jetbrains.android.AndroidProjectComponent;
|
||||
import org.jetbrains.android.facet.AndroidFacet;
|
||||
import org.jetbrains.android.facet.AndroidRootUtil;
|
||||
import org.jetbrains.android.sdk.AndroidPlatform;
|
||||
@@ -48,11 +49,19 @@ import java.util.Set;
|
||||
* @author Eugene.Kudelevsky
|
||||
*/
|
||||
public class AndroidPrecompileTask implements CompileTask {
|
||||
private static final Logger LOG = Logger.getInstance("#org.jetbrains.android.compiler.AndroidPrecompileTask");
|
||||
private final AndroidProjectComponent myOwner;
|
||||
|
||||
private static final Logger LOG = Logger.getInstance("#org.jetbrains.android.compiler.AndroidPrecompileTask");
|
||||
|
||||
public AndroidPrecompileTask(@NotNull AndroidProjectComponent owner) {
|
||||
myOwner = owner;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean execute(CompileContext context) {
|
||||
final Project project = context.getProject();
|
||||
|
||||
myOwner.setCompilationStarted();
|
||||
|
||||
ExcludedEntriesConfiguration configuration =
|
||||
((CompilerConfigurationImpl)CompilerConfiguration.getInstance(project)).getExcludedEntriesConfiguration();
|
||||
@@ -96,6 +105,18 @@ public class AndroidPrecompileTask implements CompileTask {
|
||||
CompilerManager.getInstance(project).addCompilationStatusListener(new MyCompilationStatusListener(project, addedEntries), project);
|
||||
}
|
||||
|
||||
CompilerManager.getInstance(project).addCompilationStatusListener(new CompilationStatusListener() {
|
||||
@Override
|
||||
public void compilationFinished(boolean aborted, int errors, int warnings, final CompileContext compileContext) {
|
||||
ApplicationManager.getApplication().executeOnPooledThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
myOwner.setCompilationFinished();
|
||||
}
|
||||
});
|
||||
}
|
||||
}, project);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
</constraints>
|
||||
<properties/>
|
||||
<clientProperties>
|
||||
<BorderFactoryClass class="java.lang.String" value="com.intellij.ui.IdeBorderFactory$BoldSmallWithIndent"/>
|
||||
<BorderFactoryClass class="java.lang.String" value="com.intellij.ui.IdeBorderFactory$PlainSmallWithIndent"/>
|
||||
</clientProperties>
|
||||
<border type="etched" title="Location in File"/>
|
||||
<children/>
|
||||
@@ -84,7 +84,7 @@
|
||||
</constraints>
|
||||
<properties/>
|
||||
<clientProperties>
|
||||
<BorderFactoryClass class="java.lang.String" value="com.intellij.ui.IdeBorderFactory$BoldSmallWithIndent"/>
|
||||
<BorderFactoryClass class="java.lang.String" value="com.intellij.ui.IdeBorderFactory$PlainSmallWithIndent"/>
|
||||
</clientProperties>
|
||||
<border type="etched" title="Comment Type"/>
|
||||
<children>
|
||||
@@ -121,7 +121,7 @@
|
||||
</constraints>
|
||||
<properties/>
|
||||
<clientProperties>
|
||||
<BorderFactoryClass class="java.lang.String" value="com.intellij.ui.IdeBorderFactory$BoldSmallWithIndent"/>
|
||||
<BorderFactoryClass class="java.lang.String" value="com.intellij.ui.IdeBorderFactory$PlainSmallWithIndent"/>
|
||||
</clientProperties>
|
||||
<border type="etched" title="Borders"/>
|
||||
<children>
|
||||
@@ -219,7 +219,7 @@
|
||||
</constraints>
|
||||
<properties/>
|
||||
<clientProperties>
|
||||
<BorderFactoryClass class="java.lang.String" value="com.intellij.ui.IdeBorderFactory$BoldSmallWithIndent"/>
|
||||
<BorderFactoryClass class="java.lang.String" value="com.intellij.ui.IdeBorderFactory$PlainSmallWithIndent"/>
|
||||
</clientProperties>
|
||||
<border type="etched" title="Relative Location"/>
|
||||
<children>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
</constraints>
|
||||
<properties/>
|
||||
<clientProperties>
|
||||
<BorderFactoryClass class="java.lang.String" value="com.intellij.ui.IdeBorderFactory$BoldSmallWithIndent"/>
|
||||
<BorderFactoryClass class="java.lang.String" value="com.intellij.ui.IdeBorderFactory$PlainSmallWithIndent"/>
|
||||
</clientProperties>
|
||||
<border type="none" title-resource-bundle="git4idea/i18n/GitBundle" title-key="update.options.type"/>
|
||||
<children>
|
||||
@@ -56,7 +56,7 @@
|
||||
</constraints>
|
||||
<properties/>
|
||||
<clientProperties>
|
||||
<BorderFactoryClass class="java.lang.String" value="com.intellij.ui.IdeBorderFactory$BoldSmallWithIndent"/>
|
||||
<BorderFactoryClass class="java.lang.String" value="com.intellij.ui.IdeBorderFactory$PlainSmallWithIndent"/>
|
||||
</clientProperties>
|
||||
<border type="none" title-resource-bundle="git4idea/i18n/GitBundle" title-key="update.options.save.before.update"/>
|
||||
<children>
|
||||
|
||||
@@ -110,7 +110,7 @@ label.option.deploy.never=Never
|
||||
label.option.deploy.always=Always
|
||||
label.option.deploy.text=Deploy web applications to server after compilation:
|
||||
label.option.clear.output.directory.on.rebuild=C&lear output directory on rebuild
|
||||
label.option.resource.patterns.text=Resource Patterns
|
||||
label.option.resource.patterns.text=Resource patterns\:
|
||||
error.compiler.configurable.malformed.patterns=The following resource patterns are malformed:\n{0}
|
||||
exclude.from.compile.table.path.column.name=Path
|
||||
exclude.from.compile.table.recursively.column.name=Recursively
|
||||
|
||||
Reference in New Issue
Block a user