当前位置: 首页>>代码示例>>Java>>正文


Java AbstractUrl类代码示例

本文整理汇总了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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:FavoritesListNode.java

示例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) {
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:37,代码来源:FavoritesListNode.java

示例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;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:9,代码来源:FavoritesListNode.java

示例4: createUrl

import com.intellij.ide.projectView.impl.AbstractUrl; //导入依赖的package包/类
@Override
protected AbstractUrl createUrl(String moduleName, String url) {
  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:AbstractUrlFavoriteAdapter.java

示例5: createUrlByElement

import com.intellij.ide.projectView.impl.AbstractUrl; //导入依赖的package包/类
@Override
public AbstractUrl createUrlByElement(Object element) {
  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:AbstractUrlFavoriteAdapter.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:FavoritesListNode.java

示例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);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:7,代码来源:FavoritesListNode.java


注:本文中的com.intellij.ide.projectView.impl.AbstractUrl类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。