本文整理汇总了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;
}
示例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;
}
};
}
示例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;
}
示例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;
}
示例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);
}
}
示例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));
}