public interface Configurable extends UnnamedConfigurable
com.intellij.applicationConfigurable
for settings, which are global for IDE,
and com.intellij.projectConfigurable
for project settings, which are applied
to the current project only. They differ only in the constructor implementation.
Classes for IDE settings must have a default constructor with no arguments,
while classes for project settings must declare a constructor with a single argument
of the Project
type.
The following attributes are available for both extension points mentioned above:
instance
<extensions defaultExtensionNs="com.intellij">
<projectConfigurable instance="fully.qualified.class.name"/>
</extensions>
provider
instance
attribute.
It specifies a qualified name of a custom implementation of the ConfigurableProvider
interface,
which provides another way to create a configurable component:
<extensions defaultExtensionNs="com.intellij">
<projectConfigurable provider="fully.qualified.class.name"/>
</extensions>
implementation
instance
attribute.nonDefaultProject
projectConfigurable
extension only.
If it is set to true
, the corresponding project settings will be shown for a real project only,
not for the template project
,
which provides default settings for all the new projects.displayName
key
and bundle
id
unique identifier
for the configurable component. It is also recommended specifying the identifier in XML.parentId
groupId
groupId="root"
groupId="appearance"
groupId="editor"
groupId="project"
groupId="build"
groupId="build.tools"
groupId="language"
groupId="tools"
groupId="other"
parentId
and the groupId
attributes should not be used together and the parentId
has precedence.
Currently, it is possible to specify a group identifier in the parentId
attribute.groupWeight
0
. If one child in a group or a parent configurable component has non-zero weight,
all children will be sorted descending by their weight. And if the weights are equal,
the components will be sorted ascending by their display name.dynamic
Configurable.Composite
interface
and its children are dynamically calculated by calling the getConfigurables
method.
It is needed to improve performance, because we do not want to load any additional classes during the building a setting tree.childrenEPName
configurable
<projectConfigurable id="tasks" nonDefaultProject="true" instance="com.intellij.tasks.config.TaskConfigurable">
<configurable id="tasks.servers" instance="com.intellij.tasks.config.TaskRepositoriesConfigurable"/>
</projectConfigurable>
<projectConfigurable id="tasks" nonDefaultProject="true" instance="com.intellij.tasks.config.TaskConfigurable"/>
<projectConfigurable parentId="tasks" id="tasks.servers" nonDefaultProject="true" instance="com.intellij.tasks.config.TaskRepositoriesConfigurable"/>
ConfigurableEP
,
SearchableConfigurable
,
ShowSettingsUtil
Modifier and Type | Interface and Description |
---|---|
static interface |
Configurable.Composite
This interface represents a configurable component that has child components.
|
static interface |
Configurable.NoMargin
This marker interface notifies the Settings dialog to not add an empty border to the Swing form.
|
static interface |
Configurable.NoScroll
This marker interface notifies the Settings dialog to not add scroll bars to the Swing form.
|
static interface |
Configurable.TopComponentController |
static interface |
Configurable.TopComponentProvider |
static interface |
Configurable.VariableProjectAppLevel
Allows to dynamically define if current configurable settings apply to current project or to the IDE and update "For current project"
indicator accordingly.
|
static interface |
Configurable.WithEpDependencies
The interface is used for configurable that depends on some dynamic extension points.
|
Modifier and Type | Field and Description |
---|---|
static ExtensionPointName<ConfigurableEP<Configurable>> |
APPLICATION_CONFIGURABLE |
static ExtensionPointName<ConfigurableEP<Configurable>> |
PROJECT_CONFIGURABLE |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDisplayName()
Returns the visible name of the configurable component.
|
default java.lang.String |
getHelpTopic()
Returns the topic in the help file which is shown when help for the configurable is requested.
|
default javax.swing.JComponent |
getPreferredFocusedComponent() |
default <T> boolean |
isModified(ComboBox<T> comboBox,
T value) |
default boolean |
isModified(javax.swing.JTextField textField,
int value,
UINumericRange range) |
default boolean |
isModified(javax.swing.JTextField textField,
java.lang.String value) |
default boolean |
isModified(javax.swing.JToggleButton toggleButton,
boolean value) |
apply, cancel, createComponent, disposeUIResources, isModified, reset
static final ExtensionPointName<ConfigurableEP<Configurable>> APPLICATION_CONFIGURABLE
static final ExtensionPointName<ConfigurableEP<Configurable>> PROJECT_CONFIGURABLE
java.lang.String getDisplayName()
default java.lang.String getHelpTopic()
null
if no help is availabledefault boolean isModified(javax.swing.JTextField textField, java.lang.String value)
default boolean isModified(javax.swing.JTextField textField, int value, UINumericRange range)
default boolean isModified(javax.swing.JToggleButton toggleButton, boolean value)
default <T> boolean isModified(ComboBox<T> comboBox, T value)
default javax.swing.JComponent getPreferredFocusedComponent()