当前位置: 首页>>代码示例>>Java>>正文


Java StatusBar.addWidget方法代码示例

本文整理汇总了Java中com.intellij.openapi.wm.StatusBar.addWidget方法的典型用法代码示例。如果您正苦于以下问题:Java StatusBar.addWidget方法的具体用法?Java StatusBar.addWidget怎么用?Java StatusBar.addWidget使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.openapi.wm.StatusBar的用法示例。


在下文中一共展示了StatusBar.addWidget方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: installGtmWidget

import com.intellij.openapi.wm.StatusBar; //导入方法依赖的package包/类
private void installGtmWidget() {
    StatusBar statusBar = WindowManager.getInstance().getStatusBar(myProject);
    if (statusBar != null) {
        statusBar.addWidget(myStatusWidget, myProject);
        myStatusWidget.installed();
        if (!GTMRecord.initGtmExePath()) {
            JBPopupFactory.getInstance()
                    .createHtmlTextBalloonBuilder(GTMConfig.getInstance().gtmNotFound, ERROR, null)
                    .setFadeoutTime(30000)
                    .createBalloon()
                    .show(RelativePoint.getSouthEastOf(statusBar.getComponent()),
                            Balloon.Position.atRight);
            return;
        }
        if (!GTMRecord.checkVersion()) {
            JBPopupFactory.getInstance()
                    .createHtmlTextBalloonBuilder(GTMConfig.getInstance().gtmVerOutdated, WARNING, null)
                    .setFadeoutTime(30000)
                    .createBalloon()
                    .show(RelativePoint.getSouthEastOf(statusBar.getComponent()),
                            Balloon.Position.atRight);
        }
    }
}
 
开发者ID:git-time-metric,项目名称:gtm-jetbrains-plugin,代码行数:25,代码来源:GTMProject.java

示例2: 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

示例3: addStepicWidget

import com.intellij.openapi.wm.StatusBar; //导入方法依赖的package包/类
private void addStepicWidget() {
  StudyStepicUserWidget widget = StudyUtils.getStepicWidget();
  if (widget == null) {
    StatusBar statusBar = WindowManager.getInstance().getStatusBar(myProject);
    statusBar.addWidget(new StudyStepicUserWidget(), "before Position");
  }
  else {
    widget.update();
  }
}
 
开发者ID:medvector,项目名称:educational-plugin,代码行数:11,代码来源:StudyProjectComponent.java

示例4: install

import com.intellij.openapi.wm.StatusBar; //导入方法依赖的package包/类
private void install() {
    StatusBar statusBar = WindowManager.getInstance().getStatusBar(myProject);
    if (statusBar != null) {
        statusBar.addWidget(myStatusWidget, myProject);
        myStatusWidget.installed();
    }
}
 
开发者ID:WesleyElliott,项目名称:IntelliJ-TimeTracker,代码行数:8,代码来源:StatusBarManager.java

示例5: installDefaultProjectStatusBarWidgets

import com.intellij.openapi.wm.StatusBar; //导入方法依赖的package包/类
private void installDefaultProjectStatusBarWidgets(@NotNull final Project project) {
  final StatusBar statusBar = getStatusBar();

  final PositionPanel positionPanel = new PositionPanel(project);
  statusBar.addWidget(positionPanel, "before " + IdeMessagePanel.FATAL_ERROR);

  final IdeNotificationArea notificationArea = new IdeNotificationArea();
  statusBar.addWidget(notificationArea, "before " + IdeMessagePanel.FATAL_ERROR);

  final EncodingPanel encodingPanel = new EncodingPanel(project);
  statusBar.addWidget(encodingPanel, "after Position");

  final LineSeparatorPanel lineSeparatorPanel = new LineSeparatorPanel(project);
  statusBar.addWidget(lineSeparatorPanel, "before " + encodingPanel.ID());

  final ToggleReadOnlyAttributePanel readOnlyAttributePanel = new ToggleReadOnlyAttributePanel(project);

  final InsertOverwritePanel insertOverwritePanel = new InsertOverwritePanel(project);
  statusBar.addWidget(insertOverwritePanel, "after Encoding");
  statusBar.addWidget(readOnlyAttributePanel, "after InsertOverwrite");

  Disposer.register(project, new Disposable() {
    public void dispose() {
      statusBar.removeWidget(encodingPanel.ID());
      statusBar.removeWidget(lineSeparatorPanel.ID());
      statusBar.removeWidget(positionPanel.ID());
      statusBar.removeWidget(notificationArea.ID());
      statusBar.removeWidget(readOnlyAttributePanel.ID());
      statusBar.removeWidget(insertOverwritePanel.ID());

      ((StatusBarEx)statusBar).removeCustomIndicationComponents();
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:35,代码来源:IdeFrameImpl.java

示例6: startRecording

import com.intellij.openapi.wm.StatusBar; //导入方法依赖的package包/类
public void startRecording(String macroName) {
  LOG.assertTrue(!myIsRecording);
  myIsRecording = true;
  myRecordingMacro = new ActionMacro(macroName);

  final StatusBar statusBar = WindowManager.getInstance().getIdeFrame(null).getStatusBar();
  myWidget = new Widget(statusBar);
  statusBar.addWidget(myWidget);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:ActionMacroManager.java

示例7: activate

import com.intellij.openapi.wm.StatusBar; //导入方法依赖的package包/类
@CalledInAwt
public void activate() {
  MessageBusConnection busConnection = myProject.getMessageBus().connect();
  busConnection.subscribe(HgVcs.STATUS_TOPIC, this);
  busConnection.subscribe(HgVcs.INCOMING_OUTGOING_CHECK_TOPIC, this);

  StatusBar statusBar = WindowManager.getInstance().getStatusBar(myProject);
  if (null != statusBar && isVisible()) {
    statusBar.addWidget(this, myProject);
    isAlreadyShown = true;
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:HgIncomingOutgoingWidget.java

示例8: 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

示例9: projectOpened

import com.intellij.openapi.wm.StatusBar; //导入方法依赖的package包/类
public void projectOpened() {
    StatusBar statusBar = WindowManager.getInstance().getStatusBar(project);
    if (statusBar != null) {
        ContainerStatusBarWidget containerStatusBarWidget = new ContainerStatusBarWidget(project);
        statusBar.addWidget(containerStatusBarWidget);

        containerStatusBarWidget.setText("");
    }

    ContainerResolver.put(project, new JsonFileContainer(project, Configuration.getInstance(project).containerDefinitionFileName));
}
 
开发者ID:Sorien,项目名称:silex-idea-plugin,代码行数:12,代码来源:ProjectComponent.java

示例10: install

import com.intellij.openapi.wm.StatusBar; //导入方法依赖的package包/类
private void install() {
  StatusBar statusBar = WindowManager.getInstance().getStatusBar(project);
  if (statusBar != null) {
    statusBar.addWidget(statusWidget, project);
    statusWidget.installed();
  }
}
 
开发者ID:zielu,项目名称:GitToolBox,代码行数:8,代码来源:StatusBarManager.java

示例11: installDefaultProjectStatusBarWidgets

import com.intellij.openapi.wm.StatusBar; //导入方法依赖的package包/类
private void installDefaultProjectStatusBarWidgets(@NotNull final Project project) {
  final StatusBar statusBar = getStatusBar();

  final PositionPanel positionPanel = new PositionPanel(project);
  statusBar.addWidget(positionPanel, "before " + IdeMessagePanel.FATAL_ERROR);

  final IdeNotificationArea notificationArea = new IdeNotificationArea();
  statusBar.addWidget(notificationArea, "before " + IdeMessagePanel.FATAL_ERROR);

  final EncodingPanel encodingPanel = new EncodingPanel(project);
  statusBar.addWidget(encodingPanel, "after Position");

  final LineSeparatorPanel lineSeparatorPanel = new LineSeparatorPanel(project);
  statusBar.addWidget(lineSeparatorPanel, "before " + encodingPanel.ID());

  final ToggleReadOnlyAttributePanel readOnlyAttributePanel = new ToggleReadOnlyAttributePanel();

  InsertOverwritePanel insertOverwritePanel = null;
  if (!SystemInfo.isMac) {
    insertOverwritePanel = new InsertOverwritePanel(project);
    statusBar.addWidget(insertOverwritePanel, "after Encoding");
    statusBar.addWidget(readOnlyAttributePanel, "after InsertOverwrite");
  } else {
    statusBar.addWidget(readOnlyAttributePanel, "after Encoding");
  }

  final InsertOverwritePanel finalInsertOverwritePanel = insertOverwritePanel;
  Disposer.register(project, new Disposable() {
    public void dispose() {
      statusBar.removeWidget(encodingPanel.ID());
      statusBar.removeWidget(lineSeparatorPanel.ID());
      statusBar.removeWidget(positionPanel.ID());
      statusBar.removeWidget(notificationArea.ID());
      statusBar.removeWidget(readOnlyAttributePanel.ID());
      if (finalInsertOverwritePanel != null) statusBar.removeWidget(finalInsertOverwritePanel.ID());

      ((StatusBarEx)statusBar).removeCustomIndicationComponents();
    }
  });
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:41,代码来源:IdeFrameImpl.java

示例12: activate

import com.intellij.openapi.wm.StatusBar; //导入方法依赖的package包/类
public void activate() {
  myBusConnection = myProject.getMessageBus().connect();
  myBusConnection.subscribe(HgVcs.STATUS_TOPIC, this);
  myBusConnection.subscribe(HgVcs.INCOMING_OUTGOING_CHECK_TOPIC, this);

  StatusBar statusBar = WindowManager.getInstance().getStatusBar(myProject);
  if (null != statusBar && isVisible()) {
    statusBar.addWidget(this, myProject);
    isAlreadyShown = true;
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:12,代码来源:HgIncomingOutgoingWidget.java

示例13: show

import com.intellij.openapi.wm.StatusBar; //导入方法依赖的package包/类
public void show() {
  if (isAlreadyShown) {
    return;
  }
  StatusBar statusBar = WindowManager.getInstance().getStatusBar(myProject);
  if (null != statusBar && isVisible()) {
    statusBar.addWidget(this, myProject);
    isAlreadyShown = true;
    myProject.getMessageBus().syncPublisher(HgVcs.REMOTE_TOPIC).update(myProject, null);
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:12,代码来源:HgIncomingOutgoingWidget.java

示例14: projectOpened

import com.intellij.openapi.wm.StatusBar; //导入方法依赖的package包/类
@Override
public void projectOpened() {

    StatusBar statusBar = WindowManager.getInstance().getStatusBar(myProject);
    if (statusBar != null) {
        statusBar.addWidget(new FileLanguagePanel(myProject));
    }
}
 
开发者ID:mfedko,项目名称:idea-file-language,代码行数:9,代码来源:FileLanguageProjectComponent.java

示例15: projectOpened

import com.intellij.openapi.wm.StatusBar; //导入方法依赖的package包/类
@Override
public void projectOpened() {
    if (!ApplicationManager.getApplication().isHeadlessEnvironment()) {
        myBranchWidget = new SvnBranchWidget(myProject);
        StatusBar statusBar = WindowManager.getInstance().getStatusBar(myProject);
        if (statusBar != null) {
            statusBar.addWidget(myBranchWidget, myProject);
        }
    }
    LOG.debug("Project opened");
}
 
开发者ID:zielu,项目名称:SVNToolBox,代码行数:12,代码来源:SvnToolBoxProject.java


注:本文中的com.intellij.openapi.wm.StatusBar.addWidget方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。