com.sun.hotspot.igv.data.Properties Java Examples

The following examples show how to use com.sun.hotspot.igv.data.Properties. 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: FindPanel.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public void updateComboBox(List<Figure> figures) {

        String sel = (String) nameComboBox.getSelectedItem();
        SortedSet<String> propertyNames = new TreeSet<String>();

        for (Figure f : figures) {
            Properties prop = f.getProperties();
            for (Property p : prop) {
                if (!propertyNames.contains(p.getName())) {
                    propertyNames.add(p.getName());
                }
            }
        }

        for (String s : propertyNames) {
            nameComboBox.addItem(s);
        }
        nameComboBox.setSelectedItem(sel);
    }
 
Example #2
Source File: ConnectionFilter.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public void apply(Diagram diagram) {

        Properties.PropertySelector<Figure> selector = new Properties.PropertySelector<Figure>(diagram.getFigures());
        for (ConnectionStyleRule rule : connectionStyleRules) {
            List<Figure> figures = null;
            if (rule.getSelector() != null) {
                figures = rule.getSelector().selected(diagram);
            } else {
                figures = diagram.getFigures();
            }

            for (Figure f : figures) {
                for (OutputSlot os : f.getOutputSlots()) {
                    for (Connection c : os.getConnections()) {
                        if (figures.contains(c.getInputSlot().getFigure())) {
                            c.setStyle(rule.getLineStyle());
                            c.setColor(rule.getLineColor());
                        }
                    }
                }
            }
        }
    }
 
Example #3
Source File: BytecodeNode.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public BytecodeNode(InputBytecode bytecode, InputGraph graph, String bciValue) {

        super(Children.LEAF);
        this.setDisplayName(bytecode.getBci() + " " + bytecode.getName());

        bciValue = bytecode.getBci() + " " + bciValue;
        bciValue = bciValue.trim();

        Properties.PropertySelector<InputNode> selector = new Properties.PropertySelector<InputNode>(graph.getNodes());
        StringPropertyMatcher matcher = new StringPropertyMatcher("bci", bciValue);
        List<InputNode> nodeList = selector.selectMultiple(matcher);
        if (nodeList.size() > 0) {
            nodes = new HashSet<InputNode>();
            for (InputNode n : nodeList) {
                nodes.add(n);
            }
            this.setDisplayName(this.getDisplayName() + " (" + nodes.size() + " nodes)");
        }
    }
 
Example #4
Source File: Printer.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
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 #5
Source File: Printer.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
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 #6
Source File: BytecodeNode.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public BytecodeNode(InputBytecode bytecode, InputGraph graph, String bciValue) {

        super(Children.LEAF);
        this.setDisplayName(bytecode.getBci() + " " + bytecode.getName());

        bciValue = bytecode.getBci() + " " + bciValue;
        bciValue = bciValue.trim();

        Properties.PropertySelector<InputNode> selector = new Properties.PropertySelector<InputNode>(graph.getNodes());
        StringPropertyMatcher matcher = new StringPropertyMatcher("bci", bciValue);
        List<InputNode> nodeList = selector.selectMultiple(matcher);
        if (nodeList.size() > 0) {
            nodes = new HashSet<InputNode>();
            for (InputNode n : nodeList) {
                nodes.add(n);
            }
            this.setDisplayName(this.getDisplayName() + " (" + nodes.size() + " nodes)");
        }
    }
 
Example #7
Source File: Printer.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
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 #8
Source File: Printer.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
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 #9
Source File: FindPanel.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public void updateComboBox(List<Figure> figures) {

        String sel = (String) nameComboBox.getSelectedItem();
        SortedSet<String> propertyNames = new TreeSet<String>();

        for (Figure f : figures) {
            Properties prop = f.getProperties();
            for (Property p : prop) {
                if (!propertyNames.contains(p.getName())) {
                    propertyNames.add(p.getName());
                }
            }
        }

        for (String s : propertyNames) {
            nameComboBox.addItem(s);
        }
        nameComboBox.setSelectedItem(sel);
    }
 
