mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-04 23:39:07 +07:00
highlighting: more logging in case of heavy processing running
GitOrigin-RevId: b688ff690eb905572bc5ae71958f220633061ea3
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b2b55f74cd
commit
669c8df167
@@ -1263,8 +1263,6 @@ public final class DaemonCodeAnalyzerImpl extends DaemonCodeAnalyzerEx
|
||||
ApplicationManager.getApplication().assertIsNonDispatchThread();
|
||||
try {
|
||||
ProgressManager.getInstance().executeProcessUnderProgress(Context.current().wrap(() -> {
|
||||
// wait for heavy processing to stop, re-schedule daemon but not too soon
|
||||
boolean heavyProcessIsRunning = heavyProcessIsRunning();
|
||||
HighlightingPass[] passes = ReadAction.compute(() -> {
|
||||
if (progress.isCanceled() ||
|
||||
myProject.isDisposed() ||
|
||||
@@ -1290,8 +1288,12 @@ public final class DaemonCodeAnalyzerImpl extends DaemonCodeAnalyzerEx
|
||||
if (passesToIgnore.length != 0) {
|
||||
r = ContainerUtil.findAllAsArray(r, pass->!(pass instanceof TextEditorHighlightingPass te) || ArrayUtil.indexOf(passesToIgnore, te.getId()) == -1);
|
||||
}
|
||||
if (heavyProcessIsRunning) {
|
||||
// wait for heavy processing to stop, re-schedule daemon but not too soon
|
||||
if (heavyProcessIsRunning()) {
|
||||
r = ContainerUtil.findAllAsArray(r, o -> DumbService.isDumbAware(o));
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("submitInBackground: heavyProcessIsRunning=true, so only these passes are created: " + Arrays.toString(r));
|
||||
}
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user