示例#1
0
 @NotNull
 public Set<Node> getUpRefNodes(@NotNull GraphElement graphElement) {
   Set<Node> nodes = new HashSet<Node>();
   for (Node node : getGraphModel().getFragmentManager().getUpNodes(graphElement)) {
     if (getRefsModel().isBranchRef(node.getCommitHash())) {
       nodes.add(node);
     }
   }
   return nodes;
 }
示例#2
0
 @Nullable
 public Node getNodeByHash(Hash hash) {
   Graph graph = getGraphModel().getGraph();
   for (int i = 0; i < graph.getNodeRows().size(); i++) {
     Node node = graph.getCommitNodeInRow(i);
     if (node != null && node.getCommitHash().equals(hash)) {
       return node;
     }
   }
   return null;
 }