view domake @ 3604:e4175b8b85d3

IdealGraphVisualizer: work around a Swing/NetBeans tree UI problem that occurs when mouse events are handled while the tree model is changing, e.g. when using IGV while it still receives graphs from a compiler. BasicTreeUI attempts to get the boundaries for the node associated with the location on screen, but fails and tries to access a null Rectangle, causing a user-visible NullPointerException. By implementing equals() for GraphNode, nodes for graphs that are already in the tree are not removed and re-added when updating groups, and the exception can no longer be reproduced. This potentially also resolves some redraw issues.
author Peter Hofer <peter.hofer@jku.at>
date Mon, 31 Oct 2011 15:55:13 +0100
parents a218993d2087
children 753443a8c4ff
line wrap: on
line source

#!/bin/bash

test -n "$JDK7" || { echo "Need to set JDK7 environment variable to the base of a JDK 1.7"; exit 1; }
test -n "$JDK7G" || { echo "Need to set JDK7G environment variable to the base of a JDK 1.7"; exit 1; }

# Resolve location of this script
me="${BASH_SOURCE[0]}"
while [ -h "$me" ]; do
    me=`readlink -e "$me"`
done
graal_home=$(cd `dirname $me`; pwd)

grep -- '-graal KNOWN' $JDK7/jre/lib/amd64/jvm.cfg >/dev/null
if [ $? -ne 0 ] ; then
    echo "The setting for -graal in $JDK7/jre/lib/amd64/jvm.cfg must be (insert if missing):"
    echo
    echo "  -graal KNOWN"
    echo
    exit 1
fi

grep -- '-graal KNOWN' $JDK7G/jre/lib/amd64/jvm.cfg >/dev/null
if [ $? -ne 0 ] ; then
    echo "The setting for -graal in $JDK7G/jre/lib/amd64/jvm.cfg must be (insert if missing):"
    echo
    echo "  -graal KNOWN"
    echo
    exit 1
fi

java_link="$graal_home/graal/hotspot/java"
if [ ! -e $java_link ]; then
    echo "Creating link: $java_link -> $JDK7/jre/bin/java"
    ln -s $JDK7/jre/bin/java $java_link
fi

graal_dir=$JDK7/jre/lib/amd64/graal/
if [ ! -e $graal_dir ]; then
    echo "Creating graal compiler dir: $graal_dir"
    mkdir $graal_dir
fi

graaldbg_dir=$JDK7G/jre/lib/amd64/graal/
if [ ! -e $graaldbg_dir ]; then
    echo "Creating debug graal compiler dir: $graaldbg_dir"
    mkdir $graaldbg_dir
fi

pushd $graal_home/make

# the piping magic runs stderr through grep and removes the complaints about Xusage.txt files
ARCH_DATA_MODEL=64 LANG=C HOTSPOT_BUILD_JOBS=4 ALT_BOOTDIR=$JDK7G INSTALL=y make jvmggraal 3>&1 1>&2 2>&3 | grep -v Xusage[.]txt
ARCH_DATA_MODEL=64 LANG=C HOTSPOT_BUILD_JOBS=4 ALT_BOOTDIR=$JDK7 INSTALL=y make productgraal 3>&1 1>&2 2>&3 | grep -v Xusage[.]txt

popd