com.sun.hotspot.igv.data.Group Java Examples
The following examples show how to use
com.sun.hotspot.igv.data.Group.
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 jdk8u60 with GNU General Public License v2.0 | 6 votes |
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: Parser.java From hottub with GNU General Public License v2.0 | 6 votes |
@Override protected Group start() throws SAXException { Group group = new Group(); Parser.this.difference = false; String differenceProperty = this.readAttribute(DIFFERENCE_PROPERTY); if (differenceProperty != null && (differenceProperty.equals("1") || differenceProperty.equals("true"))) { Parser.this.difference = true; } ParseMonitor monitor = getMonitor(); if (monitor != null) { monitor.setState(group.getName()); } return group; }
Example #3
Source File: OutlineTopComponent.java From hottub with GNU General Public License v2.0 | 6 votes |
private void initReceivers() { final GroupCallback callback = new GroupCallback() { public void started(Group g) { getDocument().addGroup(g); } }; Collection<? extends GroupReceiver> receivers = Lookup.getDefault().lookupAll(GroupReceiver.class); if (receivers.size() > 0) { JPanel panel = new JPanel(); panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); for (GroupReceiver r : receivers) { Component c = r.init(callback); panel.add(c); } jPanel2.add(panel, BorderLayout.PAGE_START); } }
Example #4
Source File: OutlineTopComponent.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
private void initReceivers() { final GroupCallback callback = new GroupCallback() { public void started(Group g) { getDocument().addGroup(g); } }; Collection<? extends GroupReceiver> receivers = Lookup.getDefault().lookupAll(GroupReceiver.class); if (receivers.size() > 0) { JPanel panel = new JPanel(); panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); for (GroupReceiver r : receivers) { Component c = r.init(callback); panel.add(c); } jPanel2.add(panel, BorderLayout.PAGE_START); } }
Example #5
Source File: JavaGroupOrganizer.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
private void buildResult(List<Pair<String, List<Group>>> result, List<Group> groups, NameProvider provider) { HashMap<String, List<Group>> map = new HashMap<String, List<Group>>(); for (Group g : groups) { String s = provider.getName(g); if (!map.containsKey(s)) { List<Group> list = new ArrayList<Group>(); Pair<String, List<Group>> pair = new Pair<String, List<Group>>(s, list); result.add(pair); map.put(s, list); } List<Group> curList = map.get(s); curList.add(g); } Collections.sort(result, new Comparator<Pair<String, List<Group>>>() { public int compare(Pair<String, List<Group>> a, Pair<String, List<Group>> b) { return a.getLeft().compareTo(b.getLeft()); } }); }
Example #6
Source File: JavaGroupOrganizer.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
private void buildResult(List<Pair<String, List<Group>>> result, List<Group> groups, NameProvider provider) { HashMap<String, List<Group>> map = new HashMap<String, List<Group>>(); for (Group g : groups) { String s = provider.getName(g); if (!map.containsKey(s)) { List<Group> list = new ArrayList<Group>(); Pair<String, List<Group>> pair = new Pair<String, List<Group>>(s, list); result.add(pair); map.put(s, list); } List<Group> curList = map.get(s); curList.add(g); } Collections.sort(result, new Comparator<Pair<String, List<Group>>>() { public int compare(Pair<String, List<Group>> a, Pair<String, List<Group>> b) { return a.getLeft().compareTo(b.getLeft()); } }); }
Example #7
Source File: DiagramViewModel.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
public DiagramViewModel(Group g, FilterChain filterChain, FilterChain sequenceFilterChain) { super(calculateStringList(g)); this.showNodeHull = true; this.showBlocks = true; this.group = g; assert filterChain != null; this.filterChain = filterChain; assert sequenceFilterChain != null; this.sequenceFilterChain = sequenceFilterChain; hiddenNodes = new HashSet<Integer>(); onScreenNodes = new HashSet<Integer>(); selectedNodes = new HashSet<Integer>(); super.getChangedEvent().addListener(this); diagramChangedEvent = new ChangedEvent<DiagramViewModel>(this); viewChangedEvent = new ChangedEvent<DiagramViewModel>(this); viewPropertiesChangedEvent = new ChangedEvent<DiagramViewModel>(this); groupChangedEvent = new ChangedEvent<DiagramViewModel>(this); groupChangedEvent.addListener(groupChangedListener); groupChangedEvent.fire(); filterChain.getChangedEvent().addListener(filterChainChangedListener); sequenceFilterChain.getChangedEvent().addListener(filterChainChangedListener); }
Example #8
Source File: StandardGroupOrganizer.java From hottub with GNU General Public License v2.0 | 6 votes |
public List<Pair<String, List<Group>>> organize(List<String> subFolders, List<Group> groups) { List<Pair<String, List<Group>>> result = new ArrayList<Pair<String, List<Group>>>(); if (groups.size() == 1 && subFolders.size() > 0) { result.add(new Pair<String, List<Group>>("", groups)); } else { for (Group g : groups) { List<Group> children = new ArrayList<Group>(); children.add(g); Pair<String, List<Group>> p = new Pair<String, List<Group>>(); p.setLeft(g.getName()); p.setRight(children); result.add(p); } } return result; }
Example #9
Source File: JavaGroupOrganizer.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
private void buildResult(List<Pair<String, List<Group>>> result, List<Group> groups, NameProvider provider) { HashMap<String, List<Group>> map = new HashMap<String, List<Group>>(); for (Group g : groups) { String s = provider.getName(g); if (!map.containsKey(s)) { List<Group> list = new ArrayList<Group>(); Pair<String, List<Group>> pair = new Pair<String, List<Group>>(s, list); result.add(pair); map.put(s, list); } List<Group> curList = map.get(s); curList.add(g); } Collections.sort(result, new Comparator<Pair<String, List<Group>>>() { public int compare(Pair<String, List<Group>> a, Pair<String, List<Group>> b) { return a.getLeft().compareTo(b.getLeft()); } }); }
Example #10
Source File: DiagramViewModel.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
public DiagramViewModel(Group g, FilterChain filterChain, FilterChain sequenceFilterChain) { super(calculateStringList(g)); this.showNodeHull = true; this.showBlocks = true; this.group = g; assert filterChain != null; this.filterChain = filterChain; assert sequenceFilterChain != null; this.sequenceFilterChain = sequenceFilterChain; hiddenNodes = new HashSet<Integer>(); onScreenNodes = new HashSet<Integer>(); selectedNodes = new HashSet<Integer>(); super.getChangedEvent().addListener(this); diagramChangedEvent = new ChangedEvent<DiagramViewModel>(this); viewChangedEvent = new ChangedEvent<DiagramViewModel>(this); viewPropertiesChangedEvent = new ChangedEvent<DiagramViewModel>(this); groupChangedEvent = new ChangedEvent<DiagramViewModel>(this); groupChangedEvent.addListener(groupChangedListener); groupChangedEvent.fire(); filterChain.getChangedEvent().addListener(filterChainChangedListener); sequenceFilterChain.getChangedEvent().addListener(filterChainChangedListener); }
Example #11
Source File: Parser.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
@Override protected Group start() throws SAXException { Group group = new Group(); Parser.this.difference = false; String differenceProperty = this.readAttribute(DIFFERENCE_PROPERTY); if (differenceProperty != null && (differenceProperty.equals("1") || differenceProperty.equals("true"))) { Parser.this.difference = true; } ParseMonitor monitor = getMonitor(); if (monitor != null) { monitor.setState(group.getName()); } return group; }
Example #12
Source File: FolderNode.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
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 #13
Source File: StandardGroupOrganizer.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
public List<Pair<String, List<Group>>> organize(List<String> subFolders, List<Group> groups) { List<Pair<String, List<Group>>> result = new ArrayList<Pair<String, List<Group>>>(); if (groups.size() == 1 && subFolders.size() > 0) { result.add(new Pair<String, List<Group>>("", groups)); } else { for (Group g : groups) { List<Group> children = new ArrayList<Group>(); children.add(g); Pair<String, List<Group>> p = new Pair<String, List<Group>>(); p.setLeft(g.getName()); p.setRight(children); result.add(p); } } return result; }
Example #14
Source File: JavaGroupOrganizer.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
private void buildResult(List<Pair<String, List<Group>>> result, List<Group> groups, NameProvider provider) { HashMap<String, List<Group>> map = new HashMap<String, List<Group>>(); for (Group g : groups) { String s = provider.getName(g); if (!map.containsKey(s)) { List<Group> list = new ArrayList<Group>(); Pair<String, List<Group>> pair = new Pair<String, List<Group>>(s, list); result.add(pair); map.put(s, list); } List<Group> curList = map.get(s); curList.add(g); } Collections.sort(result, new Comparator<Pair<String, List<Group>>>() { public int compare(Pair<String, List<Group>> a, Pair<String, List<Group>> b) { return a.getLeft().compareTo(b.getLeft()); } }); }
Example #15
Source File: DiagramViewModel.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
public DiagramViewModel(Group g, FilterChain filterChain, FilterChain sequenceFilterChain) { super(calculateStringList(g)); this.showNodeHull = true; this.showBlocks = true; this.group = g; assert filterChain != null; this.filterChain = filterChain; assert sequenceFilterChain != null; this.sequenceFilterChain = sequenceFilterChain; hiddenNodes = new HashSet<Integer>(); onScreenNodes = new HashSet<Integer>(); selectedNodes = new HashSet<Integer>(); super.getChangedEvent().addListener(this); diagramChangedEvent = new ChangedEvent<DiagramViewModel>(this); viewChangedEvent = new ChangedEvent<DiagramViewModel>(this); viewPropertiesChangedEvent = new ChangedEvent<DiagramViewModel>(this); groupChangedEvent = new ChangedEvent<DiagramViewModel>(this); groupChangedEvent.addListener(groupChangedListener); groupChangedEvent.fire(); filterChain.getChangedEvent().addListener(filterChainChangedListener); sequenceFilterChain.getChangedEvent().addListener(filterChainChangedListener); }
Example #16
Source File: Parser.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
@Override protected Group start() throws SAXException { Group group = new Group(); Parser.this.difference = false; String differenceProperty = this.readAttribute(DIFFERENCE_PROPERTY); if (differenceProperty != null && (differenceProperty.equals("1") || differenceProperty.equals("true"))) { Parser.this.difference = true; } ParseMonitor monitor = getMonitor(); if (monitor != null) { monitor.setState(group.getName()); } return group; }
Example #17
Source File: Printer.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
private void export(XMLWriter writer, Group g) throws IOException { Properties attributes = new Properties(); attributes.setProperty("difference", Boolean.toString(true)); writer.startTag(Parser.GROUP_ELEMENT, attributes); writer.writeProperties(g.getProperties()); if (g.getMethod() != null) { export(writer, g.getMethod()); } InputGraph previous = null; for (InputGraph graph : g.getGraphs()) { export(writer, graph, previous, true); previous = graph; } writer.endTag(); }
Example #18
Source File: Parser.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
@Override protected Group start() throws SAXException { Group group = new Group(); Parser.this.difference = false; String differenceProperty = this.readAttribute(DIFFERENCE_PROPERTY); if (differenceProperty != null && (differenceProperty.equals("1") || differenceProperty.equals("true"))) { Parser.this.difference = true; } ParseMonitor monitor = getMonitor(); if (monitor != null) { monitor.setState(group.getName()); } return group; }
Example #19
Source File: DiagramViewModel.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
public DiagramViewModel(Group g, FilterChain filterChain, FilterChain sequenceFilterChain) { super(calculateStringList(g)); this.showNodeHull = true; this.showBlocks = true; this.group = g; assert filterChain != null; this.filterChain = filterChain; assert sequenceFilterChain != null; this.sequenceFilterChain = sequenceFilterChain; hiddenNodes = new HashSet<Integer>(); onScreenNodes = new HashSet<Integer>(); selectedNodes = new HashSet<Integer>(); super.getChangedEvent().addListener(this); diagramChangedEvent = new ChangedEvent<DiagramViewModel>(this); viewChangedEvent = new ChangedEvent<DiagramViewModel>(this); viewPropertiesChangedEvent = new ChangedEvent<DiagramViewModel>(this); groupChangedEvent = new ChangedEvent<DiagramViewModel>(this); groupChangedEvent.addListener(groupChangedListener); groupChangedEvent.fire(); filterChain.getChangedEvent().addListener(filterChainChangedListener); sequenceFilterChain.getChangedEvent().addListener(filterChainChangedListener); }
Example #20
Source File: DiagramViewModel.java From hottub with GNU General Public License v2.0 | 6 votes |
public DiagramViewModel(Group g, FilterChain filterChain, FilterChain sequenceFilterChain) { super(calculateStringList(g)); this.showNodeHull = true; this.showBlocks = true; this.group = g; assert filterChain != null; this.filterChain = filterChain; assert sequenceFilterChain != null; this.sequenceFilterChain = sequenceFilterChain; hiddenNodes = new HashSet<Integer>(); onScreenNodes = new HashSet<Integer>(); selectedNodes = new HashSet<Integer>(); super.getChangedEvent().addListener(this); diagramChangedEvent = new ChangedEvent<DiagramViewModel>(this); viewChangedEvent = new ChangedEvent<DiagramViewModel>(this); viewPropertiesChangedEvent = new ChangedEvent<DiagramViewModel>(this); groupChangedEvent = new ChangedEvent<DiagramViewModel>(this); groupChangedEvent.addListener(groupChangedListener); groupChangedEvent.fire(); filterChain.getChangedEvent().addListener(filterChainChangedListener); sequenceFilterChain.getChangedEvent().addListener(filterChainChangedListener); }
Example #21
Source File: OutlineTopComponent.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
private void initReceivers() { final GroupCallback callback = new GroupCallback() { public void started(Group g) { getDocument().addGroup(g); } }; Collection<? extends GroupReceiver> receivers = Lookup.getDefault().lookupAll(GroupReceiver.class); if (receivers.size() > 0) { JPanel panel = new JPanel(); panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); for (GroupReceiver r : receivers) { Component c = r.init(callback); panel.add(c); } jPanel2.add(panel, BorderLayout.PAGE_START); } }
Example #22
Source File: DiagramViewModel.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
public DiagramViewModel(Group g, FilterChain filterChain, FilterChain sequenceFilterChain) { super(calculateStringList(g)); this.showNodeHull = true; this.showBlocks = true; this.group = g; assert filterChain != null; this.filterChain = filterChain; assert sequenceFilterChain != null; this.sequenceFilterChain = sequenceFilterChain; hiddenNodes = new HashSet<Integer>(); onScreenNodes = new HashSet<Integer>(); selectedNodes = new HashSet<Integer>(); super.getChangedEvent().addListener(this); diagramChangedEvent = new ChangedEvent<DiagramViewModel>(this); viewChangedEvent = new ChangedEvent<DiagramViewModel>(this); viewPropertiesChangedEvent = new ChangedEvent<DiagramViewModel>(this); groupChangedEvent = new ChangedEvent<DiagramViewModel>(this); groupChangedEvent.addListener(groupChangedListener); groupChangedEvent.fire(); filterChain.getChangedEvent().addListener(filterChainChangedListener); sequenceFilterChain.getChangedEvent().addListener(filterChainChangedListener); }
Example #23
Source File: StandardGroupOrganizer.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
public List<Pair<String, List<Group>>> organize(List<String> subFolders, List<Group> groups) { List<Pair<String, List<Group>>> result = new ArrayList<Pair<String, List<Group>>>(); if (groups.size() == 1 && subFolders.size() > 0) { result.add(new Pair<String, List<Group>>("", groups)); } else { for (Group g : groups) { List<Group> children = new ArrayList<Group>(); children.add(g); Pair<String, List<Group>> p = new Pair<String, List<Group>>(); p.setLeft(g.getName()); p.setRight(children); result.add(p); } } return result; }
Example #24
Source File: JavaGroupOrganizer.java From hottub with GNU General Public License v2.0 | 6 votes |
public List<Pair<String, List<Group>>> organize(List<String> subFolders, List<Group> groups) { List<Pair<String, List<Group>>> result = new ArrayList<Pair<String, List<Group>>>(); if (subFolders.size() == 0) { buildResult(result, groups, packageNameProvider); } else if (subFolders.size() == 1) { buildResult(result, groups, classNameProvider); } else if (subFolders.size() == 2) { for (Group g : groups) { List<Group> children = new ArrayList<Group>(); children.add(g); Pair<String, List<Group>> p = new Pair<String, List<Group>>(); p.setLeft(reducedNameProvider.getName(g)); p.setRight(children); result.add(p); } } else { result.add(new Pair<String, List<Group>>("", groups)); } return result; }
Example #25
Source File: JavaGroupOrganizer.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
private void buildResult(List<Pair<String, List<Group>>> result, List<Group> groups, NameProvider provider) { HashMap<String, List<Group>> map = new HashMap<String, List<Group>>(); for (Group g : groups) { String s = provider.getName(g); if (!map.containsKey(s)) { List<Group> list = new ArrayList<Group>(); Pair<String, List<Group>> pair = new Pair<String, List<Group>>(s, list); result.add(pair); map.put(s, list); } List<Group> curList = map.get(s); curList.add(g); } Collections.sort(result, new Comparator<Pair<String, List<Group>>>() { public int compare(Pair<String, List<Group>> a, Pair<String, List<Group>> b) { return a.getLeft().compareTo(b.getLeft()); } }); }
Example #26
Source File: JavaGroupOrganizer.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
public List<Pair<String, List<Group>>> organize(List<String> subFolders, List<Group> groups) { List<Pair<String, List<Group>>> result = new ArrayList<Pair<String, List<Group>>>(); if (subFolders.size() == 0) { buildResult(result, groups, packageNameProvider); } else if (subFolders.size() == 1) { buildResult(result, groups, classNameProvider); } else if (subFolders.size() == 2) { for (Group g : groups) { List<Group> children = new ArrayList<Group>(); children.add(g); Pair<String, List<Group>> p = new Pair<String, List<Group>>(); p.setLeft(reducedNameProvider.getName(g)); p.setRight(children); result.add(p); } } else { result.add(new Pair<String, List<Group>>("", groups)); } return result; }
Example #27
Source File: JavaGroupOrganizer.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
public List<Pair<String, List<Group>>> organize(List<String> subFolders, List<Group> groups) { List<Pair<String, List<Group>>> result = new ArrayList<Pair<String, List<Group>>>(); if (subFolders.size() == 0) { buildResult(result, groups, packageNameProvider); } else if (subFolders.size() == 1) { buildResult(result, groups, classNameProvider); } else if (subFolders.size() == 2) { for (Group g : groups) { List<Group> children = new ArrayList<Group>(); children.add(g); Pair<String, List<Group>> p = new Pair<String, List<Group>>(); p.setLeft(reducedNameProvider.getName(g)); p.setRight(children); result.add(p); } } else { result.add(new Pair<String, List<Group>>("", groups)); } return result; }
Example #28
Source File: Client.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public void started(final Group g) { try { RegexpPropertyMatcher matcher = new RegexpPropertyMatcher("name", ".*" + networkTextField.getText() + ".*"); if (g.getProperties().selectSingle(matcher) != null && networkTextField.isEnabled()) { socket.getOutputStream().write('y'); callback.started(g); } else { socket.getOutputStream().write('n'); } } catch (IOException e) { } }
Example #29
Source File: SaveAsAction.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
protected void performAction(Node[] activatedNodes) { GraphDocument doc = new GraphDocument(); for (Node n : activatedNodes) { Group group = n.getLookup().lookup(Group.class); doc.addGroup(group); } save(doc); }
Example #30
Source File: SaveAsAction.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
protected boolean enable(Node[] nodes) { int cnt = 0; for (Node n : nodes) { cnt += n.getLookup().lookupAll(Group.class).size(); } return cnt > 0; }