Search in sources :

Example 1 with UiActivity

use of com.intellij.ide.UiActivity in project intellij-community by JetBrains.

the class ToolWindowImpl method activate.

@Override
public void activate(@Nullable final Runnable runnable, boolean autoFocusContents, boolean forced) {
    ApplicationManager.getApplication().assertIsDispatchThread();
    final UiActivity activity = new UiActivity.Focus("toolWindow:" + myId);
    UiActivityMonitor.getInstance().addActivity(myToolWindowManager.getProject(), activity, ModalityState.NON_MODAL);
    myToolWindowManager.activateToolWindow(myId, forced, autoFocusContents);
    getActivation().doWhenDone(() -> myToolWindowManager.invokeLater(() -> {
        if (runnable != null) {
            runnable.run();
        }
        UiActivityMonitor.getInstance().removeActivity(myToolWindowManager.getProject(), activity);
    }));
}
Also used : UiActivity(com.intellij.ide.UiActivity)

Aggregations

UiActivity (com.intellij.ide.UiActivity)1