Example #10
Source File: ConnectionFilter.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public void apply(Diagram diagram) {

        Properties.PropertySelector<Figure> selector = new Properties.PropertySelector<Figure>(diagram.getFigures());
        for (ConnectionStyleRule rule : connectionStyleRules) {
            List<Figure> figures = null;
            if (rule.getSelector() != null) {
                figures = rule.getSelector().selected(diagram);
            } else {
                figures = diagram.getFigures();
            }

            for (Figure f : figures) {
                for (OutputSlot os : f.getOutputSlots()) {
                    for (Connection c : os.getConnections()) {
                        if (figures.contains(c.getInputSlot().getFigure())) {
                            c.setStyle(rule.getLineStyle());
                            c.setColor(rule.getLineColor());
                        }
                    }
                }
            }
        }
    }
 
Example #11
Source File: Diagram.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public Figure getRootFigure() {
    Properties.PropertySelector<Figure> selector = new Properties.PropertySelector<Figure>(figures);
    Figure root = selector.selectSingle("name", "Root");
    if (root == null) {
        root = selector.selectSingle("name", "Start");
    }
    if (root == null) {
        List<Figure> rootFigures = getRootFigures();
        if (rootFigures.size() > 0) {
            root = rootFigures.get(0);
        } else if (figures.size() > 0) {
            root = figures.get(0);
        }
    }

    return root;
}
 
Example #12
Source File: FindPanel.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public void updateComboBox(List<Figure> figures) {

        String sel = (String) nameComboBox.getSelectedItem();
        SortedSet<String> propertyNames = new TreeSet<String>();

        for (Figure f : figures) {
            Properties prop = f.getProperties();
            for (Property p : prop) {
                if (!propertyNames.contains(p.getName())) {
                    propertyNames.add(p.getName());
                }
            }
        }

        for (String s : propertyNames) {
            nameComboBox.addItem(s);
        }
        nameComboBox.setSelectedItem(sel);
    }
 
Example #13
Source File: ConnectionFilter.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public void apply(Diagram diagram) {

        Properties.PropertySelector<Figure> selector = new Properties.PropertySelector<Figure>(diagram.getFigures());
        for (ConnectionStyleRule rule : connectionStyleRules) {
            List<Figure> figures = null;
            if (rule.getSelector() != null) {
                figures = rule.getSelector().selected(diagram);
            } else {
                figures = diagram.getFigures();
            }

            for (Figure f : figures) {
                for (OutputSlot os : f.getOutputSlots()) {
                    for (Connection c : os.getConnections()) {
                        if (figures.contains(c.getInputSlot().getFigure())) {
                            c.setStyle(rule.getLineStyle());
                            c.setColor(rule.getLineColor());
                        }
                    }
                }
            }
        }
    }
 
Example #14
Source File: FindPanel.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public void updateComboBox(List<Figure> figures) {

        String sel = (String) nameComboBox.getSelectedItem();
        SortedSet<String> propertyNames = new TreeSet<String>();

        for (Figure f : figures) {
            Properties prop = f.getProperties();
            for (Property p : prop) {
                if (!propertyNames.contains(p.getName())) {
                    propertyNames.add(p.getName());
                }
            }
        }

        for (String s : propertyNames) {
            nameComboBox.addItem(s);
        }
        nameComboBox.setSelectedItem(sel);
    }
 
Example #15
Source File: BytecodeNode.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public BytecodeNode(InputBytecode bytecode, InputGraph graph, String bciValue) {

        super(Children.LEAF);
        this.setDisplayName(bytecode.getBci() + " " + bytecode.getName());

        bciValue = bytecode.getBci() + " " + bciValue;
        bciValue = bciValue.trim();

        Properties.PropertySelector<InputNode> selector = new Properties.PropertySelector<InputNode>(graph.getNodes());
        StringPropertyMatcher matcher = new StringPropertyMatcher("bci", bciValue);
        List<InputNode> nodeList = selector.selectMultiple(matcher);
        if (nodeList.size() > 0) {
            nodes = new HashSet<InputNode>();
            for (InputNode n : nodeList) {
                nodes.add(n);
            }
            this.setDisplayName(this.getDisplayName() + " (" + nodes.size() + " nodes)");
        }
    }
 
