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, waitinitializeComponent, noStateLoadedpublic 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)
PersistentStateComponentState 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.XmlSerializerpublic boolean shouldHighlight(PsiElement psiRoot)
HighlightingLevelManagershouldHighlight in class HighlightingLevelManagerpublic boolean shouldInspect(PsiElement psiRoot)
HighlightingLevelManagershouldInspect in class HighlightingLevelManager