當前位置: 首頁>>代碼示例>>Java>>正文


Java StatusBar.getWidget方法代碼示例

本文整理匯總了Java中com.intellij.openapi.wm.StatusBar.getWidget方法的典型用法代碼示例。如果您正苦於以下問題:Java StatusBar.getWidget方法的具體用法?Java StatusBar.getWidget怎麽用?Java StatusBar.getWidget使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.intellij.openapi.wm.StatusBar的用法示例。


在下文中一共展示了StatusBar.getWidget方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: projectOpened

import com.intellij.openapi.wm.StatusBar; //導入方法依賴的package包/類
public void projectOpened() {
    this.checkProject();

    // attach toolbar popup (right bottom)
    StatusBar statusBar = WindowManager.getInstance().getStatusBar(this.project);
    if(statusBar == null) {
        return;
    }

    // clean bar on project open; we can have multiple projects att some time
    if(statusBar.getWidget(SymfonyProfilerWidget.ID) != null) {
        statusBar.removeWidget(SymfonyProfilerWidget.ID);
    }

    if(isEnabled()) {
        SymfonyProfilerWidget symfonyProfilerWidget = new SymfonyProfilerWidget(this.project);
        statusBar.addWidget(symfonyProfilerWidget);
    }

}
 
開發者ID:Haehnchen,項目名稱:idea-php-symfony2-plugin,代碼行數:21,代碼來源:Symfony2ProjectComponent.java

示例2: openFatals

import com.intellij.openapi.wm.StatusBar; //導入方法依賴的package包/類
private static void openFatals(HyperlinkEvent event, LogMessage message) {
  Object source = event.getSource();
  if (source instanceof Component) {
    Window window = SwingUtilities.getWindowAncestor((Component)source);
    if (window instanceof IdeFrame) {
      final StatusBar statusBar = ((IdeFrame)window).getStatusBar();
      StatusBarWidget widget = statusBar == null ? null : statusBar.getWidget(IdeMessagePanel.FATAL_ERROR);
      if (widget instanceof IdeMessagePanel) {
        ((IdeMessagePanel)widget).openFatals(message);
      }
    }
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:14,代碼來源:ErrorNotifier.java

示例3: updateWidgets

import com.intellij.openapi.wm.StatusBar; //導入方法依賴的package包/類
private static void updateWidgets(final StatusBar statusBar, final Project project, final boolean allowPrompt) {
    // Update the build widget
    BuildWidget buildWidget = (BuildWidget) statusBar.getWidget(BuildWidget.getID());
    if (buildWidget == null) {
        buildWidget = new BuildWidget();
        statusBar.addWidget(buildWidget, project);
    }
    // Attempt to get the current repository context (if none, then the status stays as it was)
    final RepositoryContext repositoryContext = VcsHelper.getRepositoryContext(project);
    if (repositoryContext != null) {
        final BuildWidget widget = buildWidget;

        // Create the operation and start the background work to get the latest build information
        final BuildStatusLookupOperation op = OperationFactory.createBuildStatusLookupOperation(repositoryContext, allowPrompt);
        op.addListener(new Operation.Listener() {
            @Override
            public void notifyLookupStarted() { /* do nothing */ }

            @Override
            public void notifyLookupCompleted() { /* do nothing */ }

            @Override
            public void notifyLookupResults(final Operation.Results results) {
                updateBuildWidget(project, statusBar, widget, (BuildStatusLookupOperation.BuildStatusResults) results);
            }
        });
        op.doWorkAsync(null);

    } else {
        // The repository hasn't been opened yet, we should get an event when it is opened
    }
}
 
開發者ID:Microsoft,項目名稱:vso-intellij,代碼行數:33,代碼來源:StatusBarManager.java

示例4: removeWidgets

import com.intellij.openapi.wm.StatusBar; //導入方法依賴的package包/類
private static void removeWidgets(final Project project) {
    final StatusBar statusBar = WindowManager.getInstance().getStatusBar(project);
    if (statusBar != null) {
        // Remove build widget
        if (statusBar.getWidget(BuildWidget.getID()) != null) {
            statusBar.removeWidget(BuildWidget.getID());
        }
    }
}
 
開發者ID:Microsoft,項目名稱:vso-intellij,代碼行數:10,代碼來源:StatusBarManager.java


注:本文中的com.intellij.openapi.wm.StatusBar.getWidget方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。