Upgrade to SWT 4.3, Miglayout 4.2, and tweak code after pull request #34.

This commit is contained in:
mchr3k 2014-04-05 20:53:48 +01:00
parent 24db68904d
commit fa62aa7a37
37 changed files with 807 additions and 806 deletions

View File

@ -2,7 +2,7 @@
<feature
id="intrace.ecl.feature"
label="InTrace Eclipse Plugin"
version="0.20">
version="0.21">
<description url="https://github.com/mchr3k/org.intrace/wiki">
Enable launching Java Applications with the InTrace agent.
@ -215,6 +215,6 @@ litigation.
id="intrace.ecl"
download-size="0"
install-size="0"
version="0.20.0"/>
version="0.21.0"/>
</feature>

View File

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: InTrace Eclipse
Bundle-SymbolicName: intrace.ecl;singleton:=true
Bundle-Version: 0.20
Bundle-Version: 0.21
Bundle-Activator: intrace.ecl.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,

Binary file not shown.

Binary file not shown.

View File

@ -8,8 +8,9 @@
<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/jar-in-jar-loader.jar"/>
<classpathentry kind="lib" path="lib/swt-win32-3.6.2.jar"/>
<classpathentry kind="lib" path="lib/miglayout-3.7.3.1-swt.jar"/>
<classpathentry kind="lib" path="lib/miglayout-swt-4.2.jar"/>
<classpathentry kind="lib" path="lib/miglayout-core-4.2.jar"/>
<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"/>
</classpath>

View File

@ -101,8 +101,8 @@
<!-- UI (Cross platform SWT Jar (Windows/Linux)) -->
<swtjar jarfile="./build/jars/intrace-ui.jar"
targetmainclass="org.intrace.client.gui.InTraceStandaloneUI"
swtversion="3.6.2">
targetmainclass="org.intrace.client.gui.InTraceStandaloneUI"
swtversion="4.3">
<manifest>
<attribute name="Git-Revision" value="${git.revision}" />
<attribute name="Implementation-Version" value="${git.tag}" />
@ -116,17 +116,18 @@
<fileset dir="./src" includes="**/icons/**/*.*" />
<!-- 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" />
<fileset dir="./lib" includes="swt-lin*-3.6.2.jar" />
<fileset dir="./lib" includes="swt-win*-4.3.jar" />
<fileset dir="./lib" includes="swt-lin*-4.3.jar" />
</swtjar>
<!-- UI (OSX SWT Jar) -->
<swtjar jarfile="./build/tmp/intrace-ui-osx.jar"
targetmainclass="org.intrace.client.gui.InTraceStandaloneUI"
swtversion="3.6.2">
targetmainclass="org.intrace.client.gui.InTraceStandaloneUI"
swtversion="4.3">
<manifest>
<attribute name="Git-Revision" value="${git.revision}" />
<attribute name="Implementation-Version" value="${git.tag}" />
@ -140,10 +141,11 @@
<fileset dir="./src" includes="**/icons/**/*.*" />
<!-- 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 (OSX) -->
<fileset dir="./lib" includes="swt-osx*-3.6.2.jar" />
<fileset dir="./lib" includes="swt-osx*-4.3.jar" />
</swtjar>
<!-- UI (OSX application) -->

View File

@ -39,5 +39,10 @@
<Method name="generateCallToAgentHelper" />
<Bug code="SF" />
</Match>
` `
// Ignore all problems in Base64 which is an external class
<Match>
<Class name="org.intrace.shared.Base64" />
</Match>
</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.

View File

@ -27,7 +27,6 @@ import org.intrace.agent.server.AgentServer;
import org.intrace.output.AgentHelper;
import org.intrace.output.InstruRunnable;
import org.intrace.output.trace.TraceHandler;
import org.intrace.output.trace.TraceSettings;
import org.intrace.shared.AgentConfigConstants;
import org.objectweb.asm.ClassReader;

View File