Example #16
Source File: Printer.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
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 #17
Source File: FindPanel.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public void updateComboBox(List<Figure> figures) {

        String sel = (String) nameComboBox.getSelectedItem();
        SortedSet<String> propertyNames = new TreeSet<String>();

        for (Figure f : figures) {
            Properties prop = f.getProperties();
            for (Property p : prop) {
                if (!propertyNames.contains(p.getName())) {
                    propertyNames.add(p.getName());
                }
            }
        }

        for (String s : propertyNames) {
            nameComboBox.addItem(s);
        }
        nameComboBox.setSelectedItem(sel);
    }
 
Example #18
Source File: ConnectionFilter.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public void apply(Diagram diagram) {

        Properties.PropertySelector<Figure> selector = new Properties.PropertySelector<Figure>(diagram.getFigures());
        for (ConnectionStyleRule rule : connectionStyleRules) {
            List<Figure> figures = null;
            if (rule.getSelector() != null) {
                figures = rule.getSelector().selected(diagram);
            } else {
                figures = diagram.getFigures();
            }

            for (Figure f : figures) {
                for (OutputSlot os : f.getOutputSlots()) {
                    for (Connection c : os.getConnections()) {
                        if (figures.contains(c.getInputSlot().getFigure())) {
                            c.setStyle(rule.getLineStyle());
                            c.setColor(rule.getLineColor());
                        }
                    }
                }
            }
        }
    }
 
Example #19
Source File: ConnectionFilter.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public void apply(Diagram diagram) {

        Properties.PropertySelector<Figure> selector = new Properties.PropertySelector<Figure>(diagram.getFigures());
        for (ConnectionStyleRule rule : connectionStyleRules) {
            List<Figure> figures = null;
            if (rule.getSelector() != null) {
                figures = rule.getSelector().selected(diagram);
            } else {
                figures = diagram.getFigures();
            }

            for (Figure f : figures) {
                for (OutputSlot os : f.getOutputSlots()) {
                    for (Connection c : os.getConnections()) {
                        if (figures.contains(c.getInputSlot().getFigure())) {
                            c.setStyle(rule.getLineStyle());
                            c.setColor(rule.getLineColor());
                        }
                    }
                }
            }
        }
    }
 
Example #20
Source File: ConnectionFilter.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public void apply(Diagram diagram) {

        Properties.PropertySelector<Figure> selector = new Properties.PropertySelector<Figure>(diagram.getFigures());
        for (ConnectionStyleRule rule : connectionStyleRules) {
            List<Figure> figures = null;
            if (rule.getSelector() != null) {
                figures = rule.getSelector().selected(diagram);
            } else {
                figures = diagram.getFigures();
            }

            for (Figure f : figures) {
                for (OutputSlot os : f.getOutputSlots()) {
                    for (Connection c : os.getConnections()) {
                        if (figures.contains(c.getInputSlot().getFigure())) {
                            c.setStyle(rule.getLineStyle());
                            c.setColor(rule.getLineColor());
                        }
                    }
                }
            }
        }
    }
 
Example #21
Source File: BytecodeNode.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public BytecodeNode(InputBytecode bytecode, InputGraph graph, String bciValue) {

        super(Children.LEAF);
        this.setDisplayName(bytecode.getBci() + " " + bytecode.getName());

        bciValue = bytecode.getBci() + " " + bciValue;
        bciValue = bciValue.trim();

        Properties.PropertySelector<InputNode> selector = new Properties.PropertySelector<InputNode>(graph.getNodes());
        StringPropertyMatcher matcher = new StringPropertyMatcher("bci", bciValue);
        List<InputNode> nodeList = selector.selectMultiple(matcher);
        if (nodeList.size() > 0) {
            nodes = new HashSet<InputNode>();
            for (InputNode n : nodeList) {
                nodes.add(n);
            }
            this.setDisplayName(this.getDisplayName() + " (" + nodes.size() + " nodes)");
        }
    }
 
