public class HighlightingSettingsPerFile extends HighlightingLevelManager implements PersistentStateComponent<Element>
Constructor and Description |
---|
HighlightingSettingsPerFile(Project project,
MessageBus bus) |
Modifier and Type | Method and Description |
---|---|
FileHighlightingSetting |
getHighlightingSettingForRoot(PsiElement root) |
static HighlightingSettingsPerFile |
getInstance(Project project) |
Element |
getState() |
void |
loadState(Element element)
This method is called when new component state is loaded.
|
void |
setHighlightingSettingForRoot(PsiElement root,
FileHighlightingSetting setting) |
boolean |
shouldHighlight(PsiElement psiRoot)
>= Syntax level
|
boolean |
shouldInspect(PsiElement psiRoot)
>= Inspections level
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initializeComponent, noStateLoaded
public HighlightingSettingsPerFile(Project project, MessageBus bus)
public static HighlightingSettingsPerFile getInstance(Project project)
public FileHighlightingSetting getHighlightingSettingForRoot(PsiElement root)
public void setHighlightingSettingForRoot(PsiElement root, FileHighlightingSetting setting)
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 boolean shouldHighlight(PsiElement psiRoot)
HighlightingLevelManager
shouldHighlight
in class HighlightingLevelManager
public boolean shouldInspect(PsiElement psiRoot)
HighlightingLevelManager
shouldInspect
in class HighlightingLevelManager