mirror of https://github.com/mchr3k/org.intrace
Upgrade to SWT 4.3, Miglayout 4.2, and tweak code after pull request #34.
This commit is contained in:
parent
24db68904d
commit
fa62aa7a37
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -2,7 +2,7 @@
|
||||||
<feature
|
<feature
|
||||||
id="intrace.ecl.feature"
|
id="intrace.ecl.feature"
|
||||||
label="InTrace Eclipse Plugin"
|
label="InTrace Eclipse Plugin"
|
||||||
version="0.20">
|
version="0.21">
|
||||||
|
|
||||||
<description url="https://github.com/mchr3k/org.intrace/wiki">
|
<description url="https://github.com/mchr3k/org.intrace/wiki">
|
||||||
Enable launching Java Applications with the InTrace agent.
|
Enable launching Java Applications with the InTrace agent.
|
||||||
|
|
@ -215,6 +215,6 @@ litigation.
|
||||||
id="intrace.ecl"
|
id="intrace.ecl"
|
||||||
download-size="0"
|
download-size="0"
|
||||||
install-size="0"
|
install-size="0"
|
||||||
version="0.20.0"/>
|
version="0.21.0"/>
|
||||||
|
|
||||||
</feature>
|
</feature>
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,23 @@
|
||||||
Manifest-Version: 1.0
|
Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: InTrace Eclipse
|
Bundle-Name: InTrace Eclipse
|
||||||
Bundle-SymbolicName: intrace.ecl;singleton:=true
|
Bundle-SymbolicName: intrace.ecl;singleton:=true
|
||||||
Bundle-Version: 0.20
|
Bundle-Version: 0.21
|
||||||
Bundle-Activator: intrace.ecl.Activator
|
Bundle-Activator: intrace.ecl.Activator
|
||||||
Require-Bundle: org.eclipse.ui,
|
Require-Bundle: org.eclipse.ui,
|
||||||
org.eclipse.core.runtime,
|
org.eclipse.core.runtime,
|
||||||
org.eclipse.debug.core,
|
org.eclipse.debug.core,
|
||||||
org.eclipse.debug.ui,
|
org.eclipse.debug.ui,
|
||||||
org.eclipse.jdt.debug.ui,
|
org.eclipse.jdt.debug.ui,
|
||||||
org.eclipse.jdt.launching,
|
org.eclipse.jdt.launching,
|
||||||
org.eclipse.ui.ide,
|
org.eclipse.ui.ide,
|
||||||
org.eclipse.jdt.junit,
|
org.eclipse.jdt.junit,
|
||||||
org.eclipse.jdt.core
|
org.eclipse.jdt.core
|
||||||
Bundle-ActivationPolicy: lazy
|
Bundle-ActivationPolicy: lazy
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
||||||
Bundle-ClassPath: lib/miglayout-3.7.3.1-swt.jar,
|
Bundle-ClassPath: lib/miglayout-3.7.3.1-swt.jar,
|
||||||
.,
|
.,
|
||||||
lib/intrace-ui-helper.jar
|
lib/intrace-ui-helper.jar
|
||||||
Export-Package: intrace.ecl,
|
Export-Package: intrace.ecl,
|
||||||
intrace.ecl.ui.launching,
|
intrace.ecl.ui.launching,
|
||||||
intrace.ecl.ui.output
|
intrace.ecl.ui.output
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -8,8 +8,9 @@
|
||||||
<classpathentry kind="lib" path="lib/cglib-nodep-2.2.jar"/>
|
<classpathentry kind="lib" path="lib/cglib-nodep-2.2.jar"/>
|
||||||
<classpathentry kind="lib" path="lib/asm-debug-all-3.3.jar"/>
|
<classpathentry kind="lib" path="lib/asm-debug-all-3.3.jar"/>
|
||||||
<classpathentry kind="lib" path="lib/jar-in-jar-loader.jar"/>
|
<classpathentry kind="lib" path="lib/jar-in-jar-loader.jar"/>
|
||||||
<classpathentry kind="lib" path="lib/swt-win32-3.6.2.jar"/>
|
<classpathentry kind="lib" path="lib/miglayout-swt-4.2.jar"/>
|
||||||
<classpathentry kind="lib" path="lib/miglayout-3.7.3.1-swt.jar"/>
|
<classpathentry kind="lib" path="lib/miglayout-core-4.2.jar"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||||
|
<classpathentry kind="lib" path="lib/swt-win64-4.3.jar"/>
|
||||||
<classpathentry kind="output" path="bin"/>
|
<classpathentry kind="output" path="bin"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
|
||||||
|
|
@ -1,428 +1,430 @@
|
||||||
<project name="InTrace" basedir="." default="help">
|
<project name="InTrace" basedir="." default="help">
|
||||||
|
|
||||||
<!-- directory that contains emma.jar and emma_ant.jar: -->
|
<!-- directory that contains emma.jar and emma_ant.jar: -->
|
||||||
<path id="emma.lib" >
|
<path id="emma.lib" >
|
||||||
<pathelement location="./lib/emma.jar" />
|
<pathelement location="./lib/emma.jar" />
|
||||||
<pathelement location="./lib/emma_ant.jar" />
|
<pathelement location="./lib/emma_ant.jar" />
|
||||||
</path>
|
</path>
|
||||||
|
|
||||||
<path id="findbugs.lib" >
|
<path id="findbugs.lib" >
|
||||||
<fileset dir="./lib/findbugs" includes="*.jar" />
|
<fileset dir="./lib/findbugs" includes="*.jar" />
|
||||||
</path>
|
</path>
|
||||||
|
|
||||||
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="./lib/ant-contrib-1.0b3.jar" />
|
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="./lib/ant-contrib-1.0b3.jar" />
|
||||||
<taskdef resource="emma_ant.properties" classpathref="emma.lib" />
|
<taskdef resource="emma_ant.properties" classpathref="emma.lib" />
|
||||||
<taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask">
|
<taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask">
|
||||||
<classpath refid="findbugs.lib"/>
|
<classpath refid="findbugs.lib"/>
|
||||||
</taskdef>
|
</taskdef>
|
||||||
<taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask"
|
<taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask"
|
||||||
classpath="./lib/jarjar-1.0.jar"/>
|
classpath="./lib/jarjar-1.0.jar"/>
|
||||||
<taskdef name="swtjar" classname="org.swtjar.ant.SWTJarTask"
|
<taskdef name="swtjar" classname="org.swtjar.ant.SWTJarTask"
|
||||||
classpath="./lib/swtjar.jar"/>
|
classpath="./lib/swtjar.jar"/>
|
||||||
<taskdef name="jarbundler" classname="net.sourceforge.jarbundler.JarBundler"
|
<taskdef name="jarbundler" classname="net.sourceforge.jarbundler.JarBundler"
|
||||||
classpath="./lib/jarbundler-2.2.0.jar"/>
|
classpath="./lib/jarbundler-2.2.0.jar"/>
|
||||||
|
|
||||||
<property name="findbugs.home" value="./lib/findbugs" />
|
<property name="findbugs.home" value="./lib/findbugs" />
|
||||||
|
|
||||||
|
|
||||||
<target name="help">
|
<target name="help">
|
||||||
<java classname="org.apache.tools.ant.Main">
|
<java classname="org.apache.tools.ant.Main">
|
||||||
<arg value="-projecthelp" />
|
<arg value="-projecthelp" />
|
||||||
</java>
|
</java>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<target name="clean" description="Comile classes">
|
<target name="clean" description="Comile classes">
|
||||||
<delete dir="./build" />
|
<delete dir="./build" />
|
||||||
<delete dir="./reports" />
|
<delete dir="./reports" />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<target name="build" description="Comile classes">
|
<target name="build" description="Comile classes">
|
||||||
<mkdir dir="./build" />
|
<mkdir dir="./build" />
|
||||||
<mkdir dir="./build/classes" />
|
<mkdir dir="./build/classes" />
|
||||||
|
|
||||||
<javac destdir="./build/classes" debug="true" source="1.6" target="1.6"
|
<javac destdir="./build/classes" debug="true" source="1.6" target="1.6"
|
||||||
includeantruntime="false">
|
includeantruntime="false">
|
||||||
<src path="./src"/>
|
<src path="./src"/>
|
||||||
<classpath>
|
<classpath>
|
||||||
<fileset dir="./lib" includes="*.jar" />
|
<fileset dir="./lib" includes="*.jar" />
|
||||||
</classpath>
|
</classpath>
|
||||||
</javac>
|
</javac>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<target name="getgitdetails" >
|
<target name="getgitdetails" >
|
||||||
<exec executable="git" outputproperty="git.tagstring">
|
<exec executable="git" outputproperty="git.tagstring">
|
||||||
<arg value="describe"/>
|
<arg value="describe"/>
|
||||||
</exec>
|
</exec>
|
||||||
<exec executable="git" outputproperty="git.revision">
|
<exec executable="git" outputproperty="git.revision">
|
||||||
<arg value="rev-parse"/>
|
<arg value="rev-parse"/>
|
||||||
<arg value="HEAD"/>
|
<arg value="HEAD"/>
|
||||||
</exec>
|
</exec>
|
||||||
<if>
|
<if>
|
||||||
<contains string="${git.tagstring}" substring="cannot"/>
|
<contains string="${git.tagstring}" substring="cannot"/>
|
||||||
<then>
|
<then>
|
||||||
<property name="git.tag" value="none"/>
|
<property name="git.tag" value="none"/>
|
||||||
</then>
|
</then>
|
||||||
<else>
|
<else>
|
||||||
<property name="git.tag" value="${git.tagstring}"/>
|
<property name="git.tag" value="${git.tagstring}"/>
|
||||||
</else>
|
</else>
|
||||||
</if>
|
</if>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<target name="jar" description="Create Jars" depends="build,getgitdetails" >
|
<target name="jar" description="Create Jars" depends="build,getgitdetails" >
|
||||||
|
|
||||||
<mkdir dir="./build/tmp/" />
|
<mkdir dir="./build/tmp/" />
|
||||||
<mkdir dir="./build/jars/" />
|
<mkdir dir="./build/jars/" />
|
||||||
|
|
||||||
<!-- Agent -->
|
<!-- Agent -->
|
||||||
<jarjar jarfile="./build/jars/intrace-agent.jar">
|
<jarjar jarfile="./build/jars/intrace-agent.jar">
|
||||||
<manifest>
|
<manifest>
|
||||||
<attribute name="Premain-Class" value="org.intrace.agent.Agent" />
|
<attribute name="Premain-Class" value="org.intrace.agent.Agent" />
|
||||||
<attribute name="Agent-Class" value="org.intrace.agent.Agent" />
|
<attribute name="Agent-Class" value="org.intrace.agent.Agent" />
|
||||||
<attribute name="Can-Retransform-Classes" value="true" />
|
<attribute name="Can-Retransform-Classes" value="true" />
|
||||||
<attribute name="Class-Path" value="." />
|
<attribute name="Class-Path" value="." />
|
||||||
<attribute name="Git-Revision" value="${git.revision}" />
|
<attribute name="Git-Revision" value="${git.revision}" />
|
||||||
<attribute name="Implementation-Version" value="${git.tag}" />
|
<attribute name="Implementation-Version" value="${git.tag}" />
|
||||||
</manifest>
|
</manifest>
|
||||||
<fileset dir="./build/classes" includes="**/agent/**/*.class" />
|
<fileset dir="./build/classes" includes="**/agent/**/*.class" />
|
||||||
<fileset dir="./build/classes" includes="**/output/**/*.class" />
|
<fileset dir="./build/classes" includes="**/output/**/*.class" />
|
||||||
<fileset dir="./build/classes" includes="**/shared/*.class" />
|
<fileset dir="./build/classes" includes="**/shared/*.class" />
|
||||||
<zipfileset excludes="META-INF/*.MF" src="./lib/asm-debug-all-3.3.jar"/>
|
<zipfileset excludes="META-INF/*.MF" src="./lib/asm-debug-all-3.3.jar"/>
|
||||||
<rule pattern="org.objectweb.asm.**" result="org.intrace.internal.objectweb.asm.@1"/>
|
<rule pattern="org.objectweb.asm.**" result="org.intrace.internal.objectweb.asm.@1"/>
|
||||||
</jarjar>
|
</jarjar>
|
||||||
<copy file="./build/jars/intrace-agent.jar" todir="./lib/" />
|
<copy file="./build/jars/intrace-agent.jar" todir="./lib/" />
|
||||||
|
|
||||||
<!-- UI (Cross platform SWT Jar (Windows/Linux)) -->
|
<!-- UI (Cross platform SWT Jar (Windows/Linux)) -->
|
||||||
<swtjar jarfile="./build/jars/intrace-ui.jar"
|
<swtjar jarfile="./build/jars/intrace-ui.jar"
|
||||||
targetmainclass="org.intrace.client.gui.InTraceStandaloneUI"
|
targetmainclass="org.intrace.client.gui.InTraceStandaloneUI"
|
||||||
swtversion="3.6.2">
|
swtversion="4.3">
|
||||||
<manifest>
|
<manifest>
|
||||||
<attribute name="Git-Revision" value="${git.revision}" />
|
<attribute name="Git-Revision" value="${git.revision}" />
|
||||||
<attribute name="Implementation-Version" value="${git.tag}" />
|
<attribute name="Implementation-Version" value="${git.tag}" />
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|
||||||
<!-- InTrace classes -->
|
<!-- InTrace classes -->
|
||||||
<fileset dir="./build/classes" includes="**/shared/*.class" />
|
<fileset dir="./build/classes" includes="**/shared/*.class" />
|
||||||
<fileset dir="./build/classes" includes="**/client/gui/**/*.class" />
|
<fileset dir="./build/classes" includes="**/client/gui/**/*.class" />
|
||||||
|
|
||||||
<!-- InTrace icons -->
|
<!-- InTrace icons -->
|
||||||
<fileset dir="./src" includes="**/icons/**/*.*" />
|
<fileset dir="./src" includes="**/icons/**/*.*" />
|
||||||
|
|
||||||
<!-- Required Jars -->
|
<!-- Required Jars -->
|
||||||
<zipfileset excludes="META-INF/*.MF" src="lib/miglayout-3.7.3.1-swt.jar"/>
|
<zipfileset excludes="META-INF/*.MF" src="lib/miglayout-core-4.2.jar"/>
|
||||||
|
<zipfileset excludes="META-INF/*.MF" src="lib/miglayout-swt-4.2.jar"/>
|
||||||
<!-- SWT Jars (Windows/Linux) -->
|
|
||||||
<fileset dir="./lib" includes="swt-win*-3.6.2.jar" />
|
<!-- SWT Jars (Windows/Linux) -->
|
||||||
<fileset dir="./lib" includes="swt-lin*-3.6.2.jar" />
|
<fileset dir="./lib" includes="swt-win*-4.3.jar" />
|
||||||
</swtjar>
|
<fileset dir="./lib" includes="swt-lin*-4.3.jar" />
|
||||||
|
</swtjar>
|
||||||
<!-- UI (OSX SWT Jar) -->
|
|
||||||
<swtjar jarfile="./build/tmp/intrace-ui-osx.jar"
|
<!-- UI (OSX SWT Jar) -->
|
||||||
targetmainclass="org.intrace.client.gui.InTraceStandaloneUI"
|
<swtjar jarfile="./build/tmp/intrace-ui-osx.jar"
|
||||||
swtversion="3.6.2">
|
targetmainclass="org.intrace.client.gui.InTraceStandaloneUI"
|
||||||
<manifest>
|
swtversion="4.3">
|
||||||
<attribute name="Git-Revision" value="${git.revision}" />
|
<manifest>
|
||||||
<attribute name="Implementation-Version" value="${git.tag}" />
|
<attribute name="Git-Revision" value="${git.revision}" />
|
||||||
</manifest>
|
<attribute name="Implementation-Version" value="${git.tag}" />
|
||||||
|
</manifest>
|
||||||
<!-- InTrace classes -->
|
|
||||||
<fileset dir="./build/classes" includes="**/shared/*.class" />
|
<!-- InTrace classes -->
|
||||||
<fileset dir="./build/classes" includes="**/client/gui/**/*.class" />
|
<fileset dir="./build/classes" includes="**/shared/*.class" />
|
||||||
|
<fileset dir="./build/classes" includes="**/client/gui/**/*.class" />
|
||||||
<!-- InTrace icons -->
|
|
||||||
<fileset dir="./src" includes="**/icons/**/*.*" />
|
<!-- InTrace icons -->
|
||||||
|
<fileset dir="./src" includes="**/icons/**/*.*" />
|
||||||
<!-- Required Jars -->
|
|
||||||
<zipfileset excludes="META-INF/*.MF" src="lib/miglayout-3.7.3.1-swt.jar"/>
|
<!-- Required Jars -->
|
||||||
|
<zipfileset excludes="META-INF/*.MF" src="lib/miglayout-core-4.2.jar"/>
|
||||||
<!-- SWT Jars (OSX) -->
|
<zipfileset excludes="META-INF/*.MF" src="lib/miglayout-swt-4.2.jar"/>
|
||||||
<fileset dir="./lib" includes="swt-osx*-3.6.2.jar" />
|
|
||||||
</swtjar>
|
<!-- SWT Jars (OSX) -->
|
||||||
|
<fileset dir="./lib" includes="swt-osx*-4.3.jar" />
|
||||||
<!-- UI (OSX application) -->
|
</swtjar>
|
||||||
<mkdir dir="./build/tmp/InTraceApp/" />
|
|
||||||
<jarbundler dir="./build/tmp/InTraceApp/"
|
<!-- UI (OSX application) -->
|
||||||
name="InTrace"
|
<mkdir dir="./build/tmp/InTraceApp/" />
|
||||||
mainclass="org.swtjar.SWTLoader"
|
<jarbundler dir="./build/tmp/InTraceApp/"
|
||||||
jar="./build/tmp/intrace-ui-osx.jar"
|
name="InTrace"
|
||||||
startOnMainThread="true"
|
mainclass="org.swtjar.SWTLoader"
|
||||||
icon="./src/org/intrace/icons/intrace128.icns"
|
jar="./build/tmp/intrace-ui-osx.jar"
|
||||||
stubfile="./lib/JavaApplicationStub" />
|
startOnMainThread="true"
|
||||||
<delete file="./build/tmp/InTraceApp/InTrace.app/Contents/MacOS/JavaApplicationStub" />
|
icon="./src/org/intrace/icons/intrace128.icns"
|
||||||
<mkdir dir="./build/tmp/InTraceAppLauncher/InTrace.app/Contents/MacOS/" />
|
stubfile="./lib/JavaApplicationStub" />
|
||||||
<copy file="./lib/JavaApplicationStub"
|
<delete file="./build/tmp/InTraceApp/InTrace.app/Contents/MacOS/JavaApplicationStub" />
|
||||||
todir="./build/tmp/InTraceAppLauncher/InTrace.app/Contents/MacOS/" />
|
<mkdir dir="./build/tmp/InTraceAppLauncher/InTrace.app/Contents/MacOS/" />
|
||||||
<tar destfile="./build/jars/InTrace.app.tar">
|
<copy file="./lib/JavaApplicationStub"
|
||||||
<tarfileset dir="./build/tmp/InTraceAppLauncher/" filemode="777" />
|
todir="./build/tmp/InTraceAppLauncher/InTrace.app/Contents/MacOS/" />
|
||||||
<tarfileset dir="./build/tmp/InTraceApp/" />
|
<tar destfile="./build/jars/InTrace.app.tar">
|
||||||
</tar>
|
<tarfileset dir="./build/tmp/InTraceAppLauncher/" filemode="777" />
|
||||||
|
<tarfileset dir="./build/tmp/InTraceApp/" />
|
||||||
<!-- InTrace UI Library -->
|
</tar>
|
||||||
<jar jarfile="./build/jars/intrace-ui-helper.jar">
|
|
||||||
<fileset dir="./build/classes" includes="**/shared/*.class" />
|
<!-- InTrace UI Library -->
|
||||||
<fileset dir="./build/classes" includes="**/client/gui/helper/*.class" />
|
<jar jarfile="./build/jars/intrace-ui-helper.jar">
|
||||||
<fileset dir="./src" includes="**/icons/**/*.*" />
|
<fileset dir="./build/classes" includes="**/shared/*.class" />
|
||||||
</jar>
|
<fileset dir="./build/classes" includes="**/client/gui/helper/*.class" />
|
||||||
</target>
|
<fileset dir="./src" includes="**/icons/**/*.*" />
|
||||||
|
</jar>
|
||||||
<target name="test" description="Run Tests" depends="build" >
|
</target>
|
||||||
<property name="emma.enabled" value="true" />
|
|
||||||
|
<target name="test" description="Run Tests" depends="build" >
|
||||||
<mkdir dir="./reports" />
|
<property name="emma.enabled" value="true" />
|
||||||
<mkdir dir="./reports/junit" />
|
|
||||||
<mkdir dir="./reports/junit/raw" />
|
<mkdir dir="./reports" />
|
||||||
<mkdir dir="./reports/emma" />
|
<mkdir dir="./reports/junit" />
|
||||||
<mkdir dir="./reports/emma/metadata" />
|
<mkdir dir="./reports/junit/raw" />
|
||||||
|
<mkdir dir="./reports/emma" />
|
||||||
<mkdir dir="./build/test" />
|
<mkdir dir="./reports/emma/metadata" />
|
||||||
<mkdir dir="./build/classes_instr" />
|
|
||||||
|
<mkdir dir="./build/test" />
|
||||||
<javac destdir="./build/test" debug="true" source="1.6" target="1.6"
|
<mkdir dir="./build/classes_instr" />
|
||||||
includeantruntime="false">
|
|
||||||
<src path="./testsrc"/>
|
<javac destdir="./build/test" debug="true" source="1.6" target="1.6"
|
||||||
<classpath>
|
includeantruntime="false">
|
||||||
<pathelement path="./build/classes" />
|
<src path="./testsrc"/>
|
||||||
<fileset dir="./lib" includes="*.jar" />
|
<classpath>
|
||||||
</classpath>
|
<pathelement path="./build/classes" />
|
||||||
</javac>
|
<fileset dir="./lib" includes="*.jar" />
|
||||||
|
</classpath>
|
||||||
<copy todir="./build/classes_instr">
|
</javac>
|
||||||
<fileset dir="./build/classes"/>
|
|
||||||
</copy>
|
<copy todir="./build/classes_instr">
|
||||||
|
<fileset dir="./build/classes"/>
|
||||||
<emma enabled="${emma.enabled}" >
|
</copy>
|
||||||
<instr instrpath="./build/classes_instr"
|
|
||||||
metadatafile="./reports/emma/metadata/metadata.emma"
|
<emma enabled="${emma.enabled}" >
|
||||||
merge="true"
|
<instr instrpath="./build/classes_instr"
|
||||||
mode="overwrite"
|
metadatafile="./reports/emma/metadata/metadata.emma"
|
||||||
/>
|
merge="true"
|
||||||
</emma>
|
mode="overwrite"
|
||||||
|
/>
|
||||||
<!-- Build agent with coverage instrumentation enabled -->
|
</emma>
|
||||||
<jar jarfile="./build/tmp/intrace-agent-instr.jar">
|
|
||||||
<manifest>
|
<!-- Build agent with coverage instrumentation enabled -->
|
||||||
<attribute name="Premain-Class" value="org.intrace.agent.Agent" />
|
<jar jarfile="./build/tmp/intrace-agent-instr.jar">
|
||||||
<attribute name="Agent-Class" value="org.intrace.agent.Agent" />
|
<manifest>
|
||||||
<attribute name="Can-Redefine-Classes" value="true" />
|
<attribute name="Premain-Class" value="org.intrace.agent.Agent" />
|
||||||
<attribute name="Class-Path" value="." />
|
<attribute name="Agent-Class" value="org.intrace.agent.Agent" />
|
||||||
<attribute name="Git-Revision" value="${git.revision}" />
|
<attribute name="Can-Redefine-Classes" value="true" />
|
||||||
<attribute name="Implementation-Version" value="${git.tag}" />
|
<attribute name="Class-Path" value="." />
|
||||||
</manifest>
|
<attribute name="Git-Revision" value="${git.revision}" />
|
||||||
<fileset dir="./build/classes_instr" includes="**/agent/**/*.class" />
|
<attribute name="Implementation-Version" value="${git.tag}" />
|
||||||
<fileset dir="./build/classes_instr" includes="**/output/**/*.class" />
|
</manifest>
|
||||||
<fileset dir="./build/classes_instr" includes="**/shared/*.class" />
|
<fileset dir="./build/classes_instr" includes="**/agent/**/*.class" />
|
||||||
<zipfileset excludes="META-INF/*.MF" src="./lib/asm-debug-all-3.3.jar"/>
|
<fileset dir="./build/classes_instr" includes="**/output/**/*.class" />
|
||||||
</jar>
|
<fileset dir="./build/classes_instr" includes="**/shared/*.class" />
|
||||||
|
<zipfileset excludes="META-INF/*.MF" src="./lib/asm-debug-all-3.3.jar"/>
|
||||||
<junit printsummary="yes" failureproperty="test.failure">
|
</jar>
|
||||||
<classpath>
|
|
||||||
<pathelement location="./build/test"/>
|
<junit printsummary="yes" failureproperty="test.failure">
|
||||||
<fileset dir="./lib" includes="*.jar" excludes="intrace*.jar" />
|
<classpath>
|
||||||
<path refid="emma.lib" />
|
<pathelement location="./build/test"/>
|
||||||
</classpath>
|
<fileset dir="./lib" includes="*.jar" excludes="intrace*.jar" />
|
||||||
<jvmarg value="-Demma.coverage.out.file=./reports/emma/metadata/coverage.emma" />
|
<path refid="emma.lib" />
|
||||||
<jvmarg value="-Demma.coverage.out.merge=true" />
|
</classpath>
|
||||||
<jvmarg value="-javaagent:./build/tmp/intrace-agent-instr.jar"/>
|
<jvmarg value="-Demma.coverage.out.file=./reports/emma/metadata/coverage.emma" />
|
||||||
<jvmarg value="-Xbootclasspath/a:./lib/emma.jar" />
|
<jvmarg value="-Demma.coverage.out.merge=true" />
|
||||||
|
<jvmarg value="-javaagent:./build/tmp/intrace-agent-instr.jar"/>
|
||||||
<formatter type="xml"/>
|
<jvmarg value="-Xbootclasspath/a:./lib/emma.jar" />
|
||||||
<formatter type="plain"/>
|
|
||||||
|
<formatter type="xml"/>
|
||||||
<batchtest fork="yes" todir="./reports/junit/raw">
|
<formatter type="plain"/>
|
||||||
<fileset dir="./testsrc">
|
|
||||||
<include name="**/agent/*Test.java"/>
|
<batchtest fork="yes" todir="./reports/junit/raw">
|
||||||
</fileset>
|
<fileset dir="./testsrc">
|
||||||
</batchtest>
|
<include name="**/agent/*Test.java"/>
|
||||||
</junit>
|
</fileset>
|
||||||
|
</batchtest>
|
||||||
<junit printsummary="yes" failureproperty="test.failure">
|
</junit>
|
||||||
<classpath>
|
|
||||||
<pathelement location="./build/test"/>
|
<junit printsummary="yes" failureproperty="test.failure">
|
||||||
<pathelement location="./build/classes_instr"/>
|
<classpath>
|
||||||
<fileset dir="./lib" includes="*.jar" />
|
<pathelement location="./build/test"/>
|
||||||
<path refid="emma.lib" />
|
<pathelement location="./build/classes_instr"/>
|
||||||
</classpath>
|
<fileset dir="./lib" includes="*.jar" />
|
||||||
<jvmarg value="-Demma.coverage.out.file=./reports/emma/metadata/coverage.emma" />
|
<path refid="emma.lib" />
|
||||||
<jvmarg value="-Demma.coverage.out.merge=true" />
|
</classpath>
|
||||||
|
<jvmarg value="-Demma.coverage.out.file=./reports/emma/metadata/coverage.emma" />
|
||||||
<formatter type="xml"/>
|
<jvmarg value="-Demma.coverage.out.merge=true" />
|
||||||
<formatter type="plain"/>
|
|
||||||
|
<formatter type="xml"/>
|
||||||
<batchtest fork="yes" todir="./reports/junit/raw">
|
<formatter type="plain"/>
|
||||||
<fileset dir="./testsrc">
|
|
||||||
<include name="**/gui/*Test.java"/>
|
<batchtest fork="yes" todir="./reports/junit/raw">
|
||||||
</fileset>
|
<fileset dir="./testsrc">
|
||||||
</batchtest>
|
<include name="**/gui/*Test.java"/>
|
||||||
</junit>
|
</fileset>
|
||||||
|
</batchtest>
|
||||||
<junitreport todir="./reports/junit">
|
</junit>
|
||||||
<fileset dir="./reports/junit/raw">
|
|
||||||
<include name="TEST-*.xml"/>
|
<junitreport todir="./reports/junit">
|
||||||
</fileset>
|
<fileset dir="./reports/junit/raw">
|
||||||
<report format="frames" todir="./reports/junit/"/>
|
<include name="TEST-*.xml"/>
|
||||||
</junitreport>
|
</fileset>
|
||||||
|
<report format="frames" todir="./reports/junit/"/>
|
||||||
<emma enabled="${emma.enabled}" >
|
</junitreport>
|
||||||
<report sourcepath="./src" >
|
|
||||||
<fileset dir="./reports/emma/metadata/" >
|
<emma enabled="${emma.enabled}" >
|
||||||
<include name="*.emma" />
|
<report sourcepath="./src" >
|
||||||
</fileset>
|
<fileset dir="./reports/emma/metadata/" >
|
||||||
|
<include name="*.emma" />
|
||||||
<txt outfile="./reports/emma/coverage.txt" />
|
</fileset>
|
||||||
<html outfile="./reports/emma/coverage.html" />
|
|
||||||
</report>
|
<txt outfile="./reports/emma/coverage.txt" />
|
||||||
</emma>
|
<html outfile="./reports/emma/coverage.html" />
|
||||||
</target>
|
</report>
|
||||||
|
</emma>
|
||||||
|
</target>
|
||||||
<target name="findbugs" depends="build">
|
|
||||||
|
|
||||||
<mkdir dir="./reports/findbugs" />
|
<target name="findbugs" depends="build">
|
||||||
|
|
||||||
<!-- Build Findbugs Trace Agent (Don't include ASM classes) -->
|
<mkdir dir="./reports/findbugs" />
|
||||||
<jar destfile="./reports/findbugs/intrace-agent-findbugs.jar" compress="false">
|
|
||||||
<fileset dir="./build/classes" includes="**/agent/**/*.class" />
|
<!-- Build Findbugs Trace Agent (Don't include ASM classes) -->
|
||||||
<fileset dir="./build/classes" includes="**/output/**/*.class" />
|
<jar destfile="./reports/findbugs/intrace-agent-findbugs.jar" compress="false">
|
||||||
<fileset dir="./build/classes" includes="**/shared/*.class" />
|
<fileset dir="./build/classes" includes="**/agent/**/*.class" />
|
||||||
</jar>
|
<fileset dir="./build/classes" includes="**/output/**/*.class" />
|
||||||
|
<fileset dir="./build/classes" includes="**/shared/*.class" />
|
||||||
<findbugs home="${findbugs.home}"
|
</jar>
|
||||||
output="xml"
|
|
||||||
outputFile="./reports/findbugs/intrace-agent-findbugs-results.xml"
|
<findbugs home="${findbugs.home}"
|
||||||
excludeFilter="./conf/findbugs_exclude.xml"
|
output="xml"
|
||||||
reportLevel="low"
|
outputFile="./reports/findbugs/intrace-agent-findbugs-results.xml"
|
||||||
effort="max"
|
excludeFilter="./conf/findbugs_exclude.xml"
|
||||||
errorProperty="findbugs.errors"
|
reportLevel="low"
|
||||||
warningsProperty="findbugs.warns"
|
effort="max"
|
||||||
jvmargs="-Xmx256m">
|
errorProperty="findbugs.errors"
|
||||||
<auxClasspath>
|
warningsProperty="findbugs.warns"
|
||||||
<fileset dir="./lib" includes="*.jar" />
|
jvmargs="-Xmx256m">
|
||||||
</auxClasspath>
|
<auxClasspath>
|
||||||
<sourcePath path="./src" />
|
<fileset dir="./lib" includes="*.jar" />
|
||||||
<class location="./reports/findbugs/intrace-agent-findbugs.jar" />
|
</auxClasspath>
|
||||||
</findbugs>
|
<sourcePath path="./src" />
|
||||||
|
<class location="./reports/findbugs/intrace-agent-findbugs.jar" />
|
||||||
<fail if="findbugs.errors">FindBugs: Errors found, please run "ant view-findbugs"</fail>
|
</findbugs>
|
||||||
<fail if="findbugs.warns">FindBugs: Warnings found, please run "ant view-findbugs"</fail>
|
|
||||||
|
<fail if="findbugs.errors">FindBugs: Errors found, please run "ant view-findbugs"</fail>
|
||||||
</target>
|
<fail if="findbugs.warns">FindBugs: Warnings found, please run "ant view-findbugs"</fail>
|
||||||
|
|
||||||
<target name="view-findbugs" description="View report generated by findbugs target">
|
</target>
|
||||||
|
|
||||||
<java jar="./lib/findbugs/findbugs.jar" fork="true">
|
<target name="view-findbugs" description="View report generated by findbugs target">
|
||||||
<arg value="./reports/findbugs/intrace-agent-findbugs-results.xml"/>
|
|
||||||
</java>
|
<java jar="./lib/findbugs/findbugs.jar" fork="true">
|
||||||
|
<arg value="./reports/findbugs/intrace-agent-findbugs-results.xml"/>
|
||||||
</target>
|
</java>
|
||||||
|
|
||||||
<target name="validate" description="Build jars and run all automated tests" depends="jar, test, findbugs" >
|
</target>
|
||||||
<fail message="Tests failed" if="test.failure" />
|
|
||||||
</target>
|
<target name="validate" description="Build jars and run all automated tests" depends="jar, test, findbugs" >
|
||||||
|
<fail message="Tests failed" if="test.failure" />
|
||||||
<target name="release1" description="Validate InTrace and copy files ready for Eclipse build" depends="validate,update_eclipse_jars">
|
</target>
|
||||||
<copy todir="../binaries/jars/latest_development" overwrite="true">
|
|
||||||
<fileset file="./build/jars/intrace-agent.jar" />
|
<target name="release1" description="Validate InTrace and copy files ready for Eclipse build" depends="validate,update_eclipse_jars">
|
||||||
<fileset file="./build/jars/intrace-ui.jar" />
|
<copy todir="../binaries/jars/latest_development" overwrite="true">
|
||||||
</copy>
|
<fileset file="./build/jars/intrace-agent.jar" />
|
||||||
<delete>
|
<fileset file="./build/jars/intrace-ui.jar" />
|
||||||
<fileset dir="../intrace.appengine/war/features/" includes="*.jar"/>
|
</copy>
|
||||||
<fileset dir="../intrace.appengine/war/plugins/" includes="*.jar"/>
|
<delete>
|
||||||
<fileset dir="../intrace.ecl.site/features/" includes="*.jar"/>
|
<fileset dir="../intrace.appengine/war/features/" includes="*.jar"/>
|
||||||
<fileset dir="../intrace.ecl.site/plugins/" includes="*.jar"/>
|
<fileset dir="../intrace.appengine/war/plugins/" includes="*.jar"/>
|
||||||
<fileset dir="../intrace.ecl.site/" includes="artifacts.jar"/>
|
<fileset dir="../intrace.ecl.site/features/" includes="*.jar"/>
|
||||||
<fileset dir="../intrace.ecl.site/" includes="content.jar"/>
|
<fileset dir="../intrace.ecl.site/plugins/" includes="*.jar"/>
|
||||||
</delete>
|
<fileset dir="../intrace.ecl.site/" includes="artifacts.jar"/>
|
||||||
<echo>****</echo>
|
<fileset dir="../intrace.ecl.site/" includes="content.jar"/>
|
||||||
<echo>****</echo>
|
</delete>
|
||||||
<echo>Now run Build All in Eclipse for the intrace.ecl.site project</echo>
|
<echo>****</echo>
|
||||||
<echo>****</echo>
|
<echo>****</echo>
|
||||||
<echo>****</echo>
|
<echo>Now run Build All in Eclipse for the intrace.ecl.site project</echo>
|
||||||
</target>
|
<echo>****</echo>
|
||||||
|
<echo>****</echo>
|
||||||
<target name="release1_dev" depends="jar,update_eclipse_jars">
|
</target>
|
||||||
<copy todir="../binaries/jars/latest_development" overwrite="true">
|
|
||||||
<fileset file="./build/jars/intrace-agent.jar" />
|
<target name="release1_dev" depends="jar,update_eclipse_jars">
|
||||||
<fileset file="./build/jars/intrace-ui.jar" />
|
<copy todir="../binaries/jars/latest_development" overwrite="true">
|
||||||
</copy>
|
<fileset file="./build/jars/intrace-agent.jar" />
|
||||||
<delete>
|
<fileset file="./build/jars/intrace-ui.jar" />
|
||||||
<fileset dir="../intrace.appengine/war/features/" includes="*.jar"/>
|
</copy>
|
||||||
<fileset dir="../intrace.appengine/war/plugins/" includes="*.jar"/>
|
<delete>
|
||||||
<fileset dir="../intrace.ecl.site/features/" includes="*.jar"/>
|
<fileset dir="../intrace.appengine/war/features/" includes="*.jar"/>
|
||||||
<fileset dir="../intrace.ecl.site/plugins/" includes="*.jar"/>
|
<fileset dir="../intrace.appengine/war/plugins/" includes="*.jar"/>
|
||||||
</delete>
|
<fileset dir="../intrace.ecl.site/features/" includes="*.jar"/>
|
||||||
<echo>****</echo>
|
<fileset dir="../intrace.ecl.site/plugins/" includes="*.jar"/>
|
||||||
<echo>****</echo>
|
</delete>
|
||||||
<echo>Now run Build All in Eclipse for the intrace.ecl.site project</echo>
|
<echo>****</echo>
|
||||||
<echo>****</echo>
|
<echo>****</echo>
|
||||||
<echo>****</echo>
|
<echo>Now run Build All in Eclipse for the intrace.ecl.site project</echo>
|
||||||
</target>
|
<echo>****</echo>
|
||||||
|
<echo>****</echo>
|
||||||
<target name="release2" description="Copy around built Eclipse files">
|
</target>
|
||||||
<copy todir="../intrace.appengine/war" overwrite="true">
|
|
||||||
<fileset dir="../intrace.ecl.site/" excludes="artifacts.jar,content.jar,.project"/>
|
<target name="release2" description="Copy around built Eclipse files">
|
||||||
</copy>
|
<copy todir="../intrace.appengine/war" overwrite="true">
|
||||||
|
<fileset dir="../intrace.ecl.site/" excludes="artifacts.jar,content.jar,.project"/>
|
||||||
<delete file="../binaries/jars/latest_development/intrace.ecl.site.zip" />
|
</copy>
|
||||||
<zip destfile="../binaries/jars/latest_development/intrace.ecl.site.zip"
|
|
||||||
basedir="../intrace.ecl.site/"
|
<delete file="../binaries/jars/latest_development/intrace.ecl.site.zip" />
|
||||||
excludes=".project"
|
<zip destfile="../binaries/jars/latest_development/intrace.ecl.site.zip"
|
||||||
/>
|
basedir="../intrace.ecl.site/"
|
||||||
</target>
|
excludes=".project"
|
||||||
|
/>
|
||||||
<target name="update_eclipse_jars" depends="jar" >
|
</target>
|
||||||
<copy todir="../intrace.ecl.plugin/lib/">
|
|
||||||
<fileset file="./build/jars/intrace-agent.jar" />
|
<target name="update_eclipse_jars" depends="jar" >
|
||||||
<fileset file="./build/jars/intrace-ui-helper.jar" />
|
<copy todir="../intrace.ecl.plugin/lib/">
|
||||||
</copy>
|
<fileset file="./build/jars/intrace-agent.jar" />
|
||||||
</target>
|
<fileset file="./build/jars/intrace-ui-helper.jar" />
|
||||||
|
</copy>
|
||||||
<target name="example_build">
|
</target>
|
||||||
<mkdir dir="./build/test" />
|
|
||||||
<javac destdir="./build/test" debug="true" source="1.6" target="1.6"
|
<target name="example_build">
|
||||||
includeantruntime="false">
|
<mkdir dir="./build/test" />
|
||||||
<src path="./testsrc"/>
|
<javac destdir="./build/test" debug="true" source="1.6" target="1.6"
|
||||||
<classpath>
|
includeantruntime="false">
|
||||||
<pathelement path="./build/classes" />
|
<src path="./testsrc"/>
|
||||||
<fileset dir="./lib" includes="*.jar" />
|
<classpath>
|
||||||
</classpath>
|
<pathelement path="./build/classes" />
|
||||||
</javac>
|
<fileset dir="./lib" includes="*.jar" />
|
||||||
</target>
|
</classpath>
|
||||||
|
</javac>
|
||||||
<target name="example" depends="jar,example_build">
|
</target>
|
||||||
<java classname="example.TraceExample" fork="true">
|
|
||||||
<arg value="5000" />
|
<target name="example" depends="jar,example_build">
|
||||||
<classpath>
|
<java classname="example.TraceExample" fork="true">
|
||||||
<pathelement path="./build/test" />
|
<arg value="5000" />
|
||||||
</classpath>
|
<classpath>
|
||||||
<jvmarg value="-javaagent:build/jars/intrace-agent.jar=[instru-true" />
|
<pathelement path="./build/test" />
|
||||||
</java>
|
</classpath>
|
||||||
</target>
|
<jvmarg value="-javaagent:build/jars/intrace-agent.jar=[instru-true" />
|
||||||
|
</java>
|
||||||
<target name="waitexample" depends="jar,example_build">
|
</target>
|
||||||
<java classname="example.TraceExample" fork="true">
|
|
||||||
<arg value="5000" />
|
<target name="waitexample" depends="jar,example_build">
|
||||||
<classpath>
|
<java classname="example.TraceExample" fork="true">
|
||||||
<pathelement path="./build/test" />
|
<arg value="5000" />
|
||||||
</classpath>
|
<classpath>
|
||||||
<jvmarg value="-javaagent:build/jars/intrace-agent.jar=[instru-true[startwait" />
|
<pathelement path="./build/test" />
|
||||||
</java>
|
</classpath>
|
||||||
</target>
|
<jvmarg value="-javaagent:build/jars/intrace-agent.jar=[instru-true[startwait" />
|
||||||
|
</java>
|
||||||
<target name="fastexample" depends="jar,example_build">
|
</target>
|
||||||
<java classname="example.TraceExample" fork="true">
|
|
||||||
<arg value="0" />
|
<target name="fastexample" depends="jar,example_build">
|
||||||
<classpath>
|
<java classname="example.TraceExample" fork="true">
|
||||||
<pathelement path="./build/test" />
|
<arg value="0" />
|
||||||
</classpath>
|
<classpath>
|
||||||
<jvmarg value="-javaagent:build/jars/intrace-agent.jar=[instru-true" />
|
<pathelement path="./build/test" />
|
||||||
</java>
|
</classpath>
|
||||||
</target>
|
<jvmarg value="-javaagent:build/jars/intrace-agent.jar=[instru-true" />
|
||||||
|
</java>
|
||||||
</project>
|
</target>
|
||||||
|
|
||||||
|
</project>
|
||||||
|
|
|
||||||
|
|
@ -39,5 +39,10 @@
|
||||||
<Method name="generateCallToAgentHelper" />
|
<Method name="generateCallToAgentHelper" />
|
||||||
<Bug code="SF" />
|
<Bug code="SF" />
|
||||||
</Match>
|
</Match>
|
||||||
|
` `
|
||||||
|
// Ignore all problems in Base64 which is an external class
|
||||||
|
<Match>
|
||||||
|
<Class name="org.intrace.shared.Base64" />
|
||||||
|
</Match>
|
||||||
|
|
||||||
</FindBugsFilter>
|
</FindBugsFilter>
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -27,7 +27,6 @@ import org.intrace.agent.server.AgentServer;
|
||||||
import org.intrace.output.AgentHelper;
|
import org.intrace.output.AgentHelper;
|
||||||
import org.intrace.output.InstruRunnable;
|
import org.intrace.output.InstruRunnable;
|
||||||
import org.intrace.output.trace.TraceHandler;
|
import org.intrace.output.trace.TraceHandler;
|
||||||
import org.intrace.output.trace.TraceSettings;
|
|
||||||
import org.intrace.shared.AgentConfigConstants;
|
import org.intrace.shared.AgentConfigConstants;
|
||||||
import org.objectweb.asm.ClassReader;
|
import org.objectweb.asm.ClassReader;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -793,7 +793,7 @@ public class InTraceUI implements ISocketCallback, IControlConnectionListener
|
||||||
|
|
||||||
private TraceTab(Composite parent)
|
private TraceTab(Composite parent)
|
||||||
{
|
{
|
||||||
MigLayout windowLayout = new MigLayout("fill", "[80][80][250][100][grow]");
|
MigLayout windowLayout = new MigLayout("fill", "[80][80][250][140][grow]");
|
||||||
|
|
||||||
composite = new Composite(parent, SWT.NONE);
|
composite = new Composite(parent, SWT.NONE);
|
||||||
composite.setLayout(windowLayout);
|
composite.setLayout(windowLayout);
|
||||||
|
|
@ -818,7 +818,6 @@ public class InTraceUI implements ISocketCallback, IControlConnectionListener
|
||||||
exitStackTrace.setText(ClientStrings.ENABLE_EXIT_STACK_TRACE);
|
exitStackTrace.setText(ClientStrings.ENABLE_EXIT_STACK_TRACE);
|
||||||
exitStackTrace.setAlignment(SWT.CENTER);
|
exitStackTrace.setAlignment(SWT.CENTER);
|
||||||
|
|
||||||
|
|
||||||
entryExitTrace
|
entryExitTrace
|
||||||
.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter()
|
.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,8 @@ import java.io.PrintWriter;
|
||||||
import java.io.StringWriter;
|
import java.io.StringWriter;
|
||||||
import java.lang.reflect.Array;
|
import java.lang.reflect.Array;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.intrace.output.AgentHelper;
|
import org.intrace.output.AgentHelper;
|
||||||
|
|
@ -29,15 +27,16 @@ public class TraceHandler implements IInstrumentationHandler
|
||||||
{
|
{
|
||||||
// Private constructor
|
// Private constructor
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean entryExitTrace = true;
|
private boolean entryExitTrace = true;
|
||||||
private boolean branchTrace = false;
|
private boolean branchTrace = false;
|
||||||
private boolean argTrace = true;
|
private boolean argTrace = true;
|
||||||
private boolean truncateArrays = true;
|
private boolean truncateArrays = true;
|
||||||
private boolean exitStackTrace = false;
|
private boolean exitStackTrace = false;
|
||||||
|
|
||||||
private static final TraceSettings traceSettings = new TraceSettings("");
|
private static final TraceSettings traceSettings = new TraceSettings("");
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getResponse(String args)
|
public String getResponse(String args)
|
||||||
{
|
{
|
||||||
// TraceSettings oldSettings = new TraceSettings(traceSettings);
|
// TraceSettings oldSettings = new TraceSettings(traceSettings);
|
||||||
|
|
@ -60,10 +59,11 @@ public class TraceHandler implements IInstrumentationHandler
|
||||||
argTrace = traceSettings.isArgTraceEnabled();
|
argTrace = traceSettings.isArgTraceEnabled();
|
||||||
truncateArrays = traceSettings.isTruncateArraysEnabled();
|
truncateArrays = traceSettings.isTruncateArraysEnabled();
|
||||||
exitStackTrace = traceSettings.isExitStackTraceEnabled();
|
exitStackTrace = traceSettings.isExitStackTraceEnabled();
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Map<String, String> getSettingsMap()
|
public Map<String, String> getSettingsMap()
|
||||||
{
|
{
|
||||||
return traceSettings.getSettingsMap();
|
return traceSettings.getSettingsMap();
|
||||||
|
|
@ -78,7 +78,7 @@ public class TraceHandler implements IInstrumentationHandler
|
||||||
}
|
}
|
||||||
return lRet;
|
return lRet;
|
||||||
}
|
}
|
||||||
|
|
||||||
private String arrayStr(String xiArrStr)
|
private String arrayStr(String xiArrStr)
|
||||||
{
|
{
|
||||||
String ret = xiArrStr;
|
String ret = xiArrStr;
|
||||||
|
|
@ -89,7 +89,7 @@ public class TraceHandler implements IInstrumentationHandler
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void val(String desc, String className, String methodName, byte byteArg)
|
public void val(String desc, String className, String methodName, byte byteArg)
|
||||||
{
|
{
|
||||||
|
|
@ -100,6 +100,7 @@ public class TraceHandler implements IInstrumentationHandler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void val(String desc, String className, String methodName,
|
public void val(String desc, String className, String methodName,
|
||||||
byte[] byteArrayArg)
|
byte[] byteArrayArg)
|
||||||
{
|
{
|
||||||
|
|
@ -121,6 +122,7 @@ public class TraceHandler implements IInstrumentationHandler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void val(String desc, String className, String methodName,
|
public void val(String desc, String className, String methodName,
|
||||||
short[] shortArrayArg)
|
short[] shortArrayArg)
|
||||||
{
|
{
|
||||||
|
|
@ -270,7 +272,7 @@ private static final String STACK_TRACE_DELIM = "~";
|
||||||
* Just like Arrays.toString(Object), place a comma between each element of the stack trace
|
* Just like Arrays.toString(Object), place a comma between each element of the stack trace
|
||||||
*/
|
*/
|
||||||
private static final Object STACK_ELE_DELIM = ",";
|
private static final Object STACK_ELE_DELIM = ",";
|
||||||
|
|
||||||
private String replaceChars(String xiArg)
|
private String replaceChars(String xiArg)
|
||||||
{
|
{
|
||||||
String ret = xiArg;
|
String ret = xiArg;
|
||||||
|
|
@ -278,21 +280,21 @@ private static final Object STACK_ELE_DELIM = ",";
|
||||||
for (int ii = 0; ii < xiArg.length(); ii++)
|
for (int ii = 0; ii < xiArg.length(); ii++)
|
||||||
{
|
{
|
||||||
char c = xiArg.charAt(ii);
|
char c = xiArg.charAt(ii);
|
||||||
|
|
||||||
// Detect special char
|
// Detect special char
|
||||||
if ((0x00 <= c) &&
|
if ((0x00 <= c) &&
|
||||||
(c <= 0x20) &&
|
(c <= 0x20) &&
|
||||||
(c != '\r') &&
|
(c != '\r') &&
|
||||||
(c != '\n'))
|
(c != '\n'))
|
||||||
{
|
{
|
||||||
// Replace char
|
// Replace char
|
||||||
c = ESCAPE_REPLACEMENT;
|
c = ESCAPE_REPLACEMENT;
|
||||||
|
|
||||||
// Setup stringbuilder
|
// Setup stringbuilder
|
||||||
if (str == null)
|
if (str == null)
|
||||||
{
|
{
|
||||||
str = new StringBuilder();
|
str = new StringBuilder();
|
||||||
|
|
||||||
// Append any previous non special chars
|
// Append any previous non special chars
|
||||||
if (ii > 0)
|
if (ii > 0)
|
||||||
{
|
{
|
||||||
|
|
@ -300,23 +302,23 @@ private static final Object STACK_ELE_DELIM = ",";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we are storing chars we better write
|
// If we are storing chars we better write
|
||||||
// this one now
|
// this one now
|
||||||
if (str != null)
|
if (str != null)
|
||||||
{
|
{
|
||||||
str.append(c);
|
str.append(c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (str != null)
|
if (str != null)
|
||||||
{
|
{
|
||||||
ret = str.toString();
|
ret = str.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void val(String desc, String className, String methodName,
|
public void val(String desc, String className, String methodName,
|
||||||
Object objArg)
|
Object objArg)
|
||||||
|
|
@ -337,12 +339,13 @@ private static final Object STACK_ELE_DELIM = ",";
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
objStr = (objArg != null ? objArg.toString() : "null");
|
objStr = (objArg != null ? objArg.toString() : "null");
|
||||||
}
|
}
|
||||||
writeTraceOutput(className + ":" + methodName + ": " + desc + ": "
|
writeTraceOutput(className + ":" + methodName + ": " + desc + ": "
|
||||||
+ objStr);
|
+ objStr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void val(String desc, String className, String methodName,
|
public void val(String desc, String className, String methodName,
|
||||||
Object[] objArrayArg)
|
Object[] objArrayArg)
|
||||||
{
|
{
|
||||||
|
|
@ -361,11 +364,12 @@ private static final Object STACK_ELE_DELIM = ",";
|
||||||
{
|
{
|
||||||
if (branchTrace)
|
if (branchTrace)
|
||||||
{
|
{
|
||||||
writeTraceOutput(className + ":" + methodName + ": /" +
|
writeTraceOutput(className + ":" + methodName + ": /" +
|
||||||
(lineNo >= 0 ? ":" + lineNo : ""));
|
(lineNo >= 0 ? ":" + lineNo : ""));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void val(String desc, String className, String methodName, int lineNo,
|
public void val(String desc, String className, String methodName, int lineNo,
|
||||||
Throwable throwable)
|
Throwable throwable)
|
||||||
{
|
{
|
||||||
|
|
@ -398,7 +402,7 @@ private static final Object STACK_ELE_DELIM = ",";
|
||||||
{
|
{
|
||||||
if (entryExitTrace)
|
if (entryExitTrace)
|
||||||
{
|
{
|
||||||
writeTraceOutput(className + ":" + methodName + ": {" +
|
writeTraceOutput(className + ":" + methodName + ": {" +
|
||||||
(lineNo >= 0 ? ":" + lineNo : ""));
|
(lineNo >= 0 ? ":" + lineNo : ""));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -408,17 +412,17 @@ private static final Object STACK_ELE_DELIM = ",";
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String getStackTrace() {
|
public String getStackTrace() {
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
int counter = 0;
|
int counter = 0;
|
||||||
for(StackTraceElement ste : Thread.currentThread().getStackTrace() ) {
|
for(StackTraceElement ste : Thread.currentThread().getStackTrace() ) {
|
||||||
if ( ste.getClassName().indexOf(INTRACE_PACKAGE) <0
|
if ( ste.getClassName().indexOf(INTRACE_PACKAGE) <0
|
||||||
&& (ste.getClassName().indexOf(THREAD) < 0) && ste.getMethodName().indexOf(GET_STACK_TRACE)<0) {
|
&& (ste.getClassName().indexOf(THREAD) < 0) && ste.getMethodName().indexOf(GET_STACK_TRACE)<0) {
|
||||||
if (counter++>0) sb.append(STACK_ELE_DELIM); //Just like Arrays.toString(), place a comma between each stack trace ele.
|
if (counter++>0) sb.append(STACK_ELE_DELIM); //Just like Arrays.toString(), place a comma between each stack trace ele.
|
||||||
sb.append(ste.toString());
|
sb.append(ste.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -426,13 +430,13 @@ private static final Object STACK_ELE_DELIM = ",";
|
||||||
{
|
{
|
||||||
if (entryExitTrace)
|
if (entryExitTrace)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (exitStackTrace) {
|
if (exitStackTrace) {
|
||||||
writeTraceOutput(className + ":" + methodName + ": }" +
|
writeTraceOutput(className + ":" + methodName + ": }" +
|
||||||
(lineNo >= 0 ? ":" + lineNo : "") +
|
(lineNo >= 0 ? ":" + lineNo : "") +
|
||||||
STACK_TRACE_DELIM + getStackTrace() );
|
STACK_TRACE_DELIM + getStackTrace() );
|
||||||
} else {
|
} else {
|
||||||
writeTraceOutput(className + ":" + methodName + ": }" +
|
writeTraceOutput(className + ":" + methodName + ": }" +
|
||||||
(lineNo >= 0 ? ":" + lineNo : "") );
|
(lineNo >= 0 ? ":" + lineNo : "") );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -445,7 +449,7 @@ private static final Object STACK_ELE_DELIM = ",";
|
||||||
* <li>FileOut
|
* <li>FileOut
|
||||||
* <li>NetworkOut
|
* <li>NetworkOut
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
* @param xiOutput
|
* @param xiOutput
|
||||||
*/
|
*/
|
||||||
public void writeTraceOutput(String xiOutput)
|
public void writeTraceOutput(String xiOutput)
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,18 +1,11 @@
|
||||||
package org.intracetest.agent;
|
package org.intracetest.agent;
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
||||||
|
|
||||||
import org.intrace.agent.AgentSettings;
|
|
||||||
import org.intrace.output.trace.TraceHandler;
|
import org.intrace.output.trace.TraceHandler;
|
||||||
import org.intrace.output.trace.TraceSettings;
|
|
||||||
import org.intrace.shared.AgentConfigConstants;
|
|
||||||
import org.intrace.shared.TraceConfigConstants;
|
|
||||||
|
|
||||||
public class StackTraceTest extends TestCase
|
public class StackTraceTest extends TestCase
|
||||||
{
|
{
|
||||||
private static final String MY_PACKAGE_AND_CLASS = "org.intracetest.agent.StackTraceTest";
|
|
||||||
private String m_stackTrace;
|
private String m_stackTrace;
|
||||||
/** Here is the raw stack trace that we want to validate:
|
/** Here is the raw stack trace that we want to validate:
|
||||||
* <PRE>
|
* <PRE>
|
||||||
|
|
@ -23,7 +16,7 @@ org.intracetest.agent.StackTraceTest.c(StackTraceTest.java:57),org.intracetest.a
|
||||||
* <li>java.lang.Thread.getStackTrace</li>
|
* <li>java.lang.Thread.getStackTrace</li>
|
||||||
* <li>all org.intrace. activity</li>
|
* <li>all org.intrace. activity</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public void testStackTrace()
|
public void testStackTrace()
|
||||||
{
|
{
|
||||||
|
|
@ -41,14 +34,14 @@ public void testStackTrace()
|
||||||
}
|
}
|
||||||
private void validateStackTraceElement(String expectedPackageAndClassAndMethod, String actual) {
|
private void validateStackTraceElement(String expectedPackageAndClassAndMethod, String actual) {
|
||||||
String[] partsOfStackTraceElement = actual.split("[\\(:\\)]");
|
String[] partsOfStackTraceElement = actual.split("[\\(:\\)]");
|
||||||
assertEquals("The package and class and method name were not found in the right place",
|
assertEquals("The package and class and method name were not found in the right place",
|
||||||
expectedPackageAndClassAndMethod,
|
expectedPackageAndClassAndMethod,
|
||||||
partsOfStackTraceElement[0]);
|
partsOfStackTraceElement[0]);
|
||||||
|
|
||||||
assertEquals("source file not found in the right place",
|
assertEquals("source file not found in the right place",
|
||||||
"StackTraceTest.java",
|
"StackTraceTest.java",
|
||||||
partsOfStackTraceElement[1]);
|
partsOfStackTraceElement[1]);
|
||||||
|
|
||||||
}
|
}
|
||||||
private void a() {
|
private void a() {
|
||||||
b();
|
b();
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,7 @@ import java.util.Map;
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
||||||
|
|
||||||
import org.intrace.agent.AgentSettings;
|
|
||||||
import org.intrace.output.trace.TraceSettings;
|
import org.intrace.output.trace.TraceSettings;
|
||||||
import org.intrace.shared.AgentConfigConstants;
|
|
||||||
import org.intrace.shared.TraceConfigConstants;
|
import org.intrace.shared.TraceConfigConstants;
|
||||||
|
|
||||||
public class TraceSettingsTest extends TestCase
|
public class TraceSettingsTest extends TestCase
|
||||||
|
|
@ -25,7 +23,7 @@ public class TraceSettingsTest extends TestCase
|
||||||
+ TraceConfigConstants.EXIT_STACK_TRACE
|
+ TraceConfigConstants.EXIT_STACK_TRACE
|
||||||
+ "true"
|
+ "true"
|
||||||
);
|
);
|
||||||
|
|
||||||
assertTrue(ts.isArgTraceEnabled());
|
assertTrue(ts.isArgTraceEnabled());
|
||||||
assertTrue(ts.isEntryExitTraceEnabled());
|
assertTrue(ts.isEntryExitTraceEnabled());
|
||||||
assertTrue(ts.isBranchTraceEnabled());
|
assertTrue(ts.isBranchTraceEnabled());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue