use of com.intellij.codeInsight.daemon.impl.analysis.HighlightingLevelManager in project intellij-community by JetBrains.
the class HectorComponent method isModified.
private boolean isModified() {
final FileViewProvider viewProvider = myFile.getViewProvider();
for (Language language : mySliders.keySet()) {
JSlider slider = mySliders.get(language);
final PsiFile root = viewProvider.getPsi(language);
HighlightingLevelManager highlightingLevelManager = HighlightingLevelManager.getInstance(myFile.getProject());
if (root != null && getValue(highlightingLevelManager.shouldHighlight(root), highlightingLevelManager.shouldInspect(root)) != slider.getValue()) {
return true;
}
}
for (HectorComponentPanel panel : myAdditionalPanels) {
if (panel.isModified()) {
return true;
}
}
return false;
}
use of com.intellij.codeInsight.daemon.impl.analysis.HighlightingLevelManager in project intellij-community by JetBrains.
the class LineMarkersPass method doCollectInformation.
@Override
public void doCollectInformation(@NotNull ProgressIndicator progress) {
final List<LineMarkerInfo> lineMarkers = new ArrayList<>();
FileViewProvider viewProvider = myFile.getViewProvider();
for (Language language : viewProvider.getLanguages()) {
final PsiFile root = viewProvider.getPsi(language);
HighlightingLevelManager highlightingLevelManager = HighlightingLevelManager.getInstance(myProject);
if (!highlightingLevelManager.shouldHighlight(root))
continue;
Divider.divideInsideAndOutsideInOneRoot(root, myRestrictRange, myPriorityBounds, elements -> {
Collection<LineMarkerProvider> providers = getMarkerProviders(language, myProject);
List<LineMarkerProvider> providersList = new ArrayList<>(providers);
queryProviders(elements.inside, root, providersList, (element, info) -> {
lineMarkers.add(info);
ApplicationManager.getApplication().invokeLater(() -> LineMarkersUtil.addLineMarkerToEditorIncrementally(myProject, getDocument(), info), myProject.getDisposed());
});
queryProviders(elements.outside, root, providersList, (element, info) -> lineMarkers.add(info));
return true;
});
}
myMarkers = mergeLineMarkers(lineMarkers, getDocument());
if (LOG.isDebugEnabled()) {
LOG.debug("LineMarkersPass.doCollectInformation. lineMarkers: " + lineMarkers + "; merged: " + myMarkers);
}
}
Aggregations