當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。