Example #22
Source File: FindPanel.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public void updateComboBox(List<Figure> figures) {

        String sel = (String) nameComboBox.getSelectedItem();
        SortedSet<String> propertyNames = new TreeSet<String>();

        for (Figure f : figures) {
            Properties prop = f.getProperties();
            for (Property p : prop) {
                if (!propertyNames.contains(p.getName())) {
                    propertyNames.add(p.getName());
                }
            }
        }

        for (String s : propertyNames) {
            nameComboBox.addItem(s);
        }
        nameComboBox.setSelectedItem(sel);
    }
 
Example #23
Source File: Printer.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
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 #24
Source File: BytecodeNode.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
public BytecodeNode(InputBytecode bytecode, InputGraph graph, String bciValue) {

        super(Children.LEAF);
        String displayName = bytecode.getBci() + " " + bytecode.getName() + " " + bytecode.getOperands();

        bciValue = bytecode.getBci() + " " + bciValue;
        bciValue = bciValue.trim();

        Properties.PropertySelector<InputNode> selector = new Properties.PropertySelector<>(graph.getNodes());
        StringPropertyMatcher matcher = new StringPropertyMatcher("bci", bciValue);
        List<InputNode> nodeList = selector.selectMultiple(matcher);
        if (nodeList.size() > 0) {
            nodes = new LinkedHashSet<>();
            for (InputNode n : nodeList) {
                nodes.add(n);
            }
            displayName += " (" + nodes.size() + " nodes)";
        }

        if (bytecode.getComment() != null) {
            displayName += " // " + bytecode.getComment();
        }

        this.setDisplayName(displayName);
    }
 
Example #25
Source File: BinaryParser.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private void parseProperties(Properties properties) throws IOException {
    int propCount = readShort();
    for (int j = 0; j < propCount; j++) {
        String key = readPoolObject(String.class);
        Object value = readPropertyObject();
        properties.setProperty(key, value != null ? value.toString() : "null");
    }
}
 
Example #26
Source File: Printer.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private Properties createProperties(InputEdge edge) {
    Properties p = new Properties();
    p.setProperty(Parser.TO_INDEX_PROPERTY, Integer.toString(edge.getToIndex()));
    p.setProperty(Parser.TO_PROPERTY, Integer.toString(edge.getTo()));
    p.setProperty(Parser.FROM_PROPERTY, Integer.toString(edge.getFrom()));
    return p;
}
 
Example #27
Source File: XMLWriter.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public void simpleTag(String name, Properties attributes) throws IOException {
    inner.write("<" + name);

    for (Property p : attributes) {
        inner.write(" " + p.getName() + "=\"");
        write(p.getValue().toCharArray());
        inner.write("\"");
    }

    inner.write("/>\n");
}
 
Example #28
Source File: Printer.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private Properties createProperties(InputEdge edge) {
    Properties p = new Properties();
    p.setProperty(Parser.TO_INDEX_PROPERTY, Integer.toString(edge.getToIndex()));
    p.setProperty(Parser.TO_PROPERTY, Integer.toString(edge.getTo()));
    p.setProperty(Parser.FROM_PROPERTY, Integer.toString(edge.getFrom()));
    return p;
}
 
Example #29
Source File: XMLWriter.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public void simpleTag(String name, Properties attributes) throws IOException {
    inner.write("<" + name);

    for (Property p : attributes) {
        inner.write(" " + p.getName() + "=\"");
        write(p.getValue().toCharArray());
        inner.write("\"");
    }

    inner.write("/>\n");
}
 
Example #30
Source File: PropertiesSheet.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public static void initializeSheet(final Properties properties, Sheet s) {

        Sheet.Set set1 = Sheet.createPropertiesSet();
        set1.setDisplayName("Properties");
        for (final Property p : properties) {
            Node.Property<String> prop = new Node.Property<String>(String.class) {

                @Override
                public boolean canRead() {
                    return true;
                }

                @Override
                public String getValue() throws IllegalAccessException, InvocationTargetException {
                    return p.getValue();
                }

                @Override
                public boolean canWrite() {
                    return false;
                }

                @Override
                public void setValue(String arg0) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException {
                    properties.setProperty(p.getName(), arg0);
                }
            };
            prop.setName(p.getName());
            set1.put(prop);
        }
        s.put(set1);
    }