API cleanup

This commit is contained in:
Roman Shevchenko
2012-12-11 13:37:28 +01:00
parent 618dc898ab
commit 0785ecb913
3 changed files with 8 additions and 5 deletions
@@ -66,6 +66,8 @@ public abstract class RefreshQueue {
session.launch();
}
/** @deprecated use {@linkplain #refresh(boolean, boolean, Runnable, ModalityState, VirtualFile...)} with {@linkplain ManagingFS#getLocalRoots()} (to remove in IDEA 13) */
@SuppressWarnings("UnusedDeclaration")
public abstract void refreshLocalRoots(boolean async, @Nullable Runnable postAction, @NotNull ModalityState modalityState);
public abstract void processSingleEvent(@NotNull VFileEvent event);
@@ -27,6 +27,7 @@ import com.intellij.openapi.progress.ProgressManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.project.ex.ProjectManagerEx;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.openapi.vfs.newvfs.ManagingFS;
import com.intellij.openapi.vfs.newvfs.NewVirtualFile;
import com.intellij.openapi.vfs.newvfs.RefreshQueue;
import com.intellij.util.Alarm;
@@ -159,7 +160,6 @@ public class SaveAndSyncHandlerImpl implements ApplicationComponent, SaveAndSync
LOG.debug("enter: synchronize()");
}
myRefreshDelayAlarm.cancelAllRequests();
myRefreshDelayAlarm.addRequest(new Runnable() {
@Override
@@ -178,11 +178,11 @@ public class SaveAndSyncHandlerImpl implements ApplicationComponent, SaveAndSync
}
public void maybeRefresh(@NotNull ModalityState modalityState) {
if (myBlockSyncOnFrameActivationCount.get() == 0 && GeneralSettings.getInstance().isSyncOnFrameActivation()) {
if (GeneralSettings.getInstance().isSyncOnFrameActivation() && myBlockSyncOnFrameActivationCount.get() == 0) {
if (LOG.isDebugEnabled()) {
LOG.debug("refresh VFS");
}
RefreshQueue.getInstance().refreshLocalRoots(true, null, modalityState);
RefreshQueue.getInstance().refresh(true, true, null, modalityState, ManagingFS.getInstance().getLocalRoots());
}
}
@@ -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.
@@ -19,6 +19,7 @@ import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.application.ModalityState;
import com.intellij.openapi.project.DumbAware;
import com.intellij.openapi.vfs.newvfs.ManagingFS;
import com.intellij.openapi.vfs.newvfs.RefreshQueue;
/**
@@ -26,6 +27,6 @@ import com.intellij.openapi.vfs.newvfs.RefreshQueue;
*/
public class RefreshFileChooserAction extends AnAction implements DumbAware {
public void actionPerformed(final AnActionEvent e) {
RefreshQueue.getInstance().refreshLocalRoots(true, null, ModalityState.current());
RefreshQueue.getInstance().refresh(true, true, null, ModalityState.current(), ManagingFS.getInstance().getLocalRoots());
}
}