Mercurial > hg > truffle
changeset 4379:fe0117cb71f2
Removed graph-to-text component and associated classes from igv.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Fri, 27 Jan 2012 23:32:59 +0100 |
parents | 0c632ed89063 |
children | fce0f82aee97 |
files | src/share/tools/IdealGraphVisualizer/Graal/build.xml src/share/tools/IdealGraphVisualizer/Graal/nbproject/build-impl.xml src/share/tools/IdealGraphVisualizer/Graal/nbproject/genfiles.properties src/share/tools/IdealGraphVisualizer/Graal/nbproject/project.xml src/share/tools/IdealGraphVisualizer/Graal/src/META-INF/services/com.sun.hotspot.igv.graphtotext.services.GraphToTextConverter src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/GraalGraphToTextConverter.java src/share/tools/IdealGraphVisualizer/GraphTextEditor/build.xml src/share/tools/IdealGraphVisualizer/GraphTextEditor/manifest.mf src/share/tools/IdealGraphVisualizer/GraphTextEditor/nbproject/build-impl.xml src/share/tools/IdealGraphVisualizer/GraphTextEditor/nbproject/genfiles.properties src/share/tools/IdealGraphVisualizer/GraphTextEditor/nbproject/project.properties src/share/tools/IdealGraphVisualizer/GraphTextEditor/nbproject/project.xml src/share/tools/IdealGraphVisualizer/GraphTextEditor/nbproject/suite.properties src/share/tools/IdealGraphVisualizer/GraphToText/build.xml src/share/tools/IdealGraphVisualizer/GraphToText/manifest.mf src/share/tools/IdealGraphVisualizer/GraphToText/nbproject/build-impl.xml src/share/tools/IdealGraphVisualizer/GraphToText/nbproject/genfiles.properties src/share/tools/IdealGraphVisualizer/GraphToText/nbproject/platform.properties src/share/tools/IdealGraphVisualizer/GraphToText/nbproject/project.properties src/share/tools/IdealGraphVisualizer/GraphToText/nbproject/project.xml src/share/tools/IdealGraphVisualizer/GraphToText/nbproject/suite.properties src/share/tools/IdealGraphVisualizer/ServerCompiler/nbproject/project.xml src/share/tools/IdealGraphVisualizer/ServerCompiler/src/META-INF/services/com.sun.hotspot.igv.graphtotext.services.GraphToTextConverter src/share/tools/IdealGraphVisualizer/ServerCompiler/src/com/sun/hotspot/igv/servercompiler/ServerCompilerGraphToTextConverter.java src/share/tools/IdealGraphVisualizer/nbproject/project.properties |
diffstat | 25 files changed, 143 insertions(+), 1000 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/tools/IdealGraphVisualizer/Graal/build.xml Fri Jan 27 23:31:28 2012 +0100 +++ b/src/share/tools/IdealGraphVisualizer/Graal/build.xml Fri Jan 27 23:32:59 2012 +0100 @@ -1,8 +1,8 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- You may freely edit this file. See harness/README in the NetBeans platform --> -<!-- for some information on what you could do (e.g. targets to override). --> -<!-- If you delete this file and reopen the project it will be recreated. --> -<project name="com.sun.hotspot.igv.graal" default="netbeans" basedir="."> - <description>Builds, tests, and runs the project com.sun.hotspot.igv.graal.</description> - <import file="nbproject/build-impl.xml"/> -</project> +<?xml version="1.0" encoding="UTF-8"?> +<!-- You may freely edit this file. See harness/README in the NetBeans platform --> +<!-- for some information on what you could do (e.g. targets to override). --> +<!-- If you delete this file and reopen the project it will be recreated. --> +<project name="com.sun.hotspot.igv.graal" default="netbeans" basedir="."> + <description>Builds, tests, and runs the project com.sun.hotspot.igv.graal.</description> + <import file="nbproject/build-impl.xml"/> +</project>
--- a/src/share/tools/IdealGraphVisualizer/Graal/nbproject/build-impl.xml Fri Jan 27 23:31:28 2012 +0100 +++ b/src/share/tools/IdealGraphVisualizer/Graal/nbproject/build-impl.xml Fri Jan 27 23:32:59 2012 +0100 @@ -1,45 +1,45 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -*** GENERATED FROM project.xml - DO NOT EDIT *** -*** EDIT ../build.xml INSTEAD *** ---> -<project name="com.sun.hotspot.igv.graal-impl" basedir=".."> - <fail message="Please build using Ant 1.7.1 or higher."> - <condition> - <not> - <antversion atleast="1.7.1"/> - </not> - </condition> - </fail> - <property file="nbproject/private/suite-private.properties"/> - <property file="nbproject/suite.properties"/> - <fail unless="suite.dir">You must set 'suite.dir' to point to your containing module suite</fail> - <property file="${suite.dir}/nbproject/private/platform-private.properties"/> - <property file="${suite.dir}/nbproject/platform.properties"/> - <macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2"> - <attribute name="name"/> - <attribute name="value"/> - <sequential> - <property name="@{name}" value="${@{value}}"/> - </sequential> - </macrodef> - <macrodef name="evalprops" uri="http://www.netbeans.org/ns/nb-module-project/2"> - <attribute name="property"/> - <attribute name="value"/> - <sequential> - <property name="@{property}" value="@{value}"/> - </sequential> - </macrodef> - <property file="${user.properties.file}"/> - <nbmproject2:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/> - <nbmproject2:property name="nbplatform.active.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/> - <nbmproject2:evalprops property="cluster.path.evaluated" value="${cluster.path}" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/> - <fail message="Path to 'platform' cluster missing in $${cluster.path} property or using corrupt Netbeans Platform (missing harness)."> - <condition> - <not> - <contains string="${cluster.path.evaluated}" substring="platform"/> - </not> - </condition> - </fail> - <import file="${harness.dir}/build.xml"/> -</project> +<?xml version="1.0" encoding="UTF-8"?> +<!-- +*** GENERATED FROM project.xml - DO NOT EDIT *** +*** EDIT ../build.xml INSTEAD *** +--> +<project name="com.sun.hotspot.igv.graal-impl" basedir=".."> + <fail message="Please build using Ant 1.7.1 or higher."> + <condition> + <not> + <antversion atleast="1.7.1"/> + </not> + </condition> + </fail> + <property file="nbproject/private/suite-private.properties"/> + <property file="nbproject/suite.properties"/> + <fail unless="suite.dir">You must set 'suite.dir' to point to your containing module suite</fail> + <property file="${suite.dir}/nbproject/private/platform-private.properties"/> + <property file="${suite.dir}/nbproject/platform.properties"/> + <macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2"> + <attribute name="name"/> + <attribute name="value"/> + <sequential> + <property name="@{name}" value="${@{value}}"/> + </sequential> + </macrodef> + <macrodef name="evalprops" uri="http://www.netbeans.org/ns/nb-module-project/2"> + <attribute name="property"/> + <attribute name="value"/> + <sequential> + <property name="@{property}" value="@{value}"/> + </sequential> + </macrodef> + <property file="${user.properties.file}"/> + <nbmproject2:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/> + <nbmproject2:property name="nbplatform.active.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/> + <nbmproject2:evalprops property="cluster.path.evaluated" value="${cluster.path}" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/> + <fail message="Path to 'platform' cluster missing in $${cluster.path} property or using corrupt Netbeans Platform (missing harness)."> + <condition> + <not> + <contains string="${cluster.path.evaluated}" substring="platform"/> + </not> + </condition> + </fail> + <import file="${harness.dir}/build.xml"/> +</project>
--- a/src/share/tools/IdealGraphVisualizer/Graal/nbproject/genfiles.properties Fri Jan 27 23:31:28 2012 +0100 +++ b/src/share/tools/IdealGraphVisualizer/Graal/nbproject/genfiles.properties Fri Jan 27 23:32:59 2012 +0100 @@ -1,8 +1,8 @@ -build.xml.data.CRC32=2bb741e3 -build.xml.script.CRC32=3534d355 -build.xml.stylesheet.CRC32=a56c6a5b@1.45.1 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=2bb741e3 -nbproject/build-impl.xml.script.CRC32=2867f2d5 -nbproject/build-impl.xml.stylesheet.CRC32=238281d1@1.45.1 +build.xml.data.CRC32=24f39af6 +build.xml.script.CRC32=3534d355 +build.xml.stylesheet.CRC32=a56c6a5b@2.47.1 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=24f39af6 +nbproject/build-impl.xml.script.CRC32=2867f2d5 +nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.47.1
--- a/src/share/tools/IdealGraphVisualizer/Graal/nbproject/project.xml Fri Jan 27 23:31:28 2012 +0100 +++ b/src/share/tools/IdealGraphVisualizer/Graal/nbproject/project.xml Fri Jan 27 23:32:59 2012 +0100 @@ -1,53 +1,45 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://www.netbeans.org/ns/project/1"> - <type>org.netbeans.modules.apisupport.project</type> - <configuration> - <data xmlns="http://www.netbeans.org/ns/nb-module-project/3"> - <code-name-base>com.sun.hotspot.igv.graal</code-name-base> - <suite-component/> - <module-dependencies> - <dependency> - <code-name-base>com.sun.hotspot.igv.data</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>1.0</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>com.sun.hotspot.igv.filter</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>1.0</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>com.sun.hotspot.igv.graph</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>1.0</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>com.sun.hotspot.igv.graphtotext</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>1.0</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>com.sun.hotspot.igv.structuredtext</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>1.0</specification-version> - </run-dependency> - </dependency> - </module-dependencies> - <public-packages/> - </data> - </configuration> -</project> +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://www.netbeans.org/ns/project/1"> + <type>org.netbeans.modules.apisupport.project</type> + <configuration> + <data xmlns="http://www.netbeans.org/ns/nb-module-project/3"> + <code-name-base>com.sun.hotspot.igv.graal</code-name-base> + <suite-component/> + <module-dependencies> + <dependency> + <code-name-base>com.sun.hotspot.igv.data</code-name-base> + <build-prerequisite/> + <compile-dependency/> + <run-dependency> + <specification-version>1.0</specification-version> + </run-dependency> + </dependency> + <dependency> + <code-name-base>com.sun.hotspot.igv.filter</code-name-base> + <build-prerequisite/> + <compile-dependency/> + <run-dependency> + <specification-version>1.0</specification-version> + </run-dependency> + </dependency> + <dependency> + <code-name-base>com.sun.hotspot.igv.graph</code-name-base> + <build-prerequisite/> + <compile-dependency/> + <run-dependency> + <specification-version>1.0</specification-version> + </run-dependency> + </dependency> + <dependency> + <code-name-base>com.sun.hotspot.igv.structuredtext</code-name-base> + <build-prerequisite/> + <compile-dependency/> + <run-dependency> + <specification-version>1.0</specification-version> + </run-dependency> + </dependency> + </module-dependencies> + <public-packages/> + </data> + </configuration> +</project>
--- a/src/share/tools/IdealGraphVisualizer/Graal/src/META-INF/services/com.sun.hotspot.igv.graphtotext.services.GraphToTextConverter Fri Jan 27 23:31:28 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -com.sun.hotspot.igv.graal.GraalGraphToTextConverter \ No newline at end of file
--- a/src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/GraalGraphToTextConverter.java Fri Jan 27 23:31:28 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,209 +0,0 @@ -/* - * Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -package com.sun.hotspot.igv.graal; - -import com.sun.hotspot.igv.data.InputBlock; -import com.sun.hotspot.igv.data.InputEdge; -import com.sun.hotspot.igv.data.InputGraph; -import com.sun.hotspot.igv.data.InputNode; -import com.sun.hotspot.igv.data.Properties; -import com.sun.hotspot.igv.data.Properties.PropertyMatcher; -import com.sun.hotspot.igv.graph.Diagram; -import com.sun.hotspot.igv.graph.Figure; -import com.sun.hotspot.igv.graphtotext.services.GraphToTextConverter; -import com.sun.hotspot.igv.structuredtext.Element; -import com.sun.hotspot.igv.structuredtext.MultiElement; -import com.sun.hotspot.igv.structuredtext.SimpleElement; -import com.sun.hotspot.igv.structuredtext.StructuredText; -import java.awt.Color; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.Set; -import javax.swing.text.Style; -import javax.swing.text.StyleConstants; -import javax.swing.text.StyleContext; - -/** - * @author Peter Hofer - * @author Thomas Wuerthinger - */ -public class GraalGraphToTextConverter implements GraphToTextConverter { - - private Map<InputNode, Set<Figure>> map; - private Map<InputNode, List<InputEdge>> incomingEdges; - private Map<InputNode, List<InputEdge>> outgoingEdges; - private InputGraph graph; - - private Collection<InputNode> sortNodes(Collection<InputNode> nodes) { - List<InputNode> result = new ArrayList<InputNode>(nodes); - Collections.sort(result, InputNode.getPropertyComparator("idx")); - return result; - } - - public StructuredText convert(InputGraph graph, Diagram diagram) { - - this.graph = graph; - map = diagram.calcSourceToFigureRelation(); - - incomingEdges = graph.findAllIngoingEdges(); - outgoingEdges = graph.findAllOutgoingEdges(); - - final StructuredText result = new StructuredText(graph.getName()); - - for (InputBlock b : graph.getBlocks()) { - result.addChild(new SimpleElement("Block " + b.getName() + "\n")); - for (InputNode n : sortNodes(b.getNodes())) { - result.addChild(getNodeElement(n)); - } - } - - boolean first = true; - for (InputNode n : sortNodes(graph.getNodes())) { - if (graph.getBlock(n) == null) { - if (first) { - first = false; - result.addChild(new SimpleElement("No block: \n")); - } - result.addChild(getNodeElement(n)); - } - } - - return result; - } - - private Element getNodeNameElement(InputNode n) { - - final SimpleElement name = new SimpleElement(n.getProperties().get("idx") + " " + n.getProperties().get("name"), calcStyle(n)); - name.addSource(n.getId()); - return name; - } - - private Element getNodeShortElement(InputNode n) { - final SimpleElement id = new SimpleElement(n.getProperties().get("idx"), calcStyle(n)); - id.addSource(n.getId()); - return id; - } - - private Element getNodeElement(InputNode n) { - - final MultiElement result = new MultiElement(); - - result.print("\t"); - result.addChild(getNodeNameElement(n)); - - result.print(" :::"); - - // NOTE: lists in ingoingEdges/outgoingEdges are sorted by from/to slot - // and for slots that are connected with multiple edges, by - // from/to node - - InputEdge[] outgoing = outgoingEdges.get(n).toArray(new InputEdge[0]); - int succCount = outgoing.length - Integer.parseInt(n.getProperties().get("usageCount")); - - int i = 0; - if (outgoing.length > 0 && outgoing[0].getFromIndex() < succCount) { - // Node has successors (each connected to a different slot) - result.print(" Succ = ["); - while (i < outgoing.length && outgoing[i].getFromIndex() < succCount) { - result.print(" "); - result.addChild(getNodeShortElement(graph.getNode(outgoing[i].getTo()))); - result.print(" "); - i++; - } - result.print("]"); - } - if (i < outgoing.length) { - // Node has usages (all connected to a single slot) - result.print(" Usages = ["); - while (i < outgoing.length) { - result.print(" "); - result.addChild(getNodeShortElement(graph.getNode(outgoing[i].getTo()))); - result.print(" "); - i++; - } - result.print("]"); - } - - int predCount = Integer.parseInt(n.getProperties().get("predecessorCount")); - InputEdge[] incoming = incomingEdges.get(n).toArray(new InputEdge[0]); - - int j = 0; - if (incoming.length > 0 && incoming[0].getToIndex() < predCount) { - // Node has predecessors (each connected to a different slot) - result.print(" Pred = ["); - while (j < incoming.length && incoming[j].getToIndex() < predCount) { - result.print(" "); - result.addChild(getNodeShortElement(graph.getNode(incoming[j].getFrom()))); - result.print(" "); - j++; - } - result.print("]"); - } - if (j < incoming.length) { - // Node has inputs (each connected to a different slot) - result.print(" Inputs = ["); - while (j < incoming.length) { - result.print(" "); - result.addChild(getNodeShortElement(graph.getNode(incoming[j].getFrom()))); - result.print(" "); - j++; - } - result.print("]"); - } - - result.print("\n"); - return result; - } - private static final PropertyMatcher MATCHER = new Properties.StringPropertyMatcher("origin", "Graal"); - - public boolean canConvert(InputGraph graph) { - return graph.getGroup().getProperties().selectSingle(MATCHER) != null; - } - - private Color calcColor(InputNode node) { - Set<Figure> figureSet = this.map.get(node); - if (figureSet != null && figureSet.size() == 1) { - return figureSet.iterator().next().getColor(); - } else { - return Color.WHITE; - } - } - - private Color lessColor(Color c) { - return new Color(255 - (255 - c.getRed()) / 4, 255 - (255 - c.getGreen()) / 4, 255 - (255 - c.getBlue()) / 4); - } - - private Style calcStyle(InputNode node) { - Color c = calcColor(node); - Style defaultStyle = StyleContext.getDefaultStyleContext().getStyle(StyleContext.DEFAULT_STYLE); - Style newStyle = StyleContext.getDefaultStyleContext().addStyle(null, defaultStyle); - - StyleConstants.setBackground(newStyle, lessColor(c)); - return newStyle; - } -}
--- a/src/share/tools/IdealGraphVisualizer/GraphTextEditor/build.xml Fri Jan 27 23:31:28 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- You may freely edit this file. See harness/README in the NetBeans platform --> -<!-- for some information on what you could do (e.g. targets to override). --> -<!-- If you delete this file and reopen the project it will be recreated. --> -<project name="com.sun.hotspot.igv.graphtexteditor" default="netbeans" basedir="."> - <description>Builds, tests, and runs the project com.sun.hotspot.igv.graphtexteditor.</description> - <import file="nbproject/build-impl.xml"/> -</project>
--- a/src/share/tools/IdealGraphVisualizer/GraphTextEditor/manifest.mf Fri Jan 27 23:31:28 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -Manifest-Version: 1.0 -OpenIDE-Module: com.sun.hotspot.igv.graphtexteditor -OpenIDE-Module-Layer: com/sun/hotspot/igv/graphtexteditor/layer.xml -OpenIDE-Module-Localizing-Bundle: com/sun/hotspot/igv/graphtexteditor/Bundle.properties -OpenIDE-Module-Specification-Version: 1.0 -
--- a/src/share/tools/IdealGraphVisualizer/GraphTextEditor/nbproject/build-impl.xml Fri Jan 27 23:31:28 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -*** GENERATED FROM project.xml - DO NOT EDIT *** -*** EDIT ../build.xml INSTEAD *** ---> -<project name="com.sun.hotspot.igv.graphtexteditor-impl" basedir=".."> - <fail message="Please build using Ant 1.7.1 or higher."> - <condition> - <not> - <antversion atleast="1.7.1"/> - </not> - </condition> - </fail> - <property file="nbproject/private/suite-private.properties"/> - <property file="nbproject/suite.properties"/> - <fail unless="suite.dir">You must set 'suite.dir' to point to your containing module suite</fail> - <property file="${suite.dir}/nbproject/private/platform-private.properties"/> - <property file="${suite.dir}/nbproject/platform.properties"/> - <macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2"> - <attribute name="name"/> - <attribute name="value"/> - <sequential> - <property name="@{name}" value="${@{value}}"/> - </sequential> - </macrodef> - <macrodef name="evalprops" uri="http://www.netbeans.org/ns/nb-module-project/2"> - <attribute name="property"/> - <attribute name="value"/> - <sequential> - <property name="@{property}" value="@{value}"/> - </sequential> - </macrodef> - <property file="${user.properties.file}"/> - <nbmproject2:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/> - <nbmproject2:property name="nbplatform.active.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/> - <nbmproject2:evalprops property="cluster.path.evaluated" value="${cluster.path}" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/> - <fail message="Path to 'platform' cluster missing in $${cluster.path} property or using corrupt Netbeans Platform (missing harness)."> - <condition> - <not> - <contains string="${cluster.path.evaluated}" substring="platform"/> - </not> - </condition> - </fail> - <import file="${harness.dir}/build.xml"/> -</project>
--- a/src/share/tools/IdealGraphVisualizer/GraphTextEditor/nbproject/genfiles.properties Fri Jan 27 23:31:28 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=f0880ef0 -nbproject/build-impl.xml.script.CRC32=9388e04e -nbproject/build-impl.xml.stylesheet.CRC32=238281d1@1.45.1
--- a/src/share/tools/IdealGraphVisualizer/GraphTextEditor/nbproject/project.properties Fri Jan 27 23:31:28 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ -javac.source=1.5 -javac.compilerargs=-Xlint -Xlint:-serial
--- a/src/share/tools/IdealGraphVisualizer/GraphTextEditor/nbproject/project.xml Fri Jan 27 23:31:28 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,102 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://www.netbeans.org/ns/project/1"> - <type>org.netbeans.modules.apisupport.project</type> - <configuration> - <data xmlns="http://www.netbeans.org/ns/nb-module-project/3"> - <code-name-base>com.sun.hotspot.igv.graphtexteditor</code-name-base> - <suite-component/> - <module-dependencies> - <dependency> - <code-name-base>com.sun.hotspot.igv.data</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>1.0</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>com.sun.hotspot.igv.graph</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>1.0</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>com.sun.hotspot.igv.graphtotext</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>1.0</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>com.sun.hotspot.igv.selectioncoordinator</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>1.0</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>com.sun.hotspot.igv.structuredtext</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>1.0</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>com.sun.hotspot.igv.texteditor</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>1.0</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>com.sun.hotspot.igv.util</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>1.0</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.netbeans.modules.diff</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <release-version>1</release-version> - <specification-version>1.32.1.42.1</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.openide.util</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>7.12.0.1</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.openide.util.lookup</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>8.6.1</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>org.openide.windows</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>6.20</specification-version> - </run-dependency> - </dependency> - </module-dependencies> - <public-packages/> - </data> - </configuration> -</project>
--- a/src/share/tools/IdealGraphVisualizer/GraphTextEditor/nbproject/suite.properties Fri Jan 27 23:31:28 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -suite.dir=${basedir}/..
--- a/src/share/tools/IdealGraphVisualizer/GraphToText/build.xml Fri Jan 27 23:31:28 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- You may freely edit this file. See harness/README in the NetBeans platform --> -<!-- for some information on what you could do (e.g. targets to override). --> -<!-- If you delete this file and reopen the project it will be recreated. --> -<project name="com.sun.hotspot.igv.graphtotext" default="netbeans" basedir="."> - <description>Builds, tests, and runs the project com.sun.hotspot.igv.graphtotext.</description> - <import file="nbproject/build-impl.xml"/> -</project>
--- a/src/share/tools/IdealGraphVisualizer/GraphToText/manifest.mf Fri Jan 27 23:31:28 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ -Manifest-Version: 1.0 -OpenIDE-Module: com.sun.hotspot.igv.graphtotext -OpenIDE-Module-Localizing-Bundle: com/sun/hotspot/igv/graphtotext/Bundle.properties -OpenIDE-Module-Specification-Version: 1.0 -
--- a/src/share/tools/IdealGraphVisualizer/GraphToText/nbproject/build-impl.xml Fri Jan 27 23:31:28 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -*** GENERATED FROM project.xml - DO NOT EDIT *** -*** EDIT ../build.xml INSTEAD *** ---> -<project name="com.sun.hotspot.igv.graphtotext-impl" basedir=".."> - <fail message="Please build using Ant 1.7.1 or higher."> - <condition> - <not> - <antversion atleast="1.7.1"/> - </not> - </condition> - </fail> - <property file="nbproject/private/suite-private.properties"/> - <property file="nbproject/suite.properties"/> - <fail unless="suite.dir">You must set 'suite.dir' to point to your containing module suite</fail> - <property file="${suite.dir}/nbproject/private/platform-private.properties"/> - <property file="${suite.dir}/nbproject/platform.properties"/> - <macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2"> - <attribute name="name"/> - <attribute name="value"/> - <sequential> - <property name="@{name}" value="${@{value}}"/> - </sequential> - </macrodef> - <macrodef name="evalprops" uri="http://www.netbeans.org/ns/nb-module-project/2"> - <attribute name="property"/> - <attribute name="value"/> - <sequential> - <property name="@{property}" value="@{value}"/> - </sequential> - </macrodef> - <property file="${user.properties.file}"/> - <nbmproject2:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/> - <nbmproject2:property name="nbplatform.active.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/> - <nbmproject2:evalprops property="cluster.path.evaluated" value="${cluster.path}" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/> - <fail message="Path to 'platform' cluster missing in $${cluster.path} property or using corrupt Netbeans Platform (missing harness)."> - <condition> - <not> - <contains string="${cluster.path.evaluated}" substring="platform"/> - </not> - </condition> - </fail> - <import file="${harness.dir}/build.xml"/> -</project>
--- a/src/share/tools/IdealGraphVisualizer/GraphToText/nbproject/genfiles.properties Fri Jan 27 23:31:28 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=10eff8f6 -nbproject/build-impl.xml.script.CRC32=b176ca1a -nbproject/build-impl.xml.stylesheet.CRC32=238281d1@1.45.1
--- a/src/share/tools/IdealGraphVisualizer/GraphToText/nbproject/platform.properties Fri Jan 27 23:31:28 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,175 +0,0 @@ -cluster.path=\ - ${nbplatform.active.dir}/ide:\ - ${nbplatform.active.dir}/platform -disabled.modules=\ - org.apache.xml.resolver,\ - org.mozilla.rhino.patched,\ - org.netbeans.api.debugger,\ - org.netbeans.api.java.classpath,\ - org.netbeans.api.xml,\ - org.netbeans.core.browser,\ - org.netbeans.core.execution,\ - org.netbeans.core.ide,\ - org.netbeans.core.multiview,\ - org.netbeans.lib.cvsclient,\ - org.netbeans.lib.terminalemulator,\ - org.netbeans.libs.antlr3.runtime,\ - org.netbeans.libs.bugtracking,\ - org.netbeans.libs.bugzilla,\ - org.netbeans.libs.bytelist,\ - org.netbeans.libs.commons_codec,\ - org.netbeans.libs.commons_logging,\ - org.netbeans.libs.commons_net,\ - org.netbeans.libs.freemarker,\ - org.netbeans.libs.ini4j,\ - org.netbeans.libs.jakarta_oro,\ - org.netbeans.libs.jaxb,\ - org.netbeans.libs.jsch,\ - org.netbeans.libs.jsr223,\ - org.netbeans.libs.jvyamlb,\ - org.netbeans.libs.jzlib,\ - org.netbeans.libs.lucene,\ - org.netbeans.libs.smack,\ - org.netbeans.libs.svnClientAdapter,\ - org.netbeans.libs.svnClientAdapter.javahl,\ - org.netbeans.libs.svnClientAdapter.svnkit,\ - org.netbeans.libs.swingx,\ - org.netbeans.libs.xerces,\ - org.netbeans.modules.autoupdate.services,\ - org.netbeans.modules.autoupdate.ui,\ - org.netbeans.modules.bugtracking,\ - org.netbeans.modules.bugtracking.bridge,\ - org.netbeans.modules.bugzilla,\ - org.netbeans.modules.core.kit,\ - org.netbeans.modules.csl.api,\ - org.netbeans.modules.css.editor,\ - org.netbeans.modules.css.visual,\ - org.netbeans.modules.db,\ - org.netbeans.modules.db.core,\ - org.netbeans.modules.db.dataview,\ - org.netbeans.modules.db.drivers,\ - org.netbeans.modules.db.kit,\ - org.netbeans.modules.db.metadata.model,\ - org.netbeans.modules.db.mysql,\ - org.netbeans.modules.db.sql.editor,\ - org.netbeans.modules.db.sql.visualeditor,\ - org.netbeans.modules.dbapi,\ - org.netbeans.modules.defaults,\ - org.netbeans.modules.derby,\ - org.netbeans.modules.diff,\ - org.netbeans.modules.dlight.nativeexecution,\ - org.netbeans.modules.dlight.terminal,\ - org.netbeans.modules.editor.bookmarks,\ - org.netbeans.modules.editor.bracesmatching,\ - org.netbeans.modules.editor.codetemplates,\ - org.netbeans.modules.editor.completion,\ - org.netbeans.modules.editor.errorstripe,\ - org.netbeans.modules.editor.errorstripe.api,\ - org.netbeans.modules.editor.guards,\ - org.netbeans.modules.editor.indent.project,\ - org.netbeans.modules.editor.kit,\ - org.netbeans.modules.editor.macros,\ - org.netbeans.modules.editor.plain,\ - org.netbeans.modules.editor.plain.lib,\ - org.netbeans.modules.editor.structure,\ - org.netbeans.modules.extbrowser,\ - org.netbeans.modules.extexecution,\ - org.netbeans.modules.extexecution.destroy,\ - org.netbeans.modules.favorites,\ - org.netbeans.modules.glassfish.common,\ - org.netbeans.modules.gototest,\ - org.netbeans.modules.gsf.codecoverage,\ - org.netbeans.modules.gsf.testrunner,\ - org.netbeans.modules.html,\ - org.netbeans.modules.html.editor,\ - org.netbeans.modules.html.editor.lib,\ - org.netbeans.modules.html.lexer,\ - org.netbeans.modules.html.parser,\ - org.netbeans.modules.html.validation,\ - org.netbeans.modules.httpserver,\ - org.netbeans.modules.hudson,\ - org.netbeans.modules.hudson.mercurial,\ - org.netbeans.modules.hudson.subversion,\ - org.netbeans.modules.ide.kit,\ - org.netbeans.modules.image,\ - org.netbeans.modules.javascript.editing,\ - org.netbeans.modules.javascript.hints,\ - org.netbeans.modules.javascript.kit,\ - org.netbeans.modules.javascript.refactoring,\ - org.netbeans.modules.jellytools.ide,\ - org.netbeans.modules.jumpto,\ - org.netbeans.modules.languages,\ - org.netbeans.modules.languages.diff,\ - org.netbeans.modules.languages.manifest,\ - org.netbeans.modules.languages.yaml,\ - org.netbeans.modules.lexer.nbbridge,\ - org.netbeans.modules.localhistory,\ - org.netbeans.modules.mercurial,\ - org.netbeans.modules.options.editor,\ - org.netbeans.modules.parsing.api,\ - org.netbeans.modules.parsing.lucene,\ - org.netbeans.modules.print.editor,\ - org.netbeans.modules.project.ant,\ - org.netbeans.modules.project.libraries,\ - org.netbeans.modules.projectapi,\ - org.netbeans.modules.projectui,\ - org.netbeans.modules.projectui.buildmenu,\ - org.netbeans.modules.projectuiapi,\ - org.netbeans.modules.properties,\ - org.netbeans.modules.properties.syntax,\ - org.netbeans.modules.refactoring.api,\ - org.netbeans.modules.schema2beans,\ - org.netbeans.modules.server,\ - org.netbeans.modules.servletapi,\ - org.netbeans.modules.spellchecker,\ - org.netbeans.modules.spellchecker.apimodule,\ - org.netbeans.modules.spellchecker.bindings.htmlxml,\ - org.netbeans.modules.spellchecker.bindings.properties,\ - org.netbeans.modules.spellchecker.dictionary_en,\ - org.netbeans.modules.spellchecker.kit,\ - org.netbeans.modules.subversion,\ - org.netbeans.modules.swing.validation,\ - org.netbeans.modules.target.iterator,\ - org.netbeans.modules.tasklist.kit,\ - org.netbeans.modules.tasklist.projectint,\ - org.netbeans.modules.tasklist.todo,\ - org.netbeans.modules.tasklist.ui,\ - org.netbeans.modules.terminal,\ - org.netbeans.modules.usersguide,\ - org.netbeans.modules.utilities,\ - org.netbeans.modules.utilities.project,\ - org.netbeans.modules.versioning,\ - org.netbeans.modules.versioning.indexingbridge,\ - org.netbeans.modules.versioning.system.cvss,\ - org.netbeans.modules.versioning.util,\ - org.netbeans.modules.web.client.tools.api,\ - org.netbeans.modules.web.common,\ - org.netbeans.modules.xml,\ - org.netbeans.modules.xml.axi,\ - org.netbeans.modules.xml.catalog,\ - org.netbeans.modules.xml.core,\ - org.netbeans.modules.xml.jaxb.api,\ - org.netbeans.modules.xml.lexer,\ - org.netbeans.modules.xml.multiview,\ - org.netbeans.modules.xml.retriever,\ - org.netbeans.modules.xml.schema.completion,\ - org.netbeans.modules.xml.schema.model,\ - org.netbeans.modules.xml.tax,\ - org.netbeans.modules.xml.text,\ - org.netbeans.modules.xml.tools,\ - org.netbeans.modules.xml.wsdl.model,\ - org.netbeans.modules.xml.xam,\ - org.netbeans.modules.xml.xdm,\ - org.netbeans.modules.xsl,\ - org.netbeans.spi.debugger.ui,\ - org.netbeans.spi.editor.hints,\ - org.netbeans.spi.navigator,\ - org.netbeans.spi.palette,\ - org.netbeans.spi.tasklist,\ - org.netbeans.spi.viewmodel,\ - org.netbeans.swing.dirchooser,\ - org.openide.compat,\ - org.openide.execution,\ - org.openide.options,\ - org.openide.util.enumerations -nbplatform.active=default
--- a/src/share/tools/IdealGraphVisualizer/GraphToText/nbproject/project.properties Fri Jan 27 23:31:28 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ -javac.source=1.5 -javac.compilerargs=-Xlint -Xlint:-serial
--- a/src/share/tools/IdealGraphVisualizer/GraphToText/nbproject/project.xml Fri Jan 27 23:31:28 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://www.netbeans.org/ns/project/1"> - <type>org.netbeans.modules.apisupport.project</type> - <configuration> - <data xmlns="http://www.netbeans.org/ns/nb-module-project/3"> - <code-name-base>com.sun.hotspot.igv.graphtotext</code-name-base> - <suite-component/> - <module-dependencies> - <dependency> - <code-name-base>com.sun.hotspot.igv.data</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>1.0</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>com.sun.hotspot.igv.graph</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>1.0</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>com.sun.hotspot.igv.structuredtext</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>1.0</specification-version> - </run-dependency> - </dependency> - </module-dependencies> - <public-packages> - <package>com.sun.hotspot.igv.graphtotext</package> - <package>com.sun.hotspot.igv.graphtotext.services</package> - </public-packages> - </data> - </configuration> -</project>
--- a/src/share/tools/IdealGraphVisualizer/GraphToText/nbproject/suite.properties Fri Jan 27 23:31:28 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -suite.dir=${basedir}/..
--- a/src/share/tools/IdealGraphVisualizer/ServerCompiler/nbproject/project.xml Fri Jan 27 23:31:28 2012 +0100 +++ b/src/share/tools/IdealGraphVisualizer/ServerCompiler/nbproject/project.xml Fri Jan 27 23:32:59 2012 +0100 @@ -1,45 +1,37 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://www.netbeans.org/ns/project/1"> - <type>org.netbeans.modules.apisupport.project</type> - <configuration> - <data xmlns="http://www.netbeans.org/ns/nb-module-project/3"> - <code-name-base>com.sun.hotspot.igv.servercompiler</code-name-base> - <suite-component/> - <module-dependencies> - <dependency> - <code-name-base>com.sun.hotspot.igv.data</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>1.0</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>com.sun.hotspot.igv.graph</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>1.0</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>com.sun.hotspot.igv.graphtotext</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>1.0</specification-version> - </run-dependency> - </dependency> - <dependency> - <code-name-base>com.sun.hotspot.igv.structuredtext</code-name-base> - <build-prerequisite/> - <compile-dependency/> - <run-dependency> - <specification-version>1.0</specification-version> - </run-dependency> - </dependency> - </module-dependencies> - <public-packages/> - </data> - </configuration> -</project> +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://www.netbeans.org/ns/project/1"> + <type>org.netbeans.modules.apisupport.project</type> + <configuration> + <data xmlns="http://www.netbeans.org/ns/nb-module-project/3"> + <code-name-base>com.sun.hotspot.igv.servercompiler</code-name-base> + <suite-component/> + <module-dependencies> + <dependency> + <code-name-base>com.sun.hotspot.igv.data</code-name-base> + <build-prerequisite/> + <compile-dependency/> + <run-dependency> + <specification-version>1.0</specification-version> + </run-dependency> + </dependency> + <dependency> + <code-name-base>com.sun.hotspot.igv.graph</code-name-base> + <build-prerequisite/> + <compile-dependency/> + <run-dependency> + <specification-version>1.0</specification-version> + </run-dependency> + </dependency> + <dependency> + <code-name-base>com.sun.hotspot.igv.structuredtext</code-name-base> + <build-prerequisite/> + <compile-dependency/> + <run-dependency> + <specification-version>1.0</specification-version> + </run-dependency> + </dependency> + </module-dependencies> + <public-packages/> + </data> + </configuration> +</project>
--- a/src/share/tools/IdealGraphVisualizer/ServerCompiler/src/META-INF/services/com.sun.hotspot.igv.graphtotext.services.GraphToTextConverter Fri Jan 27 23:31:28 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -com.sun.hotspot.igv.servercompiler.ServerCompilerGraphToTextConverter \ No newline at end of file
--- a/src/share/tools/IdealGraphVisualizer/ServerCompiler/src/com/sun/hotspot/igv/servercompiler/ServerCompilerGraphToTextConverter.java Fri Jan 27 23:31:28 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,176 +0,0 @@ -/* - * Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package com.sun.hotspot.igv.servercompiler; - -import com.sun.hotspot.igv.data.InputBlock; -import com.sun.hotspot.igv.data.InputEdge; -import com.sun.hotspot.igv.data.InputGraph; -import com.sun.hotspot.igv.data.InputNode; -import com.sun.hotspot.igv.data.Properties; -import com.sun.hotspot.igv.data.Properties.PropertyMatcher; -import com.sun.hotspot.igv.data.Properties.PropertySelector; -import com.sun.hotspot.igv.graph.Diagram; -import com.sun.hotspot.igv.graph.Figure; -import com.sun.hotspot.igv.graphtotext.services.GraphToTextConverter; -import com.sun.hotspot.igv.structuredtext.Element; -import com.sun.hotspot.igv.structuredtext.MultiElement; -import com.sun.hotspot.igv.structuredtext.SimpleElement; -import com.sun.hotspot.igv.structuredtext.StructuredText; -import java.awt.Color; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.Set; -import javax.swing.text.Style; -import javax.swing.text.StyleConstants; -import javax.swing.text.StyleContext; - -/** - * - * @author Thomas Wuerthinger - */ -public class ServerCompilerGraphToTextConverter implements GraphToTextConverter { - - - private Map<InputNode, Set<Figure>> map; - private Map<InputNode, List<InputEdge>> ingoingEdges; - private Map<InputNode, List<InputEdge>> outgoingEdges; - private InputGraph graph; - - private Collection<InputNode> sortNodes(Collection<InputNode> nodes) { - List<InputNode> result = new ArrayList<InputNode>(nodes); - - Collections.sort(result, InputNode.getPropertyComparator("idx")); - - - return result; - } - - public StructuredText convert(InputGraph graph, Diagram diagram) { - - this.graph = graph; - map = diagram.calcSourceToFigureRelation(); - ingoingEdges = graph.findAllIngoingEdges(); - outgoingEdges = graph.findAllOutgoingEdges(); - - final StructuredText result = new StructuredText(graph.getName()); - - for (InputBlock b : graph.getBlocks()) { - result.addChild(new SimpleElement("Block " + b.getName() + "\n")); - for (InputNode n : sortNodes(b.getNodes())) { - result.addChild(getNodeElement(n)); - } - } - - boolean first = true; - for (InputNode n : sortNodes(graph.getNodes())) { - if (graph.getBlock(n) == null) { - if (first) { - first = false; - result.addChild(new SimpleElement("No block: \n")); - } - result.addChild(getNodeElement(n)); - } - } - - - return result; - } - - private Element getNodeNameElement(InputNode n) { - - final SimpleElement name = new SimpleElement(n.getProperties().get("idx") + " " + n.getProperties().get("name"), calcStyle(n)); - name.addSource(n.getId()); - return name; - } - - private Element getNodeSmallElement(InputNode n) { - final SimpleElement id = new SimpleElement(n.getProperties().get("idx"), calcStyle(n)); - id.addSource(n.getId()); - return id; - } - - private Element getNodeElement(InputNode n) { - - final MultiElement result = new MultiElement(); - - result.print("\t"); - result.addChild(getNodeNameElement(n)); - - result.print(" === "); - - for (InputEdge e : outgoingEdges.get(n)) { - result.print(" "); - result.addChild(getNodeSmallElement(graph.getNode(e.getTo()))); - result.print(" "); - } - - result.print(" [["); - - for (InputEdge e : ingoingEdges.get(n)) { - result.print(" "); - result.addChild(getNodeSmallElement(graph.getNode(e.getFrom()))); - result.print(" "); - } - - result.print("]] "); - - result.print(n.getProperties().get("dump_spec")); - - result.print("\n"); - - return result; - } - - private static final PropertyMatcher MATCHER = new Properties.RegexpPropertyMatcher("name", "Root"); - public boolean canConvert(InputGraph graph) { - return new PropertySelector<InputNode>(graph.getNodes()).selectSingle(MATCHER) != null; - } - - private Color calcColor(InputNode node) { - Set<Figure> figureSet = this.map.get(node); - if(figureSet != null && figureSet.size() == 1) { - return figureSet.iterator().next().getColor(); - } else { - return Color.WHITE; - } - } - - private Color lessColor(Color c) { - return new Color(255 - (255 - c.getRed()) / 4, 255 - (255 - c.getGreen()) / 4, 255 - (255 - c.getBlue()) / 4); - } - - private Style calcStyle(InputNode node) { - Color c = calcColor(node); - Style defaultStyle = StyleContext.getDefaultStyleContext().getStyle(StyleContext.DEFAULT_STYLE); - Style newStyle = StyleContext.getDefaultStyleContext().addStyle(null, defaultStyle); - - StyleConstants.setBackground(newStyle, lessColor(c)); - return newStyle; - } -}
--- a/src/share/tools/IdealGraphVisualizer/nbproject/project.properties Fri Jan 27 23:31:28 2012 +0100 +++ b/src/share/tools/IdealGraphVisualizer/nbproject/project.properties Fri Jan 27 23:32:59 2012 +0100 @@ -19,8 +19,6 @@ ${project.com.sun.hotspot.connection}:\ ${project.com.sun.hotspot.igv.servercompilerscheduler}:\ ${project.com.sun.hotspot.igv.filterwindow}:\ - ${project.com.sun.hotspot.igv.graphtotext}:\ - ${project.com.sun.hotspot.igv.graphtexteditor}:\ ${project.com.sun.hotspot.igv.structuredtext}:\ ${project.com.sun.hotspot.igv.texteditor}:\ ${project.com.sun.hotspot.igv.selectioncoordinator}:\ @@ -35,8 +33,6 @@ project.com.sun.hotspot.igv.filterwindow=FilterWindow project.com.sun.hotspot.igv.graal=Graal project.com.sun.hotspot.igv.graph=Graph -project.com.sun.hotspot.igv.graphtexteditor=GraphTextEditor -project.com.sun.hotspot.igv.graphtotext=GraphToText project.com.sun.hotspot.igv.hierarchicallayout=HierarchicalLayout project.com.sun.hotspot.igv.layout=Layout project.com.sun.hotspot.igv.selectioncoordinator=SelectionCoordinator