public abstract class PerFileMappingsBase<T> extends java.lang.Object implements PersistentStateComponent<Element>, PerFileMappings<T>, Disposable
Disposable.Parent
Constructor and Description |
---|
PerFileMappingsBase() |
Modifier and Type | Method and Description |
---|---|
void |
cleanupForNextTest() |
void |
dispose()
Usually not invoked directly, see class javadoc.
|
abstract java.util.List<T> |
getAvailableValues() |
T |
getConfiguredMapping(VirtualFile file) |
T |
getDefaultMapping(VirtualFile file) |
T |
getDirectlyConfiguredMapping(VirtualFile file) |
protected FilePropertyPusher<T> |
getFilePropertyPusher() |
T |
getImmediateMapping(VirtualFile file) |
T |
getMapping(VirtualFile file) |
java.util.Map<VirtualFile,T> |
getMappings() |
protected T |
getNotInHierarchy(VirtualFile file,
java.util.Map<VirtualFile,T> mappings) |
protected Project |
getProject() |
Element |
getState() |
protected java.lang.String |
getValueAttribute()
Deprecated.
|
protected T |
handleUnknownMapping(VirtualFile file,
java.lang.String value) |
boolean |
hasMappings() |
void |
loadState(Element element)
This method is called when new component state is loaded.
|
protected abstract java.lang.String |
serialize(T t) |
void |
setMapping(VirtualFile file,
T value) |
void |
setMappings(java.util.Map<VirtualFile,T> mappings) |
protected boolean |
shouldReparseFiles() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initializeComponent, noStateLoaded
public void dispose()
Disposable
dispose
in interface Disposable
protected FilePropertyPusher<T> getFilePropertyPusher()
protected Project getProject()
public java.util.Map<VirtualFile,T> getMappings()
getMappings
in interface PerFileMappings<T>
public T getMapping(VirtualFile file)
getMapping
in interface PerFileMappings<T>
public T getConfiguredMapping(VirtualFile file)
public T getDirectlyConfiguredMapping(VirtualFile file)
protected T getNotInHierarchy(VirtualFile file, java.util.Map<VirtualFile,T> mappings)
public T getDefaultMapping(VirtualFile file)
getDefaultMapping
in interface PerFileMappings<T>
public T getImmediateMapping(VirtualFile file)
public void setMappings(java.util.Map<VirtualFile,T> mappings)
setMappings
in interface PerFileMappings<T>
public void setMapping(VirtualFile file, T value)
setMapping
in interface PerFileMappings<T>
public abstract java.util.List<T> getAvailableValues()
protected abstract java.lang.String serialize(T t)
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
protected T handleUnknownMapping(VirtualFile file, java.lang.String value)
@Deprecated protected java.lang.String getValueAttribute()
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 cleanupForNextTest()
protected boolean shouldReparseFiles()
public boolean hasMappings()