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


Java ProgressManager.progress方法代码示例

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


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

示例1: generate

import com.intellij.openapi.progress.ProgressManager; //导入方法依赖的package包/类
@Override
public Set<TSVarExpr> generate(Project project) {
    Set<TSVarExpr> items = new HashSet<>();
    //Search every file in the project
    Collection<VirtualFile> virtualFiles = FileBasedIndex.getInstance().getContainingFiles(FileTypeIndex.NAME, TSFileType.INSTANCE, GlobalSearchScope.projectScope(project));
    for (VirtualFile virtualFile : virtualFiles) {
        TSFile tsFile = (TSFile) PsiManager.getInstance(project).findFile(virtualFile);
        if (tsFile != null) {
            Collection<TSAssignExpr> assignments = PsiTreeUtil.findChildrenOfType(tsFile, TSAssignExpr.class);
            for (TSAssignExpr assignment : assignments) {
                PsiElement first = assignment.getFirstChild();
                if (!(first instanceof TSVarExpr))
                    continue;

                if (((TSVarExpr)first).isLocal())
                    continue;

                items.add((TSVarExpr) first);

            }
        }
        ProgressManager.progress("Loading Symbols");
    }
    return items;
}
 
开发者ID:CouleeApps,项目名称:TS-IJ,代码行数:26,代码来源:TSGlobalCachedListGenerator.java

示例2: createChangeCharsetProcessor

import com.intellij.openapi.progress.ProgressManager; //导入方法依赖的package包/类
private static Processor<VirtualFile> createChangeCharsetProcessor() {
  return new Processor<VirtualFile>() {
    @Override
    public boolean process(final VirtualFile file) {
      if (!(file instanceof VirtualFileSystemEntry)) return false;
      Document cachedDocument = FileDocumentManager.getInstance().getCachedDocument(file);
      if (cachedDocument == null) return true;
      ProgressManager.progress("Reloading files...", file.getPresentableUrl());
      UIUtil.invokeLaterIfNeeded(new Runnable() {
        @Override
        public void run() {
          clearAndReload(file);
        }
      });
      return true;
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:EncodingProjectManagerImpl.java

示例3: generate

import com.intellij.openapi.progress.ProgressManager; //导入方法依赖的package包/类
@Override
public Set<TSFnDeclStmt> generate(Project project) {
    Set<TSFnDeclStmt> items = new HashSet<>();
    //Search every file in the project
    Collection<VirtualFile> virtualFiles = FileBasedIndex.getInstance().getContainingFiles(FileTypeIndex.NAME, TSFileType.INSTANCE, GlobalSearchScope.projectScope(project));
    for (VirtualFile virtualFile : virtualFiles) {
        TSFile tsFile = (TSFile) PsiManager.getInstance(project).findFile(virtualFile);
        if (tsFile != null) {
            TSFnDeclStmt[] functions = PsiTreeUtil.getChildrenOfType(tsFile, TSFnDeclStmt.class);
            if (functions != null) {
                Collections.addAll(items, functions);
            }

            TSPackageDecl[] packages = PsiTreeUtil.getChildrenOfType(tsFile, TSPackageDecl.class);
            if (packages != null) {
                for (TSPackageDecl pack : packages) {
                    functions = PsiTreeUtil.getChildrenOfType(pack, TSFnDeclStmt.class);
                    if (functions != null) {
                        Collections.addAll(items, functions);
                    }
                }
            }
            ProgressManager.progress("Loading Symbols");
        }
    }
    return items;
}
 
开发者ID:CouleeApps,项目名称:TS-IJ,代码行数:28,代码来源:TSFunctionCachedListGenerator.java

示例4: generate

import com.intellij.openapi.progress.ProgressManager; //导入方法依赖的package包/类
@Override
public Set<TSObjectExpr> generate(Project project) {
    Set<TSObjectExpr> items = new HashSet<>();
    //Search every file in the project
    Collection<VirtualFile> virtualFiles = FileBasedIndex.getInstance().getContainingFiles(FileTypeIndex.NAME, TSFileType.INSTANCE, GlobalSearchScope.projectScope(project));
    for (VirtualFile virtualFile : virtualFiles) {
        TSFile tsFile = (TSFile) PsiManager.getInstance(project).findFile(virtualFile);
        if (tsFile != null) {
            items.addAll(PsiTreeUtil.findChildrenOfType(tsFile, TSObjectExpr.class));
            items.addAll(PsiTreeUtil.findChildrenOfType(tsFile, TSDatablockDecl.class));
        }
        ProgressManager.progress("Loading Symbols");
    }
    return items;
}
 
开发者ID:CouleeApps,项目名称:TS-IJ,代码行数:16,代码来源:TSObjectCachedListGenerator.java

示例5: progress

import com.intellij.openapi.progress.ProgressManager; //导入方法依赖的package包/类
private void progress(@NotNull String text) {
  if (myIndicator != null) {
    myIndicator.checkCanceled();
    myIndicator.setText(text);
    myIndicator.setText2("");
  } else {
    ProgressManager.progress(text);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:CheckoutEventHandler.java

示例6: setCollectingChangesProgress

import com.intellij.openapi.progress.ProgressManager; //导入方法依赖的package包/类
private static void setCollectingChangesProgress(@Nullable Object location) {
  ProgressManager.progress(SvnBundle.message("progress.text.changes.collecting.changes"),
                           SvnBundle.message("progress.text2.changes.establishing.connection", location));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:SvnCommittedChangesProvider.java


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