com.sun.hotspot.igv.data.services.GraphViewer Java Examples

The following examples show how to use com.sun.hotspot.igv.data.services.GraphViewer. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DiffGraphCookie.java    From TencentKona-8 with GNU General Public License v2.0 7 votes vote down vote up
public void openDiff() {

        final GraphViewer viewer = Lookup.getDefault().lookup(GraphViewer.class);

        if(viewer != null) {
            InputGraph diffGraph = Difference.createDiffGraph(a, b);
            viewer.view(diffGraph);
        }
    }
 
Example #2
Source File: GraphNode.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
private GraphNode(final InputGraph graph, InstanceContent content) {
    super(Children.LEAF, new AbstractLookup(content));
    this.graph = graph;
    this.setDisplayName(graph.getName());
    content.add(graph);

    final GraphViewer viewer = Lookup.getDefault().lookup(GraphViewer.class);

    if (viewer != null) {
        // Action for opening the graph
        content.add(new OpenCookie() {

            public void open() {
                viewer.view(graph);
            }
        });
    }

    // Action for removing a graph
    content.add(new RemoveCookie() {

        public void remove() {
            graph.getGroup().removeGraph(graph);
        }
    });
}
 
Example #3
Source File: GraphNode.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
private GraphNode(final InputGraph graph, InstanceContent content) {
    super(Children.LEAF, new AbstractLookup(content));
    this.graph = graph;
    this.setDisplayName(graph.getName());
    content.add(graph);

    final GraphViewer viewer = Lookup.getDefault().lookup(GraphViewer.class);

    if (viewer != null) {
        // Action for opening the graph
        content.add(new OpenCookie() {

            public void open() {
                viewer.view(graph);
            }
        });
    }

    // Action for removing a graph
    content.add(new RemoveCookie() {

        public void remove() {
            graph.getGroup().removeGraph(graph);
        }
    });
}
 
Example #4
Source File: GraphNode.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
private GraphNode(final InputGraph graph, InstanceContent content) {
    super(Children.LEAF, new AbstractLookup(content));
    this.graph = graph;
    this.setDisplayName(graph.getName());
    content.add(graph);

    final GraphViewer viewer = Lookup.getDefault().lookup(GraphViewer.class);

    if (viewer != null) {
        // Action for opening the graph
        content.add(new OpenCookie() {

            public void open() {
                viewer.view(graph);
            }
        });
    }

    // Action for removing a graph
    content.add(new RemoveCookie() {

        public void remove() {
            graph.getGroup().removeGraph(graph);
        }
    });
}
 
Example #5
Source File: GraphNode.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
private GraphNode(final InputGraph graph, InstanceContent content) {
    super(Children.LEAF, new AbstractLookup(content));
    this.graph = graph;
    this.setDisplayName(graph.getName());
    content.add(graph);

    final GraphViewer viewer = Lookup.getDefault().lookup(GraphViewer.class);

    if (viewer != null) {
        // Action for opening the graph
        content.add(new OpenCookie() {

            public void open() {
                viewer.view(graph);
            }
        });
    }

    // Action for removing a graph
    content.add(new RemoveCookie() {

        public void remove() {
            graph.getGroup().removeGraph(graph);
        }
    });
}
 
Example #6
Source File: GraphNode.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
private GraphNode(final InputGraph graph, InstanceContent content) {
    super(Children.LEAF, new AbstractLookup(content));
    this.graph = graph;
    this.setDisplayName(graph.getName());
    content.add(graph);

    final GraphViewer viewer = Lookup.getDefault().lookup(GraphViewer.class);

    if (viewer != null) {
        // Action for opening the graph
        content.add(new OpenCookie() {

            public void open() {
                viewer.view(graph);
            }
        });
    }

    // Action for removing a graph
    content.add(new RemoveCookie() {

        public void remove() {
            graph.getGroup().removeGraph(graph);
        }
    });
}
 
Example #7
Source File: GraphNode.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
private GraphNode(final InputGraph graph, InstanceContent content) {
    super(Children.LEAF, new AbstractLookup(content));
    this.graph = graph;
    this.setDisplayName(graph.getName());
    content.add(graph);

    final GraphViewer viewer = Lookup.getDefault().lookup(GraphViewer.class);

    if (viewer != null) {
        // Action for opening the graph
        content.add(new OpenCookie() {

            public void open() {
                viewer.view(graph);
            }
        });
    }

    // Action for removing a graph
    content.add(new RemoveCookie() {

        public void remove() {
            graph.getGroup().removeGraph(graph);
        }
    });
}
 
Example #8
Source File: GraphNode.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
private GraphNode(final InputGraph graph, InstanceContent content) {
    super(Children.LEAF, new AbstractLookup(content));
    this.graph = graph;
    this.setDisplayName(graph.getName());
    content.add(graph);

    final GraphViewer viewer = Lookup.getDefault().lookup(GraphViewer.class);

    if (viewer != null) {
        // Action for opening the graph
        content.add(new OpenCookie() {

            public void open() {
                viewer.view(graph);
            }
        });
    }

    // Action for removing a graph
    content.add(new RemoveCookie() {

        public void remove() {
            graph.getGroup().removeGraph(graph);
        }
    });
}
 
