本文整理汇总了Java中com.intellij.ide.projectView.impl.AbstractUrl类的典型用法代码示例。如果您正苦于以下问题:Java AbstractUrl类的具体用法?Java AbstractUrl怎么用?Java AbstractUrl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AbstractUrl类属于com.intellij.ide.projectView.impl包,在下文中一共展示了AbstractUrl类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createFavoriteRoots
import com.intellij.ide.projectView.impl.AbstractUrl; //导入依赖的package包/类
@NotNull
private static Collection<AbstractTreeNode> createFavoriteRoots(Project project,
@NotNull Collection<TreeItem<Pair<AbstractUrl, String>>> urls,
final AbstractTreeNode me) {
Collection<AbstractTreeNode> result = new ArrayList<AbstractTreeNode>();
processUrls(project, urls, result, me);
return result;
}
示例2: processUrls
import com.intellij.ide.projectView.impl.AbstractUrl; //导入依赖的package包/类
private static void processUrls(Project project,
Collection<TreeItem<Pair<AbstractUrl, String>>> urls,
Collection<AbstractTreeNode> result, final AbstractTreeNode me) {
for (TreeItem<Pair<AbstractUrl, String>> pair : urls) {
AbstractUrl abstractUrl = pair.getData().getFirst();
final Object[] path = abstractUrl.createPath(project);
if (path == null || path.length < 1 || path[0] == null) {
continue;
}
try {
final String className = pair.getData().getSecond();
@SuppressWarnings("unchecked")
final Class<? extends AbstractTreeNode> nodeClass = (Class<? extends AbstractTreeNode>)Class.forName(className);
final AbstractTreeNode node = ProjectViewNode
.createTreeNode(nodeClass, project, path[path.length - 1], FavoritesManager.getInstance(project).getViewSettings());
node.setParent(me);
node.setIndex(result.size());
result.add(node);
if (node instanceof ProjectViewNodeWithChildrenList) {
final List<TreeItem<Pair<AbstractUrl, String>>> children = pair.getChildren();
if (children != null && !children.isEmpty()) {
Collection<AbstractTreeNode> childList = new ArrayList<AbstractTreeNode>();
processUrls(project, children, childList, node);
for (AbstractTreeNode treeNode : childList) {
((ProjectViewNodeWithChildrenList)node).addChild(treeNode);
}
}
}
}
catch (Exception ignored) {
}
}
}
示例3: createFavoriteRoots
import com.intellij.ide.projectView.impl.AbstractUrl; //导入依赖的package包/类
@Nonnull
private static Collection<AbstractTreeNode> createFavoriteRoots(Project project,
@Nonnull Collection<TreeItem<Pair<AbstractUrl, String>>> urls,
final AbstractTreeNode me) {
Collection<AbstractTreeNode> result = new ArrayList<AbstractTreeNode>();
processUrls(project, urls, result, me);
return result;
}
示例4: createUrl
import com.intellij.ide.projectView.impl.AbstractUrl; //导入依赖的package包/类
@Override
protected AbstractUrl createUrl(String moduleName, String url) {
return null;
}
示例5: createUrlByElement
import com.intellij.ide.projectView.impl.AbstractUrl; //导入依赖的package包/类
@Override
public AbstractUrl createUrlByElement(Object element) {
return null;
}
示例6: getFavoritesRoots
import com.intellij.ide.projectView.impl.AbstractUrl; //导入依赖的package包/类
@NotNull
public static Collection<AbstractTreeNode> getFavoritesRoots(Project project, String listName, final FavoritesListNode listNode) {
final Collection<TreeItem<Pair<AbstractUrl, String>>> pairs = FavoritesManager.getInstance(project).getFavoritesListRootUrls(listName);
if (pairs.isEmpty()) return Collections.emptyList();
return createFavoriteRoots(project, pairs, listNode);
}
示例7: getFavoritesRoots
import com.intellij.ide.projectView.impl.AbstractUrl; //导入依赖的package包/类
@Nonnull
public static Collection<AbstractTreeNode> getFavoritesRoots(Project project, String listName, final FavoritesListNode listNode) {
final Collection<TreeItem<Pair<AbstractUrl, String>>> pairs = FavoritesManager.getInstance(project).getFavoritesListRootUrls(listName);
if (pairs.isEmpty()) return Collections.emptyList();
return createFavoriteRoots(project, pairs, listNode);
}