diff --git a/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/RefreshQueueImpl.java b/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/RefreshQueueImpl.java index d48ccf44b887..8fa1c638613b 100644 --- a/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/RefreshQueueImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/RefreshQueueImpl.java @@ -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(); } diff --git a/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/RefreshSessionImpl.java b/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/RefreshSessionImpl.java index 8e9f1c6cfa9e..5da732d46532 100644 --- a/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/RefreshSessionImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/RefreshSessionImpl.java @@ -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 myWorkQueue = new ArrayList(); private List myEvents = new ArrayList(); - 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 workQueue = myWorkQueue; myWorkQueue = new ArrayList(); boolean hasEventsToFire = myFinishRunnable != null || !myEvents.isEmpty();