Java Code Examples for com.intellij.openapi.wm.IdeFrame#getStatusBar()

The following examples show how to use com.intellij.openapi.wm.IdeFrame#getStatusBar() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ShowProcessWindowAction.java    From consulo with Apache License 2.0 5 votes vote down vote up
@Override
public void setSelected(AnActionEvent e, final boolean state) {
  IdeFrame frame = IdeFrameUtil.findFocusedRootIdeFrame();
  StatusBarEx statusBar = frame == null ? null : (StatusBarEx)frame.getStatusBar();

  if(statusBar != null) {
    statusBar.setProcessWindowOpen(state);
  }
}
 
Example 2
Source File: BackgroundableProcessIndicator.java    From consulo with Apache License 2.0 5 votes vote down vote up
public BackgroundableProcessIndicator(@Nullable final Project project, @Nonnull TaskInfo info, @Nonnull PerformInBackgroundOption option) {
  super(info.isCancellable(), true, project, info.getCancelText());
  setOwnerTask(info);
  myOption = option;
  myInfo = info;
  setTitle(info.getTitle());
  final Project nonDefaultProject = project == null || project.isDisposed() ? null : project.isDefault() ? null : project;
  final IdeFrame frame = ((WindowManagerEx)WindowManager.getInstance()).findFrameFor(nonDefaultProject);
  myStatusBar = frame != null ? (StatusBarEx)frame.getStatusBar() : null;
  myBackgrounded = shouldStartInBackground();
  if (myBackgrounded) {
    doBackground();
  }
}
 
Example 3
Source File: ActionMenu.java    From consulo with Apache License 2.0 5 votes vote down vote up
public static void showDescriptionInStatusBar(boolean isIncluded, Component component, String description) {
  IdeFrame ideFrame = null;
  if (component instanceof Window) {
    ideFrame = TargetAWT.from((Window)component).getUserData(IdeFrame.KEY);
  }

  if (ideFrame == null) {
    ideFrame = DesktopIdeFrameUtil.findIdeFrameFromParent(component);
  }

  StatusBar statusBar;
  if (ideFrame != null && (statusBar = ideFrame.getStatusBar()) != null) {
    statusBar.setInfo(isIncluded ? description : null);
  }
}
 
Example 4
Source File: ShowProcessWindowAction.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
public boolean isSelected(final AnActionEvent e) {
  IdeFrame frame = IdeFrameUtil.findFocusedRootIdeFrame();
  StatusBarEx statusBar = frame == null ? null : (StatusBarEx)frame.getStatusBar();
  return statusBar != null && statusBar.isProcessWindowOpen();
}