Example #9
Source File: DiffGraphCookie.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public void openDiff() {

        final GraphViewer viewer = Lookup.getDefault().lookup(GraphViewer.class);

        if(viewer != null) {
            InputGraph diffGraph = Difference.createDiffGraph(a, b);
            viewer.view(diffGraph);
        }
    }
 
Example #10
Source File: FigureWidget.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public JPopupMenu getPopupMenu(Widget widget, Point point) {
    JPopupMenu menu = diagramScene.createPopupMenu();
    menu.addSeparator();

    build(menu, getFigure(), this, false, diagramScene);
    menu.addSeparator();
    build(menu, getFigure(), this, true, diagramScene);

    if (getFigure().getSubgraphs() != null) {
        menu.addSeparator();
        JMenu subgraphs = new JMenu("Subgraphs");
        menu.add(subgraphs);

        final GraphViewer viewer = Lookup.getDefault().lookup(GraphViewer.class);
        for (final InputGraph subgraph : getFigure().getSubgraphs()) {
            Action a = new AbstractAction() {

                @Override
                public void actionPerformed(ActionEvent e) {
                    viewer.view(subgraph, true);
                }
            };

            a.setEnabled(true);
            a.putValue(Action.NAME, subgraph.getName());
            subgraphs.add(a);
        }
    }

    return menu;
}
 
Example #11
Source File: DiffGraphCookie.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public void openDiff() {
    InputGraph other = getCurrentGraph();
    final GraphViewer viewer = Lookup.getDefault().lookup(GraphViewer.class);
    if (viewer != null) {
        InputGraph diffGraph = Difference.createDiffGraph(other, graph);
        viewer.view(diffGraph, true);
    }
}
 
Example #12
Source File: GraphNode.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private GraphNode(InputGraph graph, InstanceContent content) {
    super(Children.LEAF, new AbstractLookup(content));
    this.graph = graph;
    this.setDisplayName(graph.getName());
    content.add(graph);

    final GraphViewer viewer = Lookup.getDefault().lookup(GraphViewer.class);

    if (viewer != null) {
        // Action for opening the graph
        content.add(new GraphOpenCookie(viewer, graph));
    }

    // Action for removing a graph
    content.add(new GraphRemoveCookie(graph));

    // Action for diffing to the current graph
    content.add(new DiffGraphCookie(graph));

    // Action for cloning to the current graph
    content.add(new GraphCloneCookie(viewer, graph));

    this.addNodeListener(new NodeAdapter() {
        @Override
        public void childrenRemoved(NodeMemberEvent ev) {
            GraphNode.this.graph = null;
        }
    });
}
 
Example #13
Source File: DiffGraphCookie.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public void openDiff() {

        final GraphViewer viewer = Lookup.getDefault().lookup(GraphViewer.class);

        if(viewer != null) {
            InputGraph diffGraph = Difference.createDiffGraph(a, b);
            viewer.view(diffGraph);
        }
    }
 
Example #14
Source File: DiffGraphCookie.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public void openDiff() {

        final GraphViewer viewer = Lookup.getDefault().lookup(GraphViewer.class);

        if(viewer != null) {
            InputGraph diffGraph = Difference.createDiffGraph(a, b);
            viewer.view(diffGraph);
        }
    }
 
Example #15
Source File: DiffGraphCookie.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public void openDiff() {

        final GraphViewer viewer = Lookup.getDefault().lookup(GraphViewer.class);

        if(viewer != null) {
            InputGraph diffGraph = Difference.createDiffGraph(a, b);
            viewer.view(diffGraph);
        }
    }
 
Example #16
Source File: DiffGraphCookie.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public void openDiff() {

        final GraphViewer viewer = Lookup.getDefault().lookup(GraphViewer.class);

        if(viewer != null) {
            InputGraph diffGraph = Difference.createDiffGraph(a, b);
            viewer.view(diffGraph);
        }
    }
 
Example #17
Source File: DiffGraphCookie.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public void openDiff() {

        final GraphViewer viewer = Lookup.getDefault().lookup(GraphViewer.class);

        if(viewer != null) {
            InputGraph diffGraph = Difference.createDiffGraph(a, b);
            viewer.view(diffGraph);
        }
    }
 
Example #18
Source File: GraphCloneCookie.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public GraphCloneCookie(GraphViewer viewer, InputGraph graph) {
    this.viewer = viewer;
    this.graph = graph;
}
 
Example #19
Source File: GraphOpenCookie.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public GraphOpenCookie(GraphViewer viewer, InputGraph graph) {
    this.viewer = viewer;
    this.graph = graph;
}