public class RecentsManager extends java.lang.Object implements PersistentStateComponent<Element>
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
NAME_ATTR |
Constructor and Description |
---|
RecentsManager() |
Modifier and Type | Method and Description |
---|---|
static RecentsManager |
getInstance(Project project) |
java.util.List<java.lang.String> |
getRecentEntries(java.lang.String key) |
Element |
getState() |
void |
loadState(Element element)
This method is called when new component state is loaded.
|
void |
registerRecentEntry(java.lang.String key,
java.lang.String recentEntry) |
void |
setRecentsNumberToKeep(int recentsNumberToKeep) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initializeComponent, noStateLoaded
protected static final java.lang.String NAME_ATTR
public static RecentsManager getInstance(Project project)
public java.util.List<java.lang.String> getRecentEntries(java.lang.String key)
public void registerRecentEntry(java.lang.String key, java.lang.String recentEntry)
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 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 setRecentsNumberToKeep(int recentsNumberToKeep)