mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user