当前位置: 首页>>代码示例>>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;未经允许,请勿转载。