Revert "getReady() for app ex"

This reverts commit 7c6362e7f9.
This commit is contained in:
Kirill Kalishev
2010-11-12 18:53:31 +03:00
parent 7c6362e7f9
commit e17c0a5bb4
4 changed files with 0 additions and 24 deletions
@@ -30,8 +30,6 @@ public interface BusyObject {
protected abstract boolean isReady();
public final void onReady() {
if (!isReady()) return;
ActionCallback[] ready = getReadyCallbacks(true);
for (ActionCallback each : ready) {
if (each != null) {
@@ -18,7 +18,6 @@ package com.intellij.openapi.application.ex;
import com.intellij.openapi.application.Application;
import com.intellij.openapi.progress.Task;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.ActionCallback;
import com.intellij.openapi.util.InvalidDataException;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -109,6 +108,4 @@ public interface ApplicationEx extends Application {
* @return true if action was run while holding the lock, false if was unable to get the lock and action was not run
*/
boolean tryRunReadAction(@NotNull Runnable action);
ActionCallback getActive(boolean requestor);
}
@@ -107,13 +107,6 @@ public class ApplicationImpl extends ComponentManagerImpl implements Application
private int myRestartCode = 0;
private volatile int myExitCode = 0;
private BusyObject.Impl myReady = new BusyObject.Impl() {
@Override
protected boolean isReady() {
return isActive();
}
};
private final AtomicBoolean mySaveSettingsIsInProgress = new AtomicBoolean(false);
@SuppressWarnings({"UseOfArchaicSystemPropertyAccessors"}) private static final int ourDumpThreadsOnLongWriteActionWaiting = Integer.getInteger(
System.getProperty("dump.threads.on.long.write.action.waiting"), 0);
@@ -1024,11 +1017,6 @@ public class ApplicationImpl extends ComponentManagerImpl implements Application
return true;
}
@Override
public ActionCallback getActive(boolean requestor) {
return myReady.getReady(this);
}
public boolean tryToApplyActivationState(boolean active, Window window) {
final Component frame = UIUtil.findUltimateParent(window);
@@ -1038,7 +1026,6 @@ public class ApplicationImpl extends ComponentManagerImpl implements Application
myActive = Boolean.valueOf(active);
System.setProperty("idea.active", Boolean.valueOf(myActive).toString());
if (active) {
myReady.onReady();
myDispatcher.getMulticaster().applicationActivated(ideFrame);
}
else {
@@ -26,7 +26,6 @@ import com.intellij.openapi.extensions.ExtensionPointName;
import com.intellij.openapi.extensions.Extensions;
import com.intellij.openapi.extensions.PluginId;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.ActionCallback;
import com.intellij.openapi.util.Computable;
import com.intellij.openapi.util.Condition;
import com.intellij.openapi.util.InvalidDataException;
@@ -329,9 +328,4 @@ public class MockApplication extends MockComponentManager implements Application
public boolean tryRunReadAction(@NotNull Runnable runnable) {
return false;
}
@Override
public ActionCallback getActive(boolean requestor) {
return new ActionCallback.Done();
}
}