本文整理匯總了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;
}
}
示例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);
}
}
示例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;
}
示例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);
}
示例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);
}
}
}
示例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>();
}
示例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;
}
}
示例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);
}
}
}
示例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);
}
}
示例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;
}
示例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);
}
示例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);
}
示例13: SingleFileToDoNode
import com.intellij.ide.todo.TodoTreeBuilder; //導入依賴的package包/類
public SingleFileToDoNode(Project project, PsiFile value, TodoTreeBuilder builder) {
super(project, value, builder);
}
示例14: SummaryNode
import com.intellij.ide.todo.TodoTreeBuilder; //導入依賴的package包/類
public SummaryNode(Project project, ToDoSummary value, TodoTreeBuilder builder) {
super(project, value, builder);
}
示例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();
}