@ -793,7 +793,7 @@ public class InTraceUI implements ISocketCallback, IControlConnectionListener
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.setLayout(windowLayout);
@ -818,7 +818,6 @@ public class InTraceUI implements ISocketCallback, IControlConnectionListener
exitStackTrace.setText(ClientStrings.ENABLE_EXIT_STACK_TRACE);
exitStackTrace.setAlignment(SWT.CENTER);
entryExitTrace
.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter()
{

View File

@ -4,10 +4,8 @@ import java.io.PrintWriter;
import java.io.StringWriter;
import java.lang.reflect.Array;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.intrace.output.AgentHelper;
@ -38,6 +36,7 @@ public class TraceHandler implements IInstrumentationHandler
private static final TraceSettings traceSettings = new TraceSettings("");
@Override
public String getResponse(String args)
{
// TraceSettings oldSettings = new TraceSettings(traceSettings);
@ -64,6 +63,7 @@ public class TraceHandler implements IInstrumentationHandler
return null;
}
@Override
public Map<String, String> getSettingsMap()
{
return traceSettings.getSettingsMap();
@ -100,6 +100,7 @@ public class TraceHandler implements IInstrumentationHandler
}
}
@Override
public void val(String desc, String className, String methodName,
byte[] byteArrayArg)
{
@ -121,6 +122,7 @@ public class TraceHandler implements IInstrumentationHandler
}
}
@Override
public void val(String desc, String className, String methodName,
short[] shortArrayArg)
{
@ -343,6 +345,7 @@ private static final Object STACK_ELE_DELIM = ",";
}
}
@Override
public void val(String desc, String className, String methodName,
Object[] objArrayArg)
{
@ -366,6 +369,7 @@ private static final Object STACK_ELE_DELIM = ",";
}
}
@Override
public void val(String desc, String className, String methodName, int lineNo,
Throwable throwable)
{

View File

@ -1198,7 +1198,7 @@ public class Base64
else {
// There's a bad input character in the Base64 stream.
throw new java.io.IOException( String.format(
"Bad Base64 input character decimal %d in array position %d", ((int)source[i])&0xFF, i ) );
"Bad Base64 input character decimal %d in array position %d", source[i]&0xFF, i ) );
} // end else:
} // each input character
@ -1259,7 +1259,7 @@ public class Base64
boolean dontGunzip = (options & DONT_GUNZIP) != 0;
if( (bytes != null) && (bytes.length >= 4) && (!dontGunzip) ) {
int head = ((int)bytes[0] & 0xff) | ((bytes[1] << 8) & 0xff00);
int head = (bytes[0] & 0xff) | ((bytes[1] << 8) & 0xff00);
if( java.util.zip.GZIPInputStream.GZIP_MAGIC == head ) {
java.io.ByteArrayInputStream bais = null;
java.util.zip.GZIPInputStream gzis = null;
@ -1358,7 +1358,7 @@ public class Base64
@Override
public Class<?> resolveClass(java.io.ObjectStreamClass streamClass)
throws java.io.IOException, ClassNotFoundException {
Class c = Class.forName(streamClass.getName(), false, loader);
Class<?> c = Class.forName(streamClass.getName(), false, loader);
if( c == null ){
return super.resolveClass(streamClass);
} else {
@ -1639,15 +1639,15 @@ public class Base64
*/
public static class InputStream extends java.io.FilterInputStream {
private boolean encode; // Encoding or decoding
private final boolean encode; // Encoding or decoding
private int position; // Current position in the buffer
private byte[] buffer; // Small buffer holding converted data
private int bufferLength; // Length of buffer (3 or 4)
private final byte[] buffer; // Small buffer holding converted data
private final int bufferLength; // Length of buffer (3 or 4)
private int numSigBytes; // Number of meaningful bytes in the buffer
private int lineLength;
private boolean breakLines; // Break lines at less than 80 characters
private int options; // Record options used to create the stream.
private byte[] decodabet; // Local copies to avoid extra method calls
private final boolean breakLines; // Break lines at less than 80 characters
private final int options; // Record options used to create the stream.
private final byte[] decodabet; // Local copies to avoid extra method calls
/**
@ -1852,16 +1852,16 @@ public class Base64
*/
public static class OutputStream extends java.io.FilterOutputStream {
private boolean encode;
private final boolean encode;
private int position;
private byte[] buffer;
private int bufferLength;
private final int bufferLength;
private int lineLength;
private boolean breakLines;
private byte[] b4; // Scratch used in a few places
private final boolean breakLines;
private final byte[] b4; // Scratch used in a few places
private boolean suspendEncoding;
private int options; // Record for later
private byte[] decodabet; // Local copies to avoid extra method calls
private final int options; // Record for later
private final byte[] decodabet; // Local copies to avoid extra method calls
/**
* Constructs a {@link Base64.OutputStream} in ENCODE mode.

View File

@ -1,18 +1,11 @@
package org.intracetest.agent;
import java.util.Map;
import junit.framework.TestCase;
import org.intrace.agent.AgentSettings;
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
{
private static final String MY_PACKAGE_AND_CLASS = "org.intracetest.agent.StackTraceTest";
private String m_stackTrace;
/** Here is the raw stack trace that we want to validate:
* <PRE>

View File

@ -4,9 +4,7 @@ import java.util.Map;
import junit.framework.TestCase;
import org.intrace.agent.AgentSettings;
import org.intrace.output.trace.TraceSettings;
import org.intrace.shared.AgentConfigConstants;
import org.intrace.shared.TraceConfigConstants;
public class TraceSettingsTest extends TestCase