mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Cleanup
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -57,10 +57,10 @@ public class RefreshQueueImpl extends RefreshQueue {
|
||||
}
|
||||
else {
|
||||
if (((ApplicationEx)application).holdsReadLock()) {
|
||||
LOG.error( "Do not call synchronous refresh from inside read action except for event dispatch thread. This will eventually cause deadlock if there are events to fire");
|
||||
LOG.error("Do not call synchronous refresh from inside read action except for event dispatch thread. " +
|
||||
"This will eventually cause deadlock if there are any events to fire");
|
||||
return;
|
||||
}
|
||||
|
||||
queueSession(session, ModalityState.defaultModalityState());
|
||||
session.waitFor();
|
||||
}
|
||||
|
||||
@@ -41,14 +41,13 @@ public class RefreshSessionImpl extends RefreshSession {
|
||||
private final boolean myIsAsync;
|
||||
private final boolean myIsRecursive;
|
||||
private final Runnable myFinishRunnable;
|
||||
private final ModalityState myModalityState;
|
||||
private final Semaphore mySemaphore = new Semaphore();
|
||||
|
||||
private List<VirtualFile> myWorkQueue = new ArrayList<VirtualFile>();
|
||||
private List<VFileEvent> myEvents = new ArrayList<VFileEvent>();
|
||||
private final Semaphore mySemaphore = new Semaphore();
|
||||
private volatile boolean iHaveEventsToFire;
|
||||
|
||||
private final ModalityState myModalityState;
|
||||
|
||||
public RefreshSessionImpl(final boolean isAsync, final boolean recursively, final Runnable finishRunnable) {
|
||||
this(isAsync, recursively, finishRunnable, ModalityState.NON_MODAL);
|
||||
}
|
||||
@@ -90,7 +89,6 @@ public class RefreshSessionImpl extends RefreshSession {
|
||||
}
|
||||
|
||||
public void scan() {
|
||||
// TODO: indicator in the status bar...
|
||||
List<VirtualFile> workQueue = myWorkQueue;
|
||||
myWorkQueue = new ArrayList<VirtualFile>();
|
||||
boolean hasEventsToFire = myFinishRunnable != null || !myEvents.isEmpty();
|
||||
|
||||
Reference in New Issue
Block a user