com.sun.hotspot.igv.coordinator.actions.RemoveCookie Java Examples

The following examples show how to use com.sun.hotspot.igv.coordinator.actions.RemoveCookie. 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: FolderNode.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
private FolderNode(String name, GroupOrganizer organizer, List<String> oldSubFolders, final List<Group> groups, FolderChildren children, InstanceContent content) {
    super(children, new AbstractLookup(content));
    children.setParent(this);
    this.content = content;
    this.children = children;
    content.add(new RemoveCookie() {

        public void remove() {
            for (Group g : groups) {
                if (g.getDocument() != null) {
                    g.getDocument().removeGroup(g);
                }
            }
        }
    });
    init(name, organizer, oldSubFolders, groups);
}
 
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: FolderNode.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
private FolderNode(String name, GroupOrganizer organizer, List<String> oldSubFolders, final List<Group> groups, FolderChildren children, InstanceContent content) {
    super(children, new AbstractLookup(content));
    children.setParent(this);
    this.content = content;
    this.children = children;
    content.add(new RemoveCookie() {

        public void remove() {
            for (Group g : groups) {
                if (g.getDocument() != null) {
                    g.getDocument().removeGroup(g);
                }
            }
        }
    });
    init(name, organizer, oldSubFolders, groups);
}
 
Example #4
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 #5
Source File: FolderNode.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
private FolderNode(String name, GroupOrganizer organizer, List<String> oldSubFolders, final List<Group> groups, FolderChildren children, InstanceContent content) {
    super(children, new AbstractLookup(content));
    children.setParent(this);
    this.content = content;
    this.children = children;
    content.add(new RemoveCookie() {

        public void remove() {
            for (Group g : groups) {
                if (g.getDocument() != null) {
                    g.getDocument().removeGroup(g);
                }
            }
        }
    });
    init(name, organizer, oldSubFolders, groups);
}
 
Example #6
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 #7
Source File: FolderNode.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
private FolderNode(String name, GroupOrganizer organizer, List<String> oldSubFolders, final List<Group> groups, FolderChildren children, InstanceContent content) {
    super(children, new AbstractLookup(content));
    children.setParent(this);
    this.content = content;
    this.children = children;
    content.add(new RemoveCookie() {

        public void remove() {
            for (Group g : groups) {
                if (g.getDocument() != null) {
                    g.getDocument().removeGroup(g);
                }
            }
        }
    });
    init(name, organizer, oldSubFolders, groups);
}
 
Example #8
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 #9
Source File: FolderNode.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
private FolderNode(String name, GroupOrganizer organizer, List<String> oldSubFolders, final List<Group> groups, FolderChildren children, InstanceContent content) {
    super(children, new AbstractLookup(content));
    children.setParent(this);
    this.content = content;
    this.children = children;
    content.add(new RemoveCookie() {

        public void remove() {
            for (Group g : groups) {
                if (g.getDocument() != null) {
                    g.getDocument().removeGroup(g);
                }
            }
        }
    });
    init(name, organizer, oldSubFolders, groups);
}
 
Example #10
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 #11
Source File: FolderNode.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
private FolderNode(String name, GroupOrganizer organizer, List<String> oldSubFolders, final List<Group> groups, FolderChildren children, InstanceContent content) {
    super(children, new AbstractLookup(content));
    children.setParent(this);
    this.content = content;
    this.children = children;
    content.add(new RemoveCookie() {

        public void remove() {
            for (Group g : groups) {
                if (g.getDocument() != null) {
                    g.getDocument().removeGroup(g);
                }
            }
        }
    });
    init(name, organizer, oldSubFolders, groups);
}
 
Example #12
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 #13
Source File: FolderNode.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
private FolderNode(String name, GroupOrganizer organizer, List<String> oldSubFolders, final List<Group> groups, FolderChildren children, InstanceContent content) {
    super(children, new AbstractLookup(content));
    children.setParent(this);
    this.content = content;
    this.children = children;
    content.add(new RemoveCookie() {

        public void remove() {
            for (Group g : groups) {
                if (g.getDocument() != null) {
                    g.getDocument().removeGroup(g);
                }
            }
        }
    });
    init(name, organizer, oldSubFolders, groups);
}
 
Example #14
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 #15
Source File: FolderNode.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private FolderNode(final Folder folder, FolderChildren children, InstanceContent content) {
    super(children, new AbstractLookup(content));
    this.content = content;
    this.children = children;
    if (folder instanceof FolderElement) {
        final FolderElement folderElement = (FolderElement) folder;
        this.setDisplayName(folderElement.getName());
        content.add(new RemoveCookie() {
            @Override
            public void remove() {
                folderElement.getParent().removeElement(folderElement);
            }
        });
    }
}