public final class DaemonCodeAnalyzerImpl extends DaemonCodeAnalyzerEx implements PersistentStateComponent<Element>, Disposable
DaemonCodeAnalyzer.DaemonListener, DaemonCodeAnalyzer.DaemonListenerAdapter
Disposable.Parent
DAEMON_EVENT_TOPIC
Constructor and Description |
---|
DaemonCodeAnalyzerImpl(Project project) |
Modifier and Type | Method and Description |
---|---|
void |
addFileLevelHighlight(Project project,
int group,
HighlightInfo info,
PsiFile psiFile) |
void |
autoImportReferenceAtCursor(Editor editor,
PsiFile file) |
void |
cleanFileLevelHighlights(Project project,
int group,
PsiFile psiFile) |
void |
cleanupAfterTest() |
void |
disableUpdateByTimer(Disposable parentDisposable) |
void |
dispose()
Usually not invoked directly, see class javadoc.
|
HighlightInfo |
findHighlightByOffset(Document document,
int offset,
boolean includeFixRange) |
HighlightInfo |
findHighlightsByOffset(Document document,
int offset,
boolean includeFixRange,
boolean highestPriorityOnly,
HighlightSeverity minSeverity)
Collects HighlightInfos intersecting with a certain offset.
|
java.util.List<HighlightInfo> |
getFileLevelHighlights(Project project,
PsiFile file) |
FileStatusMap |
getFileStatusMap() |
static java.util.List<HighlightInfo> |
getHighlights(Document document,
HighlightSeverity minSeverity,
Project project) |
static java.util.List<HighlightInfo> |
getHighlights(Editor editor,
HighlightSeverity minSeverity,
Project project) |
static java.util.List<LineMarkerInfo<?>> |
getLineMarkers(Document document,
Project project) |
java.util.List<TextEditorHighlightingPass> |
getPassesToShowProgressFor(Document document) |
Element |
getState() |
DaemonProgressIndicator |
getUpdateProgress() |
boolean |
isAutohintsAvailable(PsiFile file) |
boolean |
isErrorAnalyzingFinished(PsiFile file) |
boolean |
isHighlightingAvailable(PsiFile file) |
boolean |
isImportHintsEnabled(PsiFile file) |
boolean |
isRunning() |
boolean |
isRunningOrPending() |
void |
loadState(Element state)
This method is called when new component state is loaded.
|
void |
mustWaitForSmartMode(boolean mustWait,
Disposable parent) |
void |
prepareForTest() |
void |
resetImportHintsEnabledForProject() |
void |
restart()
Force re-highlighting for all files.
|
void |
restart(PsiFile file)
Force re-highlighting for a specific file.
|
void |
runLocalInspectionPassAfterCompletionOfGeneralHighlightPass(boolean flag) |
java.util.List<HighlightInfo> |
runMainPasses(PsiFile psiFile,
Document document,
ProgressIndicator progress) |
void |
runPasses(PsiFile file,
Document document,
java.util.List<? extends TextEditor> textEditors,
int [] toIgnore,
boolean canChangeDocument,
java.lang.Runnable callbackWhileWaiting) |
void |
setHighlightingEnabled(PsiFile file,
boolean value) |
void |
setImportHintsEnabled(PsiFile file,
boolean value) |
void |
settingsChanged() |
void |
setUpdateByTimerEnabled(boolean value) |
void |
waitForTermination() |
getInstanceEx, processHighlights, processHighlights
getInstance, updateVisibleHighlighters
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initializeComponent, noStateLoaded
public DaemonCodeAnalyzerImpl(Project project)
public void dispose()
Disposable
dispose
in interface Disposable
public static java.util.List<HighlightInfo> getHighlights(Document document, HighlightSeverity minSeverity, Project project)
public static java.util.List<HighlightInfo> getHighlights(Editor editor, HighlightSeverity minSeverity, Project project)
public java.util.List<HighlightInfo> getFileLevelHighlights(Project project, PsiFile file)
getFileLevelHighlights
in class DaemonCodeAnalyzerEx
public void cleanFileLevelHighlights(Project project, int group, PsiFile psiFile)
cleanFileLevelHighlights
in class DaemonCodeAnalyzerEx
public void addFileLevelHighlight(Project project, int group, HighlightInfo info, PsiFile psiFile)
addFileLevelHighlight
in class DaemonCodeAnalyzerEx
public java.util.List<HighlightInfo> runMainPasses(PsiFile psiFile, Document document, ProgressIndicator progress)
runMainPasses
in class DaemonCodeAnalyzerEx
public void mustWaitForSmartMode(boolean mustWait, Disposable parent)
public void runPasses(PsiFile file, Document document, java.util.List<? extends TextEditor> textEditors, int [] toIgnore, boolean canChangeDocument, java.lang.Runnable callbackWhileWaiting) throws ProcessCanceledException
ProcessCanceledException
public void prepareForTest()
public void cleanupAfterTest()
public void waitForTermination()
public void settingsChanged()
settingsChanged
in class DaemonCodeAnalyzer
public void setUpdateByTimerEnabled(boolean value)
setUpdateByTimerEnabled
in class DaemonCodeAnalyzer
public void disableUpdateByTimer(Disposable parentDisposable)
disableUpdateByTimer
in class DaemonCodeAnalyzer
public void setImportHintsEnabled(PsiFile file, boolean value)
setImportHintsEnabled
in class DaemonCodeAnalyzer
public void resetImportHintsEnabledForProject()
resetImportHintsEnabledForProject
in class DaemonCodeAnalyzer
public void setHighlightingEnabled(PsiFile file, boolean value)
setHighlightingEnabled
in class DaemonCodeAnalyzer
public boolean isHighlightingAvailable(PsiFile file)
isHighlightingAvailable
in class DaemonCodeAnalyzer
public boolean isImportHintsEnabled(PsiFile file)
isImportHintsEnabled
in class DaemonCodeAnalyzer
public boolean isAutohintsAvailable(PsiFile file)
isAutohintsAvailable
in class DaemonCodeAnalyzer
public void restart()
DaemonCodeAnalyzer
restart
in class DaemonCodeAnalyzer
public void restart(PsiFile file)
DaemonCodeAnalyzer
restart
in class DaemonCodeAnalyzer
file
- the file to rehighlight.public java.util.List<TextEditorHighlightingPass> getPassesToShowProgressFor(Document document)
public boolean isErrorAnalyzingFinished(PsiFile file)
isErrorAnalyzingFinished
in class DaemonCodeAnalyzerEx
public FileStatusMap getFileStatusMap()
getFileStatusMap
in class DaemonCodeAnalyzerEx
public boolean isRunning()
public boolean isRunningOrPending()
public HighlightInfo findHighlightByOffset(Document document, int offset, boolean includeFixRange)
public HighlightInfo findHighlightsByOffset(Document document, int offset, boolean includeFixRange, boolean highestPriorityOnly, HighlightSeverity minSeverity)
document
- document in which the collecting is performedoffset
- offset which infos should intersect with to be collectedincludeFixRange
- states whether the rage of a fix associated with an info should be taken into account during the range checkinghighestPriorityOnly
- states whether to include all infos or only the ones with the highest HighlightSeverityminSeverity
- the minimum HighlightSeverity starting from which infos are considered for collectionpublic static java.util.List<LineMarkerInfo<?>> getLineMarkers(Document document, 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 state)
PersistentStateComponent
State object should be used directly, defensive copying is not required.
loadState
in interface PersistentStateComponent<Element>
state
- loaded component stateXmlSerializerUtil.copyBean(Object, Object)
public void autoImportReferenceAtCursor(Editor editor, PsiFile file)
autoImportReferenceAtCursor
in class DaemonCodeAnalyzer
public DaemonProgressIndicator getUpdateProgress()
public void runLocalInspectionPassAfterCompletionOfGeneralHighlightPass(boolean flag)