mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
exclude from import&completion
This commit is contained in:
+18
-18
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.intellij.application.options.editor.JavaAutoImportOptions">
|
||||
<grid id="27dc6" binding="myWholePanel" layout-manager="GridLayoutManager" row-count="6" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<grid id="27dc6" binding="myWholePanel" layout-manager="GridLayoutManager" row-count="5" 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="20" y="20" width="445" height="411"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="etched" title="Java">
|
||||
<size top="0" left="10" bottom="0" right="0"/>
|
||||
<border type="empty">
|
||||
<size top="0" left="0" bottom="0" right="0"/>
|
||||
</border>
|
||||
<children>
|
||||
<component id="218c1" class="javax.swing.JCheckBox" binding="myCbShowImportPopup">
|
||||
@@ -29,7 +29,7 @@
|
||||
<grid id="2ef17" layout-manager="GridLayoutManager" row-count="1" column-count="3" 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="2" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
<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"/>
|
||||
@@ -56,17 +56,17 @@
|
||||
</hspacer>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="e67c2" layout-manager="GridLayoutManager" row-count="3" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<grid id="e67c2" layout-manager="GridLayoutManager" row-count="4" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="5" column="0" row-span="1" col-span="2" vsize-policy="7" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
<grid row="4" column="0" row-span="1" col-span="1" vsize-policy="7" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<scrollpane id="9c6c">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="3" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
<grid row="1" column="0" row-span="3" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
@@ -79,7 +79,7 @@
|
||||
</scrollpane>
|
||||
<component id="82013" class="javax.swing.JButton" binding="myAddPackageButton">
|
||||
<constraints>
|
||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text resource-bundle="messages/ApplicationBundle" key="exclude.from.imports.add"/>
|
||||
@@ -87,7 +87,7 @@
|
||||
</component>
|
||||
<component id="9c559" class="javax.swing.JButton" binding="myRemoveButton">
|
||||
<constraints>
|
||||
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<enabled value="false"/>
|
||||
@@ -96,19 +96,19 @@
|
||||
</component>
|
||||
<vspacer id="c69dd">
|
||||
<constraints>
|
||||
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
|
||||
<grid row="3" column="1" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
</vspacer>
|
||||
<component id="b278d" class="javax.swing.JLabel">
|
||||
<constraints>
|
||||
<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 value="Label"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
<component id="64f08" class="com.intellij.ui.TitledSeparator">
|
||||
<constraints>
|
||||
<grid row="4" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text resource-bundle="messages/ApplicationBundle" key="exclude.from.completion.group"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="28ca2" class="javax.swing.JCheckBox" binding="myCbOptimizeImports">
|
||||
<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"/>
|
||||
|
||||
@@ -26,6 +26,7 @@ import com.intellij.openapi.application.ApplicationBundle;
|
||||
import com.intellij.openapi.ui.InputValidator;
|
||||
import com.intellij.openapi.ui.Messages;
|
||||
import com.intellij.ui.ListUtil;
|
||||
import org.jetbrains.annotations.Nls;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -187,4 +188,17 @@ public class JavaAutoImportOptions implements AutoImportOptionsProvider {
|
||||
private static boolean isModified(JToggleButton checkBox, boolean value) {
|
||||
return checkBox.isSelected() != value;
|
||||
}
|
||||
|
||||
@Nls
|
||||
public String getDisplayName() {
|
||||
return "Java";
|
||||
}
|
||||
|
||||
public Icon getIcon() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getHelpTopic() {
|
||||
return "reference.settingsdialog.IDE.editor.autoimport";
|
||||
}
|
||||
}
|
||||
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.intellij.application.options.editor.AutoImportOptionsConfigurable">
|
||||
<grid id="27dc6" binding="myPanel" 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="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="500" height="400"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="438b7" binding="myProvidersPanel" layout-manager="GridBagLayout">
|
||||
<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>
|
||||
</children>
|
||||
</grid>
|
||||
</form>
|
||||
+8
-18
@@ -16,22 +16,25 @@
|
||||
|
||||
package com.intellij.application.options.editor;
|
||||
|
||||
import com.intellij.openapi.application.Application;
|
||||
import com.intellij.openapi.application.ApplicationBundle;
|
||||
import com.intellij.openapi.extensions.Extensions;
|
||||
import com.intellij.openapi.options.CompositeConfigurable;
|
||||
import com.intellij.openapi.options.TabbedConfigurable;
|
||||
import org.jetbrains.annotations.Nls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Dmitry Avdeev
|
||||
*/
|
||||
public class AutoImportOptionsConfigurable extends CompositeConfigurable<AutoImportOptionsProvider> implements EditorOptionsProvider {
|
||||
private JPanel myPanel;
|
||||
private JPanel myProvidersPanel;
|
||||
public class AutoImportOptionsConfigurable extends TabbedConfigurable<AutoImportOptionsProvider> implements EditorOptionsProvider {
|
||||
|
||||
public AutoImportOptionsConfigurable(@NotNull Application application) {
|
||||
super(application);
|
||||
}
|
||||
|
||||
protected List<AutoImportOptionsProvider> createConfigurables() {
|
||||
return Arrays.asList(Extensions.getExtensions(AutoImportOptionsProvider.EP_NAME));
|
||||
@@ -50,19 +53,6 @@ public class AutoImportOptionsConfigurable extends CompositeConfigurable<AutoImp
|
||||
return "reference.settingsdialog.IDE.editor.autoimport";
|
||||
}
|
||||
|
||||
public JComponent createComponent() {
|
||||
myProvidersPanel.removeAll();
|
||||
for (AutoImportOptionsProvider provider : getConfigurables()) {
|
||||
myProvidersPanel.add(provider.createComponent(), new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1, 0,
|
||||
GridBagConstraints.NORTH,
|
||||
GridBagConstraints.HORIZONTAL, new Insets(0,0,0,0), 0,0));
|
||||
}
|
||||
myProvidersPanel.add(Box.createVerticalGlue(), new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1, 1,
|
||||
GridBagConstraints.NORTH,
|
||||
GridBagConstraints.BOTH, new Insets(0,0,0,0), 0,0));
|
||||
return myPanel;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return "editor.preferences.import";
|
||||
}
|
||||
|
||||
+2
-1
@@ -16,13 +16,14 @@
|
||||
|
||||
package com.intellij.application.options.editor;
|
||||
|
||||
import com.intellij.openapi.options.Configurable;
|
||||
import com.intellij.openapi.options.UnnamedConfigurable;
|
||||
import com.intellij.openapi.extensions.ExtensionPointName;
|
||||
|
||||
/**
|
||||
* @author Dmitry Avdeev
|
||||
*/
|
||||
public interface AutoImportOptionsProvider extends UnnamedConfigurable {
|
||||
public interface AutoImportOptionsProvider extends Configurable {
|
||||
|
||||
ExtensionPointName<AutoImportOptionsProvider> EP_NAME = ExtensionPointName.create("com.intellij.autoImportOptionsProvider");
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.awt.*;
|
||||
/**
|
||||
* @author yole
|
||||
*/
|
||||
public abstract class TabbedConfigurable extends CompositeConfigurable<Configurable> {
|
||||
public abstract class TabbedConfigurable<T extends Configurable> extends CompositeConfigurable<T> {
|
||||
protected TabbedPaneWrapper myTabbedPane;
|
||||
private final Disposable myParent;
|
||||
|
||||
|
||||
@@ -292,8 +292,8 @@ group.virtual.space=Virtual Space
|
||||
checkbox.allow.placement.of.caret.after.end.of.line=Allow placement of caret after end of line
|
||||
checkbox.allow.placement.of.caret.inside.tabs=Allow placement of caret inside tabs
|
||||
checkbox.show.virtual.space.at.file.bottom=Show virtual space at file bottom
|
||||
checkbox.optimize.imports.on.the.fly=Optimize imports on the fly
|
||||
checkbox.add.unambiguous.imports.on.the.fly=Add unambiguous imports on the fly
|
||||
checkbox.optimize.imports.on.the.fly=&Optimize imports on the fly
|
||||
checkbox.add.unambiguous.imports.on.the.fly=&Add unambiguous imports on the fly
|
||||
combobox.strip.trailing.spaces.on.save=Strip trailing spaces on Save:
|
||||
group.limits=Limits
|
||||
editbox.recent.files.limit=Recent files limit:
|
||||
@@ -464,7 +464,7 @@ application.save.settings.error=Could not save application settings: {0}
|
||||
exit.confirm.title=Confirm Exit
|
||||
exit.confirm.prompt=Are you sure you want to exit {0}?
|
||||
exit.confirm.prompt.tasks=You have background tasks running. Are you sure you want to cancel them and exit {0}?
|
||||
exclude.from.completion.group=Exclude from Import and Completion
|
||||
exclude.from.completion.group=E&xclude from import and completion:
|
||||
exclude.from.completion.prompt=Enter the name of the package or class to exclude from auto-import and class name completion:
|
||||
exclude.from.completion.title=Exclude Package
|
||||
exclude.from.imports.add=A&dd
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<xy x="20" y="20" width="500" height="400"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="etched" title="XML"/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="5cbfc" class="javax.swing.JCheckBox" binding="myShowAutoImportPopups" default-binding="true">
|
||||
<constraints>
|
||||
|
||||
@@ -17,6 +17,7 @@ package com.intellij.application.options;
|
||||
|
||||
import com.intellij.application.options.editor.AutoImportOptionsProvider;
|
||||
import com.intellij.openapi.options.ConfigurationException;
|
||||
import org.jetbrains.annotations.Nls;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
@@ -47,4 +48,17 @@ public class XmlAutoImportOptionsProvider implements AutoImportOptionsProvider {
|
||||
public void disposeUIResources() {
|
||||
|
||||
}
|
||||
|
||||
@Nls
|
||||
public String getDisplayName() {
|
||||
return "XML";
|
||||
}
|
||||
|
||||
public Icon getIcon() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getHelpTopic() {
|
||||
return "reference.settingsdialog.IDE.editor.autoimport";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user