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


Java StatusBar.setInfo方法代码示例

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


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

示例1: postRefresh

import com.intellij.openapi.wm.StatusBar; //导入方法依赖的package包/类
private static void postRefresh(Project project, VirtualFile[] files) {
  VcsDirtyScopeManager dirtyScopeManager = VcsDirtyScopeManager.getInstance(project);
  for (VirtualFile f : files) {
    if (f.isDirectory()) {
      dirtyScopeManager.dirDirtyRecursively(f);
    }
    else {
      dirtyScopeManager.fileDirty(f);
    }
  }

  StatusBar statusBar = WindowManager.getInstance().getStatusBar(project);
  if (statusBar != null) {
    statusBar.setInfo(IdeBundle.message("action.sync.completed.successfully", getMessage(files)));
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:SynchronizeCurrentFileAction.java

示例2: updateStatus

import com.intellij.openapi.wm.StatusBar; //导入方法依赖的package包/类
private void updateStatus() {
  Editor editor = FileEditorManager.getInstance(myProject).getSelectedTextEditor();
  if (editor == null || !editor.getContentComponent().hasFocus()){
    return;
  }

  final Document document = editor.getDocument();
  if (document instanceof DocumentEx && ((DocumentEx)document).isInBulkUpdate()) return;

  int offset = editor.getCaretModel().getOffset();
  DaemonCodeAnalyzer codeAnalyzer = DaemonCodeAnalyzer.getInstance(myProject);
  HighlightInfo info = ((DaemonCodeAnalyzerImpl)codeAnalyzer).findHighlightByOffset(document, offset, false, HighlightSeverity.WARNING);
  String text = info != null && info.getDescription() != null ? info.getDescription() : "";

  StatusBar statusBar = WindowManager.getInstance().getStatusBar(editor.getContentComponent(), myProject);
  if (statusBar != null && !text.equals(statusBar.getInfo())) {
    statusBar.setInfo(text, "updater");
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:StatusBarUpdater.java

示例3: actionPerformed

import com.intellij.openapi.wm.StatusBar; //导入方法依赖的package包/类
@Override
public void actionPerformed(AnActionEvent e) {
  final PsiElement[] elements = e.getData(LangDataKeys.PSI_ELEMENT_ARRAY);
  if (elements == null) return;
  final List<File> pycFiles = new ArrayList<File>();
  ProgressManager.getInstance().runProcessWithProgressSynchronously(new Runnable() {
    @Override
    public void run() {
      for (PsiElement element : elements) {
        PsiDirectory dir = (PsiDirectory) element;
        collectPycFiles(new File(dir.getVirtualFile().getPath()), pycFiles);
      }
      FileUtil.asyncDelete(pycFiles);
    }
  }, "Cleaning up .pyc files...", false, e.getProject());
  final StatusBar statusBar = WindowManager.getInstance().getIdeFrame(e.getProject()).getStatusBar();
  statusBar.setInfo("Deleted " + pycFiles.size() + " bytecode file" + (pycFiles.size() != 1 ? "s" : ""));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:CleanPycAction.java

示例4: updateStatus

import com.intellij.openapi.wm.StatusBar; //导入方法依赖的package包/类
private void updateStatus() {
  Editor editor = FileEditorManager.getInstance(myProject).getSelectedTextEditor();
  if (editor == null || !editor.getContentComponent().hasFocus()){
    return;
  }

  final Document document = editor.getDocument();
  if (document instanceof DocumentEx && ((DocumentEx)document).isInBulkUpdate()) return;

  int offset = editor.getCaretModel().getOffset();
  DaemonCodeAnalyzer codeAnalyzer = DaemonCodeAnalyzer.getInstance(myProject);
  HighlightInfo info = ((DaemonCodeAnalyzerImpl)codeAnalyzer).findHighlightByOffset(document, offset, false, HighlightSeverity.WARNING);
  String text = info != null && info.getDescription() != null ? info.getDescription() : "";

  StatusBar statusBar = WindowManager.getInstance().getStatusBar(editor.getContentComponent(), myProject);
  if (statusBar instanceof StatusBarEx) {
    StatusBarEx barEx = (StatusBarEx)statusBar;
    if (!text.equals(barEx.getInfo())){
      statusBar.setInfo(text, "updater");
    }
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:23,代码来源:StatusBarUpdater.java

示例5: highlightElement

import com.intellij.openapi.wm.StatusBar; //导入方法依赖的package包/类
public static void highlightElement(Editor editor, @NotNull com.intellij.openapi.project.Project project, @NotNull PsiElement[] elements)
{
    final HighlightManager highlightManager =
            HighlightManager.getInstance(project);
    final EditorColorsManager editorColorsManager =
            EditorColorsManager.getInstance();
    final EditorColorsScheme globalScheme =
            editorColorsManager.getGlobalScheme();
    final TextAttributes textattributes =
            globalScheme.getAttributes(
                    EditorColors.TEXT_SEARCH_RESULT_ATTRIBUTES);

    highlightManager.addOccurrenceHighlights(
            editor, elements, textattributes, true, null);
    final WindowManager windowManager = WindowManager.getInstance();
    final StatusBar statusBar = windowManager.getStatusBar(project);
    statusBar.setInfo("Press Esc to remove highlighting");
}
 
开发者ID:cefolger,项目名称:needsmoredojo,代码行数:19,代码来源:HighlightingUtil.java

示例6: setStatusText

import com.intellij.openapi.wm.StatusBar; //导入方法依赖的package包/类
private static void setStatusText(Project project, List<VirtualFile> files) {
  if (!files.isEmpty()) {
    StringBuilder fileNames = new StringBuilder();
    for (VirtualFile file : files) {
      if (fileNames.length() != 0) fileNames.append(", ");
      fileNames.append("'").append(file.getName()).append("'");
    }
    String time = TIME_FORMAT.format(Clock.getTime());
    final String statusText = CompilerBundle.message("status.text.file.has.been.packaged", files.size(), fileNames, time);
    final StatusBar statusBar = WindowManager.getInstance().getStatusBar(project);
    if (statusBar != null) {
      statusBar.setInfo(statusText);
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:PackageFileAction.java

示例7: showDescriptionInStatusBar

import com.intellij.openapi.wm.StatusBar; //导入方法依赖的package包/类
public static void showDescriptionInStatusBar(boolean isIncluded, Component component, String description) {
  IdeFrame frame = component instanceof IdeFrame
                   ? (IdeFrame)component
                   : (IdeFrame)SwingUtilities.getAncestorOfClass(IdeFrame.class, component);
  StatusBar statusBar;
  if (frame != null && (statusBar = frame.getStatusBar()) != null) {
    statusBar.setInfo(isIncluded ? description : null);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:ActionMenu.java

示例8: execute

import com.intellij.openapi.wm.StatusBar; //导入方法依赖的package包/类
@Override
public void execute(Editor editor, DataContext dataContext){
  editor.setHeaderComponent(null);

  Project project = CommonDataKeys.PROJECT.getData(dataContext);
  if (project != null) {
    HighlightManagerImpl highlightManager = (HighlightManagerImpl)HighlightManager.getInstance(project);
    if (highlightManager != null && highlightManager.hideHighlights(editor, HighlightManager.HIDE_BY_ESCAPE | HighlightManager.HIDE_BY_ANY_KEY)) {

      StatusBar statusBar = WindowManager.getInstance().getStatusBar(project);
      if (statusBar != null) {
        statusBar.setInfo("");
      }

      FindManager findManager = FindManager.getInstance(project);
      if (findManager != null) {
        FindModel model = findManager.getFindNextModel(editor);
        if (model != null) {
          model.setSearchHighlighters(false);
          findManager.setFindNextModel(model);
        }
      }

      return;
    }
  }

  myOriginalHandler.execute(editor, dataContext);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:30,代码来源:EscapeHandler.java

示例9: reportNonRegularUsages

import com.intellij.openapi.wm.StatusBar; //导入方法依赖的package包/类
public static boolean reportNonRegularUsages(UsageInfo[] usages, final Project project) {
  boolean inGeneratedCode = hasUsagesInGeneratedCode(usages, project);
  if (hasNonCodeUsages(usages) || inGeneratedCode) {
    StatusBar statusBar = WindowManager.getInstance().getStatusBar(project);
    if (statusBar != null) {
      statusBar.setInfo(inGeneratedCode ? RefactoringBundle.message("occurrences.found.in.comments.strings.non.java.files.and.generated.code")
                                        : RefactoringBundle.message("occurrences.found.in.comments.strings.and.non.java.files"));
    }
    return true;
  }
  return false;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:UsageViewUtil.java

示例10: reportNumberReplacedOccurrences

import com.intellij.openapi.wm.StatusBar; //导入方法依赖的package包/类
public static void reportNumberReplacedOccurrences(Project project, int occurrences) {
  if (occurrences != 0) {
    final StatusBar statusBar = WindowManager.getInstance().getStatusBar(project);
    if (statusBar != null) {
      statusBar.setInfo(FindBundle.message("0.occurrences.replaced", occurrences));
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:ReplaceInProjectManager.java

示例11: buildGradleProject

import com.intellij.openapi.wm.StatusBar; //导入方法依赖的package包/类
@Override
protected void buildGradleProject(@NotNull Project project, @NotNull DataContext dataContext) {
  StatusBar statusBar = WindowManager.getInstance().getStatusBar(project);
  if (statusBar != null) {
    // Reset info from the previous runs (if any).
    statusBar.setInfo(" ");
  }
  ModuleManager moduleManager = ModuleManager.getInstance(project);
  GradleInvoker.getInstance(project).compileJava(moduleManager.getModules());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:AndroidMakeProjectAction.java

示例12: showStatusMessage

import com.intellij.openapi.wm.StatusBar; //导入方法依赖的package包/类
private static void showStatusMessage(Project project, int elementCount) {
  final WindowManager windowManager = WindowManager.getInstance();
  final StatusBar statusBar = windowManager.getStatusBar(project);
  if (statusBar == null) {
    return;
  }
  statusBar.setInfo(InspectionGadgetsBundle.message("unnecessary.fully.qualified.name.status.bar.escape.highlighting.message",
                                                    elementCount));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:UnnecessaryFullyQualifiedNameInspection.java

示例13: updateStatusBar

import com.intellij.openapi.wm.StatusBar; //导入方法依赖的package包/类
private void updateStatusBar(long revision, Project project) {
  if (revision > 0) {
    StatusBar statusBar = WindowManager.getInstance().getStatusBar(project);

    if (statusBar != null) {
      statusBar.setInfo(SvnBundle.message("status.text.comitted.revision", revision));
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:CreateBranchOrTagAction.java

示例14: deselectNotify

import com.intellij.openapi.wm.StatusBar; //导入方法依赖的package包/类
@Override
public void deselectNotify() {
  final StatusBar statusBar = WindowManager.getInstance().getStatusBar(myProject);
  if (statusBar != null) {
    statusBar.setInfo("");
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:ResourceBundleEditor.java

示例15: setStatusBarInfo

import com.intellij.openapi.wm.StatusBar; //导入方法依赖的package包/类
/**
 * @param   info    Text to be shown inside the status bar
 */
public static void setStatusBarInfo(String info) {
    Project project = getOpenProject();

    if( project != null ) {
        StatusBar statusbar = WindowManager.getInstance().getStatusBar(project);
        if( statusbar != null ) {
            statusbar.setInfo(info);
        }
    }
}
 
开发者ID:kstenschke,项目名称:copypastestack-plugin,代码行数:14,代码来源:UtilsEnvironment.java


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