mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
test fix
This commit is contained in:
+5
-4
@@ -66,6 +66,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.annotations.TestOnly;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
/**
|
||||
* This class also controls the auto-reparse and auto-hints.
|
||||
@@ -104,7 +105,7 @@ public class DaemonCodeAnalyzerImpl extends DaemonCodeAnalyzer implements JDOMEx
|
||||
private StatusBarUpdater myStatusBarUpdater;
|
||||
private final PassExecutorService myPassExecutorService;
|
||||
private static final Key<List<HighlightInfo>> HIGHLIGHTS_TO_REMOVE_KEY = Key.create("HIGHLIGHTS_TO_REMOVE");
|
||||
|
||||
private final AtomicInteger myModificationCount = new AtomicInteger();
|
||||
|
||||
public DaemonCodeAnalyzerImpl(Project project, DaemonCodeAnalyzerSettings daemonCodeAnalyzerSettings, EditorTracker editorTracker) {
|
||||
myProject = project;
|
||||
@@ -338,9 +339,8 @@ public class DaemonCodeAnalyzerImpl extends DaemonCodeAnalyzer implements JDOMEx
|
||||
return myFileStatusMap;
|
||||
}
|
||||
|
||||
@TestOnly
|
||||
public synchronized ProgressIndicator getUpdateProgress() {
|
||||
return myUpdateProgress;
|
||||
public int getModificationCount() {
|
||||
return myModificationCount.get();
|
||||
}
|
||||
|
||||
public synchronized boolean isRunning() {
|
||||
@@ -358,6 +358,7 @@ public class DaemonCodeAnalyzerImpl extends DaemonCodeAnalyzer implements JDOMEx
|
||||
|
||||
private synchronized void cancelUpdateProgress(final boolean start, @NonNls String reason) {
|
||||
PassExecutorService.log(myUpdateProgress, null, reason, start);
|
||||
myModificationCount.incrementAndGet();
|
||||
|
||||
if (myUpdateProgress != null) {
|
||||
myUpdateProgress.cancel();
|
||||
|
||||
Reference in New Issue
Block a user