當前位置: 首頁>>代碼示例>>Java>>正文


Java TodoTreeBuilder類代碼示例

本文整理匯總了Java中com.intellij.ide.todo.TodoTreeBuilder的典型用法代碼示例。如果您正苦於以下問題:Java TodoTreeBuilder類的具體用法?Java TodoTreeBuilder怎麽用?Java TodoTreeBuilder使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


TodoTreeBuilder類屬於com.intellij.ide.todo包,在下文中一共展示了TodoTreeBuilder類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: TodoPackageNode

import com.intellij.ide.todo.TodoTreeBuilder; //導入依賴的package包/類
public TodoPackageNode(@NotNull Project project,
                       PackageElement element,
                       TodoTreeBuilder builder,
                       @Nullable String name) {
  super(project, element, ViewSettings.DEFAULT);
  myBuilder = builder;
  myHighlightedRegions = new ArrayList<HighlightedRegion>(2);
  if (element != null && name == null){
    final PsiPackage aPackage = element.getPackage();
    myPresentationName = aPackage.getName();
  }
  else {
    myPresentationName = name;
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:16,代碼來源:TodoPackageNode.java

示例2: traverseSubPackages

import com.intellij.ide.todo.TodoTreeBuilder; //導入依賴的package包/類
private static void traverseSubPackages(PsiPackage psiPackage, Module module, TodoTreeBuilder builder, Project project, Set<PsiPackage> packages){
  if (!isPackageEmpty(new PackageElement(module, psiPackage,  false), builder, project)){
    packages.add(psiPackage);
  }
  GlobalSearchScope scope = module != null ? GlobalSearchScope.moduleScope(module) : GlobalSearchScope.projectScope(project);
  final PsiPackage[] subPackages = psiPackage.getSubPackages(scope);
  for (PsiPackage subPackage : subPackages) {
    traverseSubPackages(subPackage, module, builder, project, packages);
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:11,代碼來源:TodoJavaTreeHelper.java

示例3: isPackageEmpty

import com.intellij.ide.todo.TodoTreeBuilder; //導入依賴的package包/類
private static boolean isPackageEmpty(PackageElement packageElement, TodoTreeBuilder builder, Project project) {
  if (packageElement == null) return true;
  final PsiPackage psiPackage = packageElement.getPackage();
  final Module module = packageElement.getModule();
  GlobalSearchScope scope = module != null ? GlobalSearchScope.moduleScope(module) : GlobalSearchScope.projectScope(project);
  final PsiDirectory[] directories = psiPackage.getDirectories(scope);
  boolean isEmpty = true;
  for (PsiDirectory psiDirectory : directories) {
    isEmpty &= builder.isDirectoryEmpty(psiDirectory);
  }
  return isEmpty;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:13,代碼來源:TodoJavaTreeHelper.java

示例4: TodoDirNode

import com.intellij.ide.todo.TodoTreeBuilder; //導入依賴的package包/類
public TodoDirNode(Project project,
                   PsiDirectory directory,
                   TodoTreeBuilder builder) {
  super(project, directory, ViewSettings.DEFAULT);
  myBuilder = builder;
  myHighlightedRegions = new ArrayList<HighlightedRegion>(2);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:8,代碼來源:TodoDirNode.java

示例5: addPackagesToChildren

import com.intellij.ide.todo.TodoTreeBuilder; //導入依賴的package包/類
public void addPackagesToChildren(ArrayList<AbstractTreeNode> children,
                                         Module module,
                                         TodoTreeBuilder builder) {
  final PsiManager psiManager = PsiManager.getInstance(myProject);
  final List<VirtualFile> roots = new ArrayList<VirtualFile>();
  final List<VirtualFile> sourceRoots = new ArrayList<VirtualFile>();
  if (module == null) {
    final ProjectRootManager projectRootManager = ProjectRootManager.getInstance(myProject);
    ContainerUtil.addAll(roots, projectRootManager.getContentRoots());
    ContainerUtil.addAll(sourceRoots, projectRootManager.getContentSourceRoots());
  } else {
    ModuleRootManager moduleRootManager = ModuleRootManager.getInstance(module);
    ContainerUtil.addAll(roots, moduleRootManager.getContentRoots());
    ContainerUtil.addAll(sourceRoots, moduleRootManager.getSourceRoots());
  }
  roots.removeAll(sourceRoots);
  for (VirtualFile dir : roots) {
    final PsiDirectory directory = psiManager.findDirectory(dir);
    if (directory == null) {
      continue;
    }
    final Iterator<PsiFile> files = builder.getFiles(directory);
    if (!files.hasNext()) continue;
    TodoDirNode dirNode = new TodoDirNode(myProject, directory, builder);
    if (!children.contains(dirNode)){
      children.add(dirNode);
    }
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:30,代碼來源:TodoTreeHelper.java

示例6: TodoItemNode

import com.intellij.ide.todo.TodoTreeBuilder; //導入依賴的package包/類
public TodoItemNode(Project project,
                    SmartTodoItemPointer value,
                    TodoTreeBuilder builder) {
  super(project, value, builder);
  RangeMarker rangeMarker = getValue().getRangeMarker();
  LOG.assertTrue(rangeMarker.isValid());

  myHighlightedRegions=new ArrayList<HighlightedRegion>();

}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:11,代碼來源:TodoItemNode.java

示例7: TodoPackageNode

import com.intellij.ide.todo.TodoTreeBuilder; //導入依賴的package包/類
public TodoPackageNode(@Nonnull Project project,
                       PackageElement element,
                       TodoTreeBuilder builder,
                       @Nullable String name) {
  super(project, element, ViewSettings.DEFAULT);
  myBuilder = builder;
  myHighlightedRegions = new ArrayList<HighlightedRegion>(2);
  if (element != null && name == null){
    final PsiPackage aPackage = element.getPackage();
    myPresentationName = aPackage.getName();
  }
  else {
    myPresentationName = name;
  }
}
 
開發者ID:consulo,項目名稱:consulo,代碼行數:16,代碼來源:TodoPackageNode.java

示例8: addPackagesToChildren0

import com.intellij.ide.todo.TodoTreeBuilder; //導入依賴的package包/類
private static void addPackagesToChildren0(Project project, ArrayList<AbstractTreeNode> children, Module module, TodoTreeBuilder builder) {
  final List<VirtualFile> roots = new ArrayList<VirtualFile>();
  final List<VirtualFile> sourceRoots = new ArrayList<VirtualFile>();
  final PsiManager psiManager = PsiManager.getInstance(project);
  if (module == null) {
    final ProjectRootManager projectRootManager = ProjectRootManager.getInstance(project);
    ContainerUtil.addAll(roots, projectRootManager.getContentRoots());
    ContainerUtil.addAll(sourceRoots, projectRootManager.getContentSourceRoots());
  }
  else {
    ModuleRootManager moduleRootManager = ModuleRootManager.getInstance(module);
    ContainerUtil.addAll(roots, moduleRootManager.getContentRoots());
    ContainerUtil.addAll(sourceRoots, moduleRootManager.getContentFolderFiles(ContentFolderScopes.productionAndTest()));
  }
  roots.removeAll(sourceRoots);
  for (VirtualFile dir : roots) {
    final PsiDirectory directory = psiManager.findDirectory(dir);
    if (directory == null) {
      continue;
    }
    final Iterator<PsiFile> files = builder.getFiles(directory);
    if (!files.hasNext()) continue;
    TodoDirNode dirNode = new TodoDirNode(project, directory, builder);
    if (!children.contains(dirNode)) {
      children.add(dirNode);
    }
  }
}
 
開發者ID:consulo,項目名稱:consulo,代碼行數:29,代碼來源:TodoTreeHelper.java

示例9: traverseSubPackages

import com.intellij.ide.todo.TodoTreeBuilder; //導入依賴的package包/類
private static void traverseSubPackages(PsiPackage psiPackage,
                                        Module module,
                                        TodoTreeBuilder builder,
                                        Project project,
                                        Set<PsiPackage> packages) {
  if (!isPackageEmpty(new PackageElement(module, psiPackage, false), builder, project)) {
    packages.add(psiPackage);
  }
  GlobalSearchScope scope = module != null ? GlobalSearchScope.moduleScope(module) : GlobalSearchScope.projectScope(project);
  final PsiPackage[] subPackages = psiPackage.getSubPackages(scope);
  for (PsiPackage subPackage : subPackages) {
    traverseSubPackages(subPackage, module, builder, project, packages);
  }
}
 
開發者ID:consulo,項目名稱:consulo,代碼行數:15,代碼來源:TodoTreeHelper.java

示例10: isPackageEmpty

import com.intellij.ide.todo.TodoTreeBuilder; //導入依賴的package包/類
private static boolean isPackageEmpty(PackageElement packageElement,
                                      TodoTreeBuilder builder,
                                      Project project) {
  if (packageElement == null) return true;
  final PsiPackage psiPackage = packageElement.getPackage();
  final Module module = packageElement.getModule();
  GlobalSearchScope scope = module != null ? GlobalSearchScope.moduleScope(module) : GlobalSearchScope.projectScope(project);
  final PsiDirectory[] directories = psiPackage.getDirectories(scope);
  boolean isEmpty = true;
  for (PsiDirectory psiDirectory : directories) {
    isEmpty &= builder.isDirectoryEmpty(psiDirectory);
  }
  return isEmpty;
}
 
開發者ID:consulo,項目名稱:consulo,代碼行數:15,代碼來源:TodoTreeHelper.java

示例11: ModuleToDoNode

import com.intellij.ide.todo.TodoTreeBuilder; //導入依賴的package包/類
public ModuleToDoNode(Project project, Module value, TodoTreeBuilder builder) {
  super(project, value, builder);
  myHighlightedRegions = new ArrayList<HighlightedRegion>(2);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:5,代碼來源:ModuleToDoNode.java

示例12: ToDoRootNode

import com.intellij.ide.todo.TodoTreeBuilder; //導入依賴的package包/類
public ToDoRootNode(Project project, Object value, TodoTreeBuilder builder, ToDoSummary summary) {
  super(project, value, builder);
  mySummaryNode = new SummaryNode(getProject(), summary, myBuilder);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:5,代碼來源:ToDoRootNode.java

示例13: SingleFileToDoNode

import com.intellij.ide.todo.TodoTreeBuilder; //導入依賴的package包/類
public SingleFileToDoNode(Project project, PsiFile value, TodoTreeBuilder builder) {
  super(project, value, builder);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:4,代碼來源:SingleFileToDoNode.java

示例14: SummaryNode

import com.intellij.ide.todo.TodoTreeBuilder; //導入依賴的package包/類
public SummaryNode(Project project, ToDoSummary value, TodoTreeBuilder builder) {
  super(project, value, builder);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:4,代碼來源:SummaryNode.java

示例15: BaseToDoNode

import com.intellij.ide.todo.TodoTreeBuilder; //導入依賴的package包/類
protected BaseToDoNode(Project project, Value value, TodoTreeBuilder builder) {
  super(project, value);
  myBuilder = builder;
  myToDoSettings = myBuilder.getTodoTreeStructure();
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:6,代碼來源:BaseToDoNode.java


注:本文中的com.intellij.ide.todo.TodoTreeBuilder類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。