public class ConfigurationManager extends java.lang.Object implements PersistentStateComponent<Element>
Constructor and Description |
---|
ConfigurationManager(Project project) |
Modifier and Type | Method and Description |
---|---|
void |
addHistoryConfiguration(Configuration configuration) |
Configuration |
findConfigurationByName(java.lang.String name) |
java.util.List<java.lang.String> |
getAllConfigurationNames() |
java.util.Collection<Configuration> |
getConfigurations() |
java.util.List<Configuration> |
getHistoryConfigurations() |
static ConfigurationManager |
getInstance(Project project) |
Configuration |
getMostRecentConfiguration() |
Element |
getState() |
void |
loadState(Element element)
This method is called when new component state is loaded.
|
static void |
readConfigurations(Element element,
java.util.Collection<? super Configuration> configurations) |
void |
removeConfiguration(Configuration configuration) |
static boolean |
showSaveTemplateAsDialog(java.util.Collection<Configuration> configurations,
Configuration newConfiguration,
Project project) |
boolean |
showSaveTemplateAsDialog(Configuration newConfiguration) |
static boolean |
showSaveTemplateAsDialog(Configuration newConfiguration,
Project project,
java.util.function.Predicate<? super java.lang.String> nameExistsPredicate,
java.util.function.Consumer<? super Configuration> namedConfigurationConsumer) |
static void |
writeConfigurations(Element element,
java.util.Collection<? extends Configuration> configurations) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initializeComponent, noStateLoaded
public ConfigurationManager(Project project)
public static ConfigurationManager getInstance(Project project)
public Element getState()
getState
in interface PersistentStateComponent<Element>
null
value indicates
that the returned state won't be stored, as a result previously stored state will be used.XmlSerializer
public void loadState(Element element)
PersistentStateComponent
State object should be used directly, defensive copying is not required.
loadState
in interface PersistentStateComponent<Element>
element
- loaded component stateXmlSerializerUtil.copyBean(Object, Object)
public void addHistoryConfiguration(Configuration configuration)
public Configuration getMostRecentConfiguration()
public void removeConfiguration(Configuration configuration)
public static void writeConfigurations(Element element, java.util.Collection<? extends Configuration> configurations)
public static void readConfigurations(Element element, java.util.Collection<? super Configuration> configurations)
public java.util.List<java.lang.String> getAllConfigurationNames()
public java.util.Collection<Configuration> getConfigurations()
public Configuration findConfigurationByName(java.lang.String name)
public java.util.List<Configuration> getHistoryConfigurations()
public boolean showSaveTemplateAsDialog(Configuration newConfiguration)
public static boolean showSaveTemplateAsDialog(Configuration newConfiguration, Project project, java.util.function.Predicate<? super java.lang.String> nameExistsPredicate, java.util.function.Consumer<? super Configuration> namedConfigurationConsumer)
public static boolean showSaveTemplateAsDialog(java.util.Collection<Configuration> configurations, Configuration newConfiguration, Project project)