Bug 515234 - Clean up trailing white space in jdt.debug.*.tests
Change-Id: I89d0ad1aac95440a89067a5b96bc7ee1f66bc614
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/AbstractJDITest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/AbstractJDITest.java
index ba97d95..e60580b 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/AbstractJDITest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/AbstractJDITest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -61,7 +61,7 @@
/**
* Tests for com.sun.jdi.* and JDWP commands.
- * These tests assume that the target program is
+ * These tests assume that the target program is
* "org.eclipse.debug.jdi.tests.program.MainClass".
*
* Examples of arguments:
@@ -116,7 +116,7 @@
}
/**
* Creates and returns an access watchpoint request
- * for the field "fBool" in
+ * for the field "fBool" in
* org.eclipse.debug.jdi.tests.program.MainClass
* NOTE: This assumes that the VM can watch field access.
*/
@@ -148,7 +148,7 @@
}
return result;
}
-
+
/**
* Returns if the current VM version is greater than or equal to 1.6
* @return <code>true</code> if a 1.6 or higher VM
@@ -158,7 +158,7 @@
String ver = fVM.version();
return ver.indexOf("1.6") > -1 || ver.indexOf("1.7") > -1;
}
-
+
/**
* Returns an array reference.
*/
@@ -169,7 +169,7 @@
// Get value of "fArray"
return (ArrayReference) getMainClass().getValue(field);
}
-
+
/**
* Returns another array reference.
*/
@@ -180,7 +180,7 @@
// Get value of "fDoubleArray"
return (ArrayReference) getMainClass().getValue(field);
}
-
+
/**
* One-dimensional empty array reference getters
*/
@@ -251,7 +251,7 @@
Field field = getField("booleanDoubleArray");
return (ArrayReference) getMainClass().getValue(field);
}
-
+
/**
* Returns the array type.
*/
@@ -332,16 +332,16 @@
ArrayReference value = getBooleanDoubleArrayReference();
return (ArrayType) value.referenceType();
}
-
+
/**
- * Creates and returns a breakpoint request in the first
+ * Creates and returns a breakpoint request in the first
* instruction of the MainClass.triggerBreakpointEvent() method.
*/
protected BreakpointRequest getBreakpointRequest() {
// Create a breakpoint request
return fVM.eventRequestManager().createBreakpointRequest(getLocation());
}
-
+
/**
* Creates a new breakpoint request for a user specified position
* @param loc the location to set the breakpoint on
@@ -358,7 +358,7 @@
List<?> classes = fVM.classesByName(name);
if (classes.size() == 0)
return null;
-
+
return (ClassType) classes.get(0);
}
/**
@@ -379,29 +379,29 @@
return fVM.eventRequestManager().createExceptionRequest(null, false, true);
}
/**
- * Returns the static field "fObject" in
+ * Returns the static field "fObject" in
* org.eclipse.debug.jdi.tests.program.MainClass
*/
protected Field getField() {
return getField("fObject");
}
/**
- * Returns the field with the given name in
+ * Returns the field with the given name in
* org.eclipse.debug.jdi.tests.program.MainClass.
*/
protected Field getField(String fieldName) {
// Get main class
ClassType type = getMainClass();
- // Get field
+ // Get field
Field result = type.fieldByName(fieldName);
if (result == null)
throw new Error("Unknown field: " + fieldName);
-
+
return result;
}
/**
- * Returns the n frame (starting at the top of the stack) of the thread
+ * Returns the n frame (starting at the top of the stack) of the thread
* contained in the static field "fThread" of org.eclipse.debug.jdi.tests.program.MainClass.
*/
protected StackFrame getFrame(int n) {
@@ -450,7 +450,7 @@
return getClass( getMainClassName() );
}
/**
- * Returns the method "print(Ljava/io/OutputStream;)V"
+ * Returns the method "print(Ljava/io/OutputStream;)V"
* in org.eclipse.debug.jdi.tests.program.MainClass
*/
protected Method getMethod() {
@@ -487,7 +487,7 @@
}
if (method == null)
throw new Error("Unknown method: " + name + signature);
-
+
return method;
}
/**
@@ -504,7 +504,7 @@
return fVM.eventRequestManager().createModificationWatchpointRequest(field);
}
/**
- * Returns the value of the static field "fObject" in
+ * Returns the value of the static field "fObject" in
* org.eclipse.debug.jdi.tests.program.MainClass
*/
protected ObjectReference getObjectReference() {
@@ -519,7 +519,7 @@
}
/**
* Creates and returns an access watchpoint request
- * for the static field "fString" in
+ * for the static field "fString" in
* org.eclipse.debug.jdi.tests.program.MainClass
* NOTE: This assumes that the VM can watch field access.
*/
@@ -544,7 +544,7 @@
return fVM.eventRequestManager().createModificationWatchpointRequest(field);
}
/**
- * Returns the value of the static field "fString" in
+ * Returns the value of the static field "fString" in
* org.eclipse.debug.jdi.tests.program.MainClass
*/
protected StringReference getStringReference() {
@@ -561,11 +561,11 @@
List<ReferenceType> classes = fVM.classesByName("java.lang.Object");
if (classes.size() == 0)
return null;
-
+
return (ClassType) classes.get(0);
}
/**
- * Returns the thread contained in the static field "fThread" in
+ * Returns the thread contained in the static field "fThread" in
* org.eclipse.debug.jdi.tests.program.MainClass
*/
protected ThreadReference getThread() {
@@ -595,7 +595,7 @@
Value value = type.getValue(field);
if (value == null)
return null;
-
+
return (ThreadReference) value;
}
/**
@@ -669,7 +669,7 @@
/**
* Parse the command {@link String} to make sure we use
* {@link Runtime#exec(String[])}.
- *
+ *
* @param command
* @return the array of items from the command {@link String}
* @since 4.3
@@ -686,7 +686,7 @@
}
return commandArray;
}
-
+
/**
* Launches the target J9 VM.
*/
@@ -700,7 +700,7 @@
+ System.getProperty("file.separator")
+ "bin"
+ System.getProperty("file.separator");
-
+
proxyString[index++] = binDirectory + "j9proxy";
proxyString[index++] = "localhost:" + (fBackEndPort - 1);
proxyString[index++] = "" + fBackEndPort;
@@ -708,14 +708,14 @@
// Launch target VM
Vector<String> commandLine = new Vector<>();
-
+
String launcher = binDirectory + "j9w.exe";
File vm= new File(launcher);
if (!vm.exists()) {
launcher = binDirectory + "j9";
}
commandLine.add(launcher);
-
+
if (fBootPath.length() > 0)
commandLine.add("-bp:" + fBootPath);
commandLine.add("-cp:" + fClassPath);
@@ -792,7 +792,7 @@
commandLine.add("-bootpath");
commandLine.add(fBootPath);
}
-
+
commandLine.add("-classpath");
commandLine.add(fClassPath);
commandLine.add("-Xdebug");
@@ -812,7 +812,7 @@
protected String getMainClassName() {
return "org.eclipse.debug.jdi.tests.program.MainClass";
}
-
+
protected String getTestPrefix() {
return "testJDI";
}
@@ -827,10 +827,10 @@
String[] args = fVmArgs.split(",");
for (int i=0; i < args.length; i++) {
commandLine.add(args[i]);
- }
- }
+ }
+ }
}
-
+
/**
* Flattens the variable size command line and calls Runtime.exec().
* @param commandLine A vector of command line argument strings.
@@ -839,18 +839,18 @@
*/
private Process exec(Vector<String> commandLine) throws IOException {
String[] vmString = new String[commandLine.size()];
- commandLine.toArray(vmString);
- return Runtime.getRuntime().exec(vmString);
+ commandLine.toArray(vmString);
+ return Runtime.getRuntime().exec(vmString);
}
-
+
/**
* Connects to the target vm.
*/
protected void connectToVM() {
// Start the console reader if possible so that the VM doesn't block when the stdout is full
startConsoleReaders();
-
+
// Contact the VM (try 10 times)
for (int i = 0; i < 10; i++) {
@@ -1271,7 +1271,7 @@
waitUntilReady();
}
/**
- * Returns all tests
+ * Returns all tests
*/
protected Test suite() {
JDITestSuite suite = new JDITestSuite(this);
@@ -1328,7 +1328,7 @@
if (event == null)
throw new Error(
"Event for " + request + " didn't come in after " + TIMEOUT + "ms");
-
+
return event;
}
/**
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/AbstractReader.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/AbstractReader.java
index ac1d57b..5db32dd 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/AbstractReader.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/AbstractReader.java
Binary files differ
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/AccessibleTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/AccessibleTest.java
index bf7fb87..ac2a262 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/AccessibleTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/AccessibleTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -48,7 +48,7 @@
public static void main(java.lang.String[] args) {
new AccessibleTest().runSuite(args);
}
-
+
/**
* @see junit.framework.TestCase#getName()
*/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ArrayReferenceTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ArrayReferenceTest.java
index 8f7cdb3..f8fb11a 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ArrayReferenceTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ArrayReferenceTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ArrayTypeTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ArrayTypeTest.java
index 76d2e4c..2e879cb 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ArrayTypeTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ArrayTypeTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/AutomatedSuite.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/AutomatedSuite.java
index e5b9063..6d8f7cb 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/AutomatedSuite.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/AutomatedSuite.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -15,7 +15,7 @@
/**
*/
public class AutomatedSuite extends TestSuite {
-
+
/**
* returns an instance of AutomatedSuite
* @return a new test suite
@@ -23,7 +23,7 @@
public static TestSuite suite() {
return new AutomatedSuite();
}
-
+
/**
* runs the specified tests
*/
@@ -62,7 +62,7 @@
addTest(new TestSuite(MirrorTest.class));
addTest(new TestSuite(ModificationWatchpointEventTest.class));
-
+
addTest(new TestSuite(ObjectReferenceTest.class));
addTest(new TestSuite(PrimitiveValueTest.class));
addTest(new TestSuite(ReferenceTypeTest.class));
@@ -84,7 +84,7 @@
addTest(new TestSuite(VirtualMachineExitTest.class));
addTest(new TestSuite(VMDisconnectEventTest.class));
addTest(new TestSuite(VMDisposeTest.class));
-
+
//Java 1.6 capability tests
addTest(new TestSuite(HeapWalkingTests.class));
addTest(new TestSuite(ConstantPoolTests.class));
@@ -95,5 +95,5 @@
addTest(new TestSuite(ProvideArgumentsTests.class));
addTest(new TestSuite(ContendedMonitorTests.class));
}
-
+
}
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/BooleanValueTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/BooleanValueTest.java
index ace7d1b..1c36cc2 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/BooleanValueTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/BooleanValueTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/BreakpointRequestTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/BreakpointRequestTest.java
index 797a8b3..7afbe58 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/BreakpointRequestTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/BreakpointRequestTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ByteValueTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ByteValueTest.java
index 9eccfab..5aa051e 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ByteValueTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ByteValueTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/CharValueTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/CharValueTest.java
index 5811025..0294525 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/CharValueTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/CharValueTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ClassLoaderReferenceTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ClassLoaderReferenceTest.java
index e2481b1..11268af 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ClassLoaderReferenceTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ClassLoaderReferenceTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ClassPrepareEventTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ClassPrepareEventTest.java
index b730950..e42c711 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ClassPrepareEventTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ClassPrepareEventTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ClassPrepareEventWaiter.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ClassPrepareEventWaiter.java
index 4f53e6f..4ea5070 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ClassPrepareEventWaiter.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ClassPrepareEventWaiter.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -29,7 +29,7 @@
super(request, shouldGo);
fClassName = className;
}
-
+
/**
* @see org.eclipse.debug.jdi.tests.EventWaiter#classPrepare(com.sun.jdi.event.ClassPrepareEvent)
*/
@@ -38,7 +38,7 @@
if (event.referenceType().name().equals(fClassName)) {
notifyEvent(event);
return fShouldGo;
- }
+ }
return true;
}
}
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ClassPrepareRequestTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ClassPrepareRequestTest.java
index 5df0f3f..2af5805 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ClassPrepareRequestTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ClassPrepareRequestTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ClassTypeTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ClassTypeTest.java
index 3888300..3ed6ec3 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ClassTypeTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ClassTypeTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ClassesByNameTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ClassesByNameTest.java
index 610d744..c1bd7be 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ClassesByNameTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ClassesByNameTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -68,9 +68,9 @@
classes.size() == 1
&& ((Type) classes.get(0)).signature().equals("[[I"));
}
-
+
/**
- * tests signature for an array of long values
+ * tests signature for an array of long values
*/
public void testJDILongArray() {
List<?> classes = fVM.classesByName("long[]");
@@ -79,7 +79,7 @@
classes.size() == 1
&& ((Type) classes.get(0)).signature().equals("[J"));
}
-
+
/**
* tests signature of a two dimensional array of long values
*/
@@ -90,7 +90,7 @@
classes.size() == 1
&& ((Type) classes.get(0)).signature().equals("[[J"));
}
-
+
/**
* Test that there is a class object for 'java.lang.String[]'
*/
@@ -102,7 +102,7 @@
&& ((Type) classes.get(0)).signature().equals(
"[Ljava/lang/String;"));
}
-
+
/**
* Test that there is a class object for 'java.lang.String'
*/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ConstantPoolTests.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ConstantPoolTests.java
index b301dc6..17bfa72 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ConstantPoolTests.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ConstantPoolTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -14,21 +14,21 @@
import com.sun.jdi.ReferenceType;
/**
- * Test cases for the implementation of providing argument information even if
+ * Test cases for the implementation of providing argument information even if
* no debugging information is present in the new java 1.6 VM
- *
+ *
* @since 3.3
*/
public class ConstantPoolTests extends AbstractJDITest {
ReferenceType fClass;
-
+
/** setup test info locally **/
@Override
public void localSetUp() {}
-
+
/**
- * test to see if we can get class file version info from a 1.6 VM, and
+ * test to see if we can get class file version info from a 1.6 VM, and
* that we cannot from a pre-1.6 VM
*/
public void testCanGetClassFileVersion() {
@@ -39,10 +39,10 @@
assertTrue("Should not have classfile version info", !fVM.canGetClassFileVersion());
}
}
-
+
/**
* test to make sure we can get constant pool information from a 1.6 VM, and
- * that we cannot get it from a pre-1.6 VM
+ * that we cannot get it from a pre-1.6 VM
*/
public void testCanGetConstantPool() {
if(is16OrGreater()) {
@@ -77,7 +77,7 @@
catch(UnsupportedOperationException uoe) {}
}
}
-
+
/**
* test to make sure that majorVersion returns 0 for an arrayType.
* this test does not apply to non-16 VMs
@@ -91,10 +91,10 @@
int ver = type.majorVersion();
assertTrue("major verison should be 0", ver == 0);
}
-
+
/**
* test to make sure majorVerison works.
- * this test does not apply to non-1.6VMs
+ * this test does not apply to non-1.6VMs
*/
public void testMajorVersion() {
if(!fVM.canGetClassFileVersion()) {
@@ -106,9 +106,9 @@
int ver = fClass.majorVersion();
assertTrue("version cannot be equal to -1", ver != -1);
}
-
+
/**
- * test to make sure that if minorVersion is unsupported an UnsupportedIOperationException
+ * test to make sure that if minorVersion is unsupported an UnsupportedIOperationException
* is thrown
*/
public void testMinorVersionUnsupported() {
@@ -131,10 +131,10 @@
catch(UnsupportedOperationException uoe) {}
}
}
-
+
/**
* test to make sure minorVerison works.
- * this test does not apply to non-1.6VMs
+ * this test does not apply to non-1.6VMs
*/
public void testMinorVersion() {
if(!fVM.canGetClassFileVersion()) {
@@ -146,9 +146,9 @@
int ver = fClass.minorVersion();
assertTrue("version cannot be equal to -1", ver != -1);
}
-
+
/**
- * test to make sure that if constantPoolCount is unsupported an UnsupportedIOperationException
+ * test to make sure that if constantPoolCount is unsupported an UnsupportedIOperationException
* is thrown
*/
public void testConstantPoolCountSupported() {
@@ -171,7 +171,7 @@
catch(UnsupportedOperationException uoe) {}
}
}
-
+
/**
* test to ensure the constant pool count is working correctly
* this test does not apply to non-1.6 VMs
@@ -187,9 +187,9 @@
//for now we don't care about constant pool counts, not likely to have a useful debug extension for this feature,
//but it is here for completeness
}
-
+
/**
- * test to make sure that if constantPool is unsupported an UnsupportedIOperationException
+ * test to make sure that if constantPool is unsupported an UnsupportedIOperationException
* is thrown
*/
public void testConstantPoolSupported() {
@@ -212,7 +212,7 @@
catch(UnsupportedOperationException uoe) {}
}
}
-
+
/**
* test to ensure the constant pool is working correctly
* this test does not apply to non-1.6 VMs
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ContendedMonitorTests.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ContendedMonitorTests.java
index 8448eba..66e0d80 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ContendedMonitorTests.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ContendedMonitorTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -19,15 +19,15 @@
import com.sun.jdi.request.MonitorWaitedRequest;
/**
- * Test cases for the implementation of providing argument information even if
+ * Test cases for the implementation of providing argument information even if
* no debugging information is present in the new java 1.6 VM
- *
+ *
* @since 3.3
*/
public class ContendedMonitorTests extends AbstractJDITest {
EventRequestManager erm = null;
-
+
/** setup test info locally **/
@Override
public void localSetUp() {
@@ -35,7 +35,7 @@
}
/**
- * test to see if a the 1.6 VM can get monitor events info and that
+ * test to see if a the 1.6 VM can get monitor events info and that
* a non-1.6VM cannot.
*/
public void testCanRequestMonitorEvents() {
@@ -46,7 +46,7 @@
assertTrue("Should not have ability to request monitor events info", !fVM.canRequestMonitorEvents());
}
}
-
+
/**
* test getting monitor contended enter requests from the event request manager
* this test is not applicable to non 1.6 VMs
@@ -62,7 +62,7 @@
assertTrue("list should be of size 1", list.size() == 1);
assertTrue("req should be enabled", ((MonitorContendedEnterRequest)list.get(0)).isEnabled());
}
-
+
/**
* test getting monitor contended entered requests from the event request manager
* this test is not applicable to non 1.6 VMs
@@ -78,7 +78,7 @@
assertTrue("list should be of size 1", list.size() == 1);
assertTrue("req should be enabled", ((MonitorContendedEnteredRequest)list.get(0)).isEnabled());
}
-
+
/**
* test getting monitor wait requests from the event request manager
* this test is not applicable to non 1.6 VMs
@@ -86,7 +86,7 @@
public void testMonitorWaitRequest() {
if(!fVM.canRequestMonitorEvents()) {
return;
- }
+ }
MonitorWaitRequest req = erm.createMonitorWaitRequest();
req.enable();
List<?> list = erm.monitorWaitRequests();
@@ -94,7 +94,7 @@
assertTrue("list should be of size 1", list.size() == 1);
assertTrue("req should be enabled", ((MonitorWaitRequest)list.get(0)).isEnabled());
}
-
+
/**
* test getting monitor waited requests from the event request manager
* this test is not applicable to non 1.6 VMs
@@ -110,5 +110,5 @@
assertTrue("list should be of size 1", list.size() == 1);
assertTrue("req should be enabled", ((MonitorWaitedRequest)list.get(0)).isEnabled());
}
-
+
}
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/DoubleValueTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/DoubleValueTest.java
index 2ce0262..48eb16e 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/DoubleValueTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/DoubleValueTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/EventListener.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/EventListener.java
index 794ec62..f500430 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/EventListener.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/EventListener.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/EventReader.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/EventReader.java
index 07bf849..358e641 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/EventReader.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/EventReader.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/EventRequestManagerTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/EventRequestManagerTest.java
index 79591e2..f13c2db 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/EventRequestManagerTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/EventRequestManagerTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -69,12 +69,12 @@
public void testJDIAccessWatchpointRequest() {
if (!fVM.canWatchFieldAccess())
return;
-
+
// Create an access watchpoint request
Field field = getField();
AccessWatchpointRequest request = fManager.createAccessWatchpointRequest(field);
assertEquals("1", field, request.field());
-
+
// Get all access watchpoint requests
List<?> requests = fManager.accessWatchpointRequests();
ListIterator<?> iterator = requests.listIterator();
@@ -82,13 +82,13 @@
while (iterator.hasNext()) {
assertTrue("2."+i++, iterator.next() instanceof AccessWatchpointRequest);
}
-
+
// Delete an access watchpoint request
fManager.deleteEventRequest(request);
assertEquals("3", 0, fManager.accessWatchpointRequests().size());
}
/**
- * Test JDI createBreakpointRequest(Location), breakpointRequests(),
+ * Test JDI createBreakpointRequest(Location), breakpointRequests(),
* deleteEventRequest(EventRequest) and deleteAllBreakpoints()
*/
public void testJDIBreakpointRequest() {
@@ -104,11 +104,11 @@
Object breakpoint = iterator.next();
assertTrue("3", breakpoint instanceof BreakpointRequest);
}
-
+
// Delete a breakpoint
fManager.deleteEventRequest(bp);
assertEquals("4", 0, fManager.breakpointRequests().size());
-
+
// Delete all breakpoints
fManager.createBreakpointRequest(location);
fManager.deleteAllBreakpoints();
@@ -121,7 +121,7 @@
public void testJDIClassPrepareRequest() {
// Create a class prepare request
ClassPrepareRequest request= fManager.createClassPrepareRequest();
-
+
// Get all class prepare requests
List<?> requests = fManager.classPrepareRequests();
ListIterator<?> iterator = requests.listIterator();
@@ -129,7 +129,7 @@
while (iterator.hasNext()) {
assertTrue("1."+i++, iterator.next() instanceof ClassPrepareRequest);
}
-
+
// Delete a class prepare request
fManager.deleteEventRequest(request);
assertEquals("2", 0, fManager.classPrepareRequests().size());
@@ -141,7 +141,7 @@
public void testJDIClassUnloadRequest() {
// Create a class unload request
ClassUnloadRequest request= fManager.createClassUnloadRequest();
-
+
// Get all class unload requests
List<?> requests = fManager.classUnloadRequests();
ListIterator<?> iterator = requests.listIterator();
@@ -149,7 +149,7 @@
while (iterator.hasNext()) {
assertTrue("1."+i++, iterator.next() instanceof ClassUnloadRequest);
}
-
+
// Delete a class unload request
fManager.deleteEventRequest(request);
assertEquals("2", 0, fManager.classUnloadRequests().size());
@@ -161,7 +161,7 @@
public void testJDIExceptionRequest() {
// Create a exception request
ExceptionRequest request= fManager.createExceptionRequest(null, true, true);
-
+
// Get all exception requests
List<?> requests = fManager.exceptionRequests();
ListIterator<?> iterator = requests.listIterator();
@@ -169,24 +169,24 @@
while (iterator.hasNext()) {
assertTrue("1."+i++, iterator.next() instanceof ExceptionRequest);
}
-
+
// Delete a exception request
fManager.deleteEventRequest(request);
assertEquals("2", i-1, fManager.exceptionRequests().size());
}
/**
- * Test JDI createModificationWatchpointRequest(Field),
+ * Test JDI createModificationWatchpointRequest(Field),
* accessWatchpointRequests() and deleteEventRequest(EventRequest)
*/
public void testJDIModificationWatchpointRequest() {
if (!fVM.canWatchFieldAccess())
return;
-
+
// Create a modification watchpoint
Field field = getField();
ModificationWatchpointRequest request = fManager.createModificationWatchpointRequest(field);
assertEquals("1", field, request.field());
-
+
// Get all modification watchpoints
List<?> requests = fManager.modificationWatchpointRequests();
ListIterator<?> iterator = requests.listIterator();
@@ -194,7 +194,7 @@
while (iterator.hasNext()) {
assertTrue("2."+i++, iterator.next() instanceof ModificationWatchpointRequest);
}
-
+
// Delete a modification watchpoint
fManager.deleteEventRequest(request);
assertEquals("3", 0, fManager.modificationWatchpointRequests().size());
@@ -206,7 +206,7 @@
public void testJDIStepRequest() {
// Create a step request
StepRequest request= fManager.createStepRequest(getThread(), StepRequest.STEP_LINE, StepRequest.STEP_OVER);
-
+
// Get all step requests
List<?> requests = fManager.stepRequests();
ListIterator<?> iterator = requests.listIterator();
@@ -214,7 +214,7 @@
while (iterator.hasNext()) {
assertTrue("1."+i++, iterator.next() instanceof StepRequest);
}
-
+
// Delete a step request
fManager.deleteEventRequest(request);
assertEquals("2", 0, fManager.stepRequests().size());
@@ -226,7 +226,7 @@
public void testJDIThreadDeathRequest() {
// Create a ThreadDeath request
ThreadDeathRequest request= fManager.createThreadDeathRequest();
-
+
// Get all ThreadDeath requests
List<?> requests = fManager.threadDeathRequests();
ListIterator<?> iterator = requests.listIterator();
@@ -234,7 +234,7 @@
while (iterator.hasNext()) {
assertTrue("1."+i++, iterator.next() instanceof ThreadDeathRequest);
}
-
+
// Delete a ThreadDeath request
fManager.deleteEventRequest(request);
assertEquals("2", 0, fManager.threadDeathRequests().size());
@@ -246,7 +246,7 @@
public void testJDIThreadStartRequest() {
// Create a ThreadStart request
ThreadStartRequest request= fManager.createThreadStartRequest();
-
+
// Get all ThreadStart requests
List<?> requests = fManager.classUnloadRequests();
ListIterator<?> iterator = requests.listIterator();
@@ -254,7 +254,7 @@
while (iterator.hasNext()) {
assertTrue("1."+i++, iterator.next() instanceof ThreadStartRequest);
}
-
+
// Delete a ThreadStart request
fManager.deleteEventRequest(request);
assertEquals("2", 0, fManager.classUnloadRequests().size());
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/EventRequestTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/EventRequestTest.java
index 4c82654..354d10f 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/EventRequestTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/EventRequestTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/EventTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/EventTest.java
index 6b3812c..7024db2 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/EventTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/EventTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/EventWaiter.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/EventWaiter.java
index a07ae86..6c37ef2 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/EventWaiter.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/EventWaiter.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -101,7 +101,7 @@
if ((event.request() != null) && (event.request().equals(fRequest))) {
notifyEvent(event);
return fShouldGo;
- }
+ }
return true;
}
/**
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ExceptionEventTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ExceptionEventTest.java
index 71118d2..7af03b8 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ExceptionEventTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ExceptionEventTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ExceptionRequestTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ExceptionRequestTest.java
index 3db8fc0..841cefd 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ExceptionRequestTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ExceptionRequestTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/FieldTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/FieldTest.java
index d8b1987..7557c26 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/FieldTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/FieldTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/FileConsoleReader.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/FileConsoleReader.java
index 86ae903..b7562c0 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/FileConsoleReader.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/FileConsoleReader.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/FloatValueTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/FloatValueTest.java
index c2cf25b..c14fb84 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/FloatValueTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/FloatValueTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ForceEarlyReturnTests.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ForceEarlyReturnTests.java
index 4880ca8..e96609c 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ForceEarlyReturnTests.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ForceEarlyReturnTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/package org.eclipse.debug.jdi.tests;
@@ -23,13 +23,13 @@
import com.sun.jdi.request.EventRequest;
/**
- * Test cases for the implementation of providing argument information even if
+ * Test cases for the implementation of providing argument information even if
* no debugging information is present in the new java 1.6 VM
- *
+ *
* @since 3.3
*/
public class ForceEarlyReturnTests extends AbstractJDITest {
-
+
/** setup test info locally **/
@Override
public void localSetUp() {}
@@ -45,7 +45,7 @@
assertFalse("Should not have force early return capabilities", fVM.canForceEarlyReturn());
}
}
-
+
/**
* test for the specifying the return type for a forced return to make sure the new return value works
*/
@@ -98,5 +98,5 @@
e.printStackTrace();
}
}
-
+
}
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/HeapWalkingTests.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/HeapWalkingTests.java
index 70a7f06..aac353b 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/HeapWalkingTests.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/HeapWalkingTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -18,18 +18,18 @@
/**
* Test cases for the implementation of heap walking in the new java 1.6 VM
- *
+ *
* @since 3.3
*/
public class HeapWalkingTests extends AbstractJDITest {
private ReferenceType fClass, fClass1;
private ObjectReference fObject;
-
+
/** setup our tests */
@Override
public void localSetUp() {}
-
+
/** tear down our tests */
@Override
public void localTearDown() {
@@ -50,7 +50,7 @@
assertTrue("Should not have instance info", !fVM.canGetInstanceInfo());
}
}
-
+
/**
* tests the new method instanceCounts, to make sure it throws an NPE when required.
* test is not applicable to non 1.6 VMs
@@ -65,7 +65,7 @@
}
catch (NullPointerException npe) {}
}
-
+
/**
* tests to make sure the instanceCounts method throws a not supported
*/
@@ -86,7 +86,7 @@
catch(UnsupportedOperationException uoe) {}
}
}
-
+
/**
* test to collect any referring instances can be collected for the specified class.
* test is not applicable to non 1.6 VMs.
@@ -109,7 +109,7 @@
assertTrue("count for RefClass1 should be 2", counts[0] == 2);
assertTrue("count for RefClass2 should be 1", counts[1] == 1);
}
-
+
/**
* test to make sure instances throws an unsupported exception for non 1.6 VMs
*/
@@ -132,7 +132,7 @@
catch(UnsupportedOperationException uoe) {}
}
}
-
+
/**
* test to make sure instances throws and IllegalArgument exception for negative long arguments.
* test is not applicable to non 1.6 VMs
@@ -149,10 +149,10 @@
}
catch (IllegalArgumentException iae) {}
}
-
+
/**
* test to collect a list of instances.
- * test is not applicable to non 1.6 VMs.
+ * test is not applicable to non 1.6 VMs.
*/
public void testGetInstances() {
if(!fVM.canGetInstanceInfo()) {
@@ -168,7 +168,7 @@
assertNotNull("list should not be null", list);
assertTrue("list should have two enrtries", list.size() == 2);
}
-
+
/**
* test to make sure referringObjects throws an unsupported exception for non-1.6 VMs
*/
@@ -193,7 +193,7 @@
catch(UnsupportedOperationException uoe) {}
}
}
-
+
/**
* test to make sure referringObjects throws an IllegalArgument exception for bad values of max
*/
@@ -213,7 +213,7 @@
assertTrue("Threw exception", true);
}
}
-
+
/**
* tests the method referring objects to ensure working to spec.
* test is not applicable to non 1.6 VMs
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/HotCodeReplacementTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/HotCodeReplacementTest.java
index 76fdfad..50b239d 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/HotCodeReplacementTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/HotCodeReplacementTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -79,7 +79,7 @@
}
assertEquals("dropTopFrame.6", stackSize - 1, newStackSize);
}
-
+
/**
* Init the fields that are used by this test only.
*/
@@ -223,7 +223,7 @@
org.eclipse.jdi.hcr.VirtualMachine vm =
(org.eclipse.jdi.hcr.VirtualMachine) fVM;
-
+
// Drop the top a frame
try {
if (vm.canDoReturn()) {
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/IntegerValueTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/IntegerValueTest.java
index fa7a617..3a249f0 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/IntegerValueTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/IntegerValueTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/InterfaceTypeTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/InterfaceTypeTest.java
index 4c3f37f..a5f062e 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/InterfaceTypeTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/InterfaceTypeTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/JDITestCase.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/JDITestCase.java
index 3dd5445..ff0cb10 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/JDITestCase.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/JDITestCase.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/JDITestSuite.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/JDITestSuite.java
index 13332de..6314d3f 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/JDITestSuite.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/JDITestSuite.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/LocalVariableTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/LocalVariableTest.java
index 3f8c834..45f29e6 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/LocalVariableTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/LocalVariableTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/LocatableTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/LocatableTest.java
index c33353b..f47891b 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/LocatableTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/LocatableTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/LocationTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/LocationTest.java
index 3c1b2b7..7f6befd 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/LocationTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/LocationTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/LongValueTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/LongValueTest.java
index d6aad8e..4194ca4 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/LongValueTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/LongValueTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/MethodEntryRequestTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/MethodEntryRequestTest.java
index 8bb7e7c..0a52b2a 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/MethodEntryRequestTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/MethodEntryRequestTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -64,7 +64,7 @@
}
/**
- * Tests a request without any filtering
+ * Tests a request without any filtering
*/
public void testJDIWithoutFilter() {
MethodEntryRequest request = getMethodEntryRequest();
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/MethodExitRequestTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/MethodExitRequestTest.java
index 8dbb691..4c39397 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/MethodExitRequestTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/MethodExitRequestTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -62,7 +62,7 @@
return fVM.eventRequestManager().createMethodExitRequest();
}
/**
- * Tests a method exit request without filtering
+ * Tests a method exit request without filtering
*/
public void testJDIWithoutFilter() {
MethodExitRequest request = getMethodExitRequest();
@@ -76,7 +76,7 @@
}
/**
- * Tests a method exit request with an exclusion filter
+ * Tests a method exit request with an exclusion filter
*/
public void testJDIWithClassExclusionFilter() {
MethodExitRequest request = getMethodExitRequest();
@@ -93,7 +93,7 @@
}
/**
- * Tests a method exit request with a specific class filter
+ * Tests a method exit request with a specific class filter
*/
public void testJDIWithClassFilter1() {
MethodExitRequest request = getMethodExitRequest();
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/MethodReturnValuesTests.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/MethodReturnValuesTests.java
index 21a5b15..cfa7bcb 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/MethodReturnValuesTests.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/MethodReturnValuesTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -24,11 +24,11 @@
/**
* Test cases for method exit event return values in java 1.6 VM
- *
+ *
* @since 3.3
*/
public class MethodReturnValuesTests extends AbstractJDITest {
-
+
MethodExitRequest req = null;
Value val = null;
MethodExitEvent event = null;
@@ -38,14 +38,14 @@
EventWaiter waiter = null;
BreakpointEvent bpe = null;
ThreadReference tref = null;
-
-
+
+
/** setup test info locally **/
@Override
public void localSetUp() {
erm = fVM.eventRequestManager();
}
-
+
/** cleans up local tests **/
@Override
public void localTearDown() {
@@ -54,9 +54,9 @@
erm.deleteAllBreakpoints();
}
}
-
+
/**
- * test to make sure 1.6 VM supports method return values
+ * test to make sure 1.6 VM supports method return values
*/
public void testCanGetMethodReturnValues() {
if(is16OrGreater()) {
@@ -66,7 +66,7 @@
assertFalse("Should not have method return values capabilities", fVM.canGetMethodReturnValues());
}
}
-
+
/**
* test getting a void return value.
* not applicable to non 1.6 VMs
@@ -108,7 +108,7 @@
assertTrue("thrown exception mean failure", false);
}
}
-
+
/**
* test to make sure that returnValue is working to spec.
* test is not applicable to non 1.6 VMs
@@ -145,12 +145,12 @@
assertTrue("return value must be StringReferenceImpl", val instanceof StringReferenceImpl);
erm.deleteEventRequest(req);
}
- }
+ }
catch (InterruptedException e) {
assertTrue("thrown exception mean failure", false);
}
}
-
+
/**
* test to make sure that returnValue is working to spec.
* test is not applicable to non 1.6 VMs
@@ -187,12 +187,12 @@
assertEquals("return value must be 20", val.virtualMachine().mirrorOf(20), val);
erm.deleteEventRequest(req);
}
- }
+ }
catch (InterruptedException e) {
assertTrue("thrown exception mean failure", false);
}
- }
-
+ }
+
/**
* test to make sure that returnValue is working to spec.
* test is not applicable to non 1.6 VMs
@@ -229,12 +229,12 @@
assertEquals("return value must be true", val.virtualMachine().mirrorOf(true), val);
erm.deleteEventRequest(req);
}
- }
+ }
catch (InterruptedException e) {
assertTrue("thrown exception mean failure", false);
}
- }
-
+ }
+
/**
* test to make sure that returnValue is working to spec.
* test is not applicable to non 1.6 VMs
@@ -271,9 +271,9 @@
assertEquals("return value must be 123", val.virtualMachine().mirrorOf(123L), val);
erm.deleteEventRequest(req);
}
- }
+ }
catch (InterruptedException e) {
assertTrue("thrown exception mean failure", false);
}
- }
+ }
}
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/MethodTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/MethodTest.java
index 963c4ce..828ba43 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/MethodTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/MethodTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/MirrorTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/MirrorTest.java
index f4940e9..456aa5f 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/MirrorTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/MirrorTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ModificationWatchpointEventTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ModificationWatchpointEventTest.java
index 72229fa..635cb75 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ModificationWatchpointEventTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ModificationWatchpointEventTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/MonitorFrameInfoTests.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/MonitorFrameInfoTests.java
index abe5002..a25295a 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/MonitorFrameInfoTests.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/MonitorFrameInfoTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -20,9 +20,9 @@
import com.sun.jdi.request.EventRequest;
/**
- * Test cases for the implementation of providing argument information even if
+ * Test cases for the implementation of providing argument information even if
* no debugging information is present in the new java 1.6 VM
- *
+ *
* @since 3.3
*/
public class MonitorFrameInfoTests extends AbstractJDITest {
@@ -32,7 +32,7 @@
public void localSetUp() {}
/**
- * test to see if a the 1.6 VM can get monitor frame info and that
+ * test to see if a the 1.6 VM can get monitor frame info and that
* a non-1.6VM cannot.
*/
public void testCanGetMonitorFrameInfo() {
@@ -43,7 +43,7 @@
assertTrue("Should not have monitor frame info", !fVM.canGetMonitorFrameInfo());
}
}
-
+
/**
* test to make sure the proper frames and monitors are collected for the corresponding thread ref.
* this test has no effect in a non-1.6VM
@@ -73,5 +73,5 @@
e.printStackTrace();
}
}
-
+
}
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/NotYetImplementedException.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/NotYetImplementedException.java
index 0983757..cc399ef 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/NotYetImplementedException.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/NotYetImplementedException.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -15,7 +15,7 @@
*/
public class NotYetImplementedException extends RuntimeException {
private static final long serialVersionUID = 1L;
-
+
/**
* NotYetImplemented constructor comment.
*/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/NullConsoleReader.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/NullConsoleReader.java
index 7f26501..c085bf1 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/NullConsoleReader.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/NullConsoleReader.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ObjectReferenceTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ObjectReferenceTest.java
index 6a5d8ae..337e685 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ObjectReferenceTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ObjectReferenceTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -85,7 +85,7 @@
return "com.sun.jdi.ObjectReference";
}
/**
- * Returns all tests
+ * Returns all tests
*/
@Override
protected Test suite() {
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/PrimitiveValueTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/PrimitiveValueTest.java
index 2769693..afd1ff3 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/PrimitiveValueTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/PrimitiveValueTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ProvideArgumentsTests.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ProvideArgumentsTests.java
index a0e8cd6..982579b 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ProvideArgumentsTests.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ProvideArgumentsTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -24,9 +24,9 @@
import com.sun.jdi.request.EventRequest;
/**
- * Test cases for the implementation of providing argumebnt information even if
+ * Test cases for the implementation of providing argumebnt information even if
* no debugging information is present in the new java 1.6 VM
- *
+ *
* @since 3.3
*/
public class ProvideArgumentsTests extends AbstractJDITest {
@@ -34,10 +34,10 @@
/** setup test info locally **/
@Override
public void localSetUp() {}
-
+
/**
* tests getting argument values from a stackframe when no debugging
- * info is available
+ * info is available
*/
public void testGetArgumentValues() {
try {
@@ -45,7 +45,7 @@
BreakpointRequest br = getBreakpointRequest(method.location());
br.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD);
br.enable();
-
+
EventWaiter waiter = new EventWaiter(br, true);
fEventReader.addEventListener(waiter);
triggerEvent("argvalues");
@@ -67,6 +67,6 @@
} catch (IncompatibleThreadStateException e) {
e.printStackTrace();
}
-
+
}
}
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ReferenceTypeTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ReferenceTypeTest.java
index d6e8694..167c693 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ReferenceTypeTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ReferenceTypeTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -305,7 +305,7 @@
}
}
/**
- * Test JDI isAbstract(), isFinal() and isStatic()
+ * Test JDI isAbstract(), isFinal() and isStatic()
* and JDWP 'Type - Get modifiers'.
*/
public void testJDIModifiers() {
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ShortValueTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ShortValueTest.java
index e2d8ccc..7053dbe 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ShortValueTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ShortValueTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/SourceNameFilterTests.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/SourceNameFilterTests.java
index 5f0afde..14743d9 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/SourceNameFilterTests.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/SourceNameFilterTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -15,9 +15,9 @@
import com.sun.jdi.request.EventRequestManager;
/**
- * Test cases for the implementation of providing argumebnt information even if
+ * Test cases for the implementation of providing argumebnt information even if
* no debugging information is present in the new java 1.6 VM
- *
+ *
* @since 3.3
*/
public class SourceNameFilterTests extends AbstractJDITest {
@@ -25,11 +25,11 @@
/** setup test info locally **/
@Override
public void localSetUp() {}
-
+
/**
- * test to see if we can use source name filters from a 1.6 VM, and
+ * test to see if we can use source name filters from a 1.6 VM, and
* that we cannot from a pre 1.6 VM
- *
+ *
*/
public void testCanUseSourceNameFilters() {
if(fVM.version().indexOf("1.6") > -1) {
@@ -40,7 +40,7 @@
assertTrue("Should not have source name filter capabilities", !fVM.canUseSourceNameFilters());
}
}
-
+
/**
* test to make sure the source name filter capability is working to spec.
* this test does not apply to non-1.6 VMs
@@ -57,7 +57,7 @@
assertNotNull("event should not be null", event);
assertEquals(event.referenceType().name(), "org.eclipse.debug.jdi.tests.program.TestClass1");
rm.deleteEventRequest(request);
-
+
//filter is *Test3.java
request = rm.createClassPrepareRequest();
request.addSourceNameFilter("*TestClass3.java");
@@ -65,7 +65,7 @@
assertNotNull("event should not be null", event);
assertEquals(event.referenceType().name(), "org.eclipse.debug.jdi.tests.program.TestClass3");
rm.deleteEventRequest(request);
-
+
//filter is *TestClazz6.java
request = rm.createClassPrepareRequest();
request.addSourceNameFilter("*TestClazz6.java");
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/StackFrameTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/StackFrameTest.java
index c2ab6b5..b947f6a 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/StackFrameTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/StackFrameTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/StepEventTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/StepEventTest.java
index 4876e48..2c727cb 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/StepEventTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/StepEventTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/StringReferenceTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/StringReferenceTest.java
index 5876905..58fd8ec 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/StringReferenceTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/StringReferenceTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/TestAll.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/TestAll.java
index 5e1c71c..6488c06 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/TestAll.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/TestAll.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -23,7 +23,7 @@
* Returns all the test case classes (a Vector of Class) that are
* relevant for the given VM information.
* NB1: This doesn't include the VirtualMachineTest class.
- * NB2: The last element must be the VMDeathEventTest class since
+ * NB2: The last element must be the VMDeathEventTest class since
* it shuts the VM down.
*/
protected static Vector<Class<?>> getAllTestCases(VMInformation info) {
@@ -58,10 +58,10 @@
classes.addElement(MethodEntryRequestTest.class);
classes.addElement(MethodExitRequestTest.class);
classes.addElement(MirrorTest.class);
-
+
if (info.fVM.canWatchFieldModification())
classes.addElement(ModificationWatchpointEventTest.class);
-
+
classes.addElement(ObjectReferenceTest.class);
classes.addElement(PrimitiveValueTest.class);
classes.addElement(ReferenceTypeTest.class);
@@ -76,12 +76,12 @@
classes.addElement(TypeComponentTest.class);
classes.addElement(TypeTest.class);
classes.addElement(ValueTest.class);
-
+
if (info.fVM.canWatchFieldAccess() && info.fVM.canWatchFieldModification()) {
classes.addElement(WatchpointEventTest.class);
classes.addElement(WatchpointRequestTest.class);
}
-
+
classes.addElement(VirtualMachineExitTest.class);
classes.addElement(VMDisconnectEventTest.class);
classes.addElement(VMDisposeTest.class); // note that this test does not restore the state properly.
@@ -96,20 +96,20 @@
public static void main(String[] arguments) throws Throwable {
// Create test result
TextTestResult result= new TextTestResult();
-
+
// Run the VirtualMachineTest
AbstractJDITest test= run(result, VirtualMachineTest.class, arguments, null);
-
+
// Was it possible to run the first test?
if (test == null)
return;
-
+
// Get the VM info
VMInformation info = test.getVMInfo();
-
+
// Get all test cases
Vector<Class<?>> classes= getAllTestCases(info);
-
+
// Run the other tests
Enumeration<Class<?>> enumeration= classes.elements();
while (enumeration.hasMoreElements()) {
@@ -117,10 +117,10 @@
test= run(result, testClass, arguments, info);
info= test.getVMInfo(); // In case the test has changed this info
}
-
- // Shut down the VM
+
+ // Shut down the VM
test.shutDownTarget();
-
+
// Show the result
result.print();
}
@@ -150,7 +150,7 @@
return null;
test.setVMInfo(info);
test.setInControl(false);
-
+
// Run test
System.out.println("\n" + new java.util.Date());
System.out.println("Begin testing " + test.getName() + "...");
@@ -160,7 +160,7 @@
long runTime= endTime-startTime;
System.out.println("\nTime: "+runTime/1000+"."+runTime%1000);
System.out.println("Done testing " + test.getName() + ".");
-
+
return test;
}
}
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/TextTestResult.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/TextTestResult.java
index 78bf225..11da194 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/TextTestResult.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/TextTestResult.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ThreadDeathEventTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ThreadDeathEventTest.java
index c0a8541..aa38dc0 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ThreadDeathEventTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ThreadDeathEventTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ThreadGroupReferenceTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ThreadGroupReferenceTest.java
index 1b26ea4..fb490e8 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ThreadGroupReferenceTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ThreadGroupReferenceTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ThreadReferenceTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ThreadReferenceTest.java
index 8e2053b..09edf43 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ThreadReferenceTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ThreadReferenceTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -175,7 +175,7 @@
false);
ThreadReference thread = event.thread();
- // Create a java.lang.Throwable instance in
+ // Create a java.lang.Throwable instance in
List<ReferenceType> classes = fVM.classesByName("java.lang.Throwable");
assertTrue("1", classes.size() != 0);
ClassType threadDeathClass = (ClassType) classes.get(0);
@@ -212,7 +212,7 @@
}
/**
- * Test JDI suspend() and resume()
+ * Test JDI suspend() and resume()
* and JDWP 'Thread - Suspend' and 'Thread - Resume'.
*/
public void testJDISuspendResume() {
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ThreadStartEventTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ThreadStartEventTest.java
index fbf79aa..006e3bd 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ThreadStartEventTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ThreadStartEventTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/TypeComponentTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/TypeComponentTest.java
index 257e29b..1f4ef79 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/TypeComponentTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/TypeComponentTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/TypeTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/TypeTest.java
index ae4d70f..6a00f52 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/TypeTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/TypeTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -16,7 +16,7 @@
* Tests for JDI com.sun.jdi.Type.
*/
public class TypeTest extends AbstractJDITest {
- private Type
+ private Type
fArrayType,
fClassType,
fInterfaceType,
@@ -47,7 +47,7 @@
fDoubleDoubleArrayType,
fCharDoubleArrayType,
fBooleanDoubleArrayType;
-
+
/**
* Creates a new test.
*/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/VMDisconnectEventTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/VMDisconnectEventTest.java
index ba6bebe..4360b9b 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/VMDisconnectEventTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/VMDisconnectEventTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/VMDisconnectEventWaiter.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/VMDisconnectEventWaiter.java
index 77aa749..cf52201 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/VMDisconnectEventWaiter.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/VMDisconnectEventWaiter.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -15,7 +15,7 @@
* Listen for VMDisconnectEvent.
*/
public class VMDisconnectEventWaiter extends EventWaiter {
-
+
/**
* Constructor
* @param request
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/VMDisposeTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/VMDisposeTest.java
index fc3e528..0ebc157 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/VMDisposeTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/VMDisposeTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/VMInformation.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/VMInformation.java
index ae8e313..fde5969 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/VMInformation.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/VMInformation.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -23,7 +23,7 @@
AbstractReader fConsoleReader;
String fVMType;
- /**
+ /**
* Creates a new VMInformation for the given vm, vm type, launched vm, event reader and console reader.
*/
VMInformation(VirtualMachine vm, String vmType, Process launchedVM, EventReader eventReader, AbstractReader consoleReader) {
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ValueTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ValueTest.java
index b9d49f9..c22f942 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ValueTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ValueTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/VirtualMachineExitTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/VirtualMachineExitTest.java
index f4895b0..cfa20c1 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/VirtualMachineExitTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/VirtualMachineExitTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/VirtualMachineTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/VirtualMachineTest.java
index aa30db3..3316884 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/VirtualMachineTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/VirtualMachineTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -33,7 +33,7 @@
/**
* Tests for JDI com.sun.jdi.VirtualMachine
* and JDWP VM command set.
- *
+ *
* Example of arguments:
* -launcher SunVMLauncher -address c:\jdk1.2.2\ -classpath d:\target
*/
@@ -83,7 +83,7 @@
super.startProgram();
}
/**
- * Returns all tests
+ * Returns all tests
*/
@Override
protected Test suite() {
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/WatchpointEventTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/WatchpointEventTest.java
index 4642556..1c8b70e 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/WatchpointEventTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/WatchpointEventTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/WatchpointRequestTest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/WatchpointRequestTest.java
index 9a24bba..088619a 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/WatchpointRequestTest.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/WatchpointRequestTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/MainClass.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/MainClass.java
index b5f6e8c..f601178 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/MainClass.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/MainClass.java
@@ -4,12 +4,12 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.debug.jdi.tests.program;
-
+
import java.io.OutputStream;
import java.io.PrintWriter;
@@ -19,12 +19,12 @@
/**
* Main class for target VM tests.
- * This class is intended to be run by the target VM.
+ * This class is intended to be run by the target VM.
* It will use other classes in this package, and it will create and terminate
* threads as a regular program would do.
*
* WARNING, WARNING:
- * Tests in org.eclipse.debug.jdi.tests assume the content of this class,
+ * Tests in org.eclipse.debug.jdi.tests assume the content of this class,
* as well as its behavior. So if this class or one of the types in this
* package is changed, the corresponding tests must also be changed.
*/
@@ -117,7 +117,7 @@
public MainClass(int i, Object o1, Object o2) {
}
- /**
+ /**
* For invocation tests
* @param x the integer
* @param o
@@ -130,13 +130,13 @@
return "";
}
}
- /**
+ /**
* For invocation tests
*/
private static void invoke2() {
throw new IndexOutOfBoundsException();
}
-
+
/**
* For invocation tests
* @param str
@@ -159,9 +159,9 @@
* @param l
*/
private void variablesTest(long l) {}
-
+
/**
- * Runs the test program
+ * Runs the test program
* @param args
*/
public static void main(java.lang.String[] args) {
@@ -190,7 +190,7 @@
writer.println(string);
writer.flush();
}
-
+
/**
* Prints out a specified integer. This method is used in the force early return tests to ensure we
* can specify a different, type compatible return value
@@ -206,37 +206,37 @@
writer.flush();
return num;
}
-
+
/**
* Returns 20
- *
+ *
* @return 20
*/
public int getInt() {
int x = Math.max(20, 10);
return x;
}
-
+
/**
* Returns true.
- *
+ *
* @return true
*/
public boolean getBoolean() {
boolean bool = Boolean.valueOf("true").booleanValue();
return bool;
}
-
+
/**
* Returns 123L.
- *
+ *
* @return 123
*/
public long getLong() {
long l = Long.valueOf("123").longValue();
return l;
}
-
+
/**
* dump out a string
* @return a String
@@ -246,7 +246,7 @@
System.out.println("foobar");
return "man";
}
-
+
/**
* make a sync'd method so we can stop in it to gather monitor information
* @since 3.3
@@ -254,7 +254,7 @@
synchronized public void sync() {
System.out.println("sync'd to the moon");
}
-
+
/**
* suspend on the first line of the method to get the argument values from the stackframe.
* used in testing the new 1.6VM capability to get argument values when no debugging info is available.
@@ -266,7 +266,7 @@
public void argValues(String str, int num, Object obj) {
System.out.println("get the arg values");
}
-
+
/**
* Prints to System.out and throws an exception to indicate readiness
*/
@@ -278,7 +278,7 @@
} catch (NegativeArraySizeException exc) {
}
}
-
+
/**
* @see java.lang.Runnable#run()
*/
@@ -460,7 +460,7 @@
System.out.println("Unknown event type: " + eventType);
}
}
-
+
/**
* Trigger an exception event for the front-end.
*/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/OtherClass.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/OtherClass.java
index a269800..25afc20 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/OtherClass.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/OtherClass.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/Printable.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/Printable.java
index 5c6c88b..8a341ff 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/Printable.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/Printable.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -12,7 +12,7 @@
/**
* Interface type for target VM tests.
- * This interface is intended to be loaded by the target VM.
+ * This interface is intended to be loaded by the target VM.
*
* WARNING, WARNING:
* Tests in org.eclipse.debug.jdi.tests assume the content of this interface.
@@ -27,7 +27,7 @@
*/
public interface Printable extends Cloneable {
/**
- * the number 1
+ * the number 1
*/
int CONSTANT = 1;
/**
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/RefClass.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/RefClass.java
index 55cd1d4..98a31e7 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/RefClass.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/RefClass.java
@@ -14,7 +14,7 @@
* Test class with a static object array
*/
public class RefClass {
-
+
/**
* Array of two other Ref classes
*/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/RefClass2.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/RefClass2.java
index 6711704..03d4245 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/RefClass2.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/RefClass2.java
@@ -15,7 +15,7 @@
*/
public class RefClass2 {
/**
- * A handle to the singleton <code>MainClass</code>
+ * A handle to the singleton <code>MainClass</code>
*/
public Object temp2 = MainClass.fObject;
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClass.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClass.java
index 1f3e06d..b6ebce6 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClass.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClass.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClass1.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClass1.java
index 3c73718..8b8a0db 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClass1.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClass1.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClass2.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClass2.java
index 592fcc0..cbfc3b4 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClass2.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClass2.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClass3.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClass3.java
index 23aa1f1..8284552 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClass3.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClass3.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClass4.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClass4.java
index 2099db6..aae2626 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClass4.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClass4.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClass5.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClass5.java
index b4c6d47..17ee641 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClass5.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClass5.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClass6.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClass6.java
index f48e2fd..5bba8ca 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClass6.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClass6.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClass7.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClass7.java
index 2fbed87..2f8f975 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClass7.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClass7.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClazz10.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClazz10.java
index 204da91..84a25b1 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClazz10.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClazz10.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClazz8.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClazz8.java
index 502ee93..0851b10 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClazz8.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClazz8.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClazz9.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClazz9.java
index 175f9e0..1af5d6d 100644
--- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClazz9.java
+++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/program/TestClazz9.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/console tests/org/eclipse/jdt/debug/tests/console/ConsoleTerminateAllActionTests.java b/org.eclipse.jdt.debug.tests/console tests/org/eclipse/jdt/debug/tests/console/ConsoleTerminateAllActionTests.java
index c2c0be1..0485e47 100644
--- a/org.eclipse.jdt.debug.tests/console tests/org/eclipse/jdt/debug/tests/console/ConsoleTerminateAllActionTests.java
+++ b/org.eclipse.jdt.debug.tests/console tests/org/eclipse/jdt/debug/tests/console/ConsoleTerminateAllActionTests.java
@@ -84,6 +84,6 @@
removeAllBreakpoints();
}
}
-
+
}
}
diff --git a/org.eclipse.jdt.debug.tests/console tests/org/eclipse/jdt/debug/tests/console/IOConsoleEchoActionDelegate.java b/org.eclipse.jdt.debug.tests/console tests/org/eclipse/jdt/debug/tests/console/IOConsoleEchoActionDelegate.java
index 410fb00..3d8bc20 100644
--- a/org.eclipse.jdt.debug.tests/console tests/org/eclipse/jdt/debug/tests/console/IOConsoleEchoActionDelegate.java
+++ b/org.eclipse.jdt.debug.tests/console tests/org/eclipse/jdt/debug/tests/console/IOConsoleEchoActionDelegate.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -70,33 +70,33 @@
}
}, "IOConsole Test Thread").start(); //$NON-NLS-1$
}
-
+
/**
* Actually runs the test
* @param console
*/
public void runTest(IOConsole console) {
final Display display = Display.getDefault();
-
+
final IOConsoleInputStream in = console.getInputStream();
display.asyncExec(new Runnable() {
@Override
- public void run() {
+ public void run() {
in.setColor(display.getSystemColor(SWT.COLOR_BLUE));
}
});
IConsoleManager manager = ConsolePlugin.getDefault().getConsoleManager();
manager.addConsoles(new IConsole[] { console });
-
- final IOConsoleOutputStream out = console.newOutputStream();
+
+ final IOConsoleOutputStream out = console.newOutputStream();
Display.getDefault().asyncExec(new Runnable() {
@Override
public void run() {
- out.setColor(Display.getDefault().getSystemColor(SWT.COLOR_GREEN));
+ out.setColor(Display.getDefault().getSystemColor(SWT.COLOR_GREEN));
out.setFontStyle(SWT.ITALIC);
}
});
-
+
PrintStream ps = new PrintStream(out);
ps.println("Any text entered should be echoed back"); //$NON-NLS-1$
for(;;) {
@@ -107,7 +107,7 @@
} catch (IOException io) {
io.printStackTrace();
}
-
+
try {
out.write(b, 0, bRead);
ps.println();
diff --git a/org.eclipse.jdt.debug.tests/console tests/org/eclipse/jdt/debug/tests/console/IOConsoleHyperlinkActionDelegate.java b/org.eclipse.jdt.debug.tests/console tests/org/eclipse/jdt/debug/tests/console/IOConsoleHyperlinkActionDelegate.java
index a99e248..6c3178e 100644
--- a/org.eclipse.jdt.debug.tests/console tests/org/eclipse/jdt/debug/tests/console/IOConsoleHyperlinkActionDelegate.java
+++ b/org.eclipse.jdt.debug.tests/console tests/org/eclipse/jdt/debug/tests/console/IOConsoleHyperlinkActionDelegate.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -36,7 +36,7 @@
* Test the hyperlink action delegate for the console
*/
public class IOConsoleHyperlinkActionDelegate implements IActionDelegate2, IWorkbenchWindowActionDelegate {
-
+
/**
* @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
*/
@@ -52,7 +52,7 @@
public String getPattern() {
return "1234567890"; //$NON-NLS-1$
}
-
+
@Override
public String getLineQualifier() {
return "1234567890"; //$NON-NLS-1$
@@ -80,7 +80,7 @@
public void disconnect() {
}
};
-
+
backingconsole.addPatternMatchListener(listener);
IOConsoleOutputStream stream = backingconsole.newOutputStream();
stream.setFontStyle(SWT.ITALIC | SWT.BOLD);
@@ -92,7 +92,7 @@
}
}).start();
}
-
+
private class MyHyperlink implements IHyperlink {
/**
* @see org.eclipse.ui.console.IHyperlink#linkEntered()
@@ -118,19 +118,19 @@
System.out.println("link activated");
}
}
-
+
/**
* @see org.eclipse.ui.IActionDelegate2#init(org.eclipse.jface.action.IAction)
*/
@Override
- public void init(IAction action) {
+ public void init(IAction action) {
}
/**
* @see org.eclipse.ui.IActionDelegate2#dispose()
*/
@Override
- public void dispose() {
+ public void dispose() {
}
/**
@@ -152,7 +152,7 @@
* @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow)
*/
@Override
- public void init(IWorkbenchWindow window) {
+ public void init(IWorkbenchWindow window) {
}
}
diff --git a/org.eclipse.jdt.debug.tests/console tests/org/eclipse/jdt/debug/tests/console/IOConsoleMultipleStreamActionDelegate.java b/org.eclipse.jdt.debug.tests/console tests/org/eclipse/jdt/debug/tests/console/IOConsoleMultipleStreamActionDelegate.java
index c0f3a33..9daea85 100644
--- a/org.eclipse.jdt.debug.tests/console tests/org/eclipse/jdt/debug/tests/console/IOConsoleMultipleStreamActionDelegate.java
+++ b/org.eclipse.jdt.debug.tests/console tests/org/eclipse/jdt/debug/tests/console/IOConsoleMultipleStreamActionDelegate.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -65,23 +65,23 @@
public void run(IAction action) {
runTest();
}
-
+
/**
- * Actually runs the test
+ * Actually runs the test
*/
public void runTest() {
ended = false;
-
+
final IOConsole console = new IOConsole("IO Test Console", null, DebugUITools.getImageDescriptor(IDebugUIConstants.IMG_ACT_RUN)); //$NON-NLS-1$
// console.setWaterMarks(5, 10);
IConsoleManager manager = ConsolePlugin.getDefault().getConsoleManager();
manager.addConsoles(new IConsole[] { console });
-
+
final Display display = Display.getDefault();
final IOConsoleInputStream in = console.getInputStream();
- final IOConsoleOutputStream echo = console.newOutputStream();
+ final IOConsoleOutputStream echo = console.newOutputStream();
display.asyncExec(new Runnable() {
@Override
public void run() {
@@ -90,12 +90,12 @@
}
});
startInputReadThread(in, echo);
-
- IOConsoleOutputStream out = console.newOutputStream();
+
+ IOConsoleOutputStream out = console.newOutputStream();
startOutputThread(out);
}
-
- private void startOutputThread(final IOConsoleOutputStream out) {
+
+ private void startOutputThread(final IOConsoleOutputStream out) {
new Thread(new Runnable() {
@Override
public void run() {
@@ -110,11 +110,11 @@
} catch (Exception e) {
e.printStackTrace();
}
- }
+ }
}
}, "OUTPUT").start(); //$NON-NLS-1$
}
-
+
private void startInputReadThread(final InputStream in, final OutputStream out) {
new Thread(new Runnable() {
@Override
diff --git a/org.eclipse.jdt.debug.tests/console tests/org/eclipse/jdt/debug/tests/console/IOConsoleOutputActionDelegate.java b/org.eclipse.jdt.debug.tests/console tests/org/eclipse/jdt/debug/tests/console/IOConsoleOutputActionDelegate.java
index 0f40223..243ee85 100644
--- a/org.eclipse.jdt.debug.tests/console tests/org/eclipse/jdt/debug/tests/console/IOConsoleOutputActionDelegate.java
+++ b/org.eclipse.jdt.debug.tests/console tests/org/eclipse/jdt/debug/tests/console/IOConsoleOutputActionDelegate.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -59,7 +59,7 @@
IOConsole console = new IOConsole("Test IOConsole", null, DebugUITools.getImageDescriptor(IDebugUIConstants.IMG_ACT_RUN)); //$NON-NLS-1$
IConsoleManager manager = ConsolePlugin.getDefault().getConsoleManager();
manager.addConsoles(new IConsole[]{console});
- OutputStream out = console.newOutputStream();
+ OutputStream out = console.newOutputStream();
final PrintStream stream = new PrintStream(out);
Runnable r = new Runnable() {
@Override
diff --git a/org.eclipse.jdt.debug.tests/console tests/org/eclipse/jdt/debug/tests/console/IOConsoleTests.java b/org.eclipse.jdt.debug.tests/console tests/org/eclipse/jdt/debug/tests/console/IOConsoleTests.java
index 449ec6d..e251239 100644
--- a/org.eclipse.jdt.debug.tests/console tests/org/eclipse/jdt/debug/tests/console/IOConsoleTests.java
+++ b/org.eclipse.jdt.debug.tests/console tests/org/eclipse/jdt/debug/tests/console/IOConsoleTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -24,7 +24,7 @@
* IOConsoleTests for the Automated suite
*/
public class IOConsoleTests extends AbstractDebugTest implements IPatternMatchListener {
-
+
private int fMatchCount;
private boolean fDisconnected = false;
@@ -35,7 +35,7 @@
public IOConsoleTests(String name) {
super(name);
}
-
+
/**
* Tests that the pattern matcher will find a specific pattern
* @throws Exception
@@ -51,14 +51,14 @@
stream.print("one foo bar");
stream.println();
stream.print("two foo bar");
-
+
long endTime = System.currentTimeMillis() + 1500;
while (!fDisconnected && System.currentTimeMillis() < endTime) {
synchronized(this) {
wait(500);
}
}
-
+
assertEquals("Should be two foo's", 2, fMatchCount);
} finally {
consoleManager.removeConsoles(new IConsole[]{console});
@@ -72,7 +72,7 @@
public String getPattern() {
return "foo";
}
-
+
/**
* @see org.eclipse.ui.console.IPatternMatchListener#getLineQualifier()
*/
@@ -96,7 +96,7 @@
public int getCompilerFlags() {
return 0;
}
-
+
/**
* @see org.eclipse.ui.console.IPatternMatchListenerDelegate#connect(org.eclipse.ui.console.TextConsole)
*/
@@ -112,4 +112,4 @@
notifyAll();
}
}
-
+
diff --git a/org.eclipse.jdt.debug.tests/console tests/org/eclipse/jdt/debug/tests/console/TestBufferredOutputActionDelegate.java b/org.eclipse.jdt.debug.tests/console tests/org/eclipse/jdt/debug/tests/console/TestBufferredOutputActionDelegate.java
index 0dac974..f967b31 100644
--- a/org.eclipse.jdt.debug.tests/console tests/org/eclipse/jdt/debug/tests/console/TestBufferredOutputActionDelegate.java
+++ b/org.eclipse.jdt.debug.tests/console tests/org/eclipse/jdt/debug/tests/console/TestBufferredOutputActionDelegate.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/console tests/org/eclipse/jdt/debug/tests/console/TestMessageConsoleActionDelegate.java b/org.eclipse.jdt.debug.tests/console tests/org/eclipse/jdt/debug/tests/console/TestMessageConsoleActionDelegate.java
index 5cdfa83..b48a90a 100644
--- a/org.eclipse.jdt.debug.tests/console tests/org/eclipse/jdt/debug/tests/console/TestMessageConsoleActionDelegate.java
+++ b/org.eclipse.jdt.debug.tests/console tests/org/eclipse/jdt/debug/tests/console/TestMessageConsoleActionDelegate.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/console tests/org/eclipse/jdt/debug/tests/console/TestShowConsoleActionDelegate.java b/org.eclipse.jdt.debug.tests/console tests/org/eclipse/jdt/debug/tests/console/TestShowConsoleActionDelegate.java
index 60514fc..5812a07 100644
--- a/org.eclipse.jdt.debug.tests/console tests/org/eclipse/jdt/debug/tests/console/TestShowConsoleActionDelegate.java
+++ b/org.eclipse.jdt.debug.tests/console tests/org/eclipse/jdt/debug/tests/console/TestShowConsoleActionDelegate.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -31,11 +31,11 @@
* Tests the show console drop down action delegate for the console view
*/
public class TestShowConsoleActionDelegate implements IActionDelegate2, IWorkbenchWindowActionDelegate {
-
+
MessageConsole console1;
MessageConsole console2;
IConsoleManager consoleManager;
-
+
/**
* @see org.eclipse.ui.IActionDelegate2#init(org.eclipse.jface.action.IAction)
*/
@@ -46,13 +46,13 @@
consoleManager = ConsolePlugin.getDefault().getConsoleManager();
consoleManager.addConsoles(new IConsole[]{console1, console2});
}
-
+
/**
* @see org.eclipse.ui.IActionDelegate2#dispose()
*/
@Override
public void dispose() {}
-
+
/**
* @see org.eclipse.ui.IActionDelegate2#runWithEvent(org.eclipse.jface.action.IAction, org.eclipse.swt.widgets.Event)
*/
@@ -60,7 +60,7 @@
public void runWithEvent(IAction action, Event event) {
run(action);
}
-
+
/**
* @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
*/
@@ -68,23 +68,23 @@
public void run(IAction action) {
final MessageConsoleStream stream1 = console1.newMessageStream();
final MessageConsoleStream stream2 = console2.newMessageStream();
-
+
stream2.setColor(Display.getDefault().getSystemColor(SWT.COLOR_RED));
-
+
new Thread(new Runnable() {
@Override
public void run() {
-
+
//write to console #1, show it, write again
stream1.print("Testing... Testing... Testing... "); //$NON-NLS-1$
consoleManager.showConsoleView(console1);
stream1.print("More Testing"); //$NON-NLS-1$
-
- //write to console #2, show it, write again
+
+ //write to console #2, show it, write again
stream2.print("Testing... Testing... Testing... "); //$NON-NLS-1$
consoleManager.showConsoleView(console2);
stream2.print("More Testing"); //$NON-NLS-1$
-
+
try {
for (int i=0; i<4; i++) {
consoleManager.showConsoleView(console1);
@@ -95,24 +95,24 @@
} catch (InterruptedException e) {
e.printStackTrace();
}
-
+
writeToStream(stream1, "\n\nDone"); //$NON-NLS-1$
writeToStream(stream2, "\n\nDone"); //$NON-NLS-1$
}
-
+
}).start();
}
-
+
private void writeToStream(final MessageConsoleStream stream, final String str) {
- stream.print(str);
+ stream.print(str);
}
-
+
/**
* @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
*/
@Override
public void selectionChanged(IAction action, ISelection selection) {}
-
+
/**
* @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow)
*/
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/AccessRuleParticipant.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/AccessRuleParticipant.java
index c280b59..8a8ad8c 100644
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/AccessRuleParticipant.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/AccessRuleParticipant.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -21,11 +21,11 @@
/**
* Sample access rule participant.
- *
+ *
* @since 3.3
*/
public class AccessRuleParticipant implements IAccessRuleParticipant {
-
+
IAccessRule[] fRules = new IAccessRule[] {
JavaCore.newAccessRule(new Path("discouraged"), IAccessRule.K_DISCOURAGED),
JavaCore.newAccessRule(new Path("accessible"), IAccessRule.K_ACCESSIBLE),
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/AlternateDelegate.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/AlternateDelegate.java
index 5083f64..b342092 100644
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/AlternateDelegate.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/AlternateDelegate.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -14,7 +14,7 @@
/**
* Tests an alternate launch mode that can be combined with debug mode for Java apps.
- *
+ *
* @since 3.3
*/
public class AlternateDelegate extends JavaLaunchDelegate {
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/ConsoleLineTracker.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/ConsoleLineTracker.java
index 3728003..8a67966 100644
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/ConsoleLineTracker.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/ConsoleLineTracker.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -16,19 +16,19 @@
import org.eclipse.jface.text.IRegion;
/**
- * Simple console line tracker extension point that delegates messages
+ * Simple console line tracker extension point that delegates messages
*/
public class ConsoleLineTracker implements IConsoleLineTrackerExtension {
-
+
/**
- * Forwards messages to the delegate when not <code>null</code>
+ * Forwards messages to the delegate when not <code>null</code>
*/
private static IConsoleLineTrackerExtension fDelegate;
private static IConsole fConsole;
-
+
/**
* Sets the delegate, possibly <code>null</code>
- *
+ *
* @param tracker
*/
public static void setDelegate(IConsoleLineTrackerExtension tracker) {
@@ -57,7 +57,7 @@
fDelegate.init(console);
}
}
-
+
/**
* Returns the document backing this console
* @return the document backingthis console
@@ -75,7 +75,7 @@
fDelegate.lineAppended(line);
}
}
-
+
/**
* @see org.eclipse.debug.ui.console.IConsoleLineTrackerExtension#consoleClosed()
*/
@@ -83,7 +83,7 @@
public void consoleClosed() {
if (fDelegate != null && fConsole != null) {
fDelegate.consoleClosed();
- }
+ }
}
-
+
}
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/ContextView.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/ContextView.java
index a241d33..5d06073 100644
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/ContextView.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/ContextView.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -17,11 +17,11 @@
/**
* Test view for debug model context view bindings.
- *
+ *
* @since 3.2
*/
public class ContextView extends ViewPart {
-
+
private TableViewer viewer;
/**
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/DebugElementEventWaiter.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/DebugElementEventWaiter.java
index b588933..56ee778 100644
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/DebugElementEventWaiter.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/DebugElementEventWaiter.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -16,9 +16,9 @@
* Waits for an event on a specific element
*/
public class DebugElementEventWaiter extends DebugEventWaiter {
-
+
protected Object fElement;
-
+
/**
* Constructor
* @param kind
@@ -28,7 +28,7 @@
super(kind);
fElement = element;
}
-
+
/**
* @see org.eclipse.jdt.debug.testplugin.DebugEventWaiter#accept(org.eclipse.debug.core.DebugEvent)
*/
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/DebugElementKindEventDetailWaiter.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/DebugElementKindEventDetailWaiter.java
index 7f85de0..6e7abc3 100644
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/DebugElementKindEventDetailWaiter.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/DebugElementKindEventDetailWaiter.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -29,7 +29,7 @@
super(eventKind, elementClass);
fDetail = detail;
}
-
+
/**
* @see org.eclipse.jdt.debug.testplugin.DebugElementKindEventWaiter#accept(org.eclipse.debug.core.DebugEvent)
*/
@@ -37,5 +37,5 @@
public boolean accept(DebugEvent event) {
return super.accept(event) && fDetail == event.getDetail();
}
-
+
}
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/DebugElementKindEventWaiter.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/DebugElementKindEventWaiter.java
index aa905a1..396af4b 100644
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/DebugElementKindEventWaiter.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/DebugElementKindEventWaiter.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -18,9 +18,9 @@
*/
public class DebugElementKindEventWaiter extends DebugEventWaiter {
-
+
protected Class<?> fElementClass;
-
+
/**
* Constructor
* @param eventKind
@@ -30,7 +30,7 @@
super(eventKind);
fElementClass = elementClass;
}
-
+
/**
* @see org.eclipse.jdt.debug.testplugin.DebugEventWaiter#accept(org.eclipse.debug.core.DebugEvent)
*/
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/DebugEventWaiter.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/DebugEventWaiter.java
index 39755cd..9317680 100644
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/DebugEventWaiter.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/DebugEventWaiter.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -45,7 +45,7 @@
* The <code>DebugEvent</code> received.
*/
protected DebugEvent fEvent;
-
+
/**
* The event set that was accepted
*/
@@ -166,13 +166,13 @@
public DebugEvent getEvent() {
return fEvent;
}
-
+
/**
* Returns the accepted event set, if any.
* @return the even if any
*/
public DebugEvent[] getEventSet() {
return fEventSet;
- }
+ }
}
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/EmptyClasspathProvider.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/EmptyClasspathProvider.java
index e97b676..3ca91ce 100644
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/EmptyClasspathProvider.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/EmptyClasspathProvider.java
@@ -4,12 +4,12 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.jdt.debug.testplugin;
-
+
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
import org.eclipse.jdt.launching.IRuntimeClasspathProvider;
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/EvalualtionBreakpointListener.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/EvalualtionBreakpointListener.java
index 9ea7ebb..1eefbec 100644
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/EvalualtionBreakpointListener.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/EvalualtionBreakpointListener.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -37,52 +37,52 @@
* whether to resume a thread.
*/
public class EvalualtionBreakpointListener implements IJavaBreakpointListener {
-
+
/**
* How to vote when hit
*/
public static int VOTE = IJavaBreakpointListener.DONT_CARE;
-
+
/**
* Whether hit
*/
public static boolean HIT = false;
-
+
/**
* Whether removed
*/
public static boolean REMOVED = false;
-
+
/**
* Expression to evaluate when hit
*/
public static String EXPRESSION;
-
+
/**
* Project to compile expression in
*/
public static IJavaProject PROJECT;
-
+
/**
* Evaluation result
*/
public static IEvaluationResult RESULT;
-
+
/**
* List of breakpoints with compilation errors
*/
public static List<IJavaLineBreakpoint> COMPILATION_ERRORS = new ArrayList<IJavaLineBreakpoint>();
-
+
/**
* Lock used to notify when a notification is received.
*/
public static Object REMOVE_LOCK = new Object();
-
+
/**
* List of breakpoints with runtime errors
*/
public static List<IJavaLineBreakpoint> RUNTIME_ERRORS = new ArrayList<IJavaLineBreakpoint>();
-
+
public static void reset() {
VOTE = IJavaBreakpointListener.DONT_CARE;
EXPRESSION = null;
@@ -181,5 +181,5 @@
public int installingBreakpoint(IJavaDebugTarget target, IJavaBreakpoint breakpoint, IJavaType type) {
return IJavaBreakpointListener.DONT_CARE;
}
-
+
}
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/ExpressionWaiter.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/ExpressionWaiter.java
index 353e52b..7d6cf59 100644
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/ExpressionWaiter.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/ExpressionWaiter.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -27,7 +27,7 @@
public ExpressionWaiter(int kind, Object element) {
super(kind, element);
}
-
+
/**
* @see org.eclipse.jdt.debug.testplugin.DebugElementEventWaiter#accept(org.eclipse.debug.core.DebugEvent)
*/
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/GlobalBreakpointListener.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/GlobalBreakpointListener.java
index 3ddfac2..1d03e79 100644
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/GlobalBreakpointListener.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/GlobalBreakpointListener.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -23,13 +23,13 @@
* Listens to all breakpoint notifications.
*/
public class GlobalBreakpointListener implements IJavaBreakpointListener {
-
+
public static IJavaBreakpoint ADDED;
public static IJavaBreakpoint HIT;
public static IJavaBreakpoint INSTALLED;
public static IJavaBreakpoint REMOVED;
public static IJavaBreakpoint INSTALLING;
-
+
public static void clear() {
ADDED = null;
HIT = null;
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/JavaAlernateModeTab.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/JavaAlernateModeTab.java
index 4710fb6..49a4b93 100644
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/JavaAlernateModeTab.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/JavaAlernateModeTab.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -28,11 +28,11 @@
/**
* Test tab contribution to an existing tab group.
- *
+ *
* @since 3.3
*/
public class JavaAlernateModeTab extends AbstractLaunchConfigurationTab implements ILaunchConfigurationListener {
-
+
private Button fAlternateModeCheckBox;
/** Returns the set of modes this tab supports
@@ -51,7 +51,7 @@
public String getName() {
return "Alternate";
}
-
+
/**
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#dispose()
*/
@@ -71,7 +71,7 @@
* @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationRemoved(org.eclipse.debug.core.ILaunchConfiguration)
*/
@Override
- public void launchConfigurationRemoved(ILaunchConfiguration configuration) {}
+ public void launchConfigurationRemoved(ILaunchConfiguration configuration) {}
/**
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration)
@@ -116,7 +116,7 @@
setControl(fAlternateModeCheckBox);
DebugPlugin.getDefault().getLaunchManager().addLaunchConfigurationListener(this);
}
-
+
/**
* @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#getId()
*/
@@ -142,10 +142,10 @@
});
}
}
-
+
/**
* handles setting the checked state of the widget
- * must check if we are in the UI thread before calling this method, as the launch ocnfiguration
+ * must check if we are in the UI thread before calling this method, as the launch ocnfiguration
* notification can come from the non-UI tread.
* @param configuration
*/
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/JavaProjectHelper.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/JavaProjectHelper.java
index 2209400..6ca7e42 100644
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/JavaProjectHelper.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/JavaProjectHelper.java
@@ -8,7 +8,7 @@
* This is an implementation of an early-draft specification developed under the Java
* Community Process (JCP) and is made available for testing and evaluation purposes
* only. The code is not compatible with any specification of the JCP.
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Jesper S. Møller - bug 422029: [1.8] Enable debug evaluation support for default methods
@@ -55,7 +55,7 @@
* Helper methods to set up a IJavaProject.
*/
public class JavaProjectHelper {
-
+
public static final String SRC_DIR = "src";
public static final String BIN_DIR = "bin";
public static final String J2SE_1_4_EE_NAME = "J2SE-1.4";
@@ -63,12 +63,12 @@
public static final String JAVA_SE_1_6_EE_NAME = "JavaSE-1.6";
public static final String JAVA_SE_1_7_EE_NAME = "JavaSE-1.7";
public static final String JAVA_SE_1_8_EE_NAME = "JavaSE-1.8";
-
+
/**
* path to the test src for 'testprograms'
*/
public static final IPath TEST_SRC_DIR= new Path("testprograms");
-
+
/**
* path to the 1.5 test source
*/
@@ -81,18 +81,18 @@
* path to the 1.8 test source
*/
public static final IPath TEST_1_8_SRC_DIR= new Path("java8");
-
+
/**
* path to the compiler error java file
*/
- public static final IPath TEST_COMPILE_ERROR = new Path("testresources/CompilationError.java");
-
+ public static final IPath TEST_COMPILE_ERROR = new Path("testresources/CompilationError.java");
+
public static final String JRE_CONTAINER_NAME = "org.eclipse.jdt.launching.JRE_CONTAINER";
-
+
/**
* Returns if the currently running VM is version compatible with Java 8
- *
+ *
* @return <code>true</code> if a Java 8 (or greater) VM is running <code>false</code> otherwise
*/
public static boolean isJava8Compatible() {
@@ -100,34 +100,34 @@
}
/**
* Returns if the currently running VM is version compatible with Java 7
- *
+ *
* @return <code>true</code> if a Java 7 (or greater) VM is running <code>false</code> otherwise
*/
public static boolean isJava7Compatible() {
return isCompatible(7);
}
-
+
/**
* Returns if the currently running VM is version compatible with Java 6
- *
+ *
* @return <code>true</code> if a Java 6 (or greater) VM is running <code>false</code> otherwise
*/
public static boolean isJava6Compatible() {
return isCompatible(6);
}
-
+
/**
* Returns if the currently running VM is version compatible with Java 5
- *
+ *
* @return <code>true</code> if a Java 5 (or greater) VM is running <code>false</code> otherwise
*/
public static boolean isJava5Compatible() {
return isCompatible(5);
}
-
+
/**
* Returns if the current running system is compatible with the given Java minor version
- *
+ *
* @param ver the version to test - either 4, 5, 6, 7 or 8
* @return <code>true</code> if compatible <code>false</code> otherwise
*/
@@ -150,11 +150,11 @@
}
return false;
}
-
+
/**
* Creates a new {@link IProject} with the given name unless the project already exists. If it already exists
* the project is refreshed and opened (if closed)
- *
+ *
* @param pname the desired name for the project
* @return the new {@link IProject} handle
* @throws CoreException
@@ -172,7 +172,7 @@
}
return project;
}
-
+
/**
* creates a java project with the specified name and output folder
* @param projectName
@@ -198,9 +198,9 @@
IJavaProject jproject= JavaCore.create(project);
jproject.setOutputLocation(outputLocation, null);
jproject.setRawClasspath(new IClasspathEntry[0], null);
- return jproject;
+ return jproject;
}
-
+
/**
* Creates a new Java project with the specified name
* @param projectName
@@ -214,9 +214,9 @@
}
IJavaProject jproject= JavaCore.create(project);
jproject.setRawClasspath(new IClasspathEntry[0], null);
- return jproject;
- }
-
+ return jproject;
+ }
+
/**
* deletes a java project
* @param jproject
@@ -226,7 +226,7 @@
jproject.setRawClasspath(new ClasspathEntry[0], jproject.getProject().getFullPath(), null);
jproject.getProject().delete(true, true, null);
}
-
+
/**
* Adds a new source container specified by the container name to the source path of the specified project
* @param jproject
@@ -247,12 +247,12 @@
container= folder;
}
IPackageFragmentRoot root= jproject.getPackageFragmentRoot(container);
-
+
IClasspathEntry cpe= JavaCore.newSourceEntry(root.getPath());
- addToClasspath(jproject, cpe);
+ addToClasspath(jproject, cpe);
return root;
}
-
+
/**
* Adds a source container to a IJavaProject.
* @param jproject
@@ -282,12 +282,12 @@
output.create(false, true, null);
}
}
-
+
IClasspathEntry cpe= JavaCore.newSourceEntry(root.getPath(), new IPath[0], output.getFullPath());
-
- addToClasspath(jproject, cpe);
+
+ addToClasspath(jproject, cpe);
return root;
- }
+ }
/**
* Adds a source container to a IJavaProject and imports all files contained
@@ -358,11 +358,11 @@
IFile newFile= project.getFile(jarPath.lastSegment());
try (InputStream inputStream = new FileInputStream(jarPath.toFile())) {
newFile.create(inputStream, true, null);
- }
+ }
return addLibrary(jproject, newFile.getFullPath(), sourceAttachPath, sourceAttachRoot);
- }
+ }
-
+
/**
* Adds a variable entry with source attachment to a IJavaProject.
* Can return null if variable can not be resolved.
@@ -382,7 +382,7 @@
}
return null;
}
-
+
/**
* Adds a container entry to the specified java project
* @param project
@@ -393,13 +393,13 @@
IClasspathEntry cpe = JavaCore.newContainerEntry(container, false);
addToClasspath(project, cpe);
}
-
+
/**
* Sets the given compiler compliance on the given {@link IJavaProject}
* <br><br>
- * See {@link JavaCore#VERSION_1_4}, {@link JavaCore#VERSION_1_5}, {@link JavaCore#VERSION_1_6},
+ * See {@link JavaCore#VERSION_1_4}, {@link JavaCore#VERSION_1_5}, {@link JavaCore#VERSION_1_6},
* {@link JavaCore#VERSION_1_7} and {@link JavaCore#VERSION_1_8} for more information on accepted compliances
- *
+ *
* @param project
* @param compliance
*/
@@ -410,9 +410,9 @@
map.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, compliance);
project.setOptions(map);
}
-
+
/**
- * Updates the compiler compliance project setting for the given project to match the given EE.
+ * Updates the compiler compliance project setting for the given project to match the given EE.
* I.e. J2SE-1.5 will set a 1.5 compliance for the compiler and the source level.
* @param project
* @param ee
@@ -431,7 +431,7 @@
setCompliance(project, JavaCore.VERSION_1_8);
}
}
-
+
/**
* Adds a required project entry.
* @param jproject
@@ -441,8 +441,8 @@
public static void addRequiredProject(IJavaProject jproject, IJavaProject required) throws JavaModelException {
IClasspathEntry cpe= JavaCore.newProjectEntry(required.getProject().getFullPath());
addToClasspath(jproject, cpe);
- }
-
+ }
+
/**
* Removes a specified path form the specified java project
* @param jproject
@@ -456,12 +456,12 @@
for (int i= 0 ; i < nEntries ; i++) {
IClasspathEntry curr= oldEntries[i];
if (!path.equals(curr.getPath())) {
- list.add(curr);
+ list.add(curr);
}
}
IClasspathEntry[] newEntries= list.toArray(new IClasspathEntry[list.size()]);
jproject.setRawClasspath(newEntries, null);
- }
+ }
/**
* Adds the specified classpath entry to the specified java project
@@ -485,8 +485,8 @@
entries.add(cpe);
jproject.setRawClasspath(entries.toArray(new IClasspathEntry[entries.size()]), null);
}
-
-
+
+
/**
* Adds the specified nature to the specified project
* @param proj
@@ -503,7 +503,7 @@
description.setNatureIds(newNatures);
proj.setDescription(description, monitor);
}
-
+
/**
* Imports files from the specified zip to the specified destination
* @param srcZipFile
@@ -511,7 +511,7 @@
* @param monitor
* @throws InvocationTargetException
*/
- private static void importFilesFromZip(ZipFile srcZipFile, IPath destPath, IProgressMonitor monitor) throws InvocationTargetException {
+ private static void importFilesFromZip(ZipFile srcZipFile, IPath destPath, IProgressMonitor monitor) throws InvocationTargetException {
ZipFileStructureProvider structureProvider= new ZipFileStructureProvider(srcZipFile);
try {
ImportOperation op= new ImportOperation(destPath, structureProvider.getRoot(), structureProvider, new ImportOverwriteQuery());
@@ -520,7 +520,7 @@
// should not happen
}
}
-
+
/**
* Imports files from the specified root dir into the specified path
* @param rootDir
@@ -529,7 +529,7 @@
* @throws InvocationTargetException
* @throws IOException
*/
- public static void importFilesFromDirectory(File rootDir, IPath destPath, IProgressMonitor monitor) throws InvocationTargetException, IOException {
+ public static void importFilesFromDirectory(File rootDir, IPath destPath, IProgressMonitor monitor) throws InvocationTargetException, IOException {
IImportStructureProvider structureProvider = FileSystemStructureProvider.INSTANCE;
List<File> files = new ArrayList<>(100);
addJavaFiles(rootDir, files);
@@ -545,8 +545,8 @@
} catch (InterruptedException e) {
throw new InvocationTargetException(e, "Interrupted during files import");
}
- }
-
+ }
+
/**
* Imports the specified file into the specified path
* @param file
@@ -554,7 +554,7 @@
* @param monitor
* @throws InvocationTargetException
*/
- public static void importFile(File file, IPath destPath, IProgressMonitor monitor) throws InvocationTargetException {
+ public static void importFile(File file, IPath destPath, IProgressMonitor monitor) throws InvocationTargetException {
IImportStructureProvider structureProvider = FileSystemStructureProvider.INSTANCE;
List<File> files = new ArrayList<File>(1);
files.add(file);
@@ -566,7 +566,7 @@
// should not happen
}
}
-
+
/**
* Recursively adds files from the specified dir to the provided list
* @param dir
@@ -591,7 +591,7 @@
}
}
}
-
+
/**
* Static class for an <code>IOverwriteQuery</code> implementation
*/
@@ -602,6 +602,6 @@
@Override
public String queryOverwrite(String file) {
return ALL;
- }
- }
+ }
+ }
}
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/JavaTestPlugin.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/JavaTestPlugin.java
index 8e4fee3..886edee 100644
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/JavaTestPlugin.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/JavaTestPlugin.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -28,9 +28,9 @@
* Implementation of the Test plugin
*/
public class JavaTestPlugin extends AbstractUIPlugin {
-
+
private static JavaTestPlugin fgDefault;
-
+
/**
* Constructor
*/
@@ -38,7 +38,7 @@
super();
fgDefault= this;
}
-
+
/**
* Returns the singleton instance of the plugin
* @return the singleton instance of the plugin
@@ -46,7 +46,7 @@
public static JavaTestPlugin getDefault() {
return fgDefault;
}
-
+
/**
* Returns a handle to the current workspace
* @return a handle to the current workspace
@@ -54,7 +54,7 @@
public static IWorkspace getWorkspace() {
return ResourcesPlugin.getWorkspace();
}
-
+
/**
* Sets autobuild to the specified boolean value
* @param enable
@@ -67,7 +67,7 @@
desc.setAutoBuilding(enable);
workspace.setDescription(desc);
}
-
+
/**
* Returns the file corresponding to the specified path from within this bundle
* @param path
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/NullVariableInitializer.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/NullVariableInitializer.java
index 7d53d70..2088384 100644
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/NullVariableInitializer.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/NullVariableInitializer.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -26,7 +26,7 @@
/**
* Performs no initialization.
- *
+ *
* @see org.eclipse.jdt.core.ClasspathVariableInitializer#initialize(java.lang.String)
*/
@Override
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/ResumeBreakpointListener.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/ResumeBreakpointListener.java
index 80753c9..5f1a369 100644
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/ResumeBreakpointListener.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/ResumeBreakpointListener.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -20,8 +20,8 @@
import org.eclipse.jdt.debug.core.IJavaType;
public class ResumeBreakpointListener implements IJavaBreakpointListener {
-
- public static boolean WAS_HIT = false;
+
+ public static boolean WAS_HIT = false;
public ResumeBreakpointListener() {
}
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/SampleDynamicVariableResolver.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/SampleDynamicVariableResolver.java
index 4c67301..4f00f69 100644
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/SampleDynamicVariableResolver.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/SampleDynamicVariableResolver.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -25,7 +25,7 @@
public String resolveValue(IDynamicVariable variable, String argument) {
if (argument == null) {
return "no arg";
- }
+ }
return "the arg is " + argument;
}
}
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/SecondaryAccessRuleParticipant.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/SecondaryAccessRuleParticipant.java
index bdc1d65..acb9b07 100644
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/SecondaryAccessRuleParticipant.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/SecondaryAccessRuleParticipant.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -21,11 +21,11 @@
/**
* Sample access rule participant.
- *
+ *
* @since 3.3
*/
public class SecondaryAccessRuleParticipant implements IAccessRuleParticipant {
-
+
IAccessRule[] fRules = new IAccessRule[] {
JavaCore.newAccessRule(new Path("secondary"), IAccessRule.K_DISCOURAGED)
};
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/SpecificDebugElementEventWaiter.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/SpecificDebugElementEventWaiter.java
index 931f66a..f039036 100644
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/SpecificDebugElementEventWaiter.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/SpecificDebugElementEventWaiter.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -14,14 +14,14 @@
import org.eclipse.debug.core.model.IDebugElement;
/**
- * This event waiter is used to wait for a certain type of event (create, terminate, suspend, etc.)
- * on a *specific* debug element. Contrast this with DebugElementKindEventWaiter which is similar,
+ * This event waiter is used to wait for a certain type of event (create, terminate, suspend, etc.)
+ * on a *specific* debug element. Contrast this with DebugElementKindEventWaiter which is similar,
* but is used to wait for a certain type of event on a *kind* of debug element (thread, debug target, etc.)
*/
public class SpecificDebugElementEventWaiter extends DebugEventWaiter {
protected IDebugElement fDebugElement;
-
+
/**
* Constructor
* @param eventKind
@@ -31,7 +31,7 @@
super(eventKind);
fDebugElement = element;
}
-
+
/**
* @see org.eclipse.jdt.debug.testplugin.DebugEventWaiter#accept(org.eclipse.debug.core.DebugEvent)
*/
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/TestClasspathContainerInitializer.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/TestClasspathContainerInitializer.java
index 178a006..db2e9ad 100644
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/TestClasspathContainerInitializer.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/TestClasspathContainerInitializer.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -15,7 +15,7 @@
import org.eclipse.jdt.core.ClasspathContainerInitializer;
import org.eclipse.jdt.core.IJavaProject;
-/**
+/**
* A classpath initializer that performs equality based on the project, not the container id
*/
public class TestClasspathContainerInitializer extends ClasspathContainerInitializer {
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/TestSourceLocator.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/TestSourceLocator.java
index db40424..8bec8ce 100644
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/TestSourceLocator.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/TestSourceLocator.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/TestSourcePathComputer.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/TestSourcePathComputer.java
index e54dafc..279797a 100644
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/TestSourcePathComputer.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/TestSourcePathComputer.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/ValueVariableInitializer.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/ValueVariableInitializer.java
index d772100..ff119cc 100644
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/ValueVariableInitializer.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/ValueVariableInitializer.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/detailpane/SimpleDetailPane.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/detailpane/SimpleDetailPane.java
index 440bd77..b59d713 100644
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/detailpane/SimpleDetailPane.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/detailpane/SimpleDetailPane.java
@@ -28,7 +28,7 @@
* test the detail pane functionality. Displays a colored label depending on
* if the selected element is public/private/protected/other. This detail
* pane is intended to only be used for selections containing only java variables.
- *
+ *
* @since 3.3
* @see DetailPaneManagerTests
* @see TestDetailPaneFactory
@@ -38,22 +38,22 @@
public class SimpleDetailPane implements IDetailPane {
private Label theLabel;
-
+
private Color colorPrivate;
private Color colorProtected;
private Color colorPublic;
private Color colorOther;
-
+
private static final int TYPE_PRIVATE = 1;
private static final int TYPE_PROTECTED = 2;
private static final int TYPE_PUBLIC = 3;
private static final int TYPE_OTHER = 4;
-
+
// Do not change these constants, they are compared against strings in DetailPaneManagerTests
public static final String ID = "SimpleDetailPane";
public static final String NAME = "Example Pane: Colorful Detail Pane";
public static final String DESCRIPTION = "Example pane that displays a color for variables depending on their access level.";
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPane#createControl(org.eclipse.swt.widgets.Composite)
*/
@@ -64,10 +64,10 @@
theLabel.setLayoutData(gd);
return theLabel;
}
-
+
/**
* Returns the color to be used with the given type
- *
+ *
* @param typeId type of variable
* @return the color to use
*/
@@ -121,14 +121,14 @@
}
theLabel.setBackground(getColor(TYPE_OTHER));
return;
-
+
} catch (DebugException e){
theLabel.setBackground(theLabel.getParent().getBackground());
theLabel.setText(e.getMessage());
}
}
}
-
+
}
/* (non-Javadoc)
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/detailpane/TableDetailPane.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/detailpane/TableDetailPane.java
index 63d2f8c..f0a18a8 100644
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/detailpane/TableDetailPane.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/detailpane/TableDetailPane.java
@@ -41,7 +41,7 @@
/**
* An example detail pane that creates a composite containing several controls, all of which
* will be displayed in the detail pane.
- *
+ *
* @since 3.3
* @see TestDetailPaneFactory
* @see IDetailPane
@@ -51,22 +51,22 @@
public static final String ID = "org.eclipse.jdt.debug.testplugin.detailpane.TableDetailPane";
public static final String NAME = "Example Pane: Table Detail Pane";
public static final String DESCRIPTION = "Example detail pane that displays details as a composite containing several controls";
-
+
IWorkbenchPartSite fWorkbenchPartSite;
private Table fTable;
private TextViewer fText;
private Composite fComposite;
private Button fWordWrapButton;
private IDebugModelPresentation fModelPresentation;
-
+
/**
* Job to calculate detail string
*/
class DetailJob implements Runnable{
-
+
private IValue fValue;
private IValueDetailListener fListener;
-
+
public DetailJob(IValue value, IValueDetailListener listener){
fValue = value;
fListener = listener;
@@ -74,21 +74,21 @@
@Override
public void run() {
- fModelPresentation.computeDetail(fValue, fListener);
+ fModelPresentation.computeDetail(fValue, fListener);
}
-
+
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPane#init(org.eclipse.ui.IWorkbenchPartSite)
*/
@Override
public void init(IWorkbenchPartSite workbenchPartSite) {
fWorkbenchPartSite = workbenchPartSite;
-
+
fModelPresentation = new VariablesViewModelPresentation();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPane#createControl(org.eclipse.swt.widgets.Composite)
*/
@@ -112,21 +112,21 @@
TableItem item = fTable.getItem(index);
if (item != null){
Thread detailJob = new Thread(new DetailJob((IValue)item.getData(),getValueDetailListener()));
- detailJob.start();
+ detailJob.start();
}
else{
fText.setDocument(null);
}
}
}
-
-
+
+
});
-
+
Composite composite = new Composite(fComposite,SWT.NONE);
composite.setLayout(new FillLayout(SWT.VERTICAL));
fText = new TextViewer(composite,SWT.READ_ONLY);
-
+
fWordWrapButton = new Button(composite,SWT.CHECK);
fWordWrapButton.setText("Word Wrap");
fWordWrapButton.setSelection(false);
@@ -149,28 +149,28 @@
*/
@Override
public void display(IStructuredSelection element) {
-
+
if (element != null){
-
+
fTable.removeAll();
fText.setDocument(null);
-
+
Iterator<?> iterator = element.iterator();
while (iterator.hasNext()){
-
+
Object selection = iterator.next();
if (selection != null && selection instanceof IVariable){
-
+
IValue val = null;
try {
-
+
val = ((IVariable)selection).getValue();
TableItem newItem = new TableItem(fTable,SWT.NONE);
newItem.setText(val.getValueString());
newItem.setData(val);
-
+
} catch (DebugException e) {
-
+
}
}
}
@@ -180,7 +180,7 @@
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPane#setFocus()
*/
@@ -233,7 +233,7 @@
protected IValueDetailListener getValueDetailListener(){
return this;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IValueDetailListener#detailComputed(org.eclipse.debug.core.model.IValue, java.lang.String)
*/
@@ -244,7 +244,7 @@
public IStatus runInUIThread(IProgressMonitor monitor) {
fText.setDocument(new Document(result));
return Status.OK_STATUS;
-
+
}
};
append.setSystem(true);
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/detailpane/TestDetailPaneFactory.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/detailpane/TestDetailPaneFactory.java
index 872c650..3aadb80 100644
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/detailpane/TestDetailPaneFactory.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/detailpane/TestDetailPaneFactory.java
@@ -22,7 +22,7 @@
/**
* Test detail pane factory, used by the test suite to test custom detail pane functionality.
- *
+ *
* @since 3.3
* @see DetailPaneManagerTests
* @see SimpleDetailPane
@@ -61,7 +61,7 @@
}
return possibleIDs;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPaneFactory#getDefaultDetailPane(org.eclipse.jface.viewers.IStructuredSelection)
*/
@@ -90,7 +90,7 @@
}
return null;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.views.variables.IDetailsFactory#getDescription(java.lang.String)
@@ -103,6 +103,6 @@
if (id.equals(SimpleDetailPane.ID)){
return SimpleDetailPane.DESCRIPTION;
}
- return null;
+ return null;
}
}
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/ContributedTestTab1.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/ContributedTestTab1.java
index d77cd77..b39a73f 100755
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/ContributedTestTab1.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/ContributedTestTab1.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/ContributedTestTab2.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/ContributedTestTab2.java
index 90c1973..dd449b8 100755
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/ContributedTestTab2.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/ContributedTestTab2.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -30,7 +30,7 @@
public void createControl(Composite parent) {
Label label = new Label(parent, SWT.NONE);
label.setText("Just testing...");
- setControl(label);
+ setControl(label);
}
/**
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/ContributedTestTab3.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/ContributedTestTab3.java
index a1365ab..a1d19d9 100755
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/ContributedTestTab3.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/ContributedTestTab3.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/ParticipantLaunchShortcut.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/ParticipantLaunchShortcut.java
index 1f9975d..7ed2cb1 100644
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/ParticipantLaunchShortcut.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/ParticipantLaunchShortcut.java
@@ -59,7 +59,7 @@
catch(CoreException ce) {DebugUIPlugin.log(ce);}
return null;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchShortcut2#getLaunchableResource(org.eclipse.jface.viewers.ISelection)
*/
@@ -115,6 +115,6 @@
}
}
catch(CoreException ce) {DebugPlugin.log(ce);}
-
+
}
}
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/TestJavaApplicationTabGroup.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/TestJavaApplicationTabGroup.java
index f493298..64006fa 100755
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/TestJavaApplicationTabGroup.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/TestJavaApplicationTabGroup.java
@@ -4,13 +4,13 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.jdt.debug.testplugin.launching;
-
+
import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
import org.eclipse.debug.ui.ILaunchConfigurationDialog;
import org.eclipse.debug.ui.ILaunchConfigurationTab;
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/TestLaunchDelegate.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/TestLaunchDelegate.java
index 6accbd0..97c0793 100755
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/TestLaunchDelegate.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/TestLaunchDelegate.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -26,13 +26,13 @@
/**
* Tests delegation to create a launch object.
- *
+ *
* @since 3.0
*/
public class TestLaunchDelegate implements ILaunchConfigurationDelegate2 {
-
+
private ILaunch fLaunch = null;
-
+
/**
* @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate2#getLaunch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String)
*/
@@ -41,7 +41,7 @@
fLaunch = new Launch(configuration, mode, null);
return fLaunch;
}
-
+
/**
* @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate#launch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String, org.eclipse.debug.core.ILaunch, org.eclipse.core.runtime.IProgressMonitor)
*/
@@ -67,7 +67,7 @@
public boolean buildForLaunch(ILaunchConfiguration configuration, String mode, IProgressMonitor monitor) throws CoreException {
return true;
}
-
+
/**
* @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate2#finalLaunchCheck(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
*/
@@ -75,7 +75,7 @@
public boolean finalLaunchCheck(ILaunchConfiguration configuration, String mode, IProgressMonitor monitor) {
return true;
}
-
+
/**
* @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate2#preLaunchCheck(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
*/
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/TestLaunchDelegate1.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/TestLaunchDelegate1.java
index 9e9383c..b2f7206 100755
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/TestLaunchDelegate1.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/TestLaunchDelegate1.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -18,7 +18,7 @@
/**
* Dummy launch delegate class that applies to mode 'alternate2' and the local java launch config type
- *
+ *
* @since 3.3
*/
public class TestLaunchDelegate1 implements ILaunchConfigurationDelegate {
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/TestLaunchDelegate2.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/TestLaunchDelegate2.java
index 808cf11..5872bb7 100755
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/TestLaunchDelegate2.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/TestLaunchDelegate2.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -18,7 +18,7 @@
/**
* Dummy launch delegate class that applies to mode 'alternate2' and the local java launch config type
- *
+ *
* @since 3.3
*/
public class TestLaunchDelegate2 implements ILaunchConfigurationDelegate {
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/TestLaunchShortcut.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/TestLaunchShortcut.java
index f691249..7766ad1 100755
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/TestLaunchShortcut.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/TestLaunchShortcut.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/TestModeLaunchDelegate.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/TestModeLaunchDelegate.java
index d87eff5..441202c 100755
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/TestModeLaunchDelegate.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/TestModeLaunchDelegate.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -24,7 +24,7 @@
* Contributed for local java application launch configs.
*/
public class TestModeLaunchDelegate implements ILaunchConfigurationDelegate {
-
+
// the test case to call back when launch is invoked
private static LaunchModeTests fgTestCase;
@@ -36,10 +36,10 @@
if (fgTestCase == null) {
throw new CoreException(new Status(IStatus.ERROR, "org.eclipse.jdt.debug.tests",
0, "No test case registered.", null));
- }
+ }
fgTestCase.launch(configuration, mode);
}
-
+
/**
* @param testCase
*/
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/TestTabGroup.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/TestTabGroup.java
index 968986b..62b788a 100644
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/TestTabGroup.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/launching/TestTabGroup.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/test/stepping/ForceReturnTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/test/stepping/ForceReturnTests.java
index 35cd42d..839e737 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/test/stepping/ForceReturnTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/test/stepping/ForceReturnTests.java
@@ -25,30 +25,30 @@
/**
* Tests forcing return from method.
- *
+ *
* @since 3.3
*/
public class ForceReturnTests extends AbstractDebugTest {
/**
* Creates test case.
- *
+ *
* @param name test name
*/
public ForceReturnTests(String name) {
super(name);
}
-
+
/**
* Tests forcing the return of an integer from top stack frame
- *
+ *
* @throws Exception
*/
public void testForceIntReturnTopFrame() throws Exception {
String typeName = "ForceReturnTests";
ILineBreakpoint bp2 = createLineBreakpoint(22, typeName);
ILineBreakpoint bp = createLineBreakpoint(31, typeName);
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp, false);
@@ -75,19 +75,19 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Tests forcing the return of an integer from non-top stack frame
- *
+ *
* @throws Exception
*/
public void testForceIntReturn() throws Exception {
String typeName = "ForceReturnTestsTwo";
ILineBreakpoint bp2 = createLineBreakpoint(23, typeName);
ILineBreakpoint bp = createLineBreakpoint(37, typeName);
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp, false);
@@ -116,19 +116,19 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
/**
* Tests forcing the return of a string from top frame
- *
+ *
* @throws Exception
*/
public void testForceStringReturnTopFrame() throws Exception {
String typeName = "ForceReturnTests";
ILineBreakpoint bp2 = createLineBreakpoint(24, typeName);
ILineBreakpoint bp = createLineBreakpoint(36, typeName);
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp, false);
@@ -156,19 +156,19 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
/**
* Tests forcing the return of a string from a non top frame
- *
+ *
* @throws Exception
*/
public void testForceStringReturn() throws Exception {
String typeName = "ForceReturnTestsTwo";
ILineBreakpoint bp2 = createLineBreakpoint(25, typeName);
ILineBreakpoint bp = createLineBreakpoint(46, typeName);
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp, false);
@@ -197,19 +197,19 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
+ }
+ }
/**
* Tests forcing the return of an object from top frame.
- *
+ *
* @throws Exception
*/
public void testForceObjectReturnTopFrame() throws Exception {
String typeName = "ForceReturnTests";
ILineBreakpoint bp2 = createLineBreakpoint(26, typeName);
ILineBreakpoint bp = createLineBreakpoint(43, typeName);
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp, false);
@@ -237,19 +237,19 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Tests forcing the return of an object from non-top frame.
- *
+ *
* @throws Exception
*/
public void testForceObjectReturn() throws Exception {
String typeName = "ForceReturnTestsTwo";
ILineBreakpoint bp2 = createLineBreakpoint(27, typeName);
ILineBreakpoint bp = createLineBreakpoint(56, typeName);
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp, false);
@@ -278,18 +278,18 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
/**
* Tests that an incompatible type causes an exception in top frame
- *
+ *
* @throws Exception
*/
public void testIncompatibleReturnTypeTopFrame() throws Exception {
String typeName = "ForceReturnTests";
ILineBreakpoint bp = createLineBreakpoint(43, typeName);
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp, false);
@@ -309,18 +309,18 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
/**
* Tests that an incompatible type causes an exception in non top frame
- *
+ *
* @throws Exception
*/
public void testIncompatibleReturnType() throws Exception {
String typeName = "ForceReturnTestsTwo";
ILineBreakpoint bp = createLineBreakpoint(46, typeName);
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp, false);
@@ -341,6 +341,6 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
+ }
+ }
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/test/stepping/StepFilterTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/test/stepping/StepFilterTests.java
index 12a6ec5..ea0b6b8 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/test/stepping/StepFilterTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/test/stepping/StepFilterTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Jesper Steen Moller - Enhancement 254677 - filter getters/setters
@@ -36,7 +36,7 @@
public StepFilterTests(String name) {
super(name);
fOriginalActiveFilters = getPrefStore().getString(IJDIPreferencesConstants.PREF_ACTIVE_FILTERS_LIST);
- fOriginalInactiveFilters = getPrefStore().getString(IJDIPreferencesConstants.PREF_INACTIVE_FILTERS_LIST);
+ fOriginalInactiveFilters = getPrefStore().getString(IJDIPreferencesConstants.PREF_INACTIVE_FILTERS_LIST);
}
/**
@@ -48,7 +48,7 @@
String typeName = "StepFilterOne";
ILineBreakpoint bp = createLineBreakpoint(23, typeName);
bp.setEnabled(true);
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp, true);
@@ -61,14 +61,14 @@
}
assertEquals("Wrong receiving type", "StepFilterOne", recTypeName);
int lineNumber = stackFrame.getLineNumber();
- assertEquals("Wrong line number", 24, lineNumber);
+ assertEquals("Wrong line number", 24, lineNumber);
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
resetStepFilters();
- }
+ }
}
-
+
/**
* Tests a simple step filter
* @throws Exception
@@ -78,7 +78,7 @@
String typeName = "StepFilterOne";
ILineBreakpoint bp = createLineBreakpoint(24, typeName);
bp.setEnabled(true);
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp, true);
@@ -91,14 +91,14 @@
}
assertEquals("Wrong receiving type", "StepFilterOne", recTypeName);
int lineNumber = stackFrame.getLineNumber();
- assertEquals("Wrong line number", 25, lineNumber);
+ assertEquals("Wrong line number", 25, lineNumber);
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
resetStepFilters();
- }
- }
-
+ }
+ }
+
/**
* Tests a step filter that is not active
* @throws Exception
@@ -108,7 +108,7 @@
String typeName = "StepFilterOne";
ILineBreakpoint bp = createLineBreakpoint(23, typeName);
bp.setEnabled(true);
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp, false);
@@ -121,14 +121,14 @@
}
assertEquals("Wrong receiving type", "StepFilterTwo", recTypeName);
int lineNumber = stackFrame.getLineNumber();
- assertEquals("Wrong line number", 25, lineNumber);
+ assertEquals("Wrong line number", 25, lineNumber);
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
resetStepFilters();
- }
+ }
}
-
+
/**
* Tests a deep step filter, i.e. a step filter that is more than one stack frame deep on the current
* suspended thread
@@ -139,7 +139,7 @@
String typeName = "StepFilterOne";
ILineBreakpoint bp = createLineBreakpoint(24, typeName);
bp.setEnabled(true);
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp, false);
@@ -152,13 +152,13 @@
}
assertEquals("Wrong receiving type", "StepFilterThree", recTypeName);
int lineNumber = stackFrame.getLineNumber();
- assertEquals("Wrong line number", 19, lineNumber);
+ assertEquals("Wrong line number", 19, lineNumber);
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
resetStepFilters();
- }
- }
+ }
+ }
/**
* Tests a simple step return filter
@@ -169,7 +169,7 @@
String typeName = "StepFilterOne";
ILineBreakpoint bp = createLineBreakpoint(19, "StepFilterThree");
bp.setEnabled(true);
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp, false);
@@ -182,14 +182,14 @@
}
assertEquals("Wrong receiving type", "StepFilterOne", recTypeName);
int lineNumber = stackFrame.getLineNumber();
- assertEquals("Wrong line number", 23, lineNumber);
+ assertEquals("Wrong line number", 23, lineNumber);
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
resetStepFilters();
- }
+ }
}
-
+
/**
* Tests a simple step over filter
* @throws Exception
@@ -199,7 +199,7 @@
String typeName = "StepFilterOne";
ILineBreakpoint bp = createLineBreakpoint(19, "StepFilterThree");
bp.setEnabled(true);
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp, false);
@@ -212,13 +212,13 @@
}
assertEquals("Wrong receiving type", "StepFilterOne", recTypeName);
int lineNumber = stackFrame.getLineNumber();
- assertEquals("Wrong line number", 23, lineNumber);
+ assertEquals("Wrong line number", 23, lineNumber);
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
resetStepFilters();
- }
- }
+ }
+ }
/**
* Tests filtering of getter methods
@@ -230,7 +230,7 @@
String typeName = "StepFilterFour";
ILineBreakpoint bp = createLineBreakpoint(91, typeName);
bp.setEnabled(true);
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp, false);
@@ -238,22 +238,22 @@
stackFrame = (IJavaStackFrame)stepIntoWithFilters(stackFrame).getTopStackFrame();
String recTypeName = stackFrame.getReceivingTypeName();
assertEquals("Wrong receiving type", "StepFilterFour", recTypeName);
- assertEquals("Wrong line number", 92, stackFrame.getLineNumber());
+ assertEquals("Wrong line number", 92, stackFrame.getLineNumber());
stackFrame = (IJavaStackFrame)stepIntoWithFilters(stackFrame).getTopStackFrame();
stackFrame = (IJavaStackFrame)stepIntoWithFilters(stackFrame).getTopStackFrame();
stackFrame = (IJavaStackFrame)stepIntoWithFilters(stackFrame).getTopStackFrame();
stackFrame = (IJavaStackFrame)stepIntoWithFilters(stackFrame).getTopStackFrame();
- assertEquals("Wrong line number", 96, stackFrame.getLineNumber());
+ assertEquals("Wrong line number", 96, stackFrame.getLineNumber());
// now step into the line with the call to sum() which is not a simple getter
stackFrame = (IJavaStackFrame)stepIntoWithFilters(stackFrame).getTopStackFrame();
- assertEquals("Wrong line number", 71, stackFrame.getLineNumber());
- assertEquals("Should be in sum()", "sum", stackFrame.getMethodName());
+ assertEquals("Wrong line number", 71, stackFrame.getLineNumber());
+ assertEquals("Should be in sum()", "sum", stackFrame.getMethodName());
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
resetStepFilters();
- }
- }
+ }
+ }
/**
* Tests filtering of setter methods
@@ -265,7 +265,7 @@
String typeName = "StepFilterFour";
ILineBreakpoint bp = createLineBreakpoint(84, typeName);
bp.setEnabled(true);
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp, false);
@@ -277,22 +277,22 @@
stackFrame = (IJavaStackFrame)stepIntoWithFilters(stackFrame).getTopStackFrame();
stackFrame = (IJavaStackFrame)stepIntoWithFilters(stackFrame).getTopStackFrame();
stackFrame = (IJavaStackFrame)stepIntoWithFilters(stackFrame).getTopStackFrame();
- assertEquals("Wrong line number", 91, stackFrame.getLineNumber());
+ assertEquals("Wrong line number", 91, stackFrame.getLineNumber());
// now step into the line with the call to getI() which is a simple getter
// since we're not filtering getters, we should end up in getI
stackFrame = (IJavaStackFrame)stepIntoWithFilters(stackFrame).getTopStackFrame();
- assertEquals("Wrong line number", 34, stackFrame.getLineNumber());
- assertEquals("Should be in getI()", "getI", stackFrame.getMethodName());
+ assertEquals("Wrong line number", 34, stackFrame.getLineNumber());
+ assertEquals("Should be in getI()", "getI", stackFrame.getMethodName());
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
resetStepFilters();
- }
- }
+ }
+ }
/**
* Tests filtering from a contributed filter
- *
+ *
* @throws Exception
* @since 3.8.300
*/
@@ -334,7 +334,7 @@
* @return
*/
protected IPreferenceStore getPrefStore() {
- return JDIDebugUIPlugin.getDefault().getPreferenceStore();
+ return JDIDebugUIPlugin.getDefault().getPreferenceStore();
}
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/test/stepping/StepIntoSelectionTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/test/stepping/StepIntoSelectionTests.java
index b8af4da..15f509d 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/test/stepping/StepIntoSelectionTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/test/stepping/StepIntoSelectionTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Ivan Popov - [Bug 193488] org.eclipse.jdt.debug.test.stepping.StepIntoSelectionTests
@@ -26,136 +26,136 @@
* Tests 'step into selection'
*/
public class StepIntoSelectionTests extends AbstractDebugTest {
-
+
/**
- * Constructor
+ * Constructor
*/
public StepIntoSelectionTests(String name) {
super(name);
- }
-
+ }
+
/**
* Step into 'new StepIntoSelectionClass()'
- *
+ *
* @throws Exception
*/
public void testStepIntoSourceConstructor() throws Exception {
String typeName = "org.eclipse.debug.tests.targets.StepIntoSelectionClass";
- createLineBreakpoint(21, typeName);
-
+ createLineBreakpoint(21, typeName);
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
ICompilationUnit cu = getCompilationUnit(get14Project(), "src", "org.eclipse.debug.tests.targets", "StepIntoSelectionClass.java");
IType type = cu.getType("StepIntoSelectionClass");
IMethod method = type.getMethod("StepIntoSelectionClass", new String[0]);
assertTrue("Could not find constructor", method.exists());
-
+
StepIntoSelectionHandler handler = new StepIntoSelectionHandler(thread, (IJavaStackFrame)thread.getTopStackFrame(), method);
DebugElementEventWaiter waiter = new DebugElementEventWaiter(DebugEvent.SUSPEND, thread);
handler.step();
Object source = waiter.waitForEvent();
assertEquals("Step did not complete", thread, source);
thread = (IJavaThread)source;
-
+
IJavaStackFrame frame = (IJavaStackFrame)thread.getTopStackFrame();
assertEquals("Should be in constructor", "<init>", frame.getMethodName());
-
-
+
+
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Step into 'step()'
- *
+ *
* @throws Exception
*/
public void testStepIntoSourceMethod() throws Exception {
String typeName = "org.eclipse.debug.tests.targets.StepIntoSelectionClass";
- createLineBreakpoint(23, typeName);
-
+ createLineBreakpoint(23, typeName);
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
ICompilationUnit cu = getCompilationUnit(get14Project(), "src", "org.eclipse.debug.tests.targets", "StepIntoSelectionClass.java");
IType type = cu.getType("StepIntoSelectionClass");
IMethod method = type.getMethod("step", new String[0]);
assertTrue("Could not find method 'step'", method.exists());
-
+
StepIntoSelectionHandler handler = new StepIntoSelectionHandler(thread, (IJavaStackFrame)thread.getTopStackFrame(), method);
DebugElementEventWaiter waiter = new DebugElementEventWaiter(DebugEvent.SUSPEND, thread);
handler.step();
Object source = waiter.waitForEvent();
assertEquals("Step did not complete", thread, source);
thread = (IJavaThread)source;
-
+
IJavaStackFrame frame = (IJavaStackFrame)thread.getTopStackFrame();
assertEquals("Should be in method 'step'", "step", frame.getMethodName());
-
-
+
+
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Step into 'method1(int[], String[])'
- *
+ *
* @throws Exception
*/
public void testStepIntoSourceMethodWithParameters() throws Exception {
String typeName = "org.eclipse.debug.tests.targets.StepIntoSelectionClass";
- createLineBreakpoint(36, typeName);
-
+ createLineBreakpoint(36, typeName);
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
ICompilationUnit cu = getCompilationUnit(get14Project(), "src", "org.eclipse.debug.tests.targets", "StepIntoSelectionClass.java");
IType type = cu.getType("StepIntoSelectionClass");
IMethod method = type.getMethod("method1", new String[] {"[I", "[QString;"});
assertTrue("Could not find method 'method1'", method.exists());
-
+
StepIntoSelectionHandler handler = new StepIntoSelectionHandler(thread, (IJavaStackFrame)thread.getTopStackFrame(), method);
DebugElementEventWaiter waiter = new DebugElementEventWaiter(DebugEvent.SUSPEND, thread);
handler.step();
Object source = waiter.waitForEvent();
assertEquals("Step did not complete", thread, source);
thread = (IJavaThread)source;
-
+
IJavaStackFrame frame = (IJavaStackFrame)thread.getTopStackFrame();
assertEquals("Should be in method 'step'", "method1", frame.getMethodName());
-
-
+
+
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Step into 'Vector.addElement(Object)'
- *
+ *
* @throws Exception
*/
public void testStepIntoBinaryMethod() throws Exception {
String typeName = "org.eclipse.debug.tests.targets.StepIntoSelectionClass";
- createLineBreakpoint(34, typeName);
-
+ createLineBreakpoint(34, typeName);
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
IType type = get14Project().findType("java.util.Vector");
IMethod method = type.getMethod("addElement", new String[]{"Ljava.lang.Object;"});
//for 1.5 compliance, addElement has a type 'E' not an object as the param type
@@ -163,56 +163,56 @@
method = type.getMethod("addElement", new String[] {"TE;"});
}
assertTrue("Could not find method 'addElement'", method.exists());
-
+
StepIntoSelectionHandler handler = new StepIntoSelectionHandler(thread, (IJavaStackFrame)thread.getTopStackFrame(), method);
DebugElementEventWaiter waiter = new DebugElementEventWaiter(DebugEvent.SUSPEND, thread);
handler.step();
Object source = waiter.waitForEvent();
assertEquals("Step did not complete", thread, source);
thread = (IJavaThread)source;
-
+
IJavaStackFrame frame = (IJavaStackFrame)thread.getTopStackFrame();
assertEquals("Should be in method 'addElement'", "addElement", frame.getMethodName());
-
-
+
+
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
+ }
+ }
/**
* Step into 'new Integer(i)'
- *
+ *
* @throws Exception
*/
public void testStepIntoBinaryConstructor() throws Exception {
String typeName = "org.eclipse.debug.tests.targets.StepIntoSelectionClass";
- createLineBreakpoint(34, typeName);
-
+ createLineBreakpoint(34, typeName);
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
IType type = get14Project().findType("java.lang.Integer");
IMethod method = type.getMethod("Integer", new String[]{"I"});
assertTrue("Could not find method constructor", method.exists());
-
+
StepIntoSelectionHandler handler = new StepIntoSelectionHandler(thread, (IJavaStackFrame)thread.getTopStackFrame(), method);
DebugElementEventWaiter waiter = new DebugElementEventWaiter(DebugEvent.SUSPEND, thread);
handler.step();
Object source = waiter.waitForEvent();
assertEquals("Step did not complete", thread, source);
thread = (IJavaThread)source;
-
+
IJavaStackFrame frame = (IJavaStackFrame)thread.getTopStackFrame();
assertEquals("Should be in constructor", "<init>", frame.getMethodName());
-
-
+
+
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
+ }
+ }
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/test/stepping/StepIntoSelectionWithGenerics.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/test/stepping/StepIntoSelectionWithGenerics.java
index b8e0fa0..e060991 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/test/stepping/StepIntoSelectionWithGenerics.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/test/stepping/StepIntoSelectionWithGenerics.java
@@ -32,7 +32,7 @@
private String pname = "a.b.c";
private String jname = "StepIntoSelectionWithGenerics.java";
private String mname = "hello";
-
+
/**
* Constructor
*/
@@ -47,19 +47,19 @@
protected IJavaProject getProjectContext() {
return get15Project();
}
-
+
/**
* Tests stepping into a method of a top-level class that is generified
* @throws Exception
*/
public void testStepIntoSelection1() throws Exception {
- createLineBreakpoint(30, qtypename);
-
+ createLineBreakpoint(30, qtypename);
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(qtypename);
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
ICompilationUnit cu = getCompilationUnit(get15Project(), "src", pname, jname);
IJavaProject jp = cu.getJavaProject();
NullProgressMonitor monitor = new NullProgressMonitor();
@@ -67,37 +67,37 @@
assertTrue("The top-level type"+qtypename+" must exist", type.exists());
IMethod method = type.getMethod(mname, new String[0]);
assertTrue("Could not find method "+mname+" in type "+qtypename, method.exists());
-
+
StepIntoSelectionHandler handler = new StepIntoSelectionHandler(thread, (IJavaStackFrame)thread.getTopStackFrame(), method);
DebugElementEventWaiter waiter = new DebugElementEventWaiter(DebugEvent.SUSPEND, thread);
handler.step();
Object source = waiter.waitForEvent();
assertEquals("Step did not complete", thread, source);
thread = (IJavaThread)source;
-
+
IJavaStackFrame frame = (IJavaStackFrame)thread.getTopStackFrame();
assertEquals("Should be in StepIntoSelectionWithGenerics."+mname, mname, frame.getMethodName());
assertEquals("Should be stopped on line", 26, frame.getLineNumber());
-
+
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Tests stepping into a method of an inner class that is generified
- *
+ *
* @throws Exception
*/
public void testStepIntoSelection2() throws Exception {
- createLineBreakpoint(31, qtypename);
-
+ createLineBreakpoint(31, qtypename);
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(qtypename);
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
ICompilationUnit cu = getCompilationUnit(get15Project(), "src", pname, jname);
IJavaProject jp = cu.getJavaProject();
NullProgressMonitor monitor = new NullProgressMonitor();
@@ -107,18 +107,18 @@
assertNotNull("The iner type InnerClazz must not be null", type);
IMethod method = type.getMethod(mname, new String[0]);
assertTrue("Could not find method "+mname+" in type InnerClazz", method.exists());
-
+
StepIntoSelectionHandler handler = new StepIntoSelectionHandler(thread, (IJavaStackFrame)thread.getTopStackFrame(), method);
DebugElementEventWaiter waiter = new DebugElementEventWaiter(DebugEvent.SUSPEND, thread);
handler.step();
Object source = waiter.waitForEvent();
assertEquals("Step did not complete", thread, source);
thread = (IJavaThread)source;
-
+
IJavaStackFrame frame = (IJavaStackFrame)thread.getTopStackFrame();
assertEquals("Should be in InnerClazz."+mname, mname, frame.getMethodName());
assertEquals("Should be stopped on line", 21, frame.getLineNumber());
-
+
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
@@ -127,17 +127,17 @@
/**
* Tests stepping into a method of an inner-inner class that is generified
- *
+ *
* @throws Exception
*/
public void testStepIntoSelection3() throws Exception {
- createLineBreakpoint(32, qtypename);
-
+ createLineBreakpoint(32, qtypename);
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(qtypename);
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
ICompilationUnit cu = getCompilationUnit(get15Project(), "src", pname, jname);
IJavaProject jp = cu.getJavaProject();
NullProgressMonitor monitor = new NullProgressMonitor();
@@ -147,18 +147,18 @@
assertNotNull("The inner type InnerClazz2 must not be null", type);
IMethod method = type.getMethod(mname, new String[0]);
assertTrue("Could not find method "+mname+" in type InnerClazz2", method.exists());
-
+
StepIntoSelectionHandler handler = new StepIntoSelectionHandler(thread, (IJavaStackFrame)thread.getTopStackFrame(), method);
DebugElementEventWaiter waiter = new DebugElementEventWaiter(DebugEvent.SUSPEND, thread);
handler.step();
Object source = waiter.waitForEvent();
assertEquals("Step did not complete", thread, source);
thread = (IJavaThread)source;
-
+
IJavaStackFrame frame = (IJavaStackFrame)thread.getTopStackFrame();
assertEquals("Should be in InnerClazz2."+mname, mname, frame.getMethodName());
assertEquals("Should be stopped on line", 17, frame.getLineNumber());
-
+
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/test/stepping/StepResultTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/test/stepping/StepResultTests.java
index 1c0fb56..82df334 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/test/stepping/StepResultTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/test/stepping/StepResultTests.java
@@ -85,7 +85,7 @@
/**
* test that if the step return is aborted by some other break point, no return value of a recursive invocation is shown
- *
+ *
* @throws Exception
*/
public void testNoReturnValueAfterAbortedStepReturn() throws Exception {
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/test/stepping/TestContributedStepFilter.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/test/stepping/TestContributedStepFilter.java
index c3d855b..9bf2848 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/test/stepping/TestContributedStepFilter.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/test/stepping/TestContributedStepFilter.java
@@ -20,7 +20,7 @@
public class TestContributedStepFilter implements IStepFilter {
/**
- *
+ *
*/
public TestContributedStepFilter() {
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/AbstractDebugPerformanceTest.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/AbstractDebugPerformanceTest.java
index 48de2f9..a60561e 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/AbstractDebugPerformanceTest.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/AbstractDebugPerformanceTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -28,7 +28,7 @@
public AbstractDebugPerformanceTest(String name) {
super(name);
}
-
+
/**
* Overridden to create a default performance meter for this test case.
* @throws Exception
@@ -54,7 +54,7 @@
* Mark the scenario of this test case
* to be included into the global performance summary. The summary shows
* the given dimension of the scenario and labels the scenario with the short name.
- *
+ *
* @param shortName a short (shorter than 40 characters) descriptive name of the scenario
* @param dimension the dimension to show in the summary
*/
@@ -62,10 +62,10 @@
Performance performance= Performance.getDefault();
performance.tagAsGlobalSummary(fPerformanceMeter, shortName, new Dimension[] { dimension } );
}
-
+
/**
* Sets a degradation comment on this test.
- *
+ *
* @param comment the reason for degradation.
*/
public void setDegradationComment(String comment) {
@@ -77,7 +77,7 @@
* Mark the scenario represented by the given PerformanceMeter
* to be included into the global performance summary. The summary shows
* the given dimensions of the scenario and labels the scenario with the short name.
- *
+ *
* @param shortName a short (shorter than 40 characters) descritive name of the scenario
* @param dimensions an array of dimensions to show in the summary
*/
@@ -85,24 +85,24 @@
Performance performance= Performance.getDefault();
performance.tagAsGlobalSummary(fPerformanceMeter, shortName, dimensions );
}
-
+
/**
* Mark the scenario of this test case
* to be included into the component performance summary. The summary shows
* the given dimension of the scenario and labels the scenario with the short name.
- *
+ *
* @param shortName a short (shorter than 40 characters) descritive name of the scenario
* @param dimension the dimension to show in the summary
*/
public void tagAsSummary(String shortName, Dimension dimension) {
tagAsSummary(shortName, new Dimension[]{dimension});
}
-
+
/**
* Mark the scenario of this test case
* to be included into the component performance summary. The summary shows
* the given dimension of the scenario and labels the scenario with the short name.
- *
+ *
* @param shortName a short (shorter than 40 characters) descritive name of the scenario
* @param dimensions an array of dimensions to show in the summary
*/
@@ -110,7 +110,7 @@
Performance performance= Performance.getDefault();
performance.tagAsSummary(fPerformanceMeter, shortName, dimensions);
}
-
+
/**
* Called from within a test case immediately before the code to measure is run.
* It starts capturing of performance data.
@@ -120,18 +120,18 @@
protected void startMeasuring() {
fPerformanceMeter.start();
}
-
+
protected void stopMeasuring() {
fPerformanceMeter.stop();
}
-
+
protected void commitMeasurements() {
- fPerformanceMeter.commit();
+ fPerformanceMeter.commit();
}
/**
* Asserts default properties of the measurements captured for this test case.
- *
+ *
* @throws RuntimeException if the properties do not hold
*/
protected void assertPerformance() {
@@ -142,7 +142,7 @@
* Asserts that the measurement specified by the given dimension
* is within a certain range with respect to some reference value.
* If the specified dimension isn't available, the call has no effect.
- *
+ *
* @param dim the Dimension to check
* @param lowerPercentage a negative number indicating the percentage the measured value is allowed to be smaller than some reference value
* @param upperPercentage a positive number indicating the percentage the measured value is allowed to be greater than some reference value
@@ -151,7 +151,7 @@
protected void assertPerformanceInRelativeBand(Dimension dim, int lowerPercentage, int upperPercentage) {
Performance.getDefault().assertPerformanceInRelativeBand(fPerformanceMeter, dim, lowerPercentage, upperPercentage);
}
-
+
/**
* Sets a comment to explain performance degradation.
* @param comment the explanation for a performance degradation.
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/AbstractDebugTest.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/AbstractDebugTest.java
index db64de8..6f52d2b 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/AbstractDebugTest.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/AbstractDebugTest.java
@@ -175,7 +175,7 @@
*/
@SuppressWarnings("deprecation")
public abstract class AbstractDebugTest extends TestCase implements IEvaluationListener {
-
+
public static final String MULTI_OUTPUT_PROJECT_NAME = "MultiOutput";
public static final String BOUND_EE_PROJECT_NAME = "BoundEE";
public static final String ONE_FOUR_PROJECT_NAME = "DebugTests";
@@ -191,10 +191,10 @@
"HitCountLooper", "CompileError", "MultiThreadedLoop", "HitCountException", "MultiThreadedException", "MultiThreadedList", "MethodLoop", "StepFilterOne",
"StepFilterFour", "EvalArrayTests", "EvalSimpleTests", "EvalTypeTests", "EvalNestedTypeTests", "EvalTypeHierarchyTests",
"EvalAnonymousClassVariableTests", "WorkingDirectoryTest",
- "OneToTen", "OneToTenPrint", "FloodConsole", "ConditionalStepReturn", "VariableChanges", "DefPkgReturnType", "InstanceFilterObject", "org.eclipse.debug.tests.targets.CallStack",
- "org.eclipse.debug.tests.targets.ThreadStack", "org.eclipse.debug.tests.targets.HcrClass", "org.eclipse.debug.tests.targets.StepIntoSelectionClass",
- "WatchItemTests", "ArrayTests", "ByteArrayTests", "PerfLoop", "Console80Chars", "ConsoleStackTrace", "ConsoleVariableLineLength", "StackTraces",
- "ConsoleInput", "PrintConcatenation", "VariableDetails", "org.eclipse.debug.tests.targets.ArrayDetailTests", "ArrayDetailTestsDef", "ForceReturnTests",
+ "OneToTen", "OneToTenPrint", "FloodConsole", "ConditionalStepReturn", "VariableChanges", "DefPkgReturnType", "InstanceFilterObject", "org.eclipse.debug.tests.targets.CallStack",
+ "org.eclipse.debug.tests.targets.ThreadStack", "org.eclipse.debug.tests.targets.HcrClass", "org.eclipse.debug.tests.targets.StepIntoSelectionClass",
+ "WatchItemTests", "ArrayTests", "ByteArrayTests", "PerfLoop", "Console80Chars", "ConsoleStackTrace", "ConsoleVariableLineLength", "StackTraces",
+ "ConsoleInput", "PrintConcatenation", "VariableDetails", "org.eclipse.debug.tests.targets.ArrayDetailTests", "ArrayDetailTestsDef", "ForceReturnTests",
"ForceReturnTestsTwo", "LogicalStructures", "BreakpointListenerTest", "LaunchHistoryTest", "LaunchHistoryTest2", "RunnableAppletImpl", "java6.AllInstancesTests",
"bug329294", "bug401270", "org.eclipse.debug.tests.targets.HcrClass2", "org.eclipse.debug.tests.targets.HcrClass3", "org.eclipse.debug.tests.targets.HcrClass4",
"org.eclipse.debug.tests.targets.HcrClass5", "org.eclipse.debug.tests.targets.HcrClass6", "org.eclipse.debug.tests.targets.HcrClass7", "org.eclipse.debug.tests.targets.HcrClass8",
@@ -207,7 +207,7 @@
* the default timeout
*/
public static final int DEFAULT_TIMEOUT = 30000;
-
+
//constants
protected static final String JAVA = "java"; //$NON-NLS-1$
protected static final String JAVA_EXTENSION = ".java"; //$NON-NLS-1$
@@ -216,12 +216,12 @@
protected static final String LOCAL_JAVA_APPLICATION_TYPE_ID = "org.eclipse.jdt.launching.localJavaApplication"; //$NON-NLS-1$
protected static final String JAVA_LAUNCH_SHORTCUT_ID = "org.eclipse.jdt.debug.ui.localJavaShortcut"; //$NON-NLS-1$
protected static final String TEST_LAUNCH_SHORTCUT = "org.eclipse.jdt.debug.tests.testShortCut";
-
+
/**
* an evaluation result
*/
public IEvaluationResult fEvaluationResult;
-
+
/**
* The last relevant event set - for example, that caused
* a thread to suspend
@@ -237,7 +237,7 @@
private static boolean loadedJRE = false;
private static boolean loadedMulti = false;
private static boolean welcomeClosed = false;
-
+
/**
* Constructor
* @param name
@@ -248,7 +248,7 @@
ErrorDialog.AUTOMATED_MODE = true;
SafeRunnable.setIgnoreErrors(true);
}
-
+
@Override
protected void setUp() throws Exception {
TestUtil.log(IStatus.INFO, getName(), "setUp");
@@ -281,14 +281,14 @@
debugUIPreferences.setValue(IInternalDebugUIConstants.PREF_WAIT_FOR_BUILD, MessageDialogWithToggle.ALWAYS);
debugUIPreferences.setValue(IInternalDebugUIConstants.PREF_CONTINUE_WITH_COMPILE_ERROR, MessageDialogWithToggle.ALWAYS);
debugUIPreferences.setValue(IInternalDebugUIConstants.PREF_SAVE_DIRTY_EDITORS_BEFORE_LAUNCH, MessageDialogWithToggle.NEVER);
-
+
String property = System.getProperty("debug.workbenchActivation");
- boolean activate = property != null && property.equals("on");
+ boolean activate = property != null && property.equals("on");
debugUIPreferences.setValue(IDebugPreferenceConstants.CONSOLE_OPEN_ON_ERR, activate);
debugUIPreferences.setValue(IDebugPreferenceConstants.CONSOLE_OPEN_ON_OUT, activate);
debugUIPreferences.setValue(IInternalDebugUIConstants.PREF_ACTIVATE_DEBUG_VIEW, activate);
debugUIPreferences.setValue(IDebugUIConstants.PREF_ACTIVATE_WORKBENCH, activate);
-
+
IPreferenceStore jdiUIPreferences = JDIDebugUIPlugin.getDefault().getPreferenceStore();
// Turn off suspend on uncaught exceptions
jdiUIPreferences.setValue(IJDIPreferencesConstants.PREF_SUSPEND_ON_UNCAUGHT_EXCEPTIONS, false);
@@ -302,7 +302,7 @@
JDIDebugModel.getPreferences().setDefault(JDIDebugModel.PREF_REQUEST_TIMEOUT, 10000);
// turn off monitor information
jdiUIPreferences.setValue(IJavaDebugUIConstants.PREF_SHOW_MONITOR_THREAD_INFO, false);
-
+
// turn off workbench heap monitor
PrefUtil.getAPIPreferenceStore().setValue(IWorkbenchPreferenceConstants.SHOW_MEMORY_MONITOR, false);
IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
@@ -312,7 +312,7 @@
((WorkbenchWindow) window).showHeapStatus(false);
}
}
-
+
//make sure we are auto-refreshing external workspace changes
IEclipsePreferences node = InstanceScope.INSTANCE.getNode(ResourcesPlugin.PI_RESOURCES);
if(node != null) {
@@ -323,7 +323,7 @@
loadedPrefs = true;
}
}
-
+
/**
* Creates the Java 1.4 compliant project
*/
@@ -346,17 +346,17 @@
JavaProjectHelper.importFilesFromDirectory(root, src.getPath(), null);
IPath path = src.getPath().append("A.jar");
JavaProjectHelper.addLibrary(jp, path);
-
+
//add a closed project optional classpath entry
//see https://bugs.eclipse.org/bugs/show_bug.cgi?id=380918
IClasspathEntry entry = JavaCore.newProjectEntry(
- new Path(ONE_FOUR_PROJECT_CLOSED_NAME).makeAbsolute(),
- new IAccessRule[0],
- false,
- new IClasspathAttribute[] {JavaCore.newClasspathAttribute(IClasspathAttribute.OPTIONAL, Boolean.TRUE.toString())},
+ new Path(ONE_FOUR_PROJECT_CLOSED_NAME).makeAbsolute(),
+ new IAccessRule[0],
+ false,
+ new IClasspathAttribute[] {JavaCore.newClasspathAttribute(IClasspathAttribute.OPTIONAL, Boolean.TRUE.toString())},
false);
JavaProjectHelper.addToClasspath(jp, entry);
-
+
// create launch configurations
for (int i = 0; i < LAUNCH_CONFIG_NAMES_1_4.length; i++) {
cfgs.add(createLaunchConfiguration(jp, LAUNCH_CONFIG_NAMES_1_4[i]));
@@ -380,12 +380,12 @@
handleProjectCreationException(e, ONE_FOUR_PROJECT_NAME, jp);
}
}
-
+
/**
* Creates the Java 1.5 compliant project
*/
void assert15Project() {
- IJavaProject jp = null;
+ IJavaProject jp = null;
ArrayList<ILaunchConfiguration> cfgs = new ArrayList<ILaunchConfiguration>(1);
try {
if (!loaded15) {
@@ -417,7 +417,7 @@
handleProjectCreationException(e, ONE_FIVE_PROJECT_NAME, jp);
}
}
-
+
/**
* Creates the Java 1.7 compliant project
*/
@@ -447,7 +447,7 @@
handleProjectCreationException(e, ONE_SEVEN_PROJECT_NAME, jp);
}
}
-
+
/**
* Creates the Java 1.8 compliant project
*/
@@ -479,12 +479,12 @@
handleProjectCreationException(e, ONE_SEVEN_PROJECT_NAME, jp);
}
}
-
+
/**
* Creates the 'BoundJRE' project used for the JRE testing
*/
synchronized void assertBoundJreProject() {
- IJavaProject jp = null;
+ IJavaProject jp = null;
try {
if (!loadedJRE) {
jp =JavaProjectHelper.createJavaProject(BOUND_JRE_PROJECT_NAME);
@@ -508,7 +508,7 @@
handleProjectCreationException(e, BOUND_JRE_PROJECT_NAME, jp);
}
}
-
+
/**
* Creates the 'BoundEE' project for EE testing
*/
@@ -519,7 +519,7 @@
// create project with two src folders and output locations
jp = JavaProjectHelper.createJavaProject(BOUND_EE_PROJECT_NAME);
JavaProjectHelper.addSourceContainer(jp, JavaProjectHelper.SRC_DIR, JavaProjectHelper.BIN_DIR);
-
+
// add VM specific JRE container
IExecutionEnvironment j2se14 = JavaRuntime.getExecutionEnvironmentsManager().getEnvironment(JavaProjectHelper.J2SE_1_4_EE_NAME);
assertNotNull("Missing J2SE-1.4 environment", j2se14);
@@ -541,7 +541,7 @@
handleProjectCreationException(e, BOUND_EE_PROJECT_NAME, jp);
}
}
-
+
/**
* Creates the 'MultiOutput' project for source / binary output testing
*/
@@ -553,7 +553,7 @@
jp = JavaProjectHelper.createJavaProject(MULTI_OUTPUT_PROJECT_NAME);
JavaProjectHelper.addSourceContainer(jp, "src1", "bin1");
JavaProjectHelper.addSourceContainer(jp, "src2", "bin2");
-
+
// add rt.jar
IVMInstall vm = JavaRuntime.getDefaultVMInstall();
assertNotNull("No default JRE", vm);
@@ -574,10 +574,10 @@
handleProjectCreationException(e, MULTI_OUTPUT_PROJECT_NAME, jp);
}
}
-
+
/**
* Ensure the welcome screen is closed because in 4.x the debug perspective opens a giant fast-view causing issues
- *
+ *
* @throws Exception
* @since 3.8
*/
@@ -617,7 +617,7 @@
}
}
}
-
+
void handleProjectCreationException(Exception e, String pname, IJavaProject jp) {
StringWriter buf = new StringWriter();
String msg = e.getMessage();
@@ -630,7 +630,7 @@
e.printStackTrace(new PrintWriter(buf));
fail(buf.toString());
}
-
+
/**
* Sets the contents of the given {@link ICompilationUnit} to be the new contents provided
* @param unit
@@ -644,7 +644,7 @@
unit.save(null, true);
waitForBuild();
}
-
+
/**
* Sets the last relevant event set
*
@@ -653,44 +653,44 @@
protected void setEventSet(DebugEvent[] set) {
fEventSet = set;
}
-
+
/**
* Returns the last relevant event set
- *
+ *
* @return event set
*/
protected DebugEvent[] getEventSet() {
return fEventSet;
}
-
+
/**
* Returns the launch manager
- *
+ *
* @return launch manager
*/
protected ILaunchManager getLaunchManager() {
return DebugPlugin.getDefault().getLaunchManager();
}
-
+
/**
* Returns the singleton instance of the <code>LaunchConfigurationManager</code>
- *
+ *
* @return the singleton instance of the <code>LaunchConfigurationManager</code>
* @since 3.3
*/
protected LaunchConfigurationManager getLaunchConfigurationManager() {
return DebugUIPlugin.getDefault().getLaunchConfigurationManager();
}
-
+
/**
* Returns the breakpoint manager
- *
+ *
* @return breakpoint manager
*/
protected IBreakpointManager getBreakpointManager() {
return DebugPlugin.getDefault().getBreakpointManager();
- }
-
+ }
+
/**
* Returns the project context for the current test - each
* test must implement this method
@@ -698,17 +698,17 @@
protected IJavaProject getProjectContext() {
return get14Project();
}
-
+
/**
* Returns the 'DebugTests' project.
- *
+ *
* @return the test project
*/
protected IJavaProject get14Project() {
assert14Project();
return getJavaProject(ONE_FOUR_PROJECT_NAME);
}
-
+
/**
* Returns the {@link IBreakpointOrganizer} with the given id or <code>null</code>
* if no such organizer exists
@@ -719,20 +719,20 @@
protected IBreakpointOrganizer getOrganizer(String id) {
return BreakpointOrganizerManager.getDefault().getOrganizer(id);
}
-
+
/**
* Returns the 'OneFive' project.
- *
+ *
* @return the test project
*/
protected IJavaProject get15Project() {
assert15Project();
return getJavaProject(ONE_FIVE_PROJECT_NAME);
}
-
+
/**
* Returns the 'OneSeven' project.
- *
+ *
* @return the test project
*/
protected IJavaProject get17Project() {
@@ -742,47 +742,47 @@
/**
* Returns the 'OneSeven' project.
- *
+ *
* @return the test project
*/
protected IJavaProject get18Project() {
assert18Project();
return getJavaProject(ONE_EIGHT_PROJECT_NAME);
}
-
+
/**
* Returns the 'BoundJRE' project
- *
+ *
* @return the test project
*/
protected IJavaProject getBoundJreProject() {
assertBoundJreProject();
return getJavaProject(BOUND_JRE_PROJECT_NAME);
}
-
+
/**
* Returns the 'BoundEE' project
- *
+ *
* @return the test project
*/
protected IJavaProject getBoundEeProject() {
assertBoundeEeProject();
return getJavaProject(BOUND_EE_PROJECT_NAME);
}
-
+
/**
* Returns the 'MultiOutput' project
- *
+ *
* @return the test project
*/
protected IJavaProject getMultiOutputProject() {
assertMultioutputProject();
return getJavaProject(MULTI_OUTPUT_PROJECT_NAME);
}
-
+
/**
* Returns the Java project with the given name.
- *
+ *
* @param name project name
* @return the Java project with the given name
*/
@@ -790,14 +790,14 @@
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
return JavaCore.create(project);
}
-
+
/**
- * Creates a new {@link IJavaProject} with the given name and optionally initializing it from the given
+ * Creates a new {@link IJavaProject} with the given name and optionally initializing it from the given
* resource path from the testing bundle.
* <br><br>
* The project has the default <code>src</code> and <code>bin</code> folders. It is also created with a default
* <code>launchConfigurations</code> folder.
- *
+ *
* @param name the name for the project
* @param contentpath the path within the jdt.debug test bundle to initialize the source from
* @param ee the level of execution environment to use
@@ -826,10 +826,10 @@
assertNotNull("The EE ["+ee+"] does not exist", environment);
IPath containerPath = JavaRuntime.newJREContainerPath(environment);
JavaProjectHelper.addContainerEntry(jp, containerPath);
- pro = jp.getProject();
-
+ pro = jp.getProject();
+
JavaProjectHelper.updateCompliance(jp, ee);
-
+
// create launch configuration folder
IFolder folder = pro.getFolder("launchConfigurations");
if (!folder.exists()) {
@@ -837,14 +837,14 @@
}
return jp;
}
-
+
/**
- * Creates a new {@link IJavaProject} with the given name and initializes the contents from the given
+ * Creates a new {@link IJavaProject} with the given name and initializes the contents from the given
* resource path from the testing bundle.
* <br><br>
* The project has the default <code>src</code> and <code>bin</code> folders. It is also created with a default
* <code>launchConfigurations</code> folder.
- *
+ *
* @param name the name for the project
* @param contentpath the path within the jdt.debug test bundle to initialize the source from
* @param ee the level of execution environment to use
@@ -882,8 +882,8 @@
assertNotNull("The EE ["+ee+"] does not exist", environment);
IPath containerPath = JavaRuntime.newJREContainerPath(environment);
JavaProjectHelper.addContainerEntry(jp, containerPath);
- pro = jp.getProject();
-
+ pro = jp.getProject();
+
// create launch configuration folder
IFolder folder = pro.getFolder("launchConfigurations");
if (!folder.exists()) {
@@ -893,11 +893,11 @@
TestUtil.runEventLoop();
return jp;
}
-
+
/**
- * Creates a new {@link IProject} with the given name and initializes the contents from the given
+ * Creates a new {@link IProject} with the given name and initializes the contents from the given
* resource path from the testing bundle.
- *
+ *
* @param name the name for the project
* @param contentpath the path within the jdt.debug test bundle to initialize the source from
* @param if an existing project should be deleted
@@ -923,13 +923,13 @@
TestUtil.runEventLoop();
return pj;
}
-
+
/**
* Returns the launch shortcut with the given id
* @param id
- * @return the <code>LaunchShortcutExtension</code> with the given id,
+ * @return the <code>LaunchShortcutExtension</code> with the given id,
* or <code>null</code> if none
- *
+ *
* @since 3.3
*/
protected LaunchShortcutExtension getLaunchShortcutExtension(String id) {
@@ -943,16 +943,16 @@
}
return null;
}
-
+
/**
* New to 3.3 is the ability to have multiple delegates for a variety of overlapping mode combinations.
- * As such, for tests that launch specific configurations, must be check to ensure that there is a preferred
+ * As such, for tests that launch specific configurations, must be check to ensure that there is a preferred
* launch delegate available for the launch in the event there are duplicates. Otherwise the tests
* will hang waiting for a user to select a resolution action.
* @param configuration
* @param modes
* @throws CoreException
- *
+ *
* @since 3.3
*/
protected void ensurePreferredDelegate(ILaunchConfiguration configuration, Set<String> modes) throws CoreException {
@@ -962,7 +962,7 @@
type.setPreferredDelegate(modes, getDelegateById(type.getIdentifier(), LOCAL_JAVA_APPLICATION_TYPE_ID));
}
}
-
+
/**
* Returns the LaunchDelegate for the specified ID
* @param delegateId the id of the delegate to search for
@@ -979,10 +979,10 @@
}
return null;
}
-
+
/**
* Returns the source folder with the given name in the given project.
- *
+ *
* @param project
* @param name source folder name
* @return package fragment root
@@ -991,7 +991,7 @@
IProject p = project.getProject();
return project.getPackageFragmentRoot(p.getFolder(name));
}
-
+
/**
* Returns the <code>IHyperLink</code> at the given offset in the specified document
* or <code>null</code> if the offset does not point to an <code>IHyperLink</code>
@@ -1017,12 +1017,12 @@
}
return null;
}
-
+
/**
* Launches the given configuration and waits for an event. Returns the
* source of the event. If the event is not received, the launch is
* terminated and an exception is thrown.
- *
+ *
* @param configuration the configuration to launch
* @param waiter the event waiter to use
* @return Object the source of the event
@@ -1031,12 +1031,12 @@
protected Object launchAndWait(ILaunchConfiguration configuration, DebugEventWaiter waiter) throws CoreException {
return launchAndWait(configuration, waiter, true);
}
-
+
/**
- * Launches the given configuration in debug mode and waits for an event.
- * Returns the source of the event. If the event is not received, the
+ * Launches the given configuration in debug mode and waits for an event.
+ * Returns the source of the event. If the event is not received, the
* launch is terminated and an exception is thrown.
- *
+ *
* @param configuration the configuration to launch
* @param waiter the event waiter to use
* @param register whether to register the launch
@@ -1046,12 +1046,12 @@
protected Object launchAndWait(ILaunchConfiguration configuration, DebugEventWaiter waiter, boolean register) throws CoreException {
return launchAndWait(configuration, ILaunchManager.DEBUG_MODE, waiter, register);
}
-
+
/**
* Launches the given configuration and waits for an event. Returns the
* source of the event. If the event is not received, the launch is
* terminated and an exception is thrown.
- *
+ *
* @param configuration the configuration to launch
* @param mode the mode to launch the configuration in
* @param waiter the event waiter to use
@@ -1094,16 +1094,16 @@
}
setEventSet(waiter.getEventSet());
assertNotNull("Program did not suspend, launch terminated.", suspendee); //$NON-NLS-1$
- return suspendee;
+ return suspendee;
}
-
-
-
+
+
+
/**
* Launches the type with the given name, and waits for a
* suspend event in that program. Returns the thread in which the suspend
* event occurred.
- *
+ *
* @param mainTypeName the program to launch
* @return thread in which the first suspend event occurred
*/
@@ -1114,50 +1114,50 @@
}
/**
- * Launches the given configuration in debug mode, and waits for a
+ * Launches the given configuration in debug mode, and waits for a
* suspend event in that program. Returns the thread in which the suspend
* event occurred.
- *
+ *
* @param config the configuration to launch
* @return thread in which the first suspend event occurred
- */
+ */
protected IJavaThread launchAndSuspend(ILaunchConfiguration config) throws Exception {
DebugEventWaiter waiter= new DebugElementKindEventWaiter(DebugEvent.SUSPEND, IJavaThread.class);
waiter.setTimeout(DEFAULT_TIMEOUT);
Object suspendee = launchAndWait(config, waiter);
- return (IJavaThread)suspendee;
+ return (IJavaThread)suspendee;
}
-
+
/**
- * Launches the type with the given name, and waits for a breakpoint-caused
+ * Launches the type with the given name, and waits for a breakpoint-caused
* suspend event in that program. Returns the thread in which the suspend
* event occurred.
- *
+ *
* @param mainTypeName the program to launch
* @return thread in which the first suspend event occurred
*/
protected IJavaThread launchToBreakpoint(String mainTypeName) throws Exception {
return launchToBreakpoint(getProjectContext(), mainTypeName);
}
-
+
/**
- * Launches the type with the given name, and waits for a breakpoint-caused
+ * Launches the type with the given name, and waits for a breakpoint-caused
* suspend event in that program. Returns the thread in which the suspend
* event occurred.
- *
+ *
* @param project the project the type is in
* @param mainTypeName the program to launch
* @return thread in which the first suspend event occurred
*/
protected IJavaThread launchToBreakpoint(IJavaProject project, String mainTypeName) throws Exception {
return launchToBreakpoint(project, mainTypeName, true);
- }
-
+ }
+
/**
- * Launches the type with the given name, and waits for a breakpoint-caused
+ * Launches the type with the given name, and waits for a breakpoint-caused
* suspend event in that program. Returns the thread in which the suspend
* event occurred.
- *
+ *
* @param mainTypeName the program to launch
* @param register whether to register the launch
* @return thread in which the first suspend event occurred
@@ -1165,12 +1165,12 @@
protected IJavaThread launchToBreakpoint(String mainTypeName, boolean register) throws Exception {
return launchToBreakpoint(getProjectContext(), mainTypeName, register);
}
-
+
/**
- * Launches the type with the given name, and waits for a breakpoint-caused
+ * Launches the type with the given name, and waits for a breakpoint-caused
* suspend event in that program. Returns the thread in which the suspend
* event occurred.
- *
+ *
* @param mainTypeName the program to launch
* @param register whether to register the launch
* @return thread in which the first suspend event occurred
@@ -1179,43 +1179,43 @@
ILaunchConfiguration config = getLaunchConfiguration(project, mainTypeName);
assertNotNull("Could not locate launch configuration for " + mainTypeName, config); //$NON-NLS-1$
return launchToBreakpoint(config, register);
- }
+ }
/**
- * Launches the given configuration in debug mode, and waits for a breakpoint-caused
+ * Launches the given configuration in debug mode, and waits for a breakpoint-caused
* suspend event in that program. Returns the thread in which the suspend
* event occurred.
- *
+ *
* @param config the configuration to launch
* @return thread in which the first suspend event occurred
- */
+ */
protected IJavaThread launchToBreakpoint(ILaunchConfiguration config) throws CoreException {
return launchToBreakpoint(config, true);
}
-
+
/**
- * Launches the given configuration in debug mode, and waits for a breakpoint-caused
+ * Launches the given configuration in debug mode, and waits for a breakpoint-caused
* suspend event in that program. Returns the thread in which the suspend
* event occurred.
- *
+ *
* @param config the configuration to launch
* @param whether to register the launch
* @return thread in which the first suspend event occurred
- */
+ */
protected IJavaThread launchToBreakpoint(ILaunchConfiguration config, boolean register) throws CoreException {
DebugEventWaiter waiter= new DebugElementKindEventDetailWaiter(DebugEvent.SUSPEND, IJavaThread.class, DebugEvent.BREAKPOINT);
waiter.setTimeout(DEFAULT_TIMEOUT);
Object suspendee= launchAndWait(config, waiter, register);
assertTrue("suspendee was not an IJavaThread", suspendee instanceof IJavaThread); //$NON-NLS-1$
- return (IJavaThread)suspendee;
- }
-
+ return (IJavaThread)suspendee;
+ }
+
/**
* Launches the type with the given name, and waits for a terminate
* event in that program. Returns the debug target in which the suspend
* event occurred.
- *
+ *
* @param mainTypeName the program to launch
* @param timeout the number of milliseconds to wait for a terminate event
* @return debug target in which the terminate event occurred
@@ -1230,42 +1230,42 @@
* Launches the given configuration in debug mode, and waits for a terminate
* event in that program. Returns the debug target in which the terminate
* event occurred.
- *
+ *
* @param config the configuration to launch
* @param timeout the number of milliseconds to wait for a terminate event
* @return thread in which the first suspend event occurred
- */
+ */
protected IJavaDebugTarget launchAndTerminate(ILaunchConfiguration config, int timeout) throws Exception {
- return launchAndTerminate(config, timeout, true);
+ return launchAndTerminate(config, timeout, true);
}
-
+
/**
* Launches the given configuration in debug mode, and waits for a terminate
* event in that program. Returns the debug target in which the terminate
* event occurred.
- *
+ *
* @param config the configuration to launch
* @param timeout the number of milliseconds to wait for a terminate event
* @param register whether to register the launch
* @return thread in which the first suspend event occurred
- */
+ */
protected IJavaDebugTarget launchAndTerminate(ILaunchConfiguration config, int timeout, boolean register) throws Exception {
DebugEventWaiter waiter= new DebugElementKindEventWaiter(DebugEvent.TERMINATE, IJavaDebugTarget.class);
waiter.setTimeout(timeout);
- Object terminatee = launchAndWait(config, waiter, register);
+ Object terminatee = launchAndWait(config, waiter, register);
assertNotNull("Program did not terminate.", terminatee); //$NON-NLS-1$
assertTrue("terminatee is not an IJavaDebugTarget", terminatee instanceof IJavaDebugTarget); //$NON-NLS-1$
IJavaDebugTarget debugTarget = (IJavaDebugTarget) terminatee;
assertTrue("debug target is not terminated", debugTarget.isTerminated() || debugTarget.isDisconnected()); //$NON-NLS-1$
- return debugTarget;
- }
-
+ return debugTarget;
+ }
+
/**
* Launches the type with the given name, and waits for a line breakpoint suspend
* event in that program. Returns the thread in which the suspend
* event occurred.
- *
+ *
* @param mainTypeName the program to launch
* @param bp the breakpoint that should cause a suspend event
* @return thread in which the first suspend event occurred
@@ -1278,7 +1278,7 @@
* Launches the type with the given name, and waits for a line breakpoint suspend
* event in that program. Returns the thread in which the suspend
* event occurred.
- *
+ *
* @param mainTypeName the program to launch
* @param bp the breakpoint that should cause a suspend event
* @param register whether to register the launch
@@ -1289,16 +1289,16 @@
assertNotNull("Could not locate launch configuration for " + mainTypeName, config); //$NON-NLS-1$
return launchToLineBreakpoint(config, bp, register);
}
-
+
/**
- * Launches the given configuration in debug mode, and waits for a line breakpoint
+ * Launches the given configuration in debug mode, and waits for a line breakpoint
* suspend event in that program. Returns the thread in which the suspend
* event occurred.
- *
+ *
* @param config the configuration to launch
* @param bp the breakpoint that should cause a suspend event
* @return thread in which the first suspend event occurred
- */
+ */
protected IJavaThread launchToLineBreakpoint(ILaunchConfiguration config, ILineBreakpoint bp, boolean register) throws Exception {
DebugEventWaiter waiter= new DebugElementKindEventDetailWaiter(DebugEvent.SUSPEND, IJavaThread.class, DebugEvent.BREAKPOINT);
waiter.setTimeout(DEFAULT_TIMEOUT);
@@ -1314,49 +1314,49 @@
int lineNumber = breakpoint.getLineNumber();
int stackLine = thread.getTopStackFrame().getLineNumber();
assertTrue("line numbers of breakpoint and stack frame do not match", lineNumber == stackLine); //$NON-NLS-1$
-
- return thread;
+
+ return thread;
}
-
+
/**
* Returns the standard java launch tab group
* @return the standard java launch tab group
* @throws CoreException
- *
+ *
* @since 3.3
*/
protected ILaunchConfigurationTabGroup getJavaLaunchGroup() throws CoreException {
- ILaunchConfigurationType javaType = getLaunchManager().getLaunchConfigurationType(IJavaLaunchConfigurationConstants.ID_JAVA_APPLICATION);
+ ILaunchConfigurationType javaType = getLaunchManager().getLaunchConfigurationType(IJavaLaunchConfigurationConstants.ID_JAVA_APPLICATION);
ILaunchConfigurationTabGroup standardGroup = LaunchConfigurationPresentationManager.getDefault().getTabGroup(javaType, ILaunchManager.DEBUG_MODE);
return standardGroup;
}
-
+
/**
* Returns an instance of the launch configuration dialog on the the specified launch mode
* @param modeid the id of the mode to open the launch dialog on
* @return an new instance of <code>IlaunchConfigurationDialog</code>
- *
+ *
* @since 3.3
*/
protected ILaunchConfigurationDialog getLaunchConfigurationDialog(String modeid) {
return new LaunchConfigurationsDialog(null, DebugUIPlugin.getDefault().getLaunchConfigurationManager().getLaunchGroup(modeid));
}
-
+
/**
* Resumes the given thread, and waits for another breakpoint-caused suspend event.
* Returns the thread in which the suspend event occurs.
- *
+ *
* @param thread thread to resume
* @return thread in which the first suspend event occurs
*/
protected IJavaThread resume(IJavaThread thread) throws Exception {
return resume(thread, DEFAULT_TIMEOUT);
- }
-
+ }
+
/**
* Resumes the given thread, and waits for another breakpoint-caused suspend event.
* Returns the thread in which the suspend event occurs.
- *
+ *
* @param thread thread to resume
* @param timeout timeout in milliseconds
* @return thread in which the first suspend event occurs
@@ -1364,26 +1364,26 @@
protected IJavaThread resume(IJavaThread thread, int timeout) throws Exception {
DebugEventWaiter waiter= new DebugElementKindEventDetailWaiter(DebugEvent.SUSPEND, IJavaThread.class, DebugEvent.BREAKPOINT);
waiter.setTimeout(timeout);
-
+
thread.resume();
Object suspendee= waiter.waitForEvent();
setEventSet(waiter.getEventSet());
assertNotNull("Program did not suspend.", suspendee); //$NON-NLS-1$
return (IJavaThread)suspendee;
- }
-
+ }
+
/**
* Resumes the given thread, and waits for a suspend event caused by the specified
* line breakpoint. Returns the thread in which the suspend event occurs.
- *
+ *
* @param thread thread to resume
* @return thread in which the first suspend event occurs
*/
protected IJavaThread resumeToLineBreakpoint(IJavaThread resumeThread, ILineBreakpoint bp) throws Exception {
DebugEventWaiter waiter= new DebugElementKindEventDetailWaiter(DebugEvent.SUSPEND, IJavaThread.class, DebugEvent.BREAKPOINT);
waiter.setTimeout(DEFAULT_TIMEOUT);
-
+
resumeThread.resume();
Object suspendee= waiter.waitForEvent();
@@ -1399,38 +1399,38 @@
int lineNumber = breakpoint.getLineNumber();
int stackLine = thread.getTopStackFrame().getLineNumber();
assertTrue("line numbers of breakpoint and stack frame do not match", lineNumber == stackLine); //$NON-NLS-1$
-
+
return (IJavaThread)suspendee;
- }
-
+ }
+
/**
* Resumes the given thread, and waits for the debug target
* to terminate (i.e. finish/exit the program).
- *
+ *
* @param thread thread to resume
*/
protected void exit(IJavaThread thread) throws Exception {
DebugEventWaiter waiter= new DebugElementKindEventWaiter(DebugEvent.TERMINATE, IProcess.class);
waiter.setTimeout(DEFAULT_TIMEOUT);
-
+
thread.resume();
Object suspendee= waiter.waitForEvent();
setEventSet(waiter.getEventSet());
assertNotNull("Program did not terminate.", suspendee); //$NON-NLS-1$
- }
-
+ }
+
/**
* Resumes the given thread, and waits the associated debug
* target to terminate.
- *
+ *
* @param thread thread to resume
* @return the terminated debug target
*/
protected IJavaDebugTarget resumeAndExit(IJavaThread thread) throws Exception {
DebugEventWaiter waiter= new DebugElementEventWaiter(DebugEvent.TERMINATE, thread.getDebugTarget());
waiter.setTimeout(DEFAULT_TIMEOUT);
-
+
thread.resume();
Object suspendee= waiter.waitForEvent();
@@ -1439,21 +1439,21 @@
IJavaDebugTarget target = (IJavaDebugTarget)suspendee;
assertTrue("program should have exited", target.isTerminated() || target.isDisconnected()); //$NON-NLS-1$
return target;
- }
-
+ }
+
/**
* Returns the launch configuration for the given main type
- *
+ *
* @param mainTypeName program to launch
* @see ProjectCreationDecorator
*/
protected ILaunchConfiguration getLaunchConfiguration(String mainTypeName) {
return getLaunchConfiguration(getProjectContext(), mainTypeName);
}
-
+
/**
* Returns the launch configuration for the given main type
- *
+ *
* @param mainTypeName program to launch
* @see ProjectCreationDecorator
*/
@@ -1463,11 +1463,11 @@
assertNotNull("the configuration cannot be null", config);
assertTrue("Could not find launch configuration for " + mainTypeName, config.exists()); //$NON-NLS-1$
return config;
- }
-
+ }
+
/**
* Returns the launch configuration in the specified folder in the given project, for the given main type
- *
+ *
* @param project the project to look in
* @param containername the name of the container in the specified project to look for the config
* @param mainTypeName program to launch
@@ -1480,7 +1480,7 @@
assertTrue("Could not find launch configuration for " + mainTypeName, config.exists()); //$NON-NLS-1$
return config;
}
-
+
/**
* Returns the corresponding <code>IResource</code> from the <code>IJavaElement</code> with the
* specified name
@@ -1494,12 +1494,12 @@
IResource resource = element.getCorrespondingResource();
if (resource == null) {
resource = getProjectContext().getProject();
- }
+ }
return resource;
}
-
+
/**
- * Returns the resource from the specified type or the project from the testing java project in the
+ * Returns the resource from the specified type or the project from the testing java project in the
* event there is no resource from the specified type
* @param type
* @return
@@ -1512,14 +1512,14 @@
IResource resource = type.getResource();
if (resource == null) {
resource = type.getJavaProject().getProject();
- }
+ }
return resource;
- }
-
+ }
+
/**
* Creates and returns a line breakpoint at the given line number in the type with the
* given name.
- *
+ *
* @param lineNumber line number
* @param typeName type name
*/
@@ -1528,7 +1528,7 @@
assertNotNull("Could not find the requested IType: "+typeName, type);
return createLineBreakpoint(type, lineNumber);
}
-
+
/**
* Creates am new java line breakpoint
* @param lineNumber
@@ -1538,7 +1538,7 @@
* @param fullTargetName
* @return a new line breakpoint
*/
- protected IJavaLineBreakpoint createLineBreakpoint(int lineNumber, String root, String packageName, String cuName,
+ protected IJavaLineBreakpoint createLineBreakpoint(int lineNumber, String root, String packageName, String cuName,
String fullTargetName) throws Exception{
IJavaProject javaProject = getProjectContext();
ICompilationUnit cunit = getCompilationUnit(javaProject, root, packageName, cuName);
@@ -1546,14 +1546,14 @@
IType targetType = (IType)(new MemberParser()).getDeepest(cunit,fullTargetName);
assertNotNull("did not find requested type", targetType); //$NON-NLS-1$
assertTrue("did not find type to install breakpoint in", targetType.exists()); //$NON-NLS-1$
-
+
return createLineBreakpoint(targetType, lineNumber);
}
-
+
/**
* Creates a line breakpoint in the given type (may be a top level non public type)
- *
+ *
* @param lineNumber line number to create the breakpoint at
* @param packageName fully qualified package name containing the type, example "a.b.c"
* @param cuName simple name of compilation unit containing the type, example "Something.java"
@@ -1566,10 +1566,10 @@
assertNotNull("Could not find the requested IType: "+typeName, type);
return createLineBreakpoint(type, lineNumber);
}
-
+
/**
* Creates a line breakpoint in the given type at the given line number.
- *
+ *
* @param type type in which to install the breakpoint
* @param lineNumber line number to install the breakpoint at
* @return line breakpoint
@@ -1604,10 +1604,10 @@
forceDeltas(bp);
return bp;
}
-
+
/**
* Forces marker deltas to be sent based on breakpoint creation.
- *
+ *
* @param breakpoint
*/
private void forceDeltas(IBreakpoint breakpoint) throws CoreException {
@@ -1616,11 +1616,11 @@
project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
}
}
-
+
/**
- * Returns the type in the test project based on the given name. The type name may refer to a
+ * Returns the type in the test project based on the given name. The type name may refer to a
* top level non public type.
- *
+ *
* @param packageName package name, example "a.b.c"
* @param cuName simple compilation unit name within the package, example "Something.java"
* @param typeName simple dot qualified type name, example "Something" or "NonPublic" or "Something.Inner"
@@ -1645,11 +1645,11 @@
}
return null;
}
-
+
/**
* Creates and returns a map of java element breakpoint attributes for a breakpoint on the
* given java element, or <code>null</code> if none
- *
+ *
* @param element java element the breakpoint is associated with
* @return map of breakpoint attributes or <code>null</code>
* @throws Exception
@@ -1670,12 +1670,12 @@
return map;
}
return null;
- }
-
+ }
+
/**
* Creates and returns a line breakpoint at the given line number in the type with the
* given name and sets the specified condition on the breakpoint.
- *
+ *
* @param lineNumber line number
* @param typeName type name
* @param condition condition
@@ -1687,11 +1687,11 @@
bp.setConditionSuspendOnTrue(suspendOnTrue);
return bp;
}
-
+
/**
* Creates and returns a pattern breakpoint at the given line number in the
* source file with the given name.
- *
+ *
* @param lineNumber line number
* @param sourceName name of source file
* @param pattern the pattern of the class file name
@@ -1699,22 +1699,22 @@
protected IJavaPatternBreakpoint createPatternBreakpoint(int lineNumber, String sourceName, String pattern) throws Exception {
return JDIDebugModel.createPatternBreakpoint(getProjectContext().getProject(), sourceName, pattern, lineNumber, -1, -1, 0, true, null);
}
-
+
/**
* Creates and returns a target pattern breakpoint at the given line number in the
* source file with the given name.
- *
+ *
* @param lineNumber line number
* @param sourceName name of source file
*/
protected IJavaTargetPatternBreakpoint createTargetPatternBreakpoint(int lineNumber, String sourceName) throws Exception {
return JDIDebugModel.createTargetPatternBreakpoint(getProjectContext().getProject(), sourceName, lineNumber, -1, -1, 0, true, null);
- }
-
+ }
+
/**
* Creates and returns a stratum breakpoint at the given line number in the
* source file with the given name.
- *
+ *
* @param lineNumber line number
* @param sourceName name of source file
* @param stratum the stratum of the source file
@@ -1722,10 +1722,10 @@
protected IJavaStratumLineBreakpoint createStratumBreakpoint(int lineNumber, String sourceName, String stratum) throws Exception {
return JDIDebugModel.createStratumBreakpoint(getProjectContext().getProject(), stratum, sourceName, null, null, lineNumber, -1, -1, 0, true, null);
}
-
+
/**
* Creates and returns a method breakpoint
- *
+ *
* @param typeNamePattern type name pattern
* @param methodName method name
* @param methodSignature method signature or <code>null</code>
@@ -1734,11 +1734,11 @@
*/
protected IJavaMethodBreakpoint createMethodBreakpoint(String typeNamePattern, String methodName, String methodSignature, boolean entry, boolean exit) throws Exception {
return createMethodBreakpoint(getProjectContext(), typeNamePattern, methodName, methodSignature, entry, exit);
- }
-
+ }
+
/**
* Creates and returns a method breakpoint
- *
+ *
* @param project java project
* @param typeNamePattern type name pattern
* @param methodName method name
@@ -1760,11 +1760,11 @@
IJavaMethodBreakpoint bp = JDIDebugModel.createMethodBreakpoint(resource, typeNamePattern, methodName, methodSignature, entry, exit,false, -1, -1, -1, 0, true, map);
forceDeltas(bp);
return bp;
- }
-
+ }
+
/**
* Creates a method breakpoint in a fully specified type (potentially non public).
- *
+ *
* @param packageName package name containing type to install breakpoint in, example "a.b.c"
* @param cuName simple compilation unit name within package, example "Something.java"
* @param typeName $ qualified type name within compilation unit, example "Something" or
@@ -1790,10 +1790,10 @@
forceDeltas(bp);
return bp;
}
-
+
/**
- * Creates a MethodBreakPoint on the method specified at the given path.
+ * Creates a MethodBreakPoint on the method specified at the given path.
* Syntax:
* Type$InnerType$MethodNameAndSignature$AnonymousTypeDeclarationNumber$FieldName
* eg:<code>
@@ -1804,7 +1804,7 @@
* {
* Object anon = new Object(){
* int anIntField;
- * String anonTypeMethod() {return "an Example";}
+ * String anonTypeMethod() {return "an Example";}
* }
* }
* }
@@ -1812,9 +1812,9 @@
* Syntax to get the anonymous toString would be: Foo$Inner$aMethod()V$1$anonTypeMethod()QString
* so, createMethodBreakpoint(packageName, cuName, "Foo$Inner$aMethod()V$1$anonTypeMethod()QString",true,false);
*/
- protected IJavaMethodBreakpoint createMethodBreakpoint(String root, String packageName, String cuName,
+ protected IJavaMethodBreakpoint createMethodBreakpoint(String root, String packageName, String cuName,
String fullTargetName, boolean entry, boolean exit) throws Exception {
-
+
IJavaProject javaProject = getProjectContext();
ICompilationUnit cunit = getCompilationUnit(javaProject, root, packageName, cuName);
assertNotNull("did not find requested Compilation Unit", cunit); //$NON-NLS-1$
@@ -1823,13 +1823,13 @@
assertTrue("Given method does not exist", targetMethod.exists()); //$NON-NLS-1$
IType methodParent = (IType)targetMethod.getParent();//safe - method's only parent = Type
assertNotNull("did not find type to install breakpoint in", methodParent); //$NON-NLS-1$
-
+
Map<String, Object> map = getExtraBreakpointAttributes(targetMethod);
IJavaMethodBreakpoint bp = JDIDebugModel.createMethodBreakpoint(getBreakpointResource(methodParent), methodParent.getFullyQualifiedName(),targetMethod.getElementName(), targetMethod.getSignature(), entry, exit,false, -1, -1, -1, 0, true, map);
forceDeltas(bp);
return bp;
- }
-
+ }
+
/**
* @param cu the Compilation where the target resides
* @param target the full name of the target, as per MemberParser syntax
@@ -1839,21 +1839,21 @@
IMember toReturn = (new MemberParser()).getDeepest(cu,target);
return toReturn;
}
-
+
/**
* Delegate method to get a resource with a specific name from the testing workspace 'src' folder
* @param name the name of the <code>IResource</code> to get
* @return the specified <code>IResource</code> or <code>null</code> if it does not exist
- *
+ *
* @since 3.4
*/
protected IResource getResource(String name) {
return ResourcesPlugin.getWorkspace().getRoot().findMember(new Path("/DebugTests/src/"+name));
}
-
+
/**
* Creates and returns a class prepare breakpoint on the type with the given fully qualified name.
- *
+ *
* @param typeName type on which to create the breakpoint
* @return breakpoint
* @throws Exception
@@ -1861,10 +1861,10 @@
protected IJavaClassPrepareBreakpoint createClassPrepareBreakpoint(String typeName) throws Exception {
return createClassPrepareBreakpoint(getType(typeName));
}
-
+
/**
* Creates and returns a class prepare breakpoint on the type with the given fully qualified name.
- *
+ *
* @param typeName type on which to create the breakpoint
* @return breakpoint
* @throws Exception
@@ -1875,23 +1875,23 @@
IType type = (IType)getMember(cunit,fullTargetName);
assertTrue("Target type not found", type.exists()); //$NON-NLS-1$
return createClassPrepareBreakpoint(type);
- }
-
+ }
+
/**
* Creates a class prepare breakpoint in a fully specified type (potentially non public).
- *
+ *
* @param packageName package name containing type to install breakpoint in, example "a.b.c"
* @param cuName simple compilation unit name within package, example "Something.java"
* @param typeName $ qualified type name within compilation unit, example "Something" or
* "NonPublic" or "Something$Inner"
- */
+ */
protected IJavaClassPrepareBreakpoint createClassPrepareBreakpoint(String packageName, String cuName, String typeName) throws Exception {
return createClassPrepareBreakpoint(getType(packageName, cuName, typeName));
}
-
+
/**
* Creates a class prepare breakpoint for the given type
- *
+ *
* @param type type
* @return class prepare breakpoint
* @throws Exception
@@ -1907,11 +1907,11 @@
forceDeltas(bp);
return bp;
}
-
+
/**
* Returns the Java model type from the test project with the given name or <code>null</code>
* if none.
- *
+ *
* @param typeName
* @return type or <code>null</code>
* @throws Exception
@@ -1919,27 +1919,27 @@
protected IType getType(String typeName) throws Exception {
return getProjectContext().findType(typeName);
}
-
+
/**
* Creates and returns a watchpoint
- *
+ *
* @param typeNmae type name
* @param fieldName field name
* @param access whether to suspend on field access
* @param modification whether to suspend on field modification
- */
+ */
protected IJavaWatchpoint createWatchpoint(String typeName, String fieldName, boolean access, boolean modification) throws Exception {
IType type = getType(typeName);
return createWatchpoint(type, fieldName, access, modification);
}
-
+
/**
* Creates and returns an exception breakpoint
- *
+ *
* @param exName exception name
* @param caught whether to suspend in caught locations
* @param uncaught whether to suspend in uncaught locations
- */
+ */
protected IJavaExceptionBreakpoint createExceptionBreakpoint(String exName, boolean caught, boolean uncaught) throws Exception {
IType type = getType(exName);
Map<String, Object> map = getExtraBreakpointAttributes(type);
@@ -1947,15 +1947,15 @@
forceDeltas(bp);
return bp;
}
-
+
/**
* Creates and returns a watchpoint
- *
+ *
* @param typeNmae type name
* @param fieldName field name
* @param access whether to suspend on field access
* @param modification whether to suspend on field modification
- */
+ */
/* protected IJavaWatchpoint createWatchpoint(String typeName, String fieldName, boolean access, boolean modification) throws Exception {
IType type = getType(typeName);
return createWatchpoint(type, fieldName, access, modification);
@@ -1965,17 +1965,17 @@
/**
* Creates a WatchPoint on the field specified at the given path.
* Will create watchpoints on fields within anonymous types, inner types,
- * local (non-public) types, and public types.
+ * local (non-public) types, and public types.
* @param root
* @param packageName package name containing type to install breakpoint in, example "a.b.c"
* @param cuName simple compilation unit name within package, example "Something.java"
* @param fullTargetName - see below
- * @param access whether to suspend on access
+ * @param access whether to suspend on access
* @param modification whether to suspend on modification
* @return a watchpoint
* @throws Exception
* @throws CoreException
- *
+ *
* <p>
* <pre>
* Syntax example:
@@ -1988,17 +1988,17 @@
* {
* Object anon = new Object(){
* int anIntField;
- * String anonTypeMethod() {return "an Example";}
+ * String anonTypeMethod() {return "an Example";}
* }
* }
* }
* }</pre>
* </p>
- * To get the anonymous toString, syntax of fullTargetName would be: <code>Foo$Inner$aMethod()V$1$anIntField</code>
+ * To get the anonymous toString, syntax of fullTargetName would be: <code>Foo$Inner$aMethod()V$1$anIntField</code>
*/
- protected IJavaWatchpoint createNestedTypeWatchPoint(String root, String packageName, String cuName,
+ protected IJavaWatchpoint createNestedTypeWatchPoint(String root, String packageName, String cuName,
String fullTargetName, boolean access, boolean modification) throws Exception, CoreException {
-
+
ICompilationUnit cunit = getCompilationUnit(getProjectContext(), root, packageName, cuName);
IField field = (IField)getMember(cunit,fullTargetName);
assertNotNull("Path to field is not valid", field); //$NON-NLS-1$
@@ -2006,27 +2006,27 @@
IType type = (IType)field.getParent();
return createWatchpoint(type, field.getElementName(), access, modification);
}
-
+
/**
* Creates a watchpoint in a fully specified type (potentially non public).
- *
+ *
* @param packageName package name containing type to install breakpoint in, example "a.b.c"
* @param cuName simple compilation unit name within package, example "Something.java"
* @param typeName $ qualified type name within compilation unit, example "Something" or
* "NonPublic" or "Something$Inner"
* @param fieldName name of the field
- * @param access whether to suspend on access
+ * @param access whether to suspend on access
* @param modification whether to suspend on modification
- */
+ */
protected IJavaWatchpoint createWatchpoint(String packageName, String cuName, String typeName, String fieldName, boolean access, boolean modification) throws Exception {
IType type = getType(packageName, cuName, typeName);
return createWatchpoint(type, fieldName, access, modification);
}
-
+
/**
* Creates a watchpoint on the specified field.
- *
+ *
* @param type type containing the field
* @param fieldName name of the field
* @param access whether to suspend on access
@@ -2043,8 +2043,8 @@
wp.setModification(modification);
forceDeltas(wp);
return wp;
- }
-
+ }
+
/**
* Terminates the given thread and removes its launch
*/
@@ -2053,10 +2053,10 @@
terminateAndRemove((IJavaDebugTarget)thread.getDebugTarget());
}
}
-
+
/**
* Terminates the given debug target and removes its launch.
- *
+ *
* NOTE: all breakpoints are removed, all threads are resumed, and then
* the target is terminated. This avoids defunct processes on Linux.
*/
@@ -2066,7 +2066,7 @@
if (!(debugTarget.isTerminated() || debugTarget.isDisconnected())) {
IPreferenceStore jdiUIPreferences = JDIDebugUIPlugin.getDefault().getPreferenceStore();
jdiUIPreferences.setValue(IJDIPreferencesConstants.PREF_SUSPEND_ON_UNCAUGHT_EXCEPTIONS, false);
-
+
DebugEventWaiter waiter = new DebugElementEventWaiter(DebugEvent.TERMINATE, debugTarget);
try {
removeAllBreakpoints();
@@ -2091,7 +2091,7 @@
DebugPlugin.getDefault().fireDebugEventSet(new DebugEvent[]{new DebugEvent(this, DebugEvent.MODEL_SPECIFIC)});
waiter.waitForEvent();
}
-
+
/**
* Deletes all existing breakpoints
*/
@@ -2102,11 +2102,11 @@
} catch (CoreException e) {
}
}
-
+
/**
* Returns the first breakpoint the given thread is suspended
* at, or <code>null</code> if none.
- *
+ *
* @return the first breakpoint the given thread is suspended
* at, or <code>null</code> if none
*/
@@ -2117,11 +2117,11 @@
}
return null;
}
-
+
/**
* Evaluates the given snippet in the context of the given stack frame and returns
* the result.
- *
+ *
* @param snippet code snippet
* @param frame stack frame context
* @return evaluation result
@@ -2129,11 +2129,11 @@
protected IEvaluationResult evaluate(String snippet, IJavaStackFrame frame) throws Exception {
DebugEventWaiter waiter= new DebugElementKindEventWaiter(DebugEvent.SUSPEND, IJavaThread.class);
waiter.setTimeout(DEFAULT_TIMEOUT);
-
+
IAstEvaluationEngine engine = EvaluationManager.newAstEvaluationEngine(getProjectContext(), (IJavaDebugTarget)frame.getDebugTarget());
try {
engine.evaluate(snippet, frame, this, DebugEvent.EVALUATION, true);
-
+
Object suspendee= waiter.waitForEvent();
setEventSet(waiter.getEventSet());
if(suspendee == null) {
@@ -2145,8 +2145,8 @@
finally {
engine.dispose();
}
- }
-
+ }
+
/**
* Runs an evaluation using an embedded listener and the {@link #DEFAULT_TIMEOUT} for the operation
* @param snippet the snippet to evaluate
@@ -2179,7 +2179,7 @@
engine.dispose();
}
}
-
+
/**
* @see IEvaluationListener#evaluationComplete(IEvaluationResult)
*/
@@ -2187,96 +2187,96 @@
public void evaluationComplete(IEvaluationResult result) {
fEvaluationResult = result;
}
-
+
/**
* Performs a step over in the given stack frame and returns when complete.
- *
+ *
* @param frame stack frame to step in
*/
protected IJavaThread stepOver(IJavaStackFrame frame) throws Exception {
DebugEventWaiter waiter= new DebugElementKindEventDetailWaiter(DebugEvent.SUSPEND, IJavaThread.class, DebugEvent.STEP_END);
waiter.setTimeout(DEFAULT_TIMEOUT);
-
+
frame.stepOver();
-
+
Object suspendee= waiter.waitForEvent();
setEventSet(waiter.getEventSet());
assertNotNull("Program did not suspend.", suspendee); //$NON-NLS-1$
return (IJavaThread) suspendee;
}
-
+
/**
* Performs a step over in the given stack frame and returns when a breakpoint is hit.
- *
+ *
* @param frame stack frame to step in
*/
protected IJavaThread stepOverToBreakpoint(IJavaStackFrame frame) throws Exception {
DebugEventWaiter waiter= new DebugElementKindEventDetailWaiter(DebugEvent.SUSPEND, IJavaThread.class, DebugEvent.BREAKPOINT);
waiter.setTimeout(DEFAULT_TIMEOUT);
-
+
frame.stepOver();
-
+
Object suspendee= waiter.waitForEvent();
setEventSet(waiter.getEventSet());
assertNotNull("Program did not suspend.", suspendee); //$NON-NLS-1$
return (IJavaThread) suspendee;
- }
+ }
/**
* Performs a step into in the given stack frame and returns when complete.
- *
+ *
* @param frame stack frame to step in
*/
protected IJavaThread stepInto(IJavaStackFrame frame) throws Exception {
DebugEventWaiter waiter= new DebugElementKindEventDetailWaiter(DebugEvent.SUSPEND, IJavaThread.class, DebugEvent.STEP_END);
waiter.setTimeout(DEFAULT_TIMEOUT);
-
+
frame.stepInto();
-
+
Object suspendee= waiter.waitForEvent();
setEventSet(waiter.getEventSet());
assertNotNull("Program did not suspend.", suspendee); //$NON-NLS-1$
- return (IJavaThread) suspendee;
+ return (IJavaThread) suspendee;
}
-
+
/**
* Performs a step return in the given stack frame and returns when complete.
- *
+ *
* @param frame stack frame to step return from
*/
protected IJavaThread stepReturn(IJavaStackFrame frame) throws Exception {
DebugEventWaiter waiter= new DebugElementKindEventDetailWaiter(DebugEvent.SUSPEND, IJavaThread.class, DebugEvent.STEP_END);
waiter.setTimeout(DEFAULT_TIMEOUT);
-
+
frame.stepReturn();
-
+
Object suspendee= waiter.waitForEvent();
setEventSet(waiter.getEventSet());
assertNotNull("Program did not suspend.", suspendee); //$NON-NLS-1$
return (IJavaThread) suspendee;
- }
-
+ }
+
/**
* Performs a step into with filters in the given stack frame and returns when
* complete.
- *
+ *
* @param frame stack frame to step in
*/
protected IJavaThread stepIntoWithFilters(IJavaStackFrame frame) throws Exception {
return stepIntoWithFilters(frame, true);
}
-
+
/**
* Performs a step into with filters in the given stack frame and returns when
* complete.
- *
+ *
* @param whether to step thru or step return from a filtered location
* @param frame stack frame to step in
*/
protected IJavaThread stepIntoWithFilters(IJavaStackFrame frame, boolean stepThru) throws Exception {
DebugEventWaiter waiter= new DebugElementKindEventWaiter(DebugEvent.SUSPEND, IJavaThread.class);
waiter.setTimeout(DEFAULT_TIMEOUT);
-
+
// turn filters on
IJavaDebugTarget target = (IJavaDebugTarget) frame.getDebugTarget();
try {
@@ -2295,18 +2295,18 @@
target.setStepThruFilters(true);
}
return null;
- }
+ }
/**
* Performs a step return with filters in the given stack frame and returns when
* complete.
- *
+ *
* @param frame stack frame to step in
*/
protected IJavaThread stepReturnWithFilters(IJavaStackFrame frame) throws Exception {
DebugEventWaiter waiter= new DebugElementKindEventWaiter(DebugEvent.SUSPEND, IJavaThread.class);
waiter.setTimeout(DEFAULT_TIMEOUT);
-
+
// turn filters on
IJavaDebugTarget target = (IJavaDebugTarget) frame.getDebugTarget();
try {
@@ -2318,24 +2318,24 @@
// turn filters off
target.setStepFiltersEnabled(false);
}
-
-
+
+
Object suspendee= waiter.waitForEvent();
setEventSet(waiter.getEventSet());
assertNotNull("Program did not suspend.", suspendee); //$NON-NLS-1$
- return (IJavaThread) suspendee;
- }
-
+ return (IJavaThread) suspendee;
+ }
+
/**
* Performs a step over with filters in the given stack frame and returns when
* complete.
- *
+ *
* @param frame stack frame to step in
*/
protected IJavaThread stepOverWithFilters(IJavaStackFrame frame) throws Exception {
DebugEventWaiter waiter= new DebugElementKindEventWaiter(DebugEvent.SUSPEND, IJavaThread.class);
waiter.setTimeout(DEFAULT_TIMEOUT);
-
+
// turn filters on
IJavaDebugTarget target = (IJavaDebugTarget) frame.getDebugTarget();
try {
@@ -2347,17 +2347,17 @@
// turn filters off
target.setStepFiltersEnabled(false);
}
-
-
+
+
Object suspendee= waiter.waitForEvent();
setEventSet(waiter.getEventSet());
assertNotNull("Program did not suspend.", suspendee); //$NON-NLS-1$
- return (IJavaThread) suspendee;
+ return (IJavaThread) suspendee;
}
/**
* Returns the compilation unit with the given name.
- *
+ *
* @param project the project containing the CU
* @param root the name of the source folder in the project
* @param pkg the name of the package (empty string for default package)
@@ -2369,7 +2369,7 @@
IResource r = p.getFolder(root);
return project.getPackageFragmentRoot(r).getPackageFragment(pkg).getCompilationUnit(name);
}
-
+
/**
* Wait for builds to complete
*/
@@ -2386,9 +2386,9 @@
wasInterrupted = true;
}
} while (wasInterrupted);
- }
-
-
+ }
+
+
/**
* Finds the specified variable within the context of the specified stackframe. Returns null if a variable with
* the given name does not exist
@@ -2423,7 +2423,7 @@
}
return variable;
}
-
+
/**
* Returns if the local filesystem is case-sensitive or not
* @return true if the local filesystem is case-sensitive, false otherwise
@@ -2431,14 +2431,14 @@
protected boolean isFileSystemCaseSensitive() {
return Platform.OS_MACOSX.equals(Platform.getOS()) ? false : new File("a").compareTo(new File("A")) != 0; //$NON-NLS-1$ //$NON-NLS-2$
}
-
+
/**
* Creates a shared launch configuration for the type with the given name.
*/
protected ILaunchConfiguration createLaunchConfiguration(String mainTypeName) throws Exception {
return createLaunchConfiguration(getProjectContext(), mainTypeName);
}
-
+
/**
* Creates a shared launch configuration for the type with the given name.
*/
@@ -2459,7 +2459,7 @@
map.put(IJavaLaunchConfigurationConstants.ATTR_JAVA_COMMAND, JAVA);
config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_TYPE_SPECIFIC_ATTRS_MAP, map);
return config.doSave();
- }
+ }
/**
* Creates a shared launch configuration for the type with the given name.
@@ -2482,7 +2482,7 @@
config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_TYPE_SPECIFIC_ATTRS_MAP, map);
return config.doSave();
}
-
+
/**
* When a test throws the 'try again' exception, try it again.
* @see junit.framework.TestCase#runBare()
@@ -2523,11 +2523,11 @@
}
}
}
-
+
/**
* Opens and returns an editor on the given file or <code>null</code>
* if none. The editor will be activated.
- *
+ *
* @param file
* @return editor or <code>null</code>
*/
@@ -2554,14 +2554,14 @@
job.join();
return parts[0];
}
-
+
/**
* Opens the {@link IDebugView} with the given id, does nothing if no such view exists.
* This method can return <code>null</code>
- *
+ *
* @param viewId
* @return the handle to the {@link IDebugView} with the given id
- * @throws PartInitException
+ * @throws PartInitException
* @throws InterruptedException
* @since 3.8.100
*/
@@ -2590,7 +2590,7 @@
}
return null;
}
-
+
/**
* Opens a debug view
* @param viewId
@@ -2607,11 +2607,11 @@
}
return null;
}
-
+
/**
* Toggles a breakpoint in the editor at the given line number returning the breakpoint
* or <code>null</code> if none.
- *
+ *
* @param editor
* @param lineNumber
* @return returns the created breakpoint or <code>null</code> if none.
@@ -2653,7 +2653,7 @@
manager.removeBreakpointListener(listener);
return breakpoints[0];
}
-
+
/**
* Closes all editors in the active workbench page.
*/
@@ -2668,11 +2668,11 @@
Display display = DebugUIPlugin.getStandardDisplay();
display.syncExec(closeAll);
}
-
+
/**
* Returns the version level of the class files being run, based on the system property <code>java.class.version</code>
* @return the version level of the class files being run in the current VM
- *
+ *
* @since 3.6
*/
protected String getClassFileVersion() {
@@ -2685,11 +2685,11 @@
}
return JavaCore.VERSION_1_6;
}
-
+
/**
* Determines if the test should be attempted again based on the error code.
* See bug 297071.
- *
+ *
* @param e Debug Exception
* @throws TestAgainException
* @throws DebugException
@@ -2704,7 +2704,7 @@
}
throw e;
}
-
+
/**
* Perform the actual evaluation (inspect)
* @param thread
@@ -2714,12 +2714,12 @@
protected IValue doEval(IJavaThread thread, String snippet) throws Exception{
class Listener implements IEvaluationListener {
IEvaluationResult fResult;
-
+
@Override
public void evaluationComplete(IEvaluationResult result) {
fResult= result;
}
-
+
public IEvaluationResult getResult() {
return fResult;
}
@@ -2746,6 +2746,6 @@
engine.dispose();
}
}
-
+
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/AutomatedSuite.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/AutomatedSuite.java
index 294d34d..be248dc 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/AutomatedSuite.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/AutomatedSuite.java
@@ -133,7 +133,7 @@
* Tests for integration and nightly builds.
*/
public class AutomatedSuite extends DebugSuite {
-
+
/**
* Returns the suite. This is required to
* use the JUnit Launcher.
@@ -148,9 +148,9 @@
*/
public AutomatedSuite() {
addTest(new TestSuite(ProjectCreationDecorator.class));
-
+
//Launching tests
-
+
addTest(new TestSuite(LaunchModeTests.class));
addTest(new TestSuite(LaunchDelegateTests.class));
addTest(new TestSuite(LaunchShortcutTests.class));
@@ -164,12 +164,12 @@
addTest(new TestSuite(LaunchConfigurationManagerTests.class));
addTest(new TestSuite(LaunchConfigurationTests.class));
addTest(new TestSuite(ProjectClasspathVariableTests.class));
-
+
//mac specific tests
if(Platform.OS_MACOSX.equals(Platform.getOS())) {
addTest(new TestSuite(PListParserTests.class));
}
-
+
//Breakpoints tests
addTest(new TestSuite(TypeNameBreakpointTests.class));
addTest(new TestSuite(DeferredBreakpointTests.class));
@@ -205,7 +205,7 @@
addTest(new TestSuite(DetailFormatterTests.class));
addTest(new TestSuite(AlternateStratumTests.class));
}
-
+
//Sourcelookup tests
addTest(new TestSuite(SourceLookupTests.class));
addTest(new TestSuite(FolderSourceContainerTests.class));
@@ -220,7 +220,7 @@
addTest(new TestSuite(SourceLocationTests.class));
addTest(new TestSuite(TypeResolutionTests.class));
addTest(new TestSuite(JarSourceLookupTests.class));
-
+
// Variable tests
addTest(new TestSuite(InstanceVariableTests.class));
addTest(new TestSuite(LocalVariableTests.class));
@@ -232,7 +232,7 @@
if(JavaProjectHelper.isJava7Compatible()) {
addTest(new TestSuite(LiteralTests17.class));
}
-
+
//Stepping tests
addTest(new TestSuite(StepFilterTests.class));
addTest(new TestSuite(StepIntoSelectionTests.class));
@@ -240,7 +240,7 @@
if (JavaProjectHelper.isJava6Compatible()) {
addTest(new TestSuite(ForceReturnTests.class));
}
-
+
//Classpath tests
addTest(new TestSuite(JavaLibraryPathTests.class));
addTest(new TestSuite(ClasspathVariableTests.class));
@@ -249,7 +249,7 @@
addTest(new TestSuite(ClasspathProviderTests.class));
addTest(new TestSuite(BootpathTests.class));
addTest(new TestSuite(EEDefinitionTests.class));
-
+
//VM Install/Environment tests
addTest(new TestSuite(VMInstallTests.class));
addTest(new TestSuite(StringSubstitutionTests.class));
@@ -274,7 +274,7 @@
addTest(new TestSuite(StratumTests.class));
addTest(new TestSuite(JavaDebugTargetTests.class));
addTest(new TestSuite(WorkingDirectoryTests.class));
-
+
// Refactoring tests
//TODO: project rename
//TODO: package move
@@ -302,29 +302,29 @@
//addTest(new TestSuite(ConvertPublicAnonymousTypeToNestedUnitTests.class));
//addTest(new TestSuite(ConvertInnerAnonymousTypeToNestedUnitTests.class));
//addTest(new TestSuite(ConvertNonPublicAnonymousTypeToNestedUnitTests.class));
-
+
// JDWP tests
addTest(new TestSuite(JDWPTests.class));
addTest(new TestSuite(MultipleConnectionsTest.class));
// Refresh state tests
addTest(new TestSuite(RefreshStateTests.class));
-
+
// HCR tests are last - they modify resources
addTest(new TestSuite(HcrTests.class));
-
+
// Layout tests
addTest(new TestSuite(ViewManagementTests.class));
-
+
// Leak tests
addTest(new TestSuite(InstructionPointerTests.class));
-
+
// Variables View Detail Pane tests
addTest(DetailPaneManagerTests.suite());
addTest(new TestSuite(ModelPresentationTests.class));
// Open from Clipboard action tests - Need to use #suite() because the test has a custom setup
addTest(OpenFromClipboardTests.suite());
-
+
//add the complete eval suite
addTest(new TestSuite(GeneralEvalTests.class));
//addTest(EvalTestSuite.suite());
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/DebugSuite.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/DebugSuite.java
index 3ca96e3..7c4345a 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/DebugSuite.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/DebugSuite.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -22,7 +22,7 @@
* Debug test suite framework that runs test in a non UI thread.
*/
public abstract class DebugSuite extends TestSuite {
-
+
/**
* Flag that indicates test are in progress
*/
@@ -34,7 +34,7 @@
*/
public DebugSuite() {
}
-
+
/**
* Runs the tests and collects their result in a TestResult.
* The debug tests cannot be run in the UI thread or the event
@@ -55,7 +55,7 @@
}
Test test= e.nextElement();
runTest(test, result);
- }
+ }
fTesting = false;
display.wake();
}
@@ -65,7 +65,7 @@
} catch (Exception e) {
e.printStackTrace();
}
-
+
while (fTesting) {
try {
if (!display.readAndDispatch()) {
@@ -73,8 +73,8 @@
}
} catch (Throwable e) {
e.printStackTrace();
- }
- }
+ }
+ }
}
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/EvalTestSuite.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/EvalTestSuite.java
index 414aeac..7cd7ae8 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/EvalTestSuite.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/EvalTestSuite.java
@@ -4,11 +4,11 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* This is an implementation of an early-draft specification developed under the Java
* Community Process (JCP) and is made available for testing and evaluation purposes
* only. The code is not compatible with any specification of the JCP.
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Jesper S. Møller - bug 422029: [1.8] Enable debug evaluation support for default methods
@@ -141,7 +141,7 @@
addTest(new TestSuite(TestsNestedTypes2.class));
addTest(new TestSuite(TestsTypeHierarchy1.class));
addTest(new TestSuite(TestsTypeHierarchy2.class));
-
+
// Extended evaluation tests
addTest(new TestSuite(BooleanOperatorsTests.class));
addTest(new TestSuite(ByteOperatorsTests.class));
@@ -224,18 +224,18 @@
addTest(new TestSuite(TypeHierarchy_68_3.class));
addTest(new TestSuite(TypeHierarchy_119_1.class));
addTest(new TestSuite(TypeHierarchy_146_1.class));
-
+
addTest(new TestSuite(TestsNumberLiteral.class));
addTest(new TestSuite(VariableDeclarationTests.class));
addTest(new TestSuite(LoopTests.class));
addTest(new TestSuite(LabelTests.class));
addTest(new TestSuite(TestsAnonymousClassVariable.class));
-
+
addTest(new TestSuite(TestsBreakpointConditions.class));
}
-
+
/**
* Runs the tests and collects their result in a TestResult.
* The debug tests cannot be run in the UI thread or the event
@@ -255,7 +255,7 @@
break;
}
runTest(e.nextElement(), result);
- }
+ }
fTesting = false;
display.wake();
}
@@ -265,7 +265,7 @@
} catch (Exception e) {
e.printStackTrace();
}
-
+
while (fTesting) {
try {
if (!display.readAndDispatch()) {
@@ -273,8 +273,8 @@
}
} catch (Throwable e) {
e.printStackTrace();
- }
- }
+ }
+ }
}
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ManualSuite.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ManualSuite.java
index d9a35fb..6b51e91 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ManualSuite.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ManualSuite.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -24,7 +24,7 @@
* automated tests.
*/
public class ManualSuite extends TestSuite {
-
+
/**
* Flag that indicates test are in progress
*/
@@ -44,7 +44,7 @@
*/
public ManualSuite() {
addTest(new TestSuite(ProjectCreationDecorator.class));
-
+
/**
* This test appears in the manual suite as wee need to be able to specify ports
* and security settings to make sure the client can connect
@@ -52,7 +52,7 @@
addTest(new TestSuite(RemoteJavaApplicationTests.class));
}
-
+
/**
* Runs the tests and collects their result in a TestResult.
* The debug tests cannot be run in the UI thread or the event
@@ -73,7 +73,7 @@
}
Test test= e.nextElement();
runTest(test, result);
- }
+ }
fTesting = false;
display.wake();
}
@@ -83,7 +83,7 @@
} catch (Exception e) {
e.printStackTrace();
}
-
+
while (fTesting) {
try {
if (!display.readAndDispatch()) {
@@ -91,8 +91,8 @@
}
} catch (Throwable e) {
e.printStackTrace();
- }
- }
+ }
+ }
}
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/PerformanceSuite.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/PerformanceSuite.java
index 91c4ddd..d37c7d3 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/PerformanceSuite.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/PerformanceSuite.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ProjectCreationDecorator.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ProjectCreationDecorator.java
index 08d07c2..ed12c13 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ProjectCreationDecorator.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ProjectCreationDecorator.java
@@ -40,17 +40,17 @@
public ProjectCreationDecorator() {
super("Project creation decorator tests");
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jdt.debug.tests.AbstractDebugTest#getProjectContext()
*/
@Override
protected IJavaProject getProjectContext() {
return get14Project();
- }
-
+ }
+
/**
- *
+ *
*/
public void testPerspectiveSwtich() {
DebugUIPlugin.getStandardDisplay().syncExec(new Runnable() {
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/TestAgainException.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/TestAgainException.java
index b8767df..25125bf 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/TestAgainException.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/TestAgainException.java
@@ -12,7 +12,7 @@
/**
* Exception to indicate a test should be run again when it fails.
- *
+ *
* @since 3.3
*/
public class TestAgainException extends RuntimeException {
@@ -26,7 +26,7 @@
}
/**
- * Generated serial version id
+ * Generated serial version id
*/
private static final long serialVersionUID = 1848804390493463729L;
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/VerticalRulerInfoStub.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/VerticalRulerInfoStub.java
index 57b62e2..758e4d9 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/VerticalRulerInfoStub.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/VerticalRulerInfoStub.java
@@ -14,12 +14,12 @@
import org.eclipse.swt.widgets.Control;
/**
- *
+ *
*/
public class VerticalRulerInfoStub implements IVerticalRulerInfo {
-
+
private int fLineNumber = -1;
-
+
public VerticalRulerInfoStub(int line) {
fLineNumber = line;
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/AbstractBreakpointWorkingSetTest.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/AbstractBreakpointWorkingSetTest.java
index 3453a03..51f2f01 100755
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/AbstractBreakpointWorkingSetTest.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/AbstractBreakpointWorkingSetTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -19,7 +19,7 @@
/**
* Common code for breakpoint working set tests.
- *
+ *
* @since 3.2
*/
public abstract class AbstractBreakpointWorkingSetTest extends AbstractDebugTest {
@@ -31,11 +31,11 @@
public AbstractBreakpointWorkingSetTest(String name) {
super(name);
}
-
+
/**
* Creates and returns a breakpoint working set with the given name if not
* already in existence.
- *
+ *
* @param name working set name
*/
protected IWorkingSet createSet(String name) {
@@ -51,7 +51,7 @@
/**
* Retruns the working set manager.
- *
+ *
* @return working set manager
*/
protected IWorkingSetManager getWorkingSetManager() {
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/AbstractToggleBreakpointsTarget.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/AbstractToggleBreakpointsTarget.java
index fa67722..9a07b6f 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/AbstractToggleBreakpointsTarget.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/AbstractToggleBreakpointsTarget.java
@@ -37,9 +37,9 @@
* Tests the Java debugger's 'toggle breakpoints target'.
*/
public abstract class AbstractToggleBreakpointsTarget extends AbstractDebugTest {
-
+
class Listener implements IBreakpointListener {
-
+
List<IBreakpoint> added = new ArrayList<IBreakpoint>();
List<IBreakpoint> removed = new ArrayList<IBreakpoint>();
@@ -62,7 +62,7 @@
@Override
public void breakpointChanged(IBreakpoint breakpoint, IMarkerDelta delta) {
}
-
+
public IBreakpoint getAdded() throws Exception {
synchronized (added) {
if (added.isEmpty()) {
@@ -72,7 +72,7 @@
assertFalse("Breakpoint not added", added.isEmpty());
return added.get(0);
}
-
+
public boolean isEmpty() throws Exception{
synchronized (added) {
if (added.isEmpty()) {
@@ -83,7 +83,7 @@
return false;
}
-
+
public IBreakpoint getRemoved() throws Exception {
synchronized (removed) {
if (removed.isEmpty()) {
@@ -93,18 +93,18 @@
assertFalse("Breakpoint not removed", removed.isEmpty());
return removed.get(0);
}
-
-
+
+
}
public AbstractToggleBreakpointsTarget(String name) {
super(name);
}
-
-
+
+
/**
* Opens an editor on the given external file and toggles a breakpoint.
- *
+ *
* @param externalFile path to external file in the test plug-in
* @param line line number (1 based)
* @throws Exception on failure
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/BreakpointFieldLocator.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/BreakpointFieldLocator.java
index 4ab5c19..9242b10 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/BreakpointFieldLocator.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/BreakpointFieldLocator.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -29,11 +29,11 @@
* Compute the name of field declared at a given position from an JDOM CompilationUnit.
*/
public class BreakpointFieldLocator extends ASTVisitor {
-
+
private int fPosition;
-
+
private String fTypeName;
-
+
private String fFieldName;
private boolean fFound;
@@ -62,7 +62,7 @@
public String getTypeName() {
return fTypeName;
}
-
+
private boolean containsPosition(ASTNode node) {
int startPosition= node.getStartPosition();
int endPosition = startPosition + node.getLength();
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/BreakpointListenerTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/BreakpointListenerTests.java
index 08eedd5..fc33a1f 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/BreakpointListenerTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/BreakpointListenerTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -28,9 +28,9 @@
* Tests breakpoint creation/deletion and listener interfaces.
*/
public class BreakpointListenerTests extends AbstractDebugTest implements IBreakpointListener, IBreakpointsListener {
-
+
/**
- * the number of add callbacks
+ * the number of add callbacks
*/
public int fAddCallbacks = 0;
/**
@@ -53,7 +53,7 @@
* the total changed
*/
public int fTotalChanged = 0;
-
+
/**
* Constructor
* @param name
@@ -66,16 +66,16 @@
waitForBuild();
fAddCallbacks = 0;
fTotalAdded = 0;
-
+
fRemoveCallbacks = 0;
fTotalRemoved = 0;
-
+
fChangeCallabcks = 0;
- fTotalChanged = 0;
+ fTotalChanged = 0;
}
/**
* Creates sample breakpoints
- *
+ *
* @return List
*/
protected List<IJavaLineBreakpoint> createBreakpoints(String typeName) throws Exception {
@@ -104,7 +104,7 @@
bps.add(createUnregisteredLineBreakpoint(72, typeName));
// instance method
bps.add(createUnregisteredLineBreakpoint(107, typeName));
- // static method
+ // static method
bps.add(createUnregisteredLineBreakpoint(53, typeName));
// case statement
bps.add(createUnregisteredLineBreakpoint(133, typeName));
@@ -118,7 +118,7 @@
bps.add(createUnregisteredLineBreakpoint(118, typeName));
// while
bps.add(createUnregisteredLineBreakpoint(97, typeName));
-
+
return bps;
}
@@ -126,84 +126,84 @@
* Tests a single breakpoint listener
* @throws Exception
*/
- public void testSingleListener() throws Exception {
+ public void testSingleListener() throws Exception {
List<IJavaLineBreakpoint> bps = createBreakpoints("Breakpoints");
-
+
try {
- getBreakpointManager().addBreakpointListener((IBreakpointListener)this);
-
+ getBreakpointManager().addBreakpointListener((IBreakpointListener)this);
+
resetCallbacks();
getBreakpointManager().addBreakpoints(bps.toArray(new IBreakpoint[bps.size()]));
assertEquals("Should have received individual add notifications", bps.size(), fAddCallbacks);
assertEquals("Number of breakpoints added incorrect", bps.size(), fTotalAdded);
//assertEquals("Should be change callbacks for IMarker.MESSAGE updates", bps.size(), fChangeCallabcks);
assertEquals("Should be no removes", 0, fRemoveCallbacks);
-
+
resetCallbacks();
getBreakpointManager().removeBreakpoints(bps.toArray(new IBreakpoint[bps.size()]), true);
assertEquals("Should have received individual remove notifications", bps.size(), fRemoveCallbacks);
assertEquals("Should of breakpoints removed incorrect", bps.size(), fTotalRemoved);
assertEquals("Should be no changes", 0, fChangeCallabcks);
assertEquals("Should be no additions", 0, fAddCallbacks);
-
+
} finally {
getBreakpointManager().removeBreakpointListener((IBreakpointListener)this);
removeAllBreakpoints();
}
-
+
}
-
+
/**
* Tests more than one simultaneous breakpoint listener
* @throws Exception
*/
- public void testMultiListener() throws Exception {
+ public void testMultiListener() throws Exception {
List<IJavaLineBreakpoint> bps = createBreakpoints("Breakpoints");
-
+
try {
- getBreakpointManager().addBreakpointListener((IBreakpointsListener)this);
-
+ getBreakpointManager().addBreakpointListener((IBreakpointsListener)this);
+
resetCallbacks();
getBreakpointManager().addBreakpoints(bps.toArray(new IBreakpoint[bps.size()]));
assertEquals("Should have received one add notification", 1, fAddCallbacks);
assertEquals("Number of breakpoints added incorrect", bps.size(), fTotalAdded);
//assertEquals("Should be 1 change for IMarker.MESSAGE update", 1, fChangeCallabcks);
assertEquals("Should be no removes", 0, fRemoveCallbacks);
-
+
resetCallbacks();
getBreakpointManager().removeBreakpoints(bps.toArray(new IBreakpoint[bps.size()]), true);
assertEquals("Should have received one remove notification", 1, fRemoveCallbacks);
assertEquals("Should of breakpoints removed incorrect", bps.size(), fTotalRemoved);
assertEquals("Should be no changes", 0, fChangeCallabcks);
assertEquals("Should be no additions", 0, fAddCallbacks);
-
+
} finally {
getBreakpointManager().removeBreakpointListener((IBreakpointsListener)this);
removeAllBreakpoints();
}
-
- }
-
+
+ }
+
/**
* Test multiple breakpoint listeners over a project open and close
* @throws Exception
*/
- public void testMultiListenerProjectCloseOpen() throws Exception {
+ public void testMultiListenerProjectCloseOpen() throws Exception {
List<IJavaLineBreakpoint> bps = createBreakpoints("Breakpoints");
-
+
try {
// close all editors before closing project: @see bug 204023
closeAllEditors();
-
- getBreakpointManager().addBreakpointListener((IBreakpointsListener)this);
-
+
+ getBreakpointManager().addBreakpointListener((IBreakpointsListener)this);
+
resetCallbacks();
getBreakpointManager().addBreakpoints(bps.toArray(new IBreakpoint[bps.size()]));
assertEquals("Should have received one add notification", 1, fAddCallbacks);
assertEquals("Number of breakpoints added incorrect", bps.size(), fTotalAdded);
//assertEquals("Should be 1 change for IMarker.MESSAGE update", 1, fChangeCallabcks);
assertEquals("Should be no removes", 0, fRemoveCallbacks);
-
+
resetCallbacks();
get14Project().getProject().close(null);
waitForBuild();
@@ -211,28 +211,28 @@
assertEquals("Should of breakpoints removed incorrect", bps.size(), fTotalRemoved);
assertEquals("Should be no changes", 0, fChangeCallabcks);
assertEquals("Should be no additions", 0, fAddCallbacks);
-
+
resetCallbacks();
get14Project().getProject().open(null);
waitForBuild();
assertEquals("Should have received one add notification", 1, fAddCallbacks);
assertEquals("Number of breakpoints added incorrect", bps.size(), fTotalAdded);
assertEquals("Should be no changes", 0, fChangeCallabcks);
- assertEquals("Should be no removes", 0, fRemoveCallbacks);
-
+ assertEquals("Should be no removes", 0, fRemoveCallbacks);
+
} finally {
get14Project().getProject().open(null);
getBreakpointManager().removeBreakpointListener((IBreakpointsListener)this);
removeAllBreakpoints();
}
-
- }
+
+ }
/**
* Tests multiple breakpoint listeners over a compilation move operation
* @throws Exception
*/
- public void testMultiListenerMoveCompilationUnit() throws Exception {
+ public void testMultiListenerMoveCompilationUnit() throws Exception {
IJavaProject project = get14Project();
ICompilationUnit cu = (ICompilationUnit)project.findElement(new Path("Breakpoints.java"));
assertNotNull("Did not find compilation unit", cu);
@@ -241,10 +241,10 @@
List<IJavaLineBreakpoint> bps = createBreakpoints("BreakpointsCopyA");
cu = (ICompilationUnit)project.findElement(new Path("BreakpointsCopyA.java"));
assertNotNull("Did not find compilation unit copy", cu);
-
+
try {
- getBreakpointManager().addBreakpointListener((IBreakpointsListener)this);
-
+ getBreakpointManager().addBreakpointListener((IBreakpointsListener)this);
+
resetCallbacks();
getBreakpointManager().addBreakpoints(bps.toArray(new IBreakpoint[bps.size()]));
waitForBuild();
@@ -252,7 +252,7 @@
assertEquals("Number of breakpoints added incorrect", bps.size(), fTotalAdded);
//assertEquals("Should be 1 change callback for IMarker.MESSAGE update", 1, fChangeCallabcks);
assertEquals("Should be no removes", 0, fRemoveCallbacks);
-
+
resetCallbacks();
cu.rename("BreakpointsCopyTwoA.java", false, null);
waitForBuild();
@@ -260,24 +260,24 @@
assertEquals("Number of breakpoints removed incorrect", bps.size(), fTotalRemoved);
assertEquals("Should be no changes", 0, fChangeCallabcks);
assertEquals("Should be no additions", 0, fAddCallbacks);
-
+
cu = (ICompilationUnit)project.findElement(new Path("BreakpointsCopyTwoA.java"));
assertNotNull("Did not find CU", cu);
cu.delete(false, null);
waitForBuild();
-
+
} finally {
getBreakpointManager().removeBreakpointListener((IBreakpointsListener)this);
removeAllBreakpoints();
}
-
- }
-
+
+ }
+
/**
* Tests a single breakpoint listener over the move of a compilation unit
* @throws Exception
*/
- public void testSingleListenerMoveCompilationUnit() throws Exception {
+ public void testSingleListenerMoveCompilationUnit() throws Exception {
IJavaProject project = get14Project();
ICompilationUnit cu = (ICompilationUnit)project.findElement(new Path("Breakpoints.java"));
assertNotNull("Did not find compilation unit", cu);
@@ -286,10 +286,10 @@
List<IJavaLineBreakpoint> bps = createBreakpoints("BreakpointsCopy");
cu = (ICompilationUnit)project.findElement(new Path("BreakpointsCopy.java"));
assertNotNull("Did not find compilation unit copy", cu);
-
+
try {
- getBreakpointManager().addBreakpointListener((IBreakpointListener)this);
-
+ getBreakpointManager().addBreakpointListener((IBreakpointListener)this);
+
resetCallbacks();
getBreakpointManager().addBreakpoints(bps.toArray(new IBreakpoint[bps.size()]));
waitForBuild();
@@ -297,7 +297,7 @@
assertEquals("Number of breakpoints added incorrect", bps.size(), fTotalAdded);
//assertEquals("Should be no changes", 0, fChangeCallabcks);
assertEquals("Should be no removes", 0, fRemoveCallbacks);
-
+
resetCallbacks();
cu.rename("BreakpointsCopyTwo.java", false, null);
waitForBuild();
@@ -305,23 +305,23 @@
assertEquals("Incorrect number of breakpoints removed", bps.size(), fTotalRemoved);
assertEquals("Should be no changes", 0, fChangeCallabcks);
assertEquals("Should be no additions", 0, fAddCallbacks);
-
+
cu = (ICompilationUnit)project.findElement(new Path("BreakpointsCopyTwo.java"));
- assertNotNull("Did not find CU", cu);
+ assertNotNull("Did not find CU", cu);
cu.delete(false, null);
waitForBuild();
-
+
} finally {
getBreakpointManager().removeBreakpointListener((IBreakpointListener)this);
removeAllBreakpoints();
}
-
- }
+
+ }
/**
* Creates and returns a line breakpoint at the given line number in the type with the
* given name, that is <b>not</b> registered with the breakpoint manager.
- *
+ *
* @param lineNumber line number
* @param typeName type name
*/
@@ -362,7 +362,7 @@
@Override
public void breakpointsAdded(IBreakpoint[] breakpoints) {
fAddCallbacks++;
- fTotalAdded += breakpoints.length;
+ fTotalAdded += breakpoints.length;
}
/**
@@ -380,6 +380,6 @@
@Override
public void breakpointsRemoved(IBreakpoint[] breakpoints, IMarkerDelta[] deltas) {
fRemoveCallbacks++;
- fTotalRemoved += breakpoints.length;
+ fTotalRemoved += breakpoints.length;
}
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/BreakpointLocationVerificationTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/BreakpointLocationVerificationTests.java
index 6aa2be2..a3f9983 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/BreakpointLocationVerificationTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/BreakpointLocationVerificationTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -25,7 +25,7 @@
* Tests breakpoint location locator.
*/
public class BreakpointLocationVerificationTests extends AbstractDebugTest {
-
+
/**
* Constructor
* @param name
@@ -47,7 +47,7 @@
parser.setResolveBindings(true);
return (CompilationUnit) parser.createAST(null);
}
-
+
/**
* Tests that the predefined location is locatable in the specified type
* @param lineToTry
@@ -58,7 +58,7 @@
private void testLocation(int lineToTry, int expectedLineNumber, String expectedTypeName) throws JavaModelException {
testLocation(lineToTry, expectedLineNumber, expectedTypeName, expectedTypeName, false);
}
-
+
/**
* Tests that the predefined location is locatable in the specified type
* @param lineToTry
@@ -74,7 +74,7 @@
CompilationUnit compilationUnit= parseCompilationUnit(type.getCompilationUnit());
ValidBreakpointLocationLocator locator= new ValidBreakpointLocationLocator(compilationUnit, lineToTry, true, bestmatch);
compilationUnit.accept(locator);
- int lineNumber= locator.getLineLocation();
+ int lineNumber= locator.getLineLocation();
assertEquals("Wrong line number", expectedLineNumber, lineNumber);
String typeName= locator.getFullyQualifiedTypeName();
if (typeName != null) {
@@ -89,101 +89,101 @@
/**
* Tests setting a line breakpoint on a final field that is initialized
- *
+ *
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=376354
- *
+ *
* @throws Exception
*/
public void testFinalFieldWithTypeDecl() throws Exception {
testLocation(14, 14, "FinalBreakpointLocations");
}
-
+
/**
* Tests setting a line breakpoint on a final field that is initialized looking for best match
- *
+ *
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=376354
- *
+ *
* @throws Exception
*/
public void testFinalFieldWithTypeDecla() throws Exception {
testLocation(14, 14, "FinalBreakpointLocations", "FinalBreakpointLocations", true);
}
-
+
/**
- * Tests setting a line breakpoint on an inner type member for the initializer of
+ * Tests setting a line breakpoint on an inner type member for the initializer of
* a final local field variable
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=376354
- *
+ *
* @throws Exception
*/
public void testFinalFieldWithTypeDecl3() throws Exception {
testLocation(17, 17, "FinalBreakpointLocations");
}
-
+
/**
* Tests setting a line breakpoint on an inner type member for the initializer of looking
- * for best match
+ * for best match
* a final local field variable
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=376354
- *
+ *
* @throws Exception
*/
public void testFinalFieldWithTypeDecl3a() throws Exception {
testLocation(17, 17, "FinalBreakpointLocations", "FinalBreakpointLocations", true);
}
-
+
/**
- * Tests setting a line breakpoint on an inner-inner type member for the initializer of
+ * Tests setting a line breakpoint on an inner-inner type member for the initializer of
* a final local field variable
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=376354
- *
+ *
* @throws Exception
*/
public void testFinalFieldWithTypeDecl4() throws Exception {
testLocation(20, 20, "FinalBreakpointLocations");
}
-
+
/**
- * Tests setting a line breakpoint on an inner-inner type member for the initializer of
+ * Tests setting a line breakpoint on an inner-inner type member for the initializer of
* a final local field variable looking for best match
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=376354
- *
+ *
* @throws Exception
*/
public void testFinalFieldWithTypeDecl4a() throws Exception {
testLocation(20, 20, "FinalBreakpointLocations", "FinalBreakpointLocations", true);
}
-
+
/**
* Tests setting a line breakpoint on a final field that has not been initialized
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=376354
- *
+ *
* @throws Exception
*/
public void testFinalFieldWithTypeDecl5() throws Exception {
testLocation(27, 30, "FinalBreakpointLocations");
}
-
+
/**
* Tests setting a line breakpoint on a final field that has not been initialized looking
* for best match
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=376354
- *
+ *
* @throws Exception
*/
public void testFinalFieldWithTypeDecl5a() throws Exception {
testLocation(27, 30, "FinalBreakpointLocations", "FinalBreakpointLocations", true);
}
-
+
/**
* Test line before type declaration
- *
+ *
* @throws Exception
*/
public void testLineBeforeTypeDeclaration() throws Exception {
testLocation(9, 18, "BreakpointsLocation");
}
-
+
/**
* Tests a specific breakpoint location
* @throws Exception
@@ -191,7 +191,7 @@
public void testLineMethodSignature() throws Exception {
testLocation(32, 33, "BreakpointsLocation");
}
-
+
/**
* Tests a specific breakpoint location
* @throws Exception
@@ -199,7 +199,7 @@
public void testLineInInnerType() throws Exception {
testLocation(25, 25, "BreakpointsLocation.InnerClass");
}
-
+
/**
* Tests a specific breakpoint location
* @throws Exception
@@ -207,7 +207,7 @@
public void testLineInAnnonymousType() throws Exception {
testLocation(39, 39, "BreakpointsLocation");
}
-
+
/**
* Tests a specific breakpoint location
* @throws Exception
@@ -217,7 +217,7 @@
testLocation(82, -1, "BreakpointsLocation");
// ******************************
}
-
+
/**
* Tests a specific breakpoint location
* @throws Exception
@@ -225,7 +225,7 @@
public void testLineVariableDeclarationWithAssigment() throws Exception {
testLocation(43, 46, "BreakpointsLocation");
}
-
+
/**
* Tests that a breakpoint is not set on a final field
* @throws Exception
@@ -233,16 +233,16 @@
public void testFieldLocationOnFinalField() throws Exception {
testLocation(13, 13, "org.eclipse.debug.tests.targets.BreakpointsLocationBug344984");
}
-
+
/**
- * Tests that a breakpoint is not set on a final field looking
+ * Tests that a breakpoint is not set on a final field looking
* for best match
* @throws Exception
*/
public void testFieldLocationOnFinalFielda() throws Exception {
testLocation(13, 13, "org.eclipse.debug.tests.targets.BreakpointsLocationBug344984", "org.eclipse.debug.tests.targets.BreakpointsLocationBug344984", true);
}
-
+
/**
* Tests a specific breakpoint location
* @throws Exception
@@ -250,7 +250,7 @@
public void testEmptyLabel() throws Exception {
testLocation(15, 16, "LabelTest");
}
-
+
/**
* Tests a specific breakpoint location
* @throws Exception
@@ -258,7 +258,7 @@
public void testNestedEmptyLabels() throws Exception {
testLocation(19, 21, "LabelTest");
}
-
+
/**
* Tests a specific breakpoint location
* @throws Exception
@@ -266,7 +266,7 @@
public void testLabelWithCode() throws Exception {
testLocation(21, 21, "LabelTest");
}
-
+
/**
* Tests a specific breakpoint location
* @throws Exception
@@ -274,7 +274,7 @@
public void testLineFieldDeclarationWithAssigment() throws Exception {
testLocation(51, 55, "BreakpointsLocation");
}
-
+
/**
* Tests a specific breakpoint location
* @throws Exception
@@ -282,7 +282,7 @@
public void testLineExpressionReplacedByConstant1() throws Exception {
testLocation(62, 62, "BreakpointsLocation");
}
-
+
/**
* Tests a specific breakpoint location
* @throws Exception
@@ -290,7 +290,7 @@
public void testLineExpressionReplacedByConstant2() throws Exception {
testLocation(64, 62, "BreakpointsLocation");
}
-
+
/**
* Tests a specific breakpoint location
* @throws Exception
@@ -298,7 +298,7 @@
public void testLineExpressionNotReplacedByConstant1() throws Exception {
testLocation(70, 70, "BreakpointsLocation");
}
-
+
/**
* Tests a specific breakpoint location
* @throws Exception
@@ -306,7 +306,7 @@
public void testLineExpressionNotReplacedByConstant2() throws Exception {
testLocation(72, 72, "BreakpointsLocation");
}
-
+
/**
* Tests a specific breakpoint location
* @throws Exception
@@ -314,7 +314,7 @@
public void testLineLitteral1() throws Exception {
testLocation(46, 46, "BreakpointsLocation");
}
-
+
/**
* Tests a specific breakpoint location
* @throws Exception
@@ -322,7 +322,7 @@
public void testLineLitteral2() throws Exception {
testLocation(55, 55, "BreakpointsLocation");
}
-
+
/**
* Tests a specific breakpoint location
* @throws Exception
@@ -358,7 +358,7 @@
String typeName= locator.getTypeName();
assertEquals("Wrong Type Name", expectedTypeName, typeName);
}
-
+
/**
* Tests that a specific filed is at the correct location
* @throws Exception
@@ -366,7 +366,7 @@
public void testFieldLocationOnField() throws Exception {
testField(30, 20, "fList", "BreakpointsLocation");
}
-
+
/**
* Tests that a specific filed is at the correct location
* @throws Exception
@@ -374,7 +374,7 @@
public void testFieldLocationNotOnField() throws Exception {
testField(33, 18, null, null);
}
-
+
/**
* Tests that a specific method is locatable in the specified type at the given offset and line
* @param line
@@ -399,7 +399,7 @@
String methodSignature= locator.getMethodSignature();
assertEquals("Wrong method signature", expectedMethodSignature, methodSignature);
}
-
+
/**
* Tests that a specific method is locatable in a specific location
* @throws Exception
@@ -407,7 +407,7 @@
public void testMethodOnSignature() throws Exception {
testMethod(17, 20, "test1", "BreakpointsLocation", "()V");
}
-
+
/**
* Tests that a specific method is locatable in a specific location
* @throws Exception
@@ -415,7 +415,7 @@
public void testMethodOnCode() throws Exception {
testMethod(19, 17, "test1", "BreakpointsLocation", "()V");
}
-
+
/**
* Tests that a specific method is locatable in a specific location
* @throws Exception
@@ -423,7 +423,7 @@
public void testMethodNotOnMethod() throws Exception {
testMethod(30, 1, null, null, null);
}
-
+
/**
* Tests that a specific method is locatable in a specific location
* @throws Exception
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/BreakpointMethodLocator.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/BreakpointMethodLocator.java
index 05b4251..c77c93a 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/BreakpointMethodLocator.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/BreakpointMethodLocator.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -32,13 +32,13 @@
* Compute the name of field declared at a given position from an JDOM CompilationUnit.
*/
public class BreakpointMethodLocator extends ASTVisitor {
-
+
private int fPosition;
-
+
private String fTypeName;
-
+
private String fMethodName;
-
+
private String fMethodSignature;
private boolean fFound;
@@ -80,13 +80,13 @@
public String getTypeName() {
return fTypeName;
}
-
+
private boolean containsPosition(ASTNode node) {
int startPosition= node.getStartPosition();
int endPosition = startPosition + node.getLength();
return startPosition <= fPosition && fPosition <= endPosition;
}
-
+
private String computeMethodSignature(MethodDeclaration node) {
if (node.getExtraDimensions() != 0 || Modifier.isAbstract(node.getModifiers())) {
return null;
@@ -112,7 +112,7 @@
}
return signature.toString();
}
-
+
private void appendTypeLetter(StringBuffer signature, PrimitiveType type) {
PrimitiveType.Code code= type.getPrimitiveTypeCode();
if (code == PrimitiveType.BYTE) {
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/BreakpointWorkingSetTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/BreakpointWorkingSetTests.java
index 5e5e517..02f2d5a 100755
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/BreakpointWorkingSetTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/BreakpointWorkingSetTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -26,7 +26,7 @@
/**
* Tests adding breakpoints and automatic addition to working sets.
- *
+ *
* @since 3.2
*/
public class BreakpointWorkingSetTests extends AbstractBreakpointWorkingSetTest {
@@ -57,7 +57,7 @@
getWorkingSetManager().removeWorkingSet(set);
}
}
-
+
/**
* Tests adding a breakpoint with no default working set
* @throws Exception
@@ -74,14 +74,14 @@
removeAllBreakpoints();
getWorkingSetManager().removeWorkingSet(set);
}
- }
-
+ }
+
/**
* Tests that we can have N working set shown in the view and add additional breakpoints
* to the default ones without causing exceptions
- *
+ *
* In this test we have to open / show the view to cause the insert update to occur
- *
+ *
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=380614
* @throws Exception
* @since 3.8.100
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/ConditionalBreakpointsTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/ConditionalBreakpointsTests.java
index 17209a9..581cde2 100755
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/ConditionalBreakpointsTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/ConditionalBreakpointsTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -23,7 +23,7 @@
* Tests conditional breakpoints.
*/
public class ConditionalBreakpointsTests extends AbstractDebugTest {
-
+
/**
* Constructor
* @param name
@@ -39,7 +39,7 @@
public void testSimpleConditionalBreakpoint() throws Exception {
String typeName = "HitCountLooper";
IJavaLineBreakpoint bp = createConditionalLineBreakpoint(16, typeName, "i == 3", true);
-
+
IJavaThread thread= null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -47,17 +47,17 @@
IJavaStackFrame frame = (IJavaStackFrame)thread.getTopStackFrame();
IVariable var = findVariable(frame, "i");
assertNotNull("Could not find variable 'i'", var);
-
+
IJavaPrimitiveValue value = (IJavaPrimitiveValue)var.getValue();
assertNotNull("variable 'i' has no value", value);
int iValue = value.getIntValue();
assertTrue("value of 'i' should be '3', but was " + iValue, iValue == 3);
-
+
bp.delete();
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
/**
@@ -67,7 +67,7 @@
public void testStaticMethodCallConditionalBreakpoint() throws Exception {
String typeName = "HitCountLooper";
IJavaLineBreakpoint bp = createConditionalLineBreakpoint(16, typeName, "ArgumentsTests.fact(i) == 24", true);
-
+
IJavaThread thread= null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -75,17 +75,17 @@
IJavaStackFrame frame = (IJavaStackFrame)thread.getTopStackFrame();
IVariable var = findVariable(frame, "i");
assertNotNull("Could not find variable 'i'", var);
-
+
IJavaPrimitiveValue value = (IJavaPrimitiveValue)var.getValue();
assertNotNull("variable 'i' has no value", value);
int iValue = value.getIntValue();
assertTrue("value of 'i' should be '4', but was " + iValue, iValue == 4);
-
+
bp.delete();
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
/**
@@ -95,7 +95,7 @@
public void testSimpleConditionalBreakpointSuspendOnChange() throws Exception {
String typeName = "HitCountLooper";
IJavaLineBreakpoint bp = createConditionalLineBreakpoint(16, typeName, "i != 9", false);
-
+
IJavaThread thread= null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -103,28 +103,28 @@
IJavaStackFrame frame = (IJavaStackFrame)thread.getTopStackFrame();
IVariable var = findVariable(frame, "i");
assertNotNull("Could not find variable 'i'", var);
-
+
IJavaPrimitiveValue value = (IJavaPrimitiveValue)var.getValue();
assertNotNull("variable 'i' has no value", value);
int iValue = value.getIntValue();
assertEquals(0, iValue);
-
+
resumeToLineBreakpoint(thread, bp);
-
+
frame = (IJavaStackFrame)thread.getTopStackFrame();
var = findVariable(frame, "i");
assertNotNull("Could not find variable 'i'", var);
-
+
value = (IJavaPrimitiveValue)var.getValue();
assertNotNull("variable 'i' has no value", value);
iValue = value.getIntValue();
assertEquals(9, iValue);
-
+
bp.delete();
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
/**
@@ -135,7 +135,7 @@
String typeName = "ConditionalStepReturn";
IJavaLineBreakpoint lineBreakpoint = createLineBreakpoint(17, typeName);
createConditionalLineBreakpoint(18, typeName, "!bool", true);
-
+
IJavaThread thread= null;
try {
thread= launchToLineBreakpoint(typeName, lineBreakpoint);
@@ -146,20 +146,20 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
/**
* Tests a breakpoint condition *is* evaluated when it coincides with a step end.
* See bug 265714.
- *
+ *
* @throws Exception
*/
public void testEvalConditionOnStep() throws Exception {
String typeName = "HitCountLooper";
IJavaLineBreakpoint bp = createLineBreakpoint(16, typeName);
IJavaLineBreakpoint bp2 = createConditionalLineBreakpoint(17, typeName, "i = 3; return true;", true);
-
+
IJavaThread thread= null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -168,35 +168,35 @@
IJavaStackFrame frame = (IJavaStackFrame)thread.getTopStackFrame();
IVariable var = findVariable(frame, "i");
assertNotNull("Could not find variable 'i'", var);
-
+
IJavaPrimitiveValue value = (IJavaPrimitiveValue)var.getValue();
assertNotNull("variable 'i' has no value", value);
int iValue = value.getIntValue();
assertEquals("'i' has wrong value", 3, iValue);
-
+
// breakpoint should still be available from thread, even though not eval'd
IBreakpoint[] breakpoints = thread.getBreakpoints();
assertEquals("Wrong number of breakpoints", 1, breakpoints.length);
assertEquals("Wrong breakpoint", bp2, breakpoints[0]);
-
+
bp.delete();
bp2.delete();
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
/**
* Tests that a thread can be suspended when executing a long-running condition.
- *
+ *
* @throws Exception
*/
public void testSuspendLongRunningCondition() throws Exception {
String typeName = "MethodLoop";
IJavaLineBreakpoint first = createLineBreakpoint(19, typeName);
createConditionalLineBreakpoint(29, typeName, "for (int x = 0; x < 1000; x++) { System.out.println(x);} Thread.sleep(200); return true;", true);
-
+
IJavaThread thread= null;
try {
thread= launchToLineBreakpoint(typeName, first);
@@ -212,13 +212,13 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Tests that a conditional breakpoint with an expression that will hit a breakpoint
* will complete the conditional expression evaluation (bug 269231).
- *
+ *
* @throws Exception
*/
public void testConditionalExpressionIgnoresBreakpoint() throws Exception {
@@ -235,9 +235,9 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=401270
* @throws Exception
@@ -245,7 +245,7 @@
public void testConditionalMultiInfix1() throws Exception {
String typeName = "ConditionalStepReturn";
createConditionalLineBreakpoint(17, typeName, "(true==true==true==true==true)", true);
-
+
IJavaThread thread= null;
try {
thread = launchToBreakpoint(typeName);
@@ -253,9 +253,9 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=401270
* @throws Exception
@@ -263,7 +263,7 @@
public void testConditionalMultiInfix2() throws Exception {
String typeName = "ConditionalStepReturn";
createConditionalLineBreakpoint(17, typeName, "!(true==true==true==true==true)", false);
-
+
IJavaThread thread= null;
try {
thread = launchToBreakpoint(typeName);
@@ -271,9 +271,9 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=401270
* @throws Exception
@@ -281,7 +281,7 @@
public void testConditionalMultiInfix3() throws Exception {
String typeName = "ConditionalStepReturn";
createConditionalLineBreakpoint(17, typeName, "(true&&true&&true&&true&&true)", true);
-
+
IJavaThread thread= null;
try {
thread = launchToBreakpoint(typeName);
@@ -289,9 +289,9 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=401270
* @throws Exception
@@ -299,7 +299,7 @@
public void testConditionalMultiInfix4() throws Exception {
String typeName = "ConditionalStepReturn";
createConditionalLineBreakpoint(17, typeName, "!(true&&true&&true&&true&&true)", false);
-
+
IJavaThread thread= null;
try {
thread = launchToBreakpoint(typeName);
@@ -307,9 +307,9 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=401270
* @throws Exception
@@ -317,7 +317,7 @@
public void testConditionalMultiInfix5() throws Exception {
String typeName = "ConditionalStepReturn";
createConditionalLineBreakpoint(17, typeName, "true&&true||false", true);
-
+
IJavaThread thread= null;
try {
thread = launchToBreakpoint(typeName);
@@ -325,9 +325,9 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=401270
* @throws Exception
@@ -335,7 +335,7 @@
public void testConditionalMultiInfix6() throws Exception {
String typeName = "ConditionalStepReturn";
createConditionalLineBreakpoint(17, typeName, "(1<=2==true||false)", true);
-
+
IJavaThread thread= null;
try {
thread = launchToBreakpoint(typeName);
@@ -343,9 +343,9 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=401270
* @throws Exception
@@ -353,7 +353,7 @@
public void testConditionalMultiInfix7() throws Exception {
String typeName = "ConditionalStepReturn";
createConditionalLineBreakpoint(17, typeName, "!(1<=2==true||false)", false);
-
+
IJavaThread thread= null;
try {
thread = launchToBreakpoint(typeName);
@@ -361,9 +361,9 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=401270
* @throws Exception
@@ -371,7 +371,7 @@
public void testConditionalMultiInfix8() throws Exception {
String typeName = "ConditionalStepReturn";
createConditionalLineBreakpoint(17, typeName, "(true != false && false)", false);
-
+
IJavaThread thread= null;
try {
thread = launchToBreakpoint(typeName);
@@ -379,9 +379,9 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=401270
* @throws Exception
@@ -389,7 +389,7 @@
public void testConditionalMultiInfix9() throws Exception {
String typeName = "ConditionalStepReturn";
createConditionalLineBreakpoint(17, typeName, "!(true != false && false)", true);
-
+
IJavaThread thread= null;
try {
thread = launchToBreakpoint(typeName);
@@ -397,9 +397,9 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=401270
* @throws Exception
@@ -407,7 +407,7 @@
public void testConditionalMultiInfix10() throws Exception {
String typeName = "ConditionalStepReturn";
createConditionalLineBreakpoint(17, typeName, "(true||true||true||true||true)", true);
-
+
IJavaThread thread= null;
try {
thread = launchToBreakpoint(typeName);
@@ -415,9 +415,9 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=401270
* @throws Exception
@@ -425,7 +425,7 @@
public void testConditionalMultiInfix11() throws Exception {
String typeName = "ConditionalStepReturn";
createConditionalLineBreakpoint(17, typeName, "!(true||true||true||true||true)", false);
-
+
IJavaThread thread= null;
try {
thread = launchToBreakpoint(typeName);
@@ -433,9 +433,9 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=401270
* @throws Exception
@@ -443,7 +443,7 @@
public void testConditionalMultiInfix12() throws Exception {
String typeName = "ConditionalStepReturn";
createConditionalLineBreakpoint(17, typeName, "(true==true||true!=true&&true)", true);
-
+
IJavaThread thread= null;
try {
thread = launchToBreakpoint(typeName);
@@ -451,9 +451,9 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=401270
* @throws Exception
@@ -461,7 +461,7 @@
public void testConditionalMultiInfix13() throws Exception {
String typeName = "ConditionalStepReturn";
createConditionalLineBreakpoint(17, typeName, "!(true==true||true!=true&&true)", false);
-
+
IJavaThread thread= null;
try {
thread = launchToBreakpoint(typeName);
@@ -469,12 +469,12 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
/**
* Tests a breakpoint with a simple systrace Launch should don't suspend for simple systrace
- *
+ *
* @throws Exception
*/
public void testSystracelBreakpoint() throws Exception {
@@ -496,7 +496,7 @@
/**
* Tests a breakpoint with a simple code which returns Integer Object, Launch should don't suspend for non true boolean returns
- *
+ *
* @throws Exception
*/
public void testConditionBreakpointReturnNonBooleanObject() throws Exception {
@@ -518,7 +518,7 @@
/**
* Tests a breakpoint with a simple code which returns Boolean Object with true, Launch should suspend for true Boolean returns
- *
+ *
* @throws Exception
*/
public void testConditionBreakpointReturnBooleanObjectTrue() throws Exception {
@@ -539,7 +539,7 @@
/**
* Tests a breakpoint with a simple code which returns Boolean Object with false, Launch should not suspend for false Boolean returns
- *
+ *
* @throws Exception
*/
public void testConditionBreakpointReturnBooleanObjectFalse() throws Exception {
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/ConditionalBreakpointsWithGenerics.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/ConditionalBreakpointsWithGenerics.java
index d3872e1..68d4138 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/ConditionalBreakpointsWithGenerics.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/ConditionalBreakpointsWithGenerics.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Jesper Steen Moller - initial API and implementation, adapted from
* Stefan Mandels contribution in bug 341232, and existing debug tests
@@ -21,7 +21,7 @@
* Tests conditional breakpoints.
*/
public class ConditionalBreakpointsWithGenerics extends AbstractDebugTest {
-
+
/**
* Constructor
* @param name
@@ -41,7 +41,7 @@
/**
* Tests a breakpoint with a simple condition does not cause errors
* multiple use of the same generic type 'T'
- *
+ *
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=341232
* @throws Exception
*/
@@ -51,20 +51,20 @@
createConditionalLineBreakpoint(33, typeName, "false", true);
createConditionalLineBreakpoint(44, typeName, "false", true);
ILineBreakpoint bp = createConditionalLineBreakpoint(56, innerTypeName, "true", true);
-
+
IJavaThread thread= null;
try {
thread= launchToLineBreakpoint(typeName, bp); // If compiled correctly, this will jump over bp1-bp3 !!
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Tests a breakpoint with a simple condition does not cause errors
* with many inner types with generics
- *
+ *
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=341232
* @throws Exception
*/
@@ -81,11 +81,11 @@
removeAllBreakpoints();
}
}
-
+
/**
* Tests a breakpoint with a simple condition does not cause errors
* with many inner types with generics
- *
+ *
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=341232
* @throws Exception
*/
@@ -102,11 +102,11 @@
removeAllBreakpoints();
}
}
-
+
/**
* Tests a breakpoint with a simple condition does not cause errors
* with many inner types with generics
- *
+ *
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=341232
* @throws Exception
*/
@@ -123,11 +123,11 @@
removeAllBreakpoints();
}
}
-
+
/**
* Tests a breakpoint with a simple condition does not cause errors
* with multiple generic types 'T', 'E', 'K'
- *
+ *
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=341232
* @throws Exception
*/
@@ -144,11 +144,11 @@
removeAllBreakpoints();
}
}
-
+
/**
* Tests a breakpoint with a simple condition does not cause errors
* with multiple generic types 'T', 'E', 'K'
- *
+ *
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=341232
* @throws Exception
*/
@@ -165,10 +165,10 @@
removeAllBreakpoints();
}
}
-
+
/**
* Tests a breakpoint with a condition that includes generics
- *
+ *
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=341232
* @throws Exception
*/
@@ -188,11 +188,11 @@
removeAllBreakpoints();
}
}
-
+
/**
* Tests a breakpoint with a generified condition in a type that includes
* duplicate generic declarations
- *
+ *
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=341232
* @throws Exception
*/
@@ -211,10 +211,10 @@
removeAllBreakpoints();
}
}
-
+
/**
* Tests a breakpoint with a condition that includes generics from nested classes
- *
+ *
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=341232
* @throws Exception
*/
@@ -236,10 +236,10 @@
removeAllBreakpoints();
}
}
-
+
/**
* Tests a breakpoint with a condition that includes generics from nested classes
- *
+ *
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=403028
* @throws Exception
*/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/DeferredBreakpointTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/DeferredBreakpointTests.java
index 90b3f63..d65f6ca 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/DeferredBreakpointTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/DeferredBreakpointTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -28,7 +28,7 @@
* Tests deferred breakpoints.
*/
public class DeferredBreakpointTests extends AbstractDebugTest {
-
+
/**
* Constructor
* @param name
@@ -57,7 +57,7 @@
22, // inner class
72, // return true
107, // instance method
- 53, // static method
+ 53, // static method
133, // case statement
140, // default statement
146, // synchronized blocks
@@ -66,7 +66,7 @@
97 // while
};
createBreakpoints(typeName, bps, lines);
-
+
IJavaThread thread= null;
try {
// do not register launch - see bug 130911
@@ -90,9 +90,9 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
private void createBreakpoints(String typeName, List<IBreakpoint> breakpoints, int[] lineNumbers) throws Exception {
IType type = get14Project().findType(typeName);
assertNotNull(type);
@@ -114,14 +114,14 @@
String typeName = "Breakpoints";
ILineBreakpoint bp = createLineBreakpoint(52, typeName);
bp.setEnabled(false);
-
+
IJavaDebugTarget debugTarget = null;
try {
debugTarget= launchAndTerminate(typeName);
} finally {
terminateAndRemove(debugTarget);
removeAllBreakpoints();
- }
+ }
}
/**
@@ -132,7 +132,7 @@
String typeName = "HitCountLooper";
ILineBreakpoint bp = createLineBreakpoint(16, typeName);
bp.setEnabled(true);
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -141,9 +141,9 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Tests skipping a single line breakpoint
* @throws Exception
@@ -152,7 +152,7 @@
String typeName = "Breakpoints";
ILineBreakpoint bp = createLineBreakpoint(52, typeName);
createLineBreakpoint(54, typeName);
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -162,6 +162,6 @@
terminateAndRemove(thread);
removeAllBreakpoints();
getBreakpointManager().setEnabled(true);
- }
+ }
}
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/ExceptionBreakpointTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/ExceptionBreakpointTests.java
index d06926f..0a9aa61 100755
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/ExceptionBreakpointTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/ExceptionBreakpointTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -23,7 +23,7 @@
*/
public class ExceptionBreakpointTests extends AbstractDebugTest {
-
+
/**
* Constructor
* @param name the name of the test
@@ -38,13 +38,13 @@
*/
public void testCaughtException() throws Exception {
String typeName = "ThrowsException";
- IJavaExceptionBreakpoint ex = createExceptionBreakpoint("TestException", true, false);
-
+ IJavaExceptionBreakpoint ex = createExceptionBreakpoint("TestException", true, false);
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
IBreakpoint hit = getBreakpoint(thread);
assertNotNull("suspended, but not by breakpoint", hit);
assertEquals("suspended, but not by exception breakpoint", ex ,hit);
@@ -52,22 +52,22 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* tests that breakpoint suspends on uncaught exceptions
* @throws Exception
*/
public void testUncaughtException() throws Exception {
String typeName = "HitCountException";
- IJavaExceptionBreakpoint ex = createExceptionBreakpoint("java.lang.NullPointerException", false, true);
-
+ IJavaExceptionBreakpoint ex = createExceptionBreakpoint("java.lang.NullPointerException", false, true);
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
IBreakpoint hit = getBreakpoint(thread);
assertNotNull("suspended, but not by breakpoint", hit);
assertEquals("suspended, but not by exception breakpoint", ex ,hit);
@@ -77,18 +77,18 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
- *
+ *
* @throws Exception
*/
public void testDisabledCaughtException() throws Exception {
String typeName = "ThrowsNPE";
- IJavaExceptionBreakpoint ex = createExceptionBreakpoint("java.lang.NullPointerException", true, false);
+ IJavaExceptionBreakpoint ex = createExceptionBreakpoint("java.lang.NullPointerException", true, false);
ex.setEnabled(false);
-
+
IJavaDebugTarget debugTarget= null;
try {
debugTarget= launchAndTerminate(typeName);
@@ -96,18 +96,18 @@
} finally {
terminateAndRemove(debugTarget);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
- * tests that the breakpoint does not suspend for disabled breakpoint set for uncaught exceptions
+ * tests that the breakpoint does not suspend for disabled breakpoint set for uncaught exceptions
* @throws Exception
*/
public void testDisabledUncaughtNPE() throws Exception {
String typeName = "MultiThreadedException";
- IJavaExceptionBreakpoint ex = createExceptionBreakpoint("java.lang.NullPointerException", false, true);
+ IJavaExceptionBreakpoint ex = createExceptionBreakpoint("java.lang.NullPointerException", false, true);
ex.setEnabled(false);
-
+
IJavaDebugTarget debugTarget= null;
try {
debugTarget= launchAndTerminate(typeName);
@@ -115,23 +115,23 @@
} finally {
terminateAndRemove(debugTarget);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* tests that the breakpoint will only suspend on a breakpoint in the inclusion filters
* @throws Exception
*/
public void testInclusiveScopedException() throws Exception {
String typeName = "ThrowsException";
- IJavaExceptionBreakpoint ex = createExceptionBreakpoint("TestException", true, false);
+ IJavaExceptionBreakpoint ex = createExceptionBreakpoint("TestException", true, false);
ex.setInclusionFilters(new String[] {"ThrowsException"});
-
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
IBreakpoint hit = getBreakpoint(thread);
assertNotNull("suspended, but not by breakpoint", hit);
assertEquals("suspended, but not by exception breakpoint", ex ,hit);
@@ -139,7 +139,7 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
/**
@@ -148,9 +148,9 @@
*/
public void testExclusiveScopedException() throws Exception {
String typeName = "ThrowsException";
- IJavaExceptionBreakpoint ex = createExceptionBreakpoint("TestException", true, false);
+ IJavaExceptionBreakpoint ex = createExceptionBreakpoint("TestException", true, false);
ex.setExclusionFilters(new String[] {"ThrowsException"});
-
+
IJavaDebugTarget debugTarget = null;
try {
debugTarget = launchAndTerminate(typeName);
@@ -158,7 +158,7 @@
} finally {
terminateAndRemove(debugTarget);
removeAllBreakpoints();
- }
+ }
}
/**
@@ -167,22 +167,22 @@
*/
public void testHitCountException() throws Exception {
String typeName = "HitCountException";
- IJavaExceptionBreakpoint ex = createExceptionBreakpoint("java.lang.NullPointerException", true, true);
+ IJavaExceptionBreakpoint ex = createExceptionBreakpoint("java.lang.NullPointerException", true, true);
ex.setHitCount(2);
-
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
IJavaStackFrame frame= (IJavaStackFrame)thread.getTopStackFrame();
assertEquals("Should have been suspended at linenumber", 35, frame.getLineNumber());
-
+
ex.delete();
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* tests that the breakpoint will suspend at an NPE with more than one exclusion filter, just not suspend in either
* of the classes for the exclusion filter
@@ -190,9 +190,9 @@
*/
public void testMultiExclusiveScopedExceptionHit() throws Exception {
String typeName = "ThrowsNPE";
- IJavaExceptionBreakpoint ex = createExceptionBreakpoint("java.lang.NullPointerException", true, false);
+ IJavaExceptionBreakpoint ex = createExceptionBreakpoint("java.lang.NullPointerException", true, false);
ex.setExclusionFilters(new String[] {"TestIO", "Breakpoints"});
-
+
IJavaThread thread = null;
try {
thread = launchToBreakpoint(typeName);
@@ -202,18 +202,18 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
/**
* tests that the breakpoint does not suspend for multiple exclusion filters
* @throws Exception
*/
public void testMultiExclusiveScopedExceptionMissed() throws Exception {
String typeName = "ThrowsException";
- IJavaExceptionBreakpoint ex = createExceptionBreakpoint("TestException", true, false);
+ IJavaExceptionBreakpoint ex = createExceptionBreakpoint("TestException", true, false);
ex.setExclusionFilters(new String[] {"ThrowsException2", "ThrowsException"});
-
+
IJavaDebugTarget target= null;
try {
target = launchAndTerminate(typeName);
@@ -221,18 +221,18 @@
} finally {
terminateAndRemove(target);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
/**
* tests that a breakpoint is hit with multiple inclusion filters set
* @throws Exception
*/
public void testMultiInclusiveScopedExceptionHit() throws Exception {
String typeName = "ThrowsNPE";
- IJavaExceptionBreakpoint ex = createExceptionBreakpoint("java.lang.NullPointerException", true, false);
+ IJavaExceptionBreakpoint ex = createExceptionBreakpoint("java.lang.NullPointerException", true, false);
ex.setInclusionFilters(new String[] {"ThrowsNPE", "Breakpoints"});
-
+
IJavaThread thread = null;
try {
thread = launchToBreakpoint(typeName);
@@ -242,18 +242,18 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
/**
* tests that the breakpoint does not suspend with multiple inclusion filters
* @throws Exception
*/
public void testMultiInclusiveScopedExceptionMissed() throws Exception {
String typeName = "ThrowsNPE";
- IJavaExceptionBreakpoint ex = createExceptionBreakpoint("java.lang.NullPointerException", true, false);
+ IJavaExceptionBreakpoint ex = createExceptionBreakpoint("java.lang.NullPointerException", true, false);
ex.setInclusionFilters(new String[] {"TestIO", "Breakpoints"});
-
+
IJavaDebugTarget target= null;
try {
target = launchAndTerminate(typeName);
@@ -261,19 +261,19 @@
} finally {
terminateAndRemove(target);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
/**
* test that breakpoint suspends with multi inclusion and exclusion filters
* @throws Exception
*/
public void testMultiInclusiveExclusiveScopedExceptionHit() throws Exception {
String typeName = "ThrowsNPE";
- IJavaExceptionBreakpoint ex = createExceptionBreakpoint("java.lang.NullPointerException", true, false);
+ IJavaExceptionBreakpoint ex = createExceptionBreakpoint("java.lang.NullPointerException", true, false);
ex.setInclusionFilters(new String[] {"ThrowsNPE", "Breakpoints"});
ex.setExclusionFilters(new String[] {"HitCountException", "MethodLoop"});
-
+
IJavaThread thread = null;
try {
thread = launchToBreakpoint(typeName);
@@ -283,19 +283,19 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
/**
* tests that breakpoint does not suspend with multi inclusion and exclusion filters
* @throws Exception
*/
public void testMultiInclusiveExclusiveScopedExceptionMissed() throws Exception {
String typeName = "ThrowsNPE";
- IJavaExceptionBreakpoint ex = createExceptionBreakpoint("java.lang.NullPointerException", true, false);
+ IJavaExceptionBreakpoint ex = createExceptionBreakpoint("java.lang.NullPointerException", true, false);
ex.setInclusionFilters(new String[] {"TestIO", "Breakpoints"});
ex.setExclusionFilters(new String[] {"ThrowsNPE", "MethodLoop"});
-
+
IJavaDebugTarget target= null;
try {
target = launchAndTerminate(typeName);
@@ -303,29 +303,29 @@
} finally {
terminateAndRemove(target);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* tests that breakpoint is skipped when told to do so
* @throws Exception
*/
public void testSkipExceptionBreakpoint() throws Exception {
String typeName = "ThrowsNPE";
- createExceptionBreakpoint("java.lang.NullPointerException", true, false);
+ createExceptionBreakpoint("java.lang.NullPointerException", true, false);
IJavaLineBreakpoint lineBreakpoint = createLineBreakpoint(15, typeName);
-
+
IJavaThread thread= null;
try {
thread= launchToLineBreakpoint(typeName, lineBreakpoint);
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
getBreakpointManager().setEnabled(false);
resumeAndExit(thread);
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
getBreakpointManager().setEnabled(true);
- }
- }
+ }
+ }
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/HitCountBreakpointsTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/HitCountBreakpointsTests.java
index b625ea0..399f54b 100755
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/HitCountBreakpointsTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/HitCountBreakpointsTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -38,7 +38,7 @@
String typeName = "HitCountLooper";
IJavaLineBreakpoint bp = createLineBreakpoint(16, typeName);
bp.setHitCount(3);
-
+
IJavaThread thread= null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -46,30 +46,30 @@
IJavaStackFrame frame = (IJavaStackFrame)thread.getTopStackFrame();
IVariable var = findVariable(frame, "i");
assertNotNull("Could not find variable 'i'", var);
-
+
IJavaPrimitiveValue value = (IJavaPrimitiveValue)var.getValue();
assertNotNull("variable 'i' has no value", value);
int iValue = value.getIntValue();
assertTrue("value of 'i' should be '2', but was " + iValue, iValue == 2);
-
+
bp.setHitCount(2);
IJavaThread thread2 = resumeToLineBreakpoint(thread, bp);
- assertTrue("second suspended thread not the same as first", thread == thread2);
-
+ assertTrue("second suspended thread not the same as first", thread == thread2);
+
frame = (IJavaStackFrame)thread2.getTopStackFrame();
var = findVariable(frame, "i");
value = (IJavaPrimitiveValue)var.getValue();
assertNotNull("variable 'i' has no value", value);
iValue = value.getIntValue();
assertTrue("value of 'i' should be '4', but was " + iValue, iValue == 4);
-
+
resumeAndExit(thread2);
-
+
bp.delete();
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
/**
@@ -81,7 +81,7 @@
String typeName = "HitCountLooper";
IJavaLineBreakpoint bp = createLineBreakpoint(16, typeName);
bp.setHitCount(3);
-
+
IJavaThread thread= null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -89,18 +89,18 @@
IJavaStackFrame frame = (IJavaStackFrame)thread.getTopStackFrame();
IVariable var = findVariable(frame, "i");
assertNotNull("Could not find variable 'i'", var);
-
+
IJavaPrimitiveValue value = (IJavaPrimitiveValue)var.getValue();
assertNotNull("variable 'i' has no value", value);
int iValue = value.getIntValue();
assertTrue("value of 'i' should be '2', but was " + iValue, iValue == 2);
-
+
resumeAndExit(thread);
-
+
bp.delete();
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/ImportBreakpointsTest.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/ImportBreakpointsTest.java
index 3f5885d..0ff0a73 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/ImportBreakpointsTest.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/ImportBreakpointsTest.java
@@ -31,7 +31,7 @@
/**
* Tests the import operations of the breakpoint import export feature
- *
+ *
* @since 3.2
*/
public class ImportBreakpointsTest extends AbstractBreakpointWorkingSetTest {
@@ -43,7 +43,7 @@
public ImportBreakpointsTest(String name) {super(name);}
/**
- * Tests import operation from a file.
+ * Tests import operation from a file.
* @throws Exception catch all passed to framework
*/
public void testBreakpointImportFile() throws Exception {
@@ -75,15 +75,15 @@
assertEquals("Missing imported breakpoint", breakpoint, getBreakpointManager().getBreakpoint(breakpoint.getMarker()));
}
file.delete();
- }
+ }
finally {
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Tests import operation from a string buffer.
- *
+ *
* @throws Exception catch all passed to framework
*/
public void testBreakpointImportBuffer() throws Exception {
@@ -105,12 +105,12 @@
ImportBreakpointsOperation op2 = new ImportBreakpointsOperation(buffer, true, true);
op2.run(new NullProgressMonitor());
assertEquals("manager does not contain 6 breakpoints", 6, getBreakpointManager().getBreakpoints().length);
- }
+ }
finally {
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
/**
* tests and overwrote without remove all
* @throws Exception catch all to pass back to framework
@@ -137,15 +137,15 @@
op2.run(new NullProgressMonitor());
assertEquals("manager does not contain 6 breakpoints", 6, getBreakpointManager().getBreakpoints().length);
file.delete();
- }
+ }
finally {
removeAllBreakpoints();
}
}
-
+
/**
* Tests a bad filename passed to the import operation
- *
+ *
* @throws Exception catch all to pass back to framework
*/
public void testBreakpointImportBadFilename() throws Exception {
@@ -163,10 +163,10 @@
removeAllBreakpoints();
}
}
-
+
/**
* tests importing breakpoints with working sets
- *
+ *
* @throws Exception catch all to be passed back to the framework
*/
public void testBreakpointImportWithWorkingsets() throws Exception {
@@ -179,7 +179,7 @@
IWorkingSet set = createSet(setName);
assertNotNull("workingset does not exist", wsmanager.getWorkingSet(setName));
WorkingSetCategory category = new WorkingSetCategory(set);
-
+
bporg.addBreakpoint(createClassPrepareBreakpoint(typeName), category);
bporg.addBreakpoint(createLineBreakpoint(32, typeName), category);
bporg.addBreakpoint(createLineBreakpoint(28, typeName), category);
@@ -192,7 +192,7 @@
assertNotNull("Invalid path", path);
ExportBreakpointsOperation op = new ExportBreakpointsOperation(getBreakpointManager().getBreakpoints(), path.toOSString());
op.run(new NullProgressMonitor());
-
+
//remove bps and working set and do the import
removeAllBreakpoints();
set.setElements(new IAdaptable[] {});
@@ -215,7 +215,7 @@
removeAllBreakpoints();
}
}
-
+
/**
* Tests importing breakpoints to resources that do not exist
* @throws Exception catch all passed to framework
@@ -228,16 +228,16 @@
ImportBreakpointsOperation op = new ImportBreakpointsOperation(file.getCanonicalPath(), true, true);
op.run(new NullProgressMonitor());
assertEquals("should be no breakpoints imported", 0, getBreakpointManager().getBreakpoints().length);
- }
+ }
finally {
removeAllBreakpoints();
}
}
-
+
/**
- * tests importing breakpoints with working sets where the breakpoints are restored to
+ * tests importing breakpoints with working sets where the breakpoints are restored to
* another working set and removed from the current one
- *
+ *
* @throws Exception catch all to be passed back to the framework
*/
public void testImportWithWorkingsets() throws Exception {
@@ -251,7 +251,7 @@
IWorkingSet set = createSet(setname1);
assertNotNull("workingset does not exist", wsmanager.getWorkingSet(setname1));
WorkingSetCategory category = new WorkingSetCategory(set);
-
+
bporg.addBreakpoint(createClassPrepareBreakpoint(typeName), category);
bporg.addBreakpoint(createLineBreakpoint(32, typeName), category);
bporg.addBreakpoint(createLineBreakpoint(28, typeName), category);
@@ -264,12 +264,12 @@
assertNotNull("Invalid path", path);
ExportBreakpointsOperation op = new ExportBreakpointsOperation(getBreakpointManager().getBreakpoints(), path.toOSString());
op.run(new NullProgressMonitor());
-
+
//copy items to the alternate working set
IWorkingSet set2 = createSet(setname2);
set2.setElements(set.getElements());
assertNotNull("workingset does not exist", wsmanager.getWorkingSet(setname2));
-
+
//remove bps and working set and do the import
removeAllBreakpoints();
set.setElements(new IAdaptable[] {});
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/JavaBreakpointListenerTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/JavaBreakpointListenerTests.java
index 78a57c7..4fdc793 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/JavaBreakpointListenerTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/JavaBreakpointListenerTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -45,35 +45,35 @@
* Tests breakpoint creation/deletion and listener interfaces.
*/
public class JavaBreakpointListenerTests extends AbstractDebugTest implements IJavaBreakpointListener {
-
+
/**
* count of add callbacks
*/
public int fAddCallbacks = 0;
-
+
/**
* count of remove callbacks
*/
public int fRemoveCallbacks = 0;
-
+
/**
* count of installed callbacks
*/
public int fInstalledCallbacks = 0;
-
- /**
+
+ /**
* a java breakpoint
*/
public IJavaBreakpoint fBreakpoint;
-
+
/**
* Used to test breakpoint install/suspend voting.
*/
class SuspendVoter implements IJavaBreakpointListener {
-
+
int fVote;
IJavaBreakpoint fTheBreakpoint;
-
+
/**
* Constructor
* @param suspendVote
@@ -83,7 +83,7 @@
fVote = suspendVote;
fTheBreakpoint = breakpoint;
}
-
+
/**
* @see org.eclipse.jdt.debug.core.IJavaBreakpointListener#addingBreakpoint(org.eclipse.jdt.debug.core.IJavaDebugTarget, org.eclipse.jdt.debug.core.IJavaBreakpoint)
*/
@@ -139,12 +139,12 @@
}
}
-
+
/**
* Aids in the voting for a breakpoint to be installed
*/
class InstallVoter extends SuspendVoter {
-
+
/**
* Constructor
* @param installVote
@@ -153,7 +153,7 @@
public InstallVoter(int installVote, IJavaBreakpoint breakpoint) {
super(installVote, breakpoint);
}
-
+
/**
* @see org.eclipse.jdt.debug.tests.breakpoints.JavaBreakpointListenerTests.SuspendVoter#installingBreakpoint(org.eclipse.jdt.debug.core.IJavaDebugTarget, org.eclipse.jdt.debug.core.IJavaBreakpoint, org.eclipse.jdt.debug.core.IJavaType)
*/
@@ -165,12 +165,12 @@
return DONT_CARE;
}
}
-
+
/**
* Collects hit breakpoints.
*/
class Collector implements IJavaBreakpointListener {
-
+
public List<IJavaBreakpoint> HIT = new ArrayList<IJavaBreakpoint>();
public List<IJavaLineBreakpoint> COMPILATION_ERRORS = new ArrayList<IJavaLineBreakpoint>();
public List<IJavaLineBreakpoint> RUNTIME_ERRORS = new ArrayList<IJavaLineBreakpoint>();
@@ -196,7 +196,7 @@
}
@Override
- public void breakpointInstalled(IJavaDebugTarget target, IJavaBreakpoint breakpoint) {
+ public void breakpointInstalled(IJavaDebugTarget target, IJavaBreakpoint breakpoint) {
}
@Override
@@ -207,9 +207,9 @@
public int installingBreakpoint(IJavaDebugTarget target, IJavaBreakpoint breakpoint, IJavaType type) {
return DONT_CARE;
}
-
+
}
-
+
/**
* Constructor
* @param name
@@ -223,195 +223,195 @@
*/
protected void resetCallbacks() {
fAddCallbacks = 0;
-
+
fRemoveCallbacks = 0;
-
- fInstalledCallbacks = 0;
+
+ fInstalledCallbacks = 0;
}
-
+
/**
* Tests the functionality of a single line breakpoint
* @throws Exception
*/
- public void testLineBreakpoint() throws Exception {
+ public void testLineBreakpoint() throws Exception {
IJavaLineBreakpoint breakpoint = createLineBreakpoint(54, "Breakpoints");
fBreakpoint = breakpoint;
resetCallbacks();
-
+
IJavaThread thread = null;
try {
- JDIDebugModel.addJavaBreakpointListener(this);
+ JDIDebugModel.addJavaBreakpointListener(this);
thread = launchToBreakpoint("Breakpoints");
assertNotNull(thread);
// breakpoint should be added & installed
assertEquals("Breakpoint should be added", 1, fAddCallbacks);
assertEquals("Breakpoint should be installed", 1, fInstalledCallbacks);
- assertEquals("Breakpoint should not be removed", 0, fRemoveCallbacks);
+ assertEquals("Breakpoint should not be removed", 0, fRemoveCallbacks);
// disable and re-enable the breakpoint
breakpoint.setEnabled(false);
breakpoint.setEnabled(true);
-
+
// should still be installed/added once
assertEquals("Breakpoint should be added", 1, fAddCallbacks);
assertEquals("Breakpoint should be installed", 1, fInstalledCallbacks);
assertEquals("Breakpoint should not be removed", 0, fRemoveCallbacks);
-
+
// change the hit count
breakpoint.setHitCount(34);
-
+
// should still be installed/added once
assertEquals("Breakpoint should be added", 1, fAddCallbacks);
assertEquals("Breakpoint should be installed", 1, fInstalledCallbacks);
assertEquals("Breakpoint should not be removed", 0, fRemoveCallbacks);
-
+
// delete the breakpoint
breakpoint.delete();
-
+
// should still be installed/added once
assertEquals("Breakpoint should be added", 1, fAddCallbacks);
assertEquals("Breakpoint should be installed", 1, fInstalledCallbacks);
-
+
// and removed
- assertEquals("Breakpoint should be removed", 1, fRemoveCallbacks);
-
+ assertEquals("Breakpoint should be removed", 1, fRemoveCallbacks);
+
} finally {
JDIDebugModel.removeJavaBreakpointListener(this);
terminateAndRemove(thread);
removeAllBreakpoints();
}
-
- }
-
+
+ }
+
/**
* Tests the functionality of an exception breakpoint
* @throws Exception
*/
- public void testExceptionBreakpoint() throws Exception {
+ public void testExceptionBreakpoint() throws Exception {
IJavaExceptionBreakpoint breakpoint = createExceptionBreakpoint("java.lang.NullPointerException", true, true);
fBreakpoint = breakpoint;
resetCallbacks();
-
+
IJavaThread thread = null;
try {
- JDIDebugModel.addJavaBreakpointListener(this);
+ JDIDebugModel.addJavaBreakpointListener(this);
thread = launchToBreakpoint("ThrowsNPE");
assertNotNull(thread);
// breakpoint should be added & installed
assertEquals("Breakpoint should be added", 1, fAddCallbacks);
assertEquals("Breakpoint should be installed", 1, fInstalledCallbacks);
- assertEquals("Breakpoint should not be removed", 0, fRemoveCallbacks);
+ assertEquals("Breakpoint should not be removed", 0, fRemoveCallbacks);
// disable and re-enable the breakpoint
breakpoint.setEnabled(false);
breakpoint.setEnabled(true);
-
+
// should still be installed/added once
assertEquals("Breakpoint should be added", 1, fAddCallbacks);
assertEquals("Breakpoint should be installed", 1, fInstalledCallbacks);
assertEquals("Breakpoint should not be removed", 0, fRemoveCallbacks);
-
+
// change the hit count
breakpoint.setHitCount(34);
-
+
// should still be installed/added once
assertEquals("Breakpoint should be added", 1, fAddCallbacks);
assertEquals("Breakpoint should be installed", 1, fInstalledCallbacks);
assertEquals("Breakpoint should not be removed", 0, fRemoveCallbacks);
-
+
// toggle caught/uncaught
breakpoint.setCaught(false);
breakpoint.setUncaught(false);
breakpoint.setCaught(true);
breakpoint.setUncaught(true);
-
+
// should still be installed/added once
assertEquals("Breakpoint should be added", 1, fAddCallbacks);
assertEquals("Breakpoint should be installed", 1, fInstalledCallbacks);
- assertEquals("Breakpoint should not be removed", 0, fRemoveCallbacks);
-
+ assertEquals("Breakpoint should not be removed", 0, fRemoveCallbacks);
+
// delete the breakpoint
breakpoint.delete();
-
+
// should still be installed/added once
assertEquals("Breakpoint should be added", 1, fAddCallbacks);
assertEquals("Breakpoint should be installed", 1, fInstalledCallbacks);
-
+
// and removed
- assertEquals("Breakpoint should be removed", 1, fRemoveCallbacks);
-
+ assertEquals("Breakpoint should be removed", 1, fRemoveCallbacks);
+
} finally {
JDIDebugModel.removeJavaBreakpointListener(this);
terminateAndRemove(thread);
removeAllBreakpoints();
}
-
- }
-
+
+ }
+
/**
* Tests the functionality of a method breakpoint
* @throws Exception
*/
- public void testMethodBreakpoint() throws Exception {
+ public void testMethodBreakpoint() throws Exception {
IJavaMethodBreakpoint breakpoint = createMethodBreakpoint("DropTests", "method4", "()V", true, false);
fBreakpoint = breakpoint;
resetCallbacks();
-
+
IJavaThread thread = null;
try {
- JDIDebugModel.addJavaBreakpointListener(this);
+ JDIDebugModel.addJavaBreakpointListener(this);
thread = launchToBreakpoint("DropTests");
assertNotNull(thread);
// breakpoint should be added & installed
assertEquals("Breakpoint should be added", 1, fAddCallbacks);
assertEquals("Breakpoint should be installed", 1, fInstalledCallbacks);
- assertEquals("Breakpoint should not be removed", 0, fRemoveCallbacks);
+ assertEquals("Breakpoint should not be removed", 0, fRemoveCallbacks);
// disable and re-enable the breakpoint
breakpoint.setEnabled(false);
breakpoint.setEnabled(true);
-
+
// should still be installed/added once
assertEquals("Breakpoint should be added", 1, fAddCallbacks);
assertEquals("Breakpoint should be installed", 1, fInstalledCallbacks);
assertEquals("Breakpoint should not be removed", 0, fRemoveCallbacks);
-
+
// change the hit count
breakpoint.setHitCount(34);
-
+
// should still be installed/added once
assertEquals("Breakpoint should be added", 1, fAddCallbacks);
assertEquals("Breakpoint should be installed", 1, fInstalledCallbacks);
assertEquals("Breakpoint should not be removed", 0, fRemoveCallbacks);
-
+
// toggle entry/exit
breakpoint.setExit(true);
breakpoint.setEntry(false);
breakpoint.setExit(false);
breakpoint.setEnabled(true);
-
+
// should still be installed/added once
assertEquals("Breakpoint should be added", 1, fAddCallbacks);
assertEquals("Breakpoint should be installed", 1, fInstalledCallbacks);
- assertEquals("Breakpoint should not be removed", 0, fRemoveCallbacks);
-
+ assertEquals("Breakpoint should not be removed", 0, fRemoveCallbacks);
+
// delete the breakpoint
breakpoint.delete();
-
+
// should still be installed/added once
assertEquals("Breakpoint should be added", 1, fAddCallbacks);
assertEquals("Breakpoint should be installed", 1, fInstalledCallbacks);
-
+
// and removed
- assertEquals("Breakpoint should be removed", 1, fRemoveCallbacks);
-
+ assertEquals("Breakpoint should be removed", 1, fRemoveCallbacks);
+
} finally {
JDIDebugModel.removeJavaBreakpointListener(this);
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Vote: Install 3, Don't Care 0, Don't Install 0 == INSTALL
* @throws Exception
@@ -425,7 +425,7 @@
JDIDebugModel.addJavaBreakpointListener(v2);
JDIDebugModel.addJavaBreakpointListener(v3);
IJavaThread thread = null;
- try {
+ try {
thread = launchToBreakpoint("Breakpoints");
assertNotNull(thread);
assertEquals(breakpoint, thread.getBreakpoints()[0]);
@@ -435,9 +435,9 @@
JDIDebugModel.removeJavaBreakpointListener(v3);
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Vote: Install 0, Don't Care 3, Don't Install 0 == INSTALL
* @throws Exception
@@ -451,7 +451,7 @@
JDIDebugModel.addJavaBreakpointListener(v2);
JDIDebugModel.addJavaBreakpointListener(v3);
IJavaThread thread = null;
- try {
+ try {
thread = launchToBreakpoint("Breakpoints");
assertNotNull(thread);
assertEquals(breakpoint, thread.getBreakpoints()[0]);
@@ -461,9 +461,9 @@
JDIDebugModel.removeJavaBreakpointListener(v3);
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
/**
* Vote: Install 1, Don't Care 2, Don't Install 0 == INSTALL
* @throws Exception
@@ -477,7 +477,7 @@
JDIDebugModel.addJavaBreakpointListener(v2);
JDIDebugModel.addJavaBreakpointListener(v3);
IJavaThread thread = null;
- try {
+ try {
thread = launchToBreakpoint("Breakpoints");
assertNotNull(thread);
assertEquals(breakpoint, thread.getBreakpoints()[0]);
@@ -487,9 +487,9 @@
JDIDebugModel.removeJavaBreakpointListener(v3);
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
/**
* Vote: Install 1, Don't Care 0, Don't Install 2 == INSTALL
* @throws Exception
@@ -503,7 +503,7 @@
JDIDebugModel.addJavaBreakpointListener(v2);
JDIDebugModel.addJavaBreakpointListener(v3);
IJavaThread thread = null;
- try {
+ try {
thread = launchToBreakpoint("Breakpoints");
assertNotNull(thread);
assertEquals(breakpoint, thread.getBreakpoints()[0]);
@@ -513,9 +513,9 @@
JDIDebugModel.removeJavaBreakpointListener(v3);
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
/**
* Vote: Install 0, Don't Care 1, Don't Install 2 = RESUME
* @throws Exception
@@ -530,7 +530,7 @@
JDIDebugModel.addJavaBreakpointListener(v2);
JDIDebugModel.addJavaBreakpointListener(v3);
IJavaThread thread = null;
- try {
+ try {
thread = launchToBreakpoint("Breakpoints");
assertNotNull(thread);
assertEquals(breakpoint2, thread.getBreakpoints()[0]);
@@ -540,9 +540,9 @@
JDIDebugModel.removeJavaBreakpointListener(v3);
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Vote: Suspend 3, Don't Care 0, Don't Suspend 0 == SUSPEND
* @throws Exception
@@ -556,7 +556,7 @@
JDIDebugModel.addJavaBreakpointListener(v2);
JDIDebugModel.addJavaBreakpointListener(v3);
IJavaThread thread = null;
- try {
+ try {
thread = launchToBreakpoint("Breakpoints");
assertNotNull(thread);
assertEquals(breakpoint, thread.getBreakpoints()[0]);
@@ -566,9 +566,9 @@
JDIDebugModel.removeJavaBreakpointListener(v3);
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Vote: Suspend 0, Don't Care 3, Don't Suspend 0 == SUSPEND
* @throws Exception
@@ -582,7 +582,7 @@
JDIDebugModel.addJavaBreakpointListener(v2);
JDIDebugModel.addJavaBreakpointListener(v3);
IJavaThread thread = null;
- try {
+ try {
thread = launchToBreakpoint("Breakpoints");
assertNotNull(thread);
assertEquals(breakpoint, thread.getBreakpoints()[0]);
@@ -592,9 +592,9 @@
JDIDebugModel.removeJavaBreakpointListener(v3);
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
/**
* Vote: Suspend 1, Don't Care 2, Don't Suspend 0 == SUSPEND
* @throws Exception
@@ -608,7 +608,7 @@
JDIDebugModel.addJavaBreakpointListener(v2);
JDIDebugModel.addJavaBreakpointListener(v3);
IJavaThread thread = null;
- try {
+ try {
thread = launchToBreakpoint("Breakpoints");
assertNotNull(thread);
assertEquals(breakpoint, thread.getBreakpoints()[0]);
@@ -618,9 +618,9 @@
JDIDebugModel.removeJavaBreakpointListener(v3);
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
/**
* Vote: Suspend 1, Don't Care 0, Don't Suspend 2 == SUSPEND
* @throws Exception
@@ -634,7 +634,7 @@
JDIDebugModel.addJavaBreakpointListener(v2);
JDIDebugModel.addJavaBreakpointListener(v3);
IJavaThread thread = null;
- try {
+ try {
thread = launchToBreakpoint("Breakpoints");
assertNotNull(thread);
assertEquals(breakpoint, thread.getBreakpoints()[0]);
@@ -644,9 +644,9 @@
JDIDebugModel.removeJavaBreakpointListener(v3);
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
/**
* Vote: Suspend 0, Don't Care 1, Don't Suspend 2 = RESUME
* @throws Exception
@@ -661,7 +661,7 @@
JDIDebugModel.addJavaBreakpointListener(v2);
JDIDebugModel.addJavaBreakpointListener(v3);
IJavaThread thread = null;
- try {
+ try {
thread = launchToBreakpoint("Breakpoints");
assertNotNull(thread);
assertEquals(breakpoint2, thread.getBreakpoints()[0]);
@@ -671,9 +671,9 @@
JDIDebugModel.removeJavaBreakpointListener(v3);
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
/**
* Vote: Suspend 0, Don't Care 1 (java debug options manager), Don't Suspend 1 = RESUME
* @throws Exception
@@ -684,7 +684,7 @@
SuspendVoter v1 = new SuspendVoter(DONT_SUSPEND, breakpoint1);
JDIDebugModel.addJavaBreakpointListener(v1);
IJavaThread thread = null;
- try {
+ try {
thread = launchToBreakpoint("DropTests");
assertNotNull(thread);
assertEquals(breakpoint2, thread.getBreakpoints()[0]);
@@ -692,9 +692,9 @@
JDIDebugModel.removeJavaBreakpointListener(v1);
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
/**
* @see org.eclipse.jdt.debug.core.IJavaBreakpointListener#breakpointHasCompilationErrors(org.eclipse.jdt.debug.core.IJavaLineBreakpoint, org.eclipse.jdt.core.dom.Message[])
*/
@@ -743,7 +743,7 @@
IJavaDebugTarget target,
IJavaBreakpoint breakpoint) {
if (breakpoint == fBreakpoint) {
- fRemoveCallbacks++;
+ fRemoveCallbacks++;
}
}
@@ -781,7 +781,7 @@
EvalualtionBreakpointListener.PROJECT = get14Project();
EvalualtionBreakpointListener.EXPRESSION = "return new Integer(i);";
EvalualtionBreakpointListener.VOTE = IJavaBreakpointListener.SUSPEND;
-
+
IJavaThread thread= null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -805,13 +805,13 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Tests that a step end that lands on a breakpoint listener that votes to resume
* results in the step completing and suspending.
- *
+ *
* @throws Exception
*/
public void testStepEndResumeVote() throws Exception {
@@ -819,7 +819,7 @@
IJavaLineBreakpoint first = createLineBreakpoint(16, typeName);
IJavaLineBreakpoint second = createLineBreakpoint(17, typeName);
second.addBreakpointListener("org.eclipse.jdt.debug.tests.resumeListener");
-
+
IJavaThread thread= null;
try {
thread= launchToLineBreakpoint(typeName, first);
@@ -830,13 +830,13 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Test that a step over hitting a breakpoint deeper up the stack with a listener
* can perform an evaluation and resume to complete the step.
- *
+ *
* @throws Exception
*/
public void testStepOverHitsNestedEvaluationHandlerResume() throws Exception {
@@ -851,7 +851,7 @@
EvalualtionBreakpointListener.EXPRESSION = "return new Integer(sum);";
EvalualtionBreakpointListener.VOTE = IJavaBreakpointListener.DONT_SUSPEND;
EvalualtionBreakpointListener.RESULT = null;
-
+
IJavaThread thread= null;
try {
thread= launchToLineBreakpoint(typeName, first);
@@ -885,11 +885,11 @@
removeAllBreakpoints();
}
}
-
+
/**
* Test that a step over hitting a breakpoint deeper up the stack with a listener
* can perform an evaluation and suspend to abort the step.
- *
+ *
* @throws Exception
*/
public void testStepOverHitsNestedEvaluationHandlerSuspend() throws Exception {
@@ -904,7 +904,7 @@
EvalualtionBreakpointListener.EXPRESSION = "return new Integer(sum);";
EvalualtionBreakpointListener.VOTE = IJavaBreakpointListener.SUSPEND;
EvalualtionBreakpointListener.RESULT = null;
-
+
IJavaThread thread= null;
try {
thread= launchToLineBreakpoint(typeName, first);
@@ -938,12 +938,12 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
/**
* Suspends an evaluation. Ensures we're returned to the proper top frame.
- *
+ *
* @throws Exception
*/
public void testSuspendEvaluation() throws Exception {
@@ -956,7 +956,7 @@
EvalualtionBreakpointListener.EXPRESSION = "for (int x = 0; x < 1000; x++) { System.out.println(x);} Thread.sleep(200);";
EvalualtionBreakpointListener.VOTE = IJavaBreakpointListener.DONT_SUSPEND;
EvalualtionBreakpointListener.RESULT = null;
-
+
IJavaThread thread= null;
try {
thread= launchToLineBreakpoint(typeName, first);
@@ -972,19 +972,19 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Test that a global listener gets notifications.
- *
+ *
* @throws Exception
*/
public void testGlobalListener() throws Exception {
GlobalBreakpointListener.clear();
String typeName = "HitCountLooper";
IJavaLineBreakpoint bp = createLineBreakpoint(16, typeName);
-
+
IJavaThread thread= null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -994,18 +994,18 @@
assertEquals("Should be INSTALLED", bp, GlobalBreakpointListener.INSTALLED);
assertEquals("Should be HIT", bp, GlobalBreakpointListener.HIT);
assertNull("Should not be REMOVED", GlobalBreakpointListener.REMOVED);
-
+
bp.delete();
assertEquals("Should be REMOVED", bp, GlobalBreakpointListener.REMOVED);
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Tests that breakpoint listeners are only notified when condition is true.
- *
+ *
* @throws Exception
*/
public void testListenersOnConditionalBreakpoint() throws Exception {
@@ -1014,7 +1014,7 @@
JDIDebugModel.addJavaBreakpointListener(collector);
IJavaLineBreakpoint bp = createConditionalLineBreakpoint(16, typeName, "return false;", true);
IJavaLineBreakpoint second = createConditionalLineBreakpoint(17, typeName, "i == 3", true);
-
+
IJavaThread thread= null;
try {
thread= launchToLineBreakpoint(typeName, second);
@@ -1027,11 +1027,11 @@
removeAllBreakpoints();
}
}
-
+
/**
* Tests that breakpoint listeners are only notified when condition is true
* while stepping to a breakpoint.
- *
+ *
* @throws Exception
*/
public void testListenersOnConditionalBreakpointStepping() throws Exception {
@@ -1040,7 +1040,7 @@
JDIDebugModel.addJavaBreakpointListener(collector);
IJavaLineBreakpoint bp = createLineBreakpoint(16, typeName);
IJavaLineBreakpoint second = createConditionalLineBreakpoint(17, typeName, "i == 1", true);
-
+
IJavaThread thread= null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -1050,7 +1050,7 @@
assertTrue("Wrong breakpoint hit", collector.HIT.contains(bp));
assertFalse("Wrong breakpoint hit", collector.HIT.contains(second));
collector.HIT.clear();
-
+
// resume to line breakpoint again
thread = resumeToLineBreakpoint(thread, bp);
// step over to next line with conditional (should be true && hit)
@@ -1058,18 +1058,18 @@
assertEquals("Wrong number of breakpoints hit", 2, collector.HIT.size());
assertTrue("Wrong breakpoint hit", collector.HIT.contains(bp));
assertTrue("Wrong breakpoint hit", collector.HIT.contains(second));
-
+
} finally {
JDIDebugModel.removeJavaBreakpointListener(collector);
terminateAndRemove(thread);
removeAllBreakpoints();
}
- }
-
+ }
+
/**
* Tests that breakpoint listeners are not notified of "hit" when condition has compilation
* errors. Also they should be notified of the compilation errors.
- *
+ *
* @throws Exception
*/
public void testListenersOnCompilationError() throws Exception {
@@ -1077,7 +1077,7 @@
IJavaLineBreakpoint bp = createConditionalLineBreakpoint(17, typeName, "x == 1", true);
bp.addBreakpointListener("org.eclipse.jdt.debug.tests.evalListener");
EvalualtionBreakpointListener.reset();
-
+
IJavaThread thread= null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -1088,13 +1088,13 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
/**
* Tests that breakpoint listeners are not notified of "hit" when condition has compilation
* errors. Also they should be notified of the compilation errors.
- *
+ *
* @throws Exception
*/
public void testListenersOnRuntimeError() throws Exception {
@@ -1102,7 +1102,7 @@
IJavaLineBreakpoint bp = createConditionalLineBreakpoint(17, typeName, "(new String()).charAt(34) == 'c'", true);
bp.addBreakpointListener("org.eclipse.jdt.debug.tests.evalListener");
EvalualtionBreakpointListener.reset();
-
+
IJavaThread thread= null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -1113,51 +1113,51 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
+ }
+ }
/**
* Tests addition and removal of breakpoint listeners to a breakpoint.
- *
+ *
* @throws Exception
*/
public void testAddRemoveListeners() throws Exception {
try {
String typeName = "HitCountLooper";
IJavaLineBreakpoint bp = createLineBreakpoint(16, typeName);
-
+
String[] listeners = bp.getBreakpointListeners();
assertEquals(0, listeners.length);
-
+
bp.addBreakpointListener("a");
listeners = bp.getBreakpointListeners();
assertEquals(1, listeners.length);
assertEquals("a", listeners[0]);
-
+
bp.addBreakpointListener("b");
listeners = bp.getBreakpointListeners();
assertEquals(2, listeners.length);
assertEquals("a", listeners[0]);
assertEquals("b", listeners[1]);
-
+
bp.addBreakpointListener("c");
listeners = bp.getBreakpointListeners();
assertEquals(3, listeners.length);
assertEquals("a", listeners[0]);
assertEquals("b", listeners[1]);
assertEquals("c", listeners[2]);
-
+
bp.removeBreakpointListener("a");
listeners = bp.getBreakpointListeners();
assertEquals(2, listeners.length);
assertEquals("b", listeners[0]);
assertEquals("c", listeners[1]);
-
+
bp.removeBreakpointListener("c");
listeners = bp.getBreakpointListeners();
assertEquals(1, listeners.length);
assertEquals("b", listeners[0]);
-
+
bp.removeBreakpointListener("b");
listeners = bp.getBreakpointListeners();
assertEquals(0, listeners.length);
@@ -1165,30 +1165,30 @@
removeAllBreakpoints();
}
}
-
+
/**
* Tests addition of duplicate breakpoint listeners to a breakpoint.
- *
+ *
* @throws Exception
*/
public void testAddDuplicateListeners() throws Exception {
try {
String typeName = "HitCountLooper";
IJavaLineBreakpoint bp = createLineBreakpoint(16, typeName);
-
+
String[] listeners = bp.getBreakpointListeners();
assertEquals(0, listeners.length);
-
+
bp.addBreakpointListener("a");
listeners = bp.getBreakpointListeners();
assertEquals(1, listeners.length);
assertEquals("a", listeners[0]);
-
+
bp.addBreakpointListener("a");
listeners = bp.getBreakpointListeners();
assertEquals(1, listeners.length);
- assertEquals("a", listeners[0]);
-
+ assertEquals("a", listeners[0]);
+
bp.addBreakpointListener("b");
listeners = bp.getBreakpointListeners();
assertEquals(2, listeners.length);
@@ -1197,40 +1197,40 @@
} finally {
removeAllBreakpoints();
}
- }
-
+ }
+
/**
* Tests that listeners can be retrieved after breakpoint deletion.
- *
+ *
* @throws Exception
*/
public void testGetListenersAfterDelete() throws Exception {
try {
String typeName = "HitCountLooper";
IJavaLineBreakpoint bp = createLineBreakpoint(16, typeName);
-
+
String[] listeners = bp.getBreakpointListeners();
assertEquals(0, listeners.length);
-
+
bp.addBreakpointListener("a");
bp.addBreakpointListener("b");
-
+
listeners = bp.getBreakpointListeners();
assertEquals(2, listeners.length);
assertEquals("a", listeners[0]);
assertEquals("b", listeners[1]);
-
+
bp.delete();
listeners = bp.getBreakpointListeners();
assertEquals(2, listeners.length);
assertEquals("a", listeners[0]);
assertEquals("b", listeners[1]);
-
+
} finally {
removeAllBreakpoints();
}
- }
-
+ }
+
/**
* Tests a breakpoint listener extension gets removal notification when the underlying
* marker is deleted.
@@ -1241,11 +1241,11 @@
bp.addBreakpointListener("org.eclipse.jdt.debug.tests.evalListener");
EvalualtionBreakpointListener.reset();
EvalualtionBreakpointListener.VOTE = SUSPEND;
-
+
IJavaThread thread= null;
try {
thread= launchToLineBreakpoint(typeName, bp);
- assertTrue(EvalualtionBreakpointListener.HIT);
+ assertTrue(EvalualtionBreakpointListener.HIT);
IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
@Override
public void run(IProgressMonitor monitor) throws CoreException {
@@ -1266,7 +1266,7 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/MethodBreakpointTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/MethodBreakpointTests.java
index e8bb51a..bbcca75 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/MethodBreakpointTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/MethodBreakpointTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -32,7 +32,7 @@
* Tests method breakpoints.
*/
public class MethodBreakpointTests extends AbstractDebugTest {
-
+
/**
* Constructor
* @param name
@@ -51,30 +51,30 @@
bps.add(createMethodBreakpoint(typeName, "method4", "()V", true, false));
// method 1 - exit
bps.add(createMethodBreakpoint(typeName, "method1", "()V", false, true));
-
-
+
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
IBreakpoint hit = getBreakpoint(thread);
assertNotNull("suspended, but not by breakpoint", hit);
assertEquals("should hit entry breakpoint first", bps.get(0),hit);
- // onto the next breakpoint
+ // onto the next breakpoint
thread = resume(thread);
-
+
hit = getBreakpoint(thread);
assertNotNull("suspended, but not by breakpoint", hit);
- assertEquals("should hit exit breakpoint second", bps.get(1), hit);
+ assertEquals("should hit exit breakpoint second", bps.get(1), hit);
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Tests the 'stop in main' launching preference
* {@link IJavaLaunchConfigurationConstants#ATTR_STOP_IN_MAIN}
@@ -86,27 +86,27 @@
assertNotNull("Could not find launch config", config);
ILaunchConfigurationWorkingCopy wc = config.copy("DropTests - Stop in main");
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_STOP_IN_MAIN, true);
- config = wc.doSave();
-
+ config = wc.doSave();
+
IJavaThread thread= null;
try {
thread= launchAndSuspend(config);
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
IBreakpoint hit = getBreakpoint(thread);
assertNotNull("suspended, but not by breakpoint", hit);
-
+
IJavaStackFrame frame = (IJavaStackFrame)thread.getTopStackFrame();
assertTrue("Should be in 'main'", frame.getMethodName().equals("main") && frame.isStatic());
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
/**
- * Tests disabled method entry and exit breakpoints
+ * Tests disabled method entry and exit breakpoints
* @throws Exception
*/
public void testDisabledEntryAndExitBreakpoints() throws Exception {
@@ -116,17 +116,17 @@
bp1.setEnabled(false);
// method 1 - exit
IBreakpoint bp2 = createMethodBreakpoint(typeName, "method1", "()V", false, true);
- bp2.setEnabled(false);
-
+ bp2.setEnabled(false);
+
IJavaDebugTarget debugTarget= null;
try {
debugTarget= launchAndTerminate(typeName);
} finally {
terminateAndRemove(debugTarget);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Tests that a method is NOT hit in an inner class
* @throws Exception
@@ -136,26 +136,26 @@
List<IJavaMethodBreakpoint> bps = new ArrayList<IJavaMethodBreakpoint>();
// method b - entry
bps.add(createMethodBreakpoint(typeNamePattern, "b", "()V", true, false));
-
-
+
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeNamePattern);
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
IBreakpoint hit = getBreakpoint(thread);
assertNotNull("suspended, but not by breakpoint", hit);
assertEquals("should hit entry breakpoint first", bps.get(0),hit);
-
+
resumeAndExit(thread);
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Tests that a given method IS hit in an inner class
* @throws Exception
@@ -165,13 +165,13 @@
List<IJavaMethodBreakpoint> bps = new ArrayList<IJavaMethodBreakpoint>();
// method b - entry
bps.add(createMethodBreakpoint(typeNamePattern, "b", "()V", true, false));
-
-
+
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint("A");
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
IBreakpoint hit = getBreakpoint(thread);
assertNotNull("suspended, but not by breakpoint", hit);
assertEquals("should hit entry breakpoint first", bps.get(0),hit);
@@ -185,17 +185,17 @@
hit = getBreakpoint(thread);
assertNotNull("suspended, but not by breakpoint", hit);
assertEquals("should hit entry breakpoint first", bps.get(0),hit);
-
+
thread= resume(thread);
hit = getBreakpoint(thread);
assertNotNull("suspended, but not by breakpoint", hit);
assertEquals("should hit entry breakpoint first", bps.get(0),hit);
-
+
resumeAndExit(thread);
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
/**
@@ -206,26 +206,26 @@
String typeName = "MethodLoop";
IJavaMethodBreakpoint bp = createMethodBreakpoint(typeName, "calculateSum", "()V", true, false);
bp.setHitCount(3);
-
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
assertNotNull("Method entry breakpoint not hit within timeout period", thread);
-
+
IJavaStackFrame frame = (IJavaStackFrame)thread.getTopStackFrame();
IVariable var = findVariable(frame, "sum");
assertNotNull("Could not find variable 'sum'", var);
-
+
IJavaPrimitiveValue value = (IJavaPrimitiveValue)var.getValue();
assertNotNull("variable 'sum' has no value", value);
int iValue = value.getIntValue();
- assertTrue("value of 'sum' should be '3', but was " + iValue, iValue == 3);
-
+ assertTrue("value of 'sum' should be '3', but was " + iValue, iValue == 3);
+
bp.delete();
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
/**
@@ -236,28 +236,28 @@
String typeName = "MethodLoop";
IJavaMethodBreakpoint bp = createMethodBreakpoint(typeName, "calculateSum", "()V", false, true);
bp.setHitCount(3);
-
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
assertNotNull("Method exit breakpoint not hit within timeout period", thread);
-
+
IJavaStackFrame frame = (IJavaStackFrame)thread.getTopStackFrame();
IVariable var = findVariable(frame, "sum");
assertNotNull("Could not find variable 'sum'", var);
-
+
IJavaPrimitiveValue value = (IJavaPrimitiveValue)var.getValue();
assertNotNull("variable 'sum' has no value", value);
int iValue = value.getIntValue();
- assertTrue("value of 'sum' should be '6', but was " + iValue, iValue == 6);
-
+ assertTrue("value of 'sum' should be '6', but was " + iValue, iValue == 6);
+
bp.delete();
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Tests an inclusive thread filter on a method breakpoint
* @throws Exception
@@ -266,29 +266,29 @@
String typeName = "MethodLoop";
IJavaMethodBreakpoint methodBp = createMethodBreakpoint(typeName, "calculateSum", "()V", true, false);
createLineBreakpoint(18, typeName);
-
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName, false);
assertNotNull("breakpoint not hit within timeout period", thread);
-
+
IJavaStackFrame frame = (IJavaStackFrame)thread.getTopStackFrame();
-
+
// set a thread filter (to the main thread)
methodBp.setThreadFilter(thread);
-
+
thread = resume(thread);
assertNotNull("breakpoint not hit", thread);
-
+
frame = (IJavaStackFrame)thread.getTopStackFrame();
assertEquals("should be in 'calucateSum'", "calculateSum", frame.getMethodName());
-
+
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
/**
* Tests an exclusive thread filter on a method breakpoint
* @throws Exception
@@ -297,14 +297,14 @@
String typeName = "MethodLoop";
IJavaMethodBreakpoint methodBp = createMethodBreakpoint(typeName, "calculateSum", "()V", true, false);
createLineBreakpoint(18, typeName);
-
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName, false);
assertNotNull("breakpoint not hit within timeout period", thread);
-
+
thread.getTopStackFrame();
-
+
// set a thread filter (*not* the main thread)
IThread[] threads = thread.getDebugTarget().getThreads();
for (int i = 0; i < threads.length; i++) {
@@ -315,14 +315,14 @@
}
}
assertNotNull("Did not set thread filter",methodBp.getThreadFilter((IJavaDebugTarget)thread.getDebugTarget()));
-
+
resumeAndExit(thread);
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
/**
* Test for bug 33551
* Tests that a method breakpoint is hit properly in the default package
@@ -330,13 +330,13 @@
*/
public void testEntryDefaultPackageReturnType() throws Exception {
String typeName = "DefPkgReturnType";
- IJavaMethodBreakpoint bp = createMethodBreakpoint(typeName, "self", "()LDefPkgReturnType;", true, false);
-
+ IJavaMethodBreakpoint bp = createMethodBreakpoint(typeName, "self", "()LDefPkgReturnType;", true, false);
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
IBreakpoint hit = getBreakpoint(thread);
assertNotNull("suspended, but not by breakpoint", hit);
assertEquals("should hit entry breakpoint", bp,hit);
@@ -344,9 +344,9 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
/**
* Test for bug 43611
* Tests that the debug model presentation is returning the correct signature for a specific method breakpoint
@@ -364,7 +364,7 @@
modelPresentation.dispose();
}
}
-
+
/**
* Test for bug 43611
* Tests that the debug model presentation handles a label with no name for a specific method breakpoint
@@ -381,8 +381,8 @@
removeAllBreakpoints();
modelPresentation.dispose();
}
- }
-
+ }
+
/**
* Test for bug 43611
* Tests that the debug model presentation handles no signature or method name for a specific
@@ -400,8 +400,8 @@
removeAllBreakpoints();
modelPresentation.dispose();
}
- }
-
+ }
+
/**
* Tests that a specific method breakpoint is skipped when set to do so
* @throws Exception
@@ -413,23 +413,23 @@
bps.add(createMethodBreakpoint(typeName, "method4", "()V", true, false));
// method 1 - exit
bps.add(createMethodBreakpoint(typeName, "method1", "()V", false, true));
-
-
+
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
IBreakpoint hit = getBreakpoint(thread);
assertNotNull("suspended, but not by breakpoint", hit);
assertEquals("should hit entry breakpoint first", bps.get(0),hit);
- getBreakpointManager().setEnabled(false);
+ getBreakpointManager().setEnabled(false);
resumeAndExit(thread);
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
getBreakpointManager().setEnabled(true);
- }
- }
+ }
+ }
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/MethodBreakpointTests15.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/MethodBreakpointTests15.java
index fcb5d4e..7d29f20 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/MethodBreakpointTests15.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/MethodBreakpointTests15.java
@@ -27,7 +27,7 @@
* Tests method breakpoints for 1.5 source code.
*/
public class MethodBreakpointTests15 extends AbstractDebugTest {
-
+
public MethodBreakpointTests15(String name) {
super(name);
}
@@ -38,30 +38,30 @@
@Override
protected IJavaProject getProjectContext() {
return get15Project();
- }
-
+ }
+
public void testStaticTypeParameter() throws Exception {
IJavaMethodBreakpoint breakpoint = createBreakpoint(25);
assertEquals("Wrong method", "staticTypeParameter", breakpoint.getMethodName());
- runToBreakpoint(getTypeName(), breakpoint);
+ runToBreakpoint(getTypeName(), breakpoint);
}
-
+
public void testTypeParameter() throws Exception {
IJavaMethodBreakpoint breakpoint = createBreakpoint(29);
assertEquals("Wrong method", "typeParameter", breakpoint.getMethodName());
runToBreakpoint(getTypeName(), breakpoint);
}
-
+
public void testMethodTypeParameter() throws Exception {
IJavaMethodBreakpoint breakpoint = createBreakpoint(34);
assertEquals("Wrong method", "methodTypeParameter", breakpoint.getMethodName());
- runToBreakpoint(getTypeName(), breakpoint);
- }
-
+ runToBreakpoint(getTypeName(), breakpoint);
+ }
+
private String getTypeName() {
return "a.b.c.MethodBreakpoints";
}
-
+
private IJavaMethodBreakpoint createBreakpoint(int line) throws Exception {
IType type = get15Project().findType(getTypeName());
assertNotNull("Missing file", type);
@@ -78,7 +78,7 @@
try {
thread= launchToBreakpoint(get15Project(), typeName);
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
IBreakpoint hit = getBreakpoint(thread);
assertNotNull("suspended, but not by breakpoint", hit);
assertEquals("should hit entry breakpoint first", mbp,hit);
@@ -87,7 +87,7 @@
terminateAndRemove(thread);
removeAllBreakpoints();
}
- }
+ }
/**
* @throws Exception
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/MiscBreakpointsTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/MiscBreakpointsTests.java
index e5cb2e7..ce57fc9 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/MiscBreakpointsTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/MiscBreakpointsTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -24,11 +24,11 @@
*/
public class MiscBreakpointsTests extends AbstractDebugTest {
- private static final String COMPILE_ERROR_CONTENTS =
+ private static final String COMPILE_ERROR_CONTENTS =
"public class CompileError {\npublic static void main(String[] args) {\nString foo = \"foo\" + bar;\n} \n}";
private static final String ORIGINAL_CONTENTS = "public class CompileError {\npublic static void main(String[] args) {\n}\n}";
-
+
/**
* Constructor
* @param name
@@ -45,19 +45,19 @@
public void testSuspendOnUncaughtExceptions() throws Exception {
String typeName = "ThrowsNPE";
getPrefStore().setValue(IJDIPreferencesConstants.PREF_SUSPEND_ON_UNCAUGHT_EXCEPTIONS, true);
-
+
IJavaThread javaThread = null;
try {
javaThread= launchAndSuspend(typeName);
-
+
int stackLine = javaThread.getTopStackFrame().getLineNumber();
assertTrue("line number should be '26', but was " + stackLine, stackLine == 26);
-
+
} finally {
getPrefStore().setValue(IJDIPreferencesConstants.PREF_SUSPEND_ON_UNCAUGHT_EXCEPTIONS, false);
terminateAndRemove(javaThread);
removeAllBreakpoints();
- }
+ }
}
/**
@@ -68,19 +68,19 @@
public void testSuspendOnCompilationErrors() throws Exception {
String typeName = "CompileError";
getPrefStore().setValue(IJDIPreferencesConstants.PREF_SUSPEND_ON_UNCAUGHT_EXCEPTIONS, false);
- getPrefStore().setValue(IJDIPreferencesConstants.PREF_SUSPEND_ON_COMPILATION_ERRORS, true);
-
+ getPrefStore().setValue(IJDIPreferencesConstants.PREF_SUSPEND_ON_COMPILATION_ERRORS, true);
+
IType type = get14Project().findType(typeName);
ICompilationUnit cu = type.getCompilationUnit();
setFileContents(cu, COMPILE_ERROR_CONTENTS);
-
+
IJavaThread javaThread = null;
try {
javaThread= launchAndSuspend(typeName);
-
+
int stackLine = javaThread.getTopStackFrame().getLineNumber();
assertTrue("line number should be '3', but was " + stackLine, stackLine == 3);
-
+
} finally {
getPrefStore().setValue(IJDIPreferencesConstants.PREF_SUSPEND_ON_UNCAUGHT_EXCEPTIONS, false);
getPrefStore().setValue(IJDIPreferencesConstants.PREF_SUSPEND_ON_COMPILATION_ERRORS, false);
@@ -88,7 +88,7 @@
removeAllBreakpoints();
//restore the file to remove compile errors
setFileContents(cu, ORIGINAL_CONTENTS);
- }
+ }
}
/**
@@ -99,12 +99,12 @@
public void testDontSuspendOnCompilationErrors() throws Exception {
String typeName = "CompileError";
getPrefStore().setValue(IJDIPreferencesConstants.PREF_SUSPEND_ON_UNCAUGHT_EXCEPTIONS, false);
- getPrefStore().setValue(IJDIPreferencesConstants.PREF_SUSPEND_ON_COMPILATION_ERRORS, false);
-
+ getPrefStore().setValue(IJDIPreferencesConstants.PREF_SUSPEND_ON_COMPILATION_ERRORS, false);
+
IType type = get14Project().findType(typeName);
ICompilationUnit cu = type.getCompilationUnit();
setFileContents(cu, COMPILE_ERROR_CONTENTS);
-
+
IJavaDebugTarget debugTarget = null;
try {
debugTarget= launchAndTerminate(typeName);
@@ -112,7 +112,7 @@
terminateAndRemove(debugTarget);
removeAllBreakpoints();
setFileContents(cu, ORIGINAL_CONTENTS);
- }
+ }
}
/**
@@ -122,22 +122,22 @@
*/
public void testDontSuspendOnUncaughtExceptions() throws Exception {
String typeName = "ThrowsNPE";
- getPrefStore().setValue(IJDIPreferencesConstants.PREF_SUSPEND_ON_UNCAUGHT_EXCEPTIONS, false);
-
+ getPrefStore().setValue(IJDIPreferencesConstants.PREF_SUSPEND_ON_UNCAUGHT_EXCEPTIONS, false);
+
IJavaDebugTarget debugTarget= null;
try {
debugTarget = launchAndTerminate(typeName);
} finally {
terminateAndRemove(debugTarget);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Returns the <code>JDIDebugUIPlugin</code> preference store
* @return
*/
protected IPreferenceStore getPrefStore() {
- return JDIDebugUIPlugin.getDefault().getPreferenceStore();
+ return JDIDebugUIPlugin.getDefault().getPreferenceStore();
}
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/PatternBreakpointTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/PatternBreakpointTests.java
index 95c8412..f9d3e87 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/PatternBreakpointTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/PatternBreakpointTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -25,7 +25,7 @@
*/
@SuppressWarnings("deprecation")
public class PatternBreakpointTests extends AbstractDebugTest {
-
+
/**
* Constructor
* @param name
@@ -66,7 +66,7 @@
bps.add(createPatternBreakpoint(72, sourceName, pattern));
// instance method
bps.add(createPatternBreakpoint(107, sourceName, pattern));
- // static method
+ // static method
bps.add(createPatternBreakpoint(53, sourceName, pattern));
// case statement
bps.add(createPatternBreakpoint(133, sourceName, pattern));
@@ -80,8 +80,8 @@
bps.add(createPatternBreakpoint(118, sourceName, pattern));
// while
bps.add(createPatternBreakpoint(97, sourceName, pattern));
-
-
+
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint("Breakpoints", false);
@@ -104,9 +104,9 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Bug 74108 - enable/disable a stratum breakpoint that is not yet installed
* @throws Exception
@@ -135,9 +135,9 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Bug 74108 - enable/disable a pattern breakpoint that is not yet installed
* @throws Exception
@@ -166,9 +166,9 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
/**
* Tests that a pattern breakpoint is skipped when set to do so
* @throws Exception
@@ -201,7 +201,7 @@
bps.add(createPatternBreakpoint(72, sourceName, pattern));
// instance method
bps.add(createPatternBreakpoint(107, sourceName, pattern));
- // static method
+ // static method
bps.add(createPatternBreakpoint(53, sourceName, pattern));
// case statement
bps.add(createPatternBreakpoint(133, sourceName, pattern));
@@ -215,8 +215,8 @@
bps.add(createPatternBreakpoint(118, sourceName, pattern));
// while
bps.add(createPatternBreakpoint(97, sourceName, pattern));
-
-
+
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint("Breakpoints");
@@ -227,6 +227,6 @@
terminateAndRemove(thread);
removeAllBreakpoints();
getBreakpointManager().setEnabled(true);
- }
- }
+ }
+ }
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/PreLaunchBreakpointTest.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/PreLaunchBreakpointTest.java
index 8ab5b75..c7e35ea 100755
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/PreLaunchBreakpointTest.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/PreLaunchBreakpointTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -26,7 +26,7 @@
* Tests launch notification.
*/
public class PreLaunchBreakpointTest extends AbstractDebugTest {
-
+
/**
* Constructor
* @param name
@@ -34,17 +34,17 @@
public PreLaunchBreakpointTest(String name) {
super(name);
}
-
+
/**
* Tests that the perspective will switch if breakpoints are detected and the program was launched in
* 'run' mode
* @throws Exception
*/
public void testRunModeLaunchWithBreakpoints() throws Exception {
- String typeName = "Breakpoints";
-
+ String typeName = "Breakpoints";
+
ILaunchConfiguration configuration = getLaunchConfiguration(typeName);
-
+
IPreferenceStore preferenceStore = DebugUIPlugin.getDefault().getPreferenceStore();
preferenceStore.setValue(IInternalDebugUIConstants.PREF_RELAUNCH_IN_DEBUG_MODE, MessageDialogWithToggle.ALWAYS);
IJavaThread thread = null;
@@ -56,7 +56,7 @@
Object suspendee= waiter.waitForEvent();
assertTrue("Program did not suspend", suspendee instanceof IJavaThread);
thread = (IJavaThread) suspendee;
-
+
} catch (Exception e) {
e.printStackTrace();
} finally {
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/RunToLineTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/RunToLineTests.java
index a49961b..22da8a3 100755
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/RunToLineTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/RunToLineTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -38,7 +38,7 @@
* Tests run to line debug functionality
*/
public class RunToLineTests extends AbstractDebugTest {
-
+
/**
* Constructor
* @param name
@@ -49,7 +49,7 @@
private Object fLock = new Object();
private IEditorPart fEditor = null;
-
+
class MyListener implements IPerspectiveListener2 {
/**
@@ -76,43 +76,43 @@
* @see org.eclipse.ui.IPerspectiveListener#perspectiveChanged(org.eclipse.ui.IWorkbenchPage, org.eclipse.ui.IPerspectiveDescriptor, java.lang.String)
*/
@Override
- public void perspectiveChanged(IWorkbenchPage page, IPerspectiveDescriptor perspective, String changeId) {
+ public void perspectiveChanged(IWorkbenchPage page, IPerspectiveDescriptor perspective, String changeId) {
}
}
/**
* Test a run to line, with no extra breakpoints.
- *
+ *
* @throws Exception
*/
public void testRunToLine() throws Exception {
runToLine(55, 55, true);
}
-
+
/**
* Test a run to line, with an extra breakpoint, and preference to skip
- *
+ *
* @throws Exception
*/
public void testRunToLineSkipBreakpoint() throws Exception {
createLineBreakpoint(53, "Breakpoints");
runToLine(55, 55, true);
- }
-
+ }
+
/**
* Test a run to line, with an extra breakpoint, and preference to *not* skip
- *
+ *
* @throws Exception
*/
public void testRunToLineHitBreakpoint() throws Exception {
createLineBreakpoint(53, "Breakpoints");
runToLine(55, 53, false);
- }
+ }
/**
* Runs to the given line number in the 'Breakpoints' source file, after stopping at the
* first line in the main method.
- *
+ *
* @param lineNumber line number to run to, ONE BASED
* @param expectedLineNumber the line number to be on after run-to-line (may differ from
* the target line number if the option to skip breakpoints is off).
@@ -122,7 +122,7 @@
public void runToLine(final int lineNumber, int expectedLineNumber, boolean skipBreakpoints) throws Exception {
String typeName = "Breakpoints";
IJavaLineBreakpoint breakpoint = createLineBreakpoint(52, typeName);
-
+
boolean restore = DebugUITools.getPreferenceStore().getBoolean(IDebugUIConstants.PREF_SKIP_BREAKPOINTS_DURING_RUN_TO_LINE);
DebugUITools.getPreferenceStore().setValue(IDebugUIConstants.PREF_SKIP_BREAKPOINTS_DURING_RUN_TO_LINE, skipBreakpoints);
IJavaThread thread= null;
@@ -139,7 +139,7 @@
};
Display display = DebugUIPlugin.getStandardDisplay();
display.syncExec(closeAll);
-
+
thread= launchToLineBreakpoint(typeName, breakpoint);
// wait for editor to open
synchronized (fLock) {
@@ -148,20 +148,20 @@
}
}
if (fEditor == null) {
- Runnable r = new Runnable() {
+ Runnable r = new Runnable() {
@Override
public void run() {
IWorkbenchWindow activeWorkbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
IEditorPart activeEditor = activeWorkbenchWindow.getActivePage().getActiveEditor();
if (activeEditor != null) {
- System.out.println("ACTIVE: " + activeEditor.getTitle());
+ System.out.println("ACTIVE: " + activeEditor.getTitle());
}
}
};
display.syncExec(r);
}
assertNotNull("Editor did not open", fEditor);
-
+
final Exception[] exs = new Exception[1];
final IJavaThread suspendee = thread;
Runnable r = new Runnable() {
@@ -204,7 +204,7 @@
}
};
Display display = DebugUIPlugin.getStandardDisplay();
- display.syncExec(cleanup);
- }
+ display.syncExec(cleanup);
+ }
}
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/SuspendVMBreakpointsTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/SuspendVMBreakpointsTests.java
index 3cdeebe..07ef5ec 100755
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/SuspendVMBreakpointsTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/SuspendVMBreakpointsTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -44,18 +44,18 @@
String typeName = "MultiThreadedLoop";
IJavaLineBreakpoint bp = createLineBreakpoint(40, typeName);
bp.setSuspendPolicy(IJavaBreakpoint.SUSPEND_VM);
-
+
IJavaThread thread= null;
try {
thread= launchToLineBreakpoint(typeName, bp);
-
+
verifyAllThreadsSuspended(thread);
-
+
bp.delete();
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
/**
@@ -64,37 +64,37 @@
*/
public void testSuspendVmExceptionBreakpoint() throws Exception {
String typeName = "ThrowsNPE";
- IJavaExceptionBreakpoint ex = createExceptionBreakpoint("java.lang.NullPointerException", true, false);
+ IJavaExceptionBreakpoint ex = createExceptionBreakpoint("java.lang.NullPointerException", true, false);
ex.setSuspendPolicy(IJavaBreakpoint.SUSPEND_VM);
-
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
IBreakpoint hit = getBreakpoint(thread);
assertNotNull("suspended, but not by breakpoint", hit);
assertEquals("suspended, but not by exception breakpoint", ex ,hit);
-
+
verifyAllThreadsSuspended(thread);
-
+
ex.delete();
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Tests that the VM is suspended when a specific access watchpoint is hit
* @throws Exception
*/
public void testSuspendVmAccessWatchpointBreakpoint() throws Exception {
String typeName = "org.eclipse.debug.tests.targets.Watchpoint";
-
+
IJavaWatchpoint wp = createWatchpoint(typeName, "list", true, false);
wp.setSuspendPolicy(IJavaBreakpoint.SUSPEND_VM);
-
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
@@ -104,16 +104,16 @@
IStackFrame frame = thread.getTopStackFrame();
assertNotNull("No breakpoint", hit);
assertTrue("Should be an access", wp.isAccessSuspend(thread.getDebugTarget()));
- assertEquals("Should be line 30", 30, frame.getLineNumber());
-
+ assertEquals("Should be line 30", 30, frame.getLineNumber());
+
verifyAllThreadsSuspended(thread);
-
+
wp.delete();
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
+ }
+ }
/**
* Tests that the VM is suspended when a specific modification watchpoint is hit
@@ -121,10 +121,10 @@
*/
public void testSuspendVmModificationWatchpointBreakpoint() throws Exception {
String typeName = "org.eclipse.debug.tests.targets.Watchpoint";
-
+
IJavaWatchpoint wp = createWatchpoint(typeName, "list", false, true);
wp.setSuspendPolicy(IJavaBreakpoint.SUSPEND_VM);
-
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
@@ -133,21 +133,21 @@
IBreakpoint hit = getBreakpoint(thread);
IStackFrame frame = thread.getTopStackFrame();
assertNotNull("No breakpoint", hit);
-
+
// should be modification
assertTrue("First hit should be modification", !wp.isAccessSuspend(thread.getDebugTarget()));
// line 27
assertEquals("Should be on line 27", 27, frame.getLineNumber());
-
+
verifyAllThreadsSuspended(thread);
-
+
wp.delete();
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
/**
* Tests that the VM is suspended when a specific method entry breakpoint is hit
* @throws Exception
@@ -156,50 +156,50 @@
String typeName = "DropTests";
IJavaBreakpoint bp = createMethodBreakpoint(typeName, "method4", "()V", true, false);
bp.setSuspendPolicy(IJavaBreakpoint.SUSPEND_VM);
-
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
-
+
IBreakpoint hit = getBreakpoint(thread);
assertNotNull("suspended, but not by breakpoint", hit);
assertTrue("breakpoint was not a method breakpoint", hit instanceof IJavaMethodBreakpoint);
verifyAllThreadsSuspended(thread);
-
+
bp.delete();
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Tests that the VM is suspended when a specific method exit breakpoint is hit
* @throws Exception
*/
public void testSuspendVmMethodExitBreakpoint() throws Exception {
String typeName = "DropTests";
- IJavaBreakpoint bp = createMethodBreakpoint(typeName, "method1", "()V", false, true);
+ IJavaBreakpoint bp = createMethodBreakpoint(typeName, "method1", "()V", false, true);
bp.setSuspendPolicy(IJavaBreakpoint.SUSPEND_VM);
-
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
-
+
IBreakpoint hit = getBreakpoint(thread);
assertNotNull("suspended, but not by breakpoint", hit);
assertTrue("breakpoint was not a method breakpoint", hit instanceof IJavaMethodBreakpoint);
verifyAllThreadsSuspended(thread);
-
+
bp.delete();
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Verifies that all of the threads of the related debug target are suspended
* @param thread
@@ -210,9 +210,9 @@
IThread[] threads = debugTarget.getThreads();
for (int i = 0; i < threads.length; i++) {
assertTrue("Thread wasn't suspended when a SUSPEND_VM breakpoint was hit, thread=" + threads[i].getName(), threads[i].isSuspended());
- }
+ }
} catch (DebugException e) {
fail(e.getMessage());
}
- }
+ }
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/TargetPatternBreakpointTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/TargetPatternBreakpointTests.java
index c384f43..87d0a2f 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/TargetPatternBreakpointTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/TargetPatternBreakpointTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -32,7 +32,7 @@
* Tests deferred target pattern breakpoints.
*/
public class TargetPatternBreakpointTests extends AbstractDebugTest implements IJavaBreakpointListener {
-
+
/**
* Constructor
* @param name
@@ -47,7 +47,7 @@
*/
public void testTargetPatternBreakpoints() throws Exception {
JDIDebugPlugin.getDefault().addJavaBreakpointListener(this);
-
+
String sourceName = "Breakpoints.java";
List<IJavaTargetPatternBreakpoint> bps = new ArrayList<IJavaTargetPatternBreakpoint>();
// anonymous class
@@ -74,7 +74,7 @@
bps.add(createTargetPatternBreakpoint(72, sourceName));
// instance method
bps.add(createTargetPatternBreakpoint(107, sourceName));
- // static method
+ // static method
bps.add(createTargetPatternBreakpoint(53, sourceName));
// case statement
bps.add(createTargetPatternBreakpoint(133, sourceName));
@@ -88,8 +88,8 @@
bps.add(createTargetPatternBreakpoint(118, sourceName));
// while
bps.add(createTargetPatternBreakpoint(97, sourceName));
-
-
+
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint("Breakpoints", false);
@@ -113,7 +113,7 @@
terminateAndRemove(thread);
removeAllBreakpoints();
JDIDebugPlugin.getDefault().removeJavaBreakpointListener(this);
- }
+ }
}
/**
* @see IJavaBreakpointListener#addingBreakpoint(IJavaDebugTarget, IJavaBreakpoint)
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/TestToggleBreakpointsTarget.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/TestToggleBreakpointsTarget.java
index 5099803..7da9341 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/TestToggleBreakpointsTarget.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/TestToggleBreakpointsTarget.java
@@ -25,11 +25,11 @@
public TestToggleBreakpointsTarget(String name) {
super(name);
}
-
+
/**
* Tests that qualified names get created for line breakpoints in external
* files.
- *
+ *
* @throws Exception
*/
public void testExternalLineBreakpoint() throws Exception {
@@ -49,11 +49,11 @@
removeAllBreakpoints();
}
}
-
+
/**
* Tests that qualified names get created for watchpoints in external
* files.
- *
+ *
* @throws Exception
*/
public void testExternalWatchpoint() throws Exception {
@@ -72,12 +72,12 @@
manager.removeBreakpointListener(listener);
removeAllBreakpoints();
}
- }
-
+ }
+
/**
* Tests that qualified names get created for method breakpoints in external
* files.
- *
+ *
* @throws Exception
*/
public void testExternalMethodBreakpoint() throws Exception {
@@ -99,6 +99,6 @@
manager.removeBreakpointListener(listener);
removeAllBreakpoints();
}
- }
-
+ }
+
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/TestToggleBreakpointsTarget8.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/TestToggleBreakpointsTarget8.java
index 59394df..d864bac 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/TestToggleBreakpointsTarget8.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/TestToggleBreakpointsTarget8.java
@@ -20,10 +20,10 @@
* Tests the Java debugger's 'toggle breakpoints target'.
*/
public class TestToggleBreakpointsTarget8 extends AbstractToggleBreakpointsTarget {
-
-
-
-
+
+
+
+
public TestToggleBreakpointsTarget8(String name) {
super(name);
// TODO Auto-generated constructor stub
@@ -32,7 +32,7 @@
/**
* Tests that qualified names get created for method breakpoints in default method of Java 8 interface
* files.
- *
+ *
* @throws Exception
*/
public void testInterfaceDefaultMethodBreakpoint() throws Exception {
@@ -53,11 +53,11 @@
removeAllBreakpoints();
}
}
-
+
/**
* Tests that qualified names get created for method breakpoints in Static method of Java 8 interface
* files.
- *
+ *
* @throws Exception
*/
public void testInterfaceStaticMethodBreakpoint() throws Exception {
@@ -78,12 +78,12 @@
removeAllBreakpoints();
}
}
-
-
+
+
/**
* Tests that qualified names does get created for method breakpoints in unimplemented method of Java 8 interface
* files.
- *
+ *
* @throws Exception
*/
public void testInterfaceUnimplementedMethodBreakpoint() throws Exception {
@@ -99,11 +99,11 @@
removeAllBreakpoints();
}
}
-
+
/**
* Tests that qualified names get created for line breakpoints in Interface implemented method
* files.
- *
+ *
* @throws Exception
*/
public void testInterfaceLineBreakpoint() throws Exception {
@@ -123,5 +123,5 @@
removeAllBreakpoints();
}
}
-
+
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/ThreadFilterBreakpointsTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/ThreadFilterBreakpointsTests.java
index 5bd71bd..dab9328 100755
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/ThreadFilterBreakpointsTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/ThreadFilterBreakpointsTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -36,19 +36,19 @@
public void testSimpleThreadFilterBreakpoint() throws Exception {
String typeName = "HitCountLooper";
IJavaLineBreakpoint bp = createLineBreakpoint(16, typeName);
-
+
IJavaThread thread= null;
try {
thread= launchToLineBreakpoint(typeName, bp);
bp.setThreadFilter(thread);
resumeToLineBreakpoint(thread, bp);
-
+
bp.delete();
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
/**
@@ -58,23 +58,23 @@
public void testMultiThreadFilterBreakpoint() throws Exception {
String typeName = "MultiThreadedLoop";
IJavaLineBreakpoint bp1 = createLineBreakpoint(17, typeName);
-
+
IJavaThread thread= null;
try {
thread= launchToLineBreakpoint(typeName, bp1);
-
+
IJavaLineBreakpoint bp2 = createLineBreakpoint(40, typeName);
bp2.setThreadFilter(thread);
-
+
thread = resumeToLineBreakpoint(thread, bp2);
assertTrue("Suspended thread should have been '1stThread'", thread.getName().equals("1stThread"));
-
+
bp1.delete();
bp2.delete();
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
/**
@@ -84,23 +84,23 @@
public void testExceptionThreadFilterBreakpoint() throws Exception {
String typeName = "MultiThreadedException";
IJavaLineBreakpoint bp1 = createLineBreakpoint(17, typeName);
-
+
IJavaThread thread= null;
try {
thread= launchToLineBreakpoint(typeName, bp1);
IJavaExceptionBreakpoint ex1 = createExceptionBreakpoint("java.lang.NullPointerException", false, true);
ex1.setThreadFilter(thread);
-
+
thread = resume(thread);
assertTrue("Suspended thread should have been '1stThread'", thread.getName().equals("1stThread"));
-
+
bp1.delete();
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Tests that a thread filter works for a specific watchpoint
* @throws Exception
@@ -108,24 +108,24 @@
public void testAccessWatchpointThreadFilterBreakpoint() throws Exception {
String typeName = "MultiThreadedList";
IJavaLineBreakpoint bp1 = createLineBreakpoint(21, typeName);
-
+
IJavaThread thread= null;
try {
thread= launchToLineBreakpoint(typeName, bp1);
- IJavaWatchpoint wp = createWatchpoint(typeName, "list", true, false);
- wp.setThreadFilter(thread);
-
+ IJavaWatchpoint wp = createWatchpoint(typeName, "list", true, false);
+ wp.setThreadFilter(thread);
+
thread = resume(thread);
assertTrue("Suspended thread should have been '1stThread'", thread.getName().equals("1stThread"));
-
+
bp1.delete();
wp.delete();
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Tests that a thread filter is working for a specific modification watchpoint
* @throws Exception
@@ -133,21 +133,21 @@
public void testModificationWatchpointThreadFilterBreakpoint() throws Exception {
String typeName = "MultiThreadedList";
IJavaLineBreakpoint bp1 = createLineBreakpoint(22, typeName);
-
+
IJavaThread thread= null;
try {
thread= launchToLineBreakpoint(typeName, bp1);
- IJavaWatchpoint wp = createWatchpoint(typeName, "i", false, true);
- wp.setThreadFilter(thread);
-
+ IJavaWatchpoint wp = createWatchpoint(typeName, "i", false, true);
+ wp.setThreadFilter(thread);
+
thread = resume(thread);
assertTrue("Suspended thread should have been '1stThread'", thread.getName().equals("1stThread"));
-
+
bp1.delete();
wp.delete();
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/TriggerPointBreakpointsTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/TriggerPointBreakpointsTests.java
index 37cc3d7..91b519e 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/TriggerPointBreakpointsTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/TriggerPointBreakpointsTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -32,7 +32,7 @@
/**
* Tests the trigger point
- *
+ *
* @throws Exception
*/
public void testTriggerPointBreakpoint() throws Exception {
@@ -40,7 +40,7 @@
IJavaLineBreakpoint bp1 = createLineBreakpoint(25, typeName);
IJavaLineBreakpoint bp2 = createLineBreakpoint(30, typeName);
bp2.setTriggerPoint(true);
-
+
IJavaThread thread= null;
try {
thread = launchToLineBreakpoint(typeName, bp2);
@@ -48,7 +48,7 @@
IJavaStackFrame frame = (IJavaStackFrame)thread.getTopStackFrame();
IVariable var = findVariable(frame, "i");
assertNotNull("Could not find variable 'i'", var);
-
+
IJavaPrimitiveValue value = (IJavaPrimitiveValue)var.getValue();
assertNotNull("variable 'i' has no value", value);
int iValue = value.getIntValue();
@@ -56,7 +56,7 @@
var = findVariable(frame, "j");
assertNotNull("Could not find variable 'j'", var);
-
+
value = (IJavaPrimitiveValue) var.getValue();
assertNotNull("variable 'j' has no value", value);
int jValue = value.getIntValue();
@@ -67,6 +67,6 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/TypeNameBreakpointTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/TypeNameBreakpointTests.java
index 212d404..e19efdb 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/TypeNameBreakpointTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/TypeNameBreakpointTests.java
@@ -34,7 +34,7 @@
/**
* Tests getting and setting the type name for Java breakpoints
- *
+ *
* @since 3.8.200
*/
public class TypeNameBreakpointTests extends AbstractDebugTest {
@@ -72,7 +72,7 @@
/**
* Tests the {@link JavaDebugUtils#typeNamesEqual(String, String)} method
- *
+ *
* @throws Exception
*/
public void testTypeNamesEqual() throws Exception {
@@ -84,7 +84,7 @@
/**
* Returns the {@link IResource} for the class HitCountLooper
- *
+ *
* @return the {@link IResource} for HitCountLooper
*/
IResource getTestResource() throws Exception {
@@ -93,7 +93,7 @@
/**
* Util to get a line breakpoint with a null type name
- *
+ *
* @return
* @throws Exception
*/
@@ -105,7 +105,7 @@
/**
* Util to get an exception breakpoint with a null type
- *
+ *
* @return
* @throws Exception
*/
@@ -117,7 +117,7 @@
/**
* Util to get a method entry breakpoint with a null type
- *
+ *
* @return
* @throws Exception
*/
@@ -129,7 +129,7 @@
/**
* Util to get a stratum line breakpoint with no type
- *
+ *
* @return
* @throws Exception
*/
@@ -141,7 +141,7 @@
/**
* Util to get a class prepare breakpoint with a null type
- *
+ *
* @return
* @throws Exception
*/
@@ -153,7 +153,7 @@
/**
* Util to get a watchpoint with a null type
- *
+ *
* @return
* @throws Exception
*/
@@ -167,7 +167,7 @@
/**
* Util to get a method breakpoint with a null type
- *
+ *
* @return
* @throws Exception
*/
@@ -180,7 +180,7 @@
/**
* Tests {@link JDIDebugModel#createLineBreakpoint(org.eclipse.core.resources.IResource, String, int, int, int, int, boolean, java.util.Map)} with
* a null type name
- *
+ *
* @throws Exception
*/
public void testCreateLineBPNullTypeName() throws Exception {
@@ -197,7 +197,7 @@
* Tests the
* {@link JDIDebugModel#createMethodBreakpoint(IResource, String, String, String, boolean, boolean, boolean, int, int, int, int, boolean, java.util.Map)}
* method with null type infos
- *
+ *
* @throws Exception
*/
public void testCreateMethodBPNullTypeName() throws Exception {
@@ -213,7 +213,7 @@
/**
* Tests the {@link JDIDebugModel#createExceptionBreakpoint(IResource, String, boolean, boolean, boolean, boolean, java.util.Map)} method with
* null type infos
- *
+ *
* @throws Exception
*/
public void testCreateExceptionBPNullTypeName() throws Exception {
@@ -229,7 +229,7 @@
/**
* Tests the {@link JDIDebugModel#createClassPrepareBreakpoint(IResource, String, int, int, int, boolean, java.util.Map)} method with null type
* infos
- *
+ *
* @throws Exception
*/
public void testCreateClassPrepareBPNullTypeName() throws Exception {
@@ -245,7 +245,7 @@
/**
* Tests the {@link JDIDebugModel#createWatchpoint(IResource, String, String, int, int, int, int, boolean, java.util.Map)} method with null type
* infos
- *
+ *
* @throws Exception
*/
public void testCreateWatchpointBPNullTypeName() throws Exception {
@@ -261,7 +261,7 @@
/**
* Tests the {@link JDIDebugModel#createStratumBreakpoint(IResource, String, String, String, String, int, int, int, int, boolean, java.util.Map)}
* method with null type infos
- *
+ *
* @throws Exception
*/
public void testCreateStratumBPNullTypeName() throws Exception {
@@ -277,7 +277,7 @@
/**
* Tests the {@link JDIDebugModel#createMethodEntryBreakpoint(IResource, String, String, String, int, int, int, int, boolean, java.util.Map)}
* method with null type infos
- *
+ *
* @throws Excpetion
*/
public void testCreateMethodEntryBPNullTypeName() throws Exception {
@@ -292,7 +292,7 @@
/**
* Tests the {@link JDIModelPresentation#getMarkerTypeName}
- *
+ *
* @throws Exception
*/
public void testGetPresentationNullTypeName() throws Exception {
@@ -308,7 +308,7 @@
/**
* Tests the {@link JDIModelPresentation#getExceptionBreakpointText} with a null type name
- *
+ *
* @throws Exception
*/
public void testGetPresentationTypeNameNull2() throws Exception {
@@ -324,7 +324,7 @@
/**
* Tests the {@link JDIModelPresentation#getLineBreakpointText} with a null type name
- *
+ *
* @throws Exception
*/
public void testGetPresentationTypeNameNull3() throws Exception {
@@ -340,7 +340,7 @@
/**
* Tests the {@link JDIModelPresentation#getClassPrepareBreakpointText} with a null type name
- *
+ *
* @throws Exception
*/
public void testGetPresentationTypeNameNull4() throws Exception {
@@ -356,7 +356,7 @@
/**
* Tests the {@link JDIModelPresentation#getWatchpointText} with a null type name
- *
+ *
* @throws Exception
*/
public void testGetPresentationTypeNameNull5() throws Exception {
@@ -372,7 +372,7 @@
/**
* Tests the {@link JDIModelPresentation#getMethodBreakpointText} with a null type name
- *
+ *
* @throws Exception
*/
public void testGetPresentationTypeNameNull6() throws Exception {
@@ -388,7 +388,7 @@
/**
* Tests the {@link JDIModelPresentation#getStratumLineBreakpointText} with a null type name
- *
+ *
* @throws Exception
*/
public void testGetPresentationTypeNameNull7() throws Exception {
@@ -404,7 +404,7 @@
/**
* Tests the {@link JDIDebugModel#lineBreakpointExists(String, int)} method
- *
+ *
* @throws Exception
*/
public void testJDIDebugModelTypeName2() throws Exception {
@@ -419,7 +419,7 @@
/**
* Tests the {@link JDIDebugModel#lineBreakpointExists(String, int)} method with a null type name
- *
+ *
* @throws Exception
*/
public void testJDIModelTypeNameNull1() throws Exception {
@@ -434,7 +434,7 @@
/**
* Tests that launching with a null typed breakpoint does not suspend and does not cause a failure while trying to create requests
- *
+ *
* @throws Exception
*/
public void testLaunchNullTypeLineBreakpoint() throws Exception {
@@ -452,7 +452,7 @@
/**
* Tests launching with an exception breakpoint with a null type name
- *
+ *
* @throws Exception
*/
public void testLaunchNullTypeExceptionBreakpoint() throws Exception {
@@ -470,7 +470,7 @@
/**
* Tests launching with a watchpoint with a null type
- *
+ *
* @throws Exception
*/
public void testLaunchNullTypeWatchpoint() throws Exception {
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/WatchpointTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/WatchpointTests.java
index abea61a..985f124 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/WatchpointTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/WatchpointTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -26,7 +26,7 @@
* Tests watchpoint, both modification and access watchpoints
*/
public class WatchpointTests extends AbstractDebugTest {
-
+
/**
* Constructor
* @param name
@@ -41,9 +41,9 @@
*/
public void testAccessAndModification() throws Exception {
String typeName = "org.eclipse.debug.tests.targets.Watchpoint";
-
+
IJavaWatchpoint wp = createWatchpoint(typeName, "list", true, true);
-
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
@@ -52,12 +52,12 @@
IBreakpoint hit = getBreakpoint(thread);
IStackFrame frame = thread.getTopStackFrame();
assertNotNull("No breakpoint", hit);
-
+
// should be modification
assertTrue("First hit should be modification", !wp.isAccessSuspend(thread.getDebugTarget()));
// line 27
assertEquals("Should be on line 27", 27, frame.getLineNumber());
-
+
// should hit access 10 times
int count = 10;
while (count > 0) {
@@ -73,24 +73,24 @@
assertEquals("Should be line 30", 30, frame.getLineNumber());
count--;
}
-
+
resumeAndExit(thread);
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Tests that a modification breakpoint suspends correctly
* @throws Exception
*/
public void testModification() throws Exception {
String typeName = "org.eclipse.debug.tests.targets.Watchpoint";
-
+
IJavaWatchpoint wp = createWatchpoint(typeName, "list", false, true);
-
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
@@ -99,48 +99,48 @@
IBreakpoint hit = getBreakpoint(thread);
IStackFrame frame = thread.getTopStackFrame();
assertNotNull("No breakpoint", hit);
-
+
// should be modification
assertTrue("First hit should be modification", !wp.isAccessSuspend(thread.getDebugTarget()));
// line 27
assertEquals("Should be on line 27", 27, frame.getLineNumber());
-
+
resumeAndExit(thread);
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
/**
* Tests that a disabled modification watchpoint is NOT hit
* @throws Exception
*/
public void testDisabledModification() throws Exception {
String typeName = "org.eclipse.debug.tests.targets.Watchpoint";
-
+
IJavaWatchpoint wp = createWatchpoint(typeName, "list", false, true);
wp.setEnabled(false);
-
+
IJavaDebugTarget debugTarget= null;
try {
debugTarget= launchAndTerminate(typeName);
} finally {
terminateAndRemove(debugTarget);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
/**
* Tests that an access watchpoint is hit
* @throws Exception
*/
public void testAccess() throws Exception {
String typeName = "org.eclipse.debug.tests.targets.Watchpoint";
-
+
IJavaWatchpoint wp = createWatchpoint(typeName, "list", true, false);
-
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
@@ -150,8 +150,8 @@
IStackFrame frame = thread.getTopStackFrame();
assertNotNull("No breakpoint", wp);
assertTrue("Should be an access", wp.isAccessSuspend(thread.getDebugTarget()));
- assertEquals("Should be line 30", 30, frame.getLineNumber());
-
+ assertEquals("Should be line 30", 30, frame.getLineNumber());
+
// should hit access 9 more times
int count = 9;
while (count > 0) {
@@ -167,14 +167,14 @@
assertEquals("Should be line 30", 30, frame.getLineNumber());
count--;
}
-
+
resumeAndExit(thread);
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
+ }
+ }
/**
* Tests that a disabled access watchpoint is not hit
@@ -182,9 +182,9 @@
*/
public void testDisabledAccess() throws Exception {
String typeName = "org.eclipse.debug.tests.targets.Watchpoint";
-
+
IJavaWatchpoint wp = createWatchpoint(typeName, "list", true, false);
-
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
@@ -198,17 +198,17 @@
throw new TestAgainException("Retest - the debug target is terminated or disconnected");
}
assertTrue("Should be an access", wp.isAccessSuspend(thread.getDebugTarget()));
- assertEquals("Should be line 30", 30, frame.getLineNumber());
-
+ assertEquals("Should be line 30", 30, frame.getLineNumber());
+
wp.setEnabled(false);
-
+
resumeAndExit(thread);
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
+ }
+ }
/**
* Tests that an access watchpoint suspends when it count is hit
@@ -216,10 +216,10 @@
*/
public void testHitCountAccess() throws Exception {
String typeName = "org.eclipse.debug.tests.targets.Watchpoint";
-
+
IJavaWatchpoint wp = createWatchpoint(typeName, "list", true, false);
wp.setHitCount(4);
-
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
@@ -229,18 +229,18 @@
IJavaStackFrame frame = (IJavaStackFrame) thread.getTopStackFrame();
assertNotNull("No breakpoint", hit);
assertTrue("Should be an access", wp.isAccessSuspend(thread.getDebugTarget()));
- assertEquals("Should be line 30", 30, frame.getLineNumber());
+ assertEquals("Should be line 30", 30, frame.getLineNumber());
IVariable var = findVariable(frame, "value");
assertNotNull("Could not find variable 'value'", var);
-
+
// retrieve an instance var
IJavaPrimitiveValue value = (IJavaPrimitiveValue)var.getValue();
assertNotNull(value);
int varValue = value.getIntValue();
- assertTrue("'value' should be 7", varValue == 7);
-
+ assertTrue("'value' should be 7", varValue == 7);
+
wp.setHitCount(0);
-
+
// should hit access 6 more times
int count = 6;
while (count > 0) {
@@ -256,24 +256,24 @@
assertEquals("Should be line 30", 30, frame.getLineNumber());
count--;
}
-
+
resumeAndExit(thread);
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
/**
* Tests that a watchpoint set to be skipped is indeed skipped
* @throws Exception
*/
public void testSkipWatchpoint() throws Exception {
String typeName = "org.eclipse.debug.tests.targets.Watchpoint";
-
+
IJavaWatchpoint wp = createWatchpoint(typeName, "list", true, true);
-
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
@@ -282,12 +282,12 @@
IBreakpoint hit = getBreakpoint(thread);
IStackFrame frame = thread.getTopStackFrame();
assertNotNull("No breakpoint", hit);
-
+
// should be modification
assertTrue("First hit should be modification", !wp.isAccessSuspend(thread.getDebugTarget()));
// line 27
assertEquals("Should be on line 27", 27, frame.getLineNumber());
-
+
getBreakpointManager().setEnabled(false);
resumeAndExit(thread);
@@ -295,12 +295,12 @@
terminateAndRemove(thread);
removeAllBreakpoints();
getBreakpointManager().setEnabled(true);
- }
- }
+ }
+ }
/**
* Tests that a watchpoint set to be skipped is indeed skipped
- *
+ *
* @throws Exception
*/
public void testFinalWatchpoint() throws Exception {
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/connectors/MultipleConnectionsTest.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/connectors/MultipleConnectionsTest.java
index caf70b7..4735c7d 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/connectors/MultipleConnectionsTest.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/connectors/MultipleConnectionsTest.java
@@ -63,7 +63,7 @@
/**
* Ensure out-of-the-box settings mimics previous behaviour of accepting a
* single connection
- *
+ *
* @throws IOException
*/
@Test
@@ -80,7 +80,7 @@
/**
* Ensure connector accepts a single connection
- *
+ *
* @throws InterruptedException
*/
@Test
@@ -99,7 +99,7 @@
/**
* Ensure out-of-the-box settings mimics previous behaviour of accepting a
* single connection
- *
+ *
* @throws InterruptedException
*/
@Test
@@ -118,7 +118,7 @@
/**
* Ensure out-of-the-box settings mimics previous behaviour of accepting a
* single connection
- *
+ *
* @throws InterruptedException
*/
@Test
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/AlternateStratumTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/AlternateStratumTests.java
index af118f9..dbdce7f 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/AlternateStratumTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/AlternateStratumTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -39,7 +39,7 @@
/**
* Test available strata on a type with alternate strata
- *
+ *
* @throws Exception
*/
public void testAvailableStrata() throws Exception {
@@ -64,7 +64,7 @@
/**
* Test default stratum on a type with alternate strata.
- *
+ *
* @throws Exception
*/
public void testDefaultStratum() throws Exception {
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/ArgumentTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/ArgumentTests.java
index 56689e1..286cf49 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/ArgumentTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/ArgumentTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -36,7 +36,7 @@
* Tests for program and VM arguments
*/
public class ArgumentTests extends AbstractDebugTest {
-
+
private Object fLock = new Object();
private class ConsoleArgumentOutputRetriever implements IConsoleLineTrackerExtension {
@@ -44,7 +44,7 @@
StringBuffer buffer;
IDocument document;
boolean closed = false;
-
+
/**
* @see org.eclipse.debug.ui.console.IConsoleLineTracker#dispose()
*/
@@ -67,13 +67,13 @@
public void lineAppended(IRegion line) {
try {
assertNotNull("received notification of invalid line", line);
- assertNotNull("buffer is null", buffer);
+ assertNotNull("buffer is null", buffer);
buffer.append(document.get(line.getOffset(), line.getLength()));
} catch (BadLocationException e) {
e.printStackTrace();
}
}
-
+
/**
* @see org.eclipse.debug.ui.console.IConsoleLineTrackerExtension#consoleClosed()
*/
@@ -99,11 +99,11 @@
}
}
if (!closed) {
- // output contents to console in case of error
+ // output contents to console in case of error
if (buffer != null) {
System.out.println();
System.out.println(ArgumentTests.this.getName());
- System.out.println("\treceived " + buffer.length() + " chars: " + buffer.toString());
+ System.out.println("\treceived " + buffer.length() + " chars: " + buffer.toString());
}
}
assertNotNull("Line tracker did not receive init notification", buffer);
@@ -121,7 +121,7 @@
super(name);
}
- /**
+ /**
* Creates and returns a new launch config the given name
*/
protected ILaunchConfigurationWorkingCopy newConfiguration(IContainer container, String name) throws CoreException {
@@ -167,7 +167,7 @@
}
/**
* Test a VM argument with the quoting style we recommended as a workaround
- * to a bug (now fixed) that we suggested in the past.
+ * to a bug (now fixed) that we suggested in the past.
* Program output should be: foo bar
* @throws CoreException
*/
@@ -200,7 +200,7 @@
public void testVMArgEmbeddedCreativeQuotes() throws CoreException {
testWithVMArg("-Dfoo=fo\"\\\"o b\\\"\"ar", "fo\"o b\"ar");
}
-
+
/*
* Program argument tests
*/
@@ -262,7 +262,7 @@
public void testProgramArgCreativeEmbeddedQuotes() throws CoreException {
testWithProgramArg("f\\\"o\\\"o", "f\"o\"o");
}
-
+
/**
* Test a program argument with one empty string
*
@@ -274,28 +274,28 @@
// assert that it's really the empty string:
testWithProgramArg("\"\"", "");
}
-
+
/**
* Test a program with an empty string among other args.
- *
+ *
* Program output should be: 4
* @throws CoreException
*/
public void testProgramArgEmptyStringWithOthers() throws CoreException {
testProgramArgCount("word1 \"\" \"part1 part2\" word2", "4");
}
-
+
/**
* Test a program argument with one double quote. We should pass in the
* empty string to match Java console behavior.
- *
+ *
* Program output should be: 1
* @throws CoreException
*/
public void testProgramArgOneQuote() throws CoreException {
testProgramArgCount("\"", "1");
}
-
+
/**
* Runs the FooPropertyPrinter with the given VM arguments and checks for
* the given output.
@@ -305,7 +305,7 @@
private void testWithVMArg(String argString, String outputValue) throws CoreException {
testOutput("FooPropertyPrinter", argString, null, outputValue);
}
-
+
/**
* Runs the ArgumentPrinter with the given program arguments
* @param argString
@@ -315,7 +315,7 @@
private void testWithProgramArg(String argString, String outputValue) throws CoreException {
testOutput("ArgumentPrinter", null, argString, outputValue);
}
-
+
/**
* Runs the ArgumentCounter with the given program arguments
* @param argString
@@ -324,8 +324,8 @@
*/
private void testProgramArgCount(String argString, String outputValue) throws CoreException {
testOutput("ArgumentCounter", null, argString, outputValue);
- }
-
+ }
+
/**
* Runs the given program with the given VM arguments and the given program arguments and
* asserts that the output matches the given output.
@@ -349,7 +349,7 @@
Map<String, String> map = new HashMap<String, String>(1);
map.put(IJavaLaunchConfigurationConstants.ATTR_JAVA_COMMAND, "java");
workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_TYPE_SPECIFIC_ATTRS_MAP, map);
-
+
ConsoleArgumentOutputRetriever retriever = new ConsoleArgumentOutputRetriever();
ConsoleLineTracker.setDelegate(retriever);
IProcess process = null;
@@ -383,7 +383,7 @@
}
}
}
-
+
/**
* Tests the default VM args
* @throws CoreException
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/ArrayTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/ArrayTests.java
index 98bb1ff..3a03a7c 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/ArrayTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/ArrayTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -34,7 +34,7 @@
public void testGetSize() throws Exception {
String typeName = "ArrayTests";
ILineBreakpoint bp = createLineBreakpoint(19, typeName);
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -47,14 +47,14 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
-
+
+
public void testGetVariable() throws Exception {
String typeName = "ArrayTests";
ILineBreakpoint bp = createLineBreakpoint(19, typeName);
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -70,13 +70,13 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
public void testGetVariableRange() throws Exception {
String typeName = "ArrayTests";
ILineBreakpoint bp = createLineBreakpoint(19, typeName);
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -91,17 +91,17 @@
for (int i = 0; i < 15; i++) {
assertEquals("Wrong value", ((IJavaDebugTarget)frame.getDebugTarget()).newValue(50 + i), variables[i].getValue());
}
-
+
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
public void testSetValueRange() throws Exception {
String typeName = "ByteArrayTests";
ILineBreakpoint bp = createLineBreakpoint(27, typeName);
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -132,13 +132,13 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
public void testCreateArray() throws Exception {
String typeName = "ByteArrayTests";
ILineBreakpoint bp = createLineBreakpoint(32, typeName);
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -157,7 +157,7 @@
IJavaArray javaArray = type.newInstance(6000);
v.setValue(javaArray);
IJavaArray array = (IJavaArray) v.getValue();
-
+
IJavaValue[] replacements = new IJavaValue[6000];
for (int i = 0; i < replacements.length; i++) {
replacements[i] = target.newValue((byte)23);
@@ -173,9 +173,9 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
/**
* Sets a zero-length array as the new values
* @throws Exception
@@ -184,7 +184,7 @@
public void testSetZeroLengthArray() throws Exception {
String typeName = "ByteArrayTests";
ILineBreakpoint bp = createLineBreakpoint(32, typeName);
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -198,7 +198,7 @@
IJavaArray javaArray = type.newInstance(1);
v.setValue(javaArray);
IJavaArray array = (IJavaArray) v.getValue();
-
+
IJavaValue[] replacements = new IJavaValue[0];
array.setValues(replacements);
// the overall size of the array will never change size, and trying to set no values has not effect
@@ -206,19 +206,19 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
/**
* Tries to set a new array with a starting index of -1
- *
+ *
* @throws Exception
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=359450
*/
public void testSetBadLowerIndexArray() throws Exception {
String typeName = "ByteArrayTests";
ILineBreakpoint bp = createLineBreakpoint(32, typeName);
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -233,7 +233,7 @@
IJavaArray javaArray = type.newInstance(1);
v.setValue(javaArray);
IJavaArray array = (IJavaArray) v.getValue();
-
+
IJavaValue[] replacements = {target.nullValue()};
try {
array.setValues(-1, 0, replacements, 0);
@@ -246,9 +246,9 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Tries to set an array with an index greater than the total length of the source array
* @throws Exception
@@ -257,7 +257,7 @@
public void testSetBadUpperIndexArray() throws Exception {
String typeName = "ByteArrayTests";
ILineBreakpoint bp = createLineBreakpoint(32, typeName);
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -271,7 +271,7 @@
IJavaArray javaArray = type.newInstance(1);
v.setValue(javaArray);
IJavaArray array = (IJavaArray) v.getValue();
-
+
IJavaDebugTarget target = (IJavaDebugTarget) frame.getDebugTarget();
IJavaValue bite = target.newValue((byte)-1);
IJavaValue[] replacements = {bite};
@@ -286,9 +286,9 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Tries to set an array with an index greater than the total length of the soure array
* @throws Exception
@@ -297,7 +297,7 @@
public void testSetExactUpperIndexArray() throws Exception {
String typeName = "ByteArrayTests";
ILineBreakpoint bp = createLineBreakpoint(32, typeName);
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -326,9 +326,9 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Tries to set an array with a source index greater than the total length of the new values array
* @throws Exception
@@ -337,7 +337,7 @@
public void testSetBadLowerSrcIndexArray() throws Exception {
String typeName = "ByteArrayTests";
ILineBreakpoint bp = createLineBreakpoint(32, typeName);
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -366,9 +366,9 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Tries to set an array with a source index greater than the total length of the new values array
* @throws Exception
@@ -377,7 +377,7 @@
public void testSetBadUpperSrcIndexArray() throws Exception {
String typeName = "ByteArrayTests";
ILineBreakpoint bp = createLineBreakpoint(32, typeName);
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -406,9 +406,9 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Tries to set an array with a source index greater than the total length of the new values array
* @throws Exception
@@ -417,7 +417,7 @@
public void testSetExactSrcIndexArray() throws Exception {
String typeName = "ByteArrayTests";
ILineBreakpoint bp = createLineBreakpoint(32, typeName);
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -446,9 +446,9 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Tries to set an array with a length less than -1
* @throws Exception
@@ -457,7 +457,7 @@
public void testSetBadLowerLengthArray() throws Exception {
String typeName = "ByteArrayTests";
ILineBreakpoint bp = createLineBreakpoint(32, typeName);
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -486,9 +486,9 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Tries to set an array with a length equal to -1
* @throws Exception
@@ -497,7 +497,7 @@
public void testSetMinus1LengthArray() throws Exception {
String typeName = "ByteArrayTests";
ILineBreakpoint bp = createLineBreakpoint(32, typeName);
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -524,18 +524,18 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
- * Tries to set an array where the given length and index combined exceed the length of the array
+ * Tries to set an array where the given length and index combined exceed the length of the array
* @throws Exception
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=359450
*/
public void testSetBadLengthPlusIndexArray() throws Exception {
String typeName = "ByteArrayTests";
ILineBreakpoint bp = createLineBreakpoint(32, typeName);
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -564,18 +564,18 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
- * Tries to set an array where the given length and source index combined exceed the length of the array
+ * Tries to set an array where the given length and source index combined exceed the length of the array
* @throws Exception
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=359450
*/
public void testSetBadLengthPlusSrcIndexArray() throws Exception {
String typeName = "ByteArrayTests";
ILineBreakpoint bp = createLineBreakpoint(32, typeName);
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -603,9 +603,9 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Tries to set an array where the source array is longer than the array to set the values into
* @throws Exception
@@ -614,7 +614,7 @@
public void testSetLongerSrcArray() throws Exception {
String typeName = "ByteArrayTests";
ILineBreakpoint bp = createLineBreakpoint(32, typeName);
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -640,6 +640,6 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/BootpathTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/BootpathTests.java
index c1f1218..fc822d6 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/BootpathTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/BootpathTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -28,14 +28,14 @@
* Tests bootpath settings
*/
public class BootpathTests extends AbstractDebugTest {
-
+
public BootpathTests(String name) {
super(name);
}
public void testDefaultBootpath() throws Exception {
ILaunchConfiguration config = getLaunchConfiguration("Breakpoints");
-
+
JavaLaunchDelegate delegate = new JavaLaunchDelegate();
String[] path = delegate.getBootpath(config);
assertNull("Default bootpath should be null", path);
@@ -46,13 +46,13 @@
assertNull("Main bootpath should be null", pathInfo[1]);
assertNull("Append bootpath should be null", pathInfo[2]);
}
-
+
public void testEmptyBootpath() throws Exception {
ILaunchConfiguration config = getLaunchConfiguration("Breakpoints");
ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
-
+
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_DEFAULT_CLASSPATH, false);
-
+
JavaLaunchDelegate delegate = new JavaLaunchDelegate();
String[] path = delegate.getBootpath(wc);
assertNotNull("Empty bootpath should be empty array", path);
@@ -64,7 +64,7 @@
assertNull("Main bootpath should be empty array", pathInfo[1]);
assertNull("Append bootpath should be null", pathInfo[2]);
}
-
+
public void testPrependBootpath() throws Exception {
ILaunchConfiguration config = getLaunchConfiguration("Breakpoints");
ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
@@ -80,10 +80,10 @@
IRuntimeClasspathEntry entry = newpath[i];
mementos.add(entry.getMemento());
}
-
+
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_DEFAULT_CLASSPATH, false);
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_CLASSPATH, mementos);
-
+
JavaLaunchDelegate delegate = new JavaLaunchDelegate();
Map<String, Object> map = delegate.getVMSpecificAttributesMap(wc);
assertNotNull("Missing VM specific attributes map", map);
@@ -91,6 +91,6 @@
assertNotNull("Missing bootpath prepend", pre);
assertEquals("Incorrect number of prepends", 1, prepath.length);
assertEquals("wrong prepended path", jar.getLocation().toOSString(), prepath[0]);
- }
-
+ }
+
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/ClasspathContainerTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/ClasspathContainerTests.java
index 70a4014..250f578 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/ClasspathContainerTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/ClasspathContainerTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -37,9 +37,9 @@
* Tests JRE classpath container
*/
public class ClasspathContainerTests extends AbstractDebugTest {
-
+
class FakeContainer implements IClasspathContainer {
-
+
IClasspathEntry[] entries = new IClasspathEntry[0];
/**
* @see org.eclipse.jdt.core.IClasspathContainer#getClasspathEntries()
@@ -72,7 +72,7 @@
public IPath getPath() {
return new Path(JavaRuntime.JRE_CONTAINER);
}
-
+
/**
* @param cpe
*/
@@ -81,7 +81,7 @@
}
}
-
+
/**
* @param name
*/
@@ -107,11 +107,11 @@
standin.setJavadocLocation(def.getJavadocLocation());
standin.setLibraryLocations(JavaRuntime.getLibraryLocations(def));
standin.convertToRealVM();
-
+
// ensure the new VM exists
IVMInstall newVM = def.getVMInstallType().findVMInstall(vmId);
assertNotNull("Failed to create new VM", newVM);
-
+
JREContainer container = new JREContainer(newVM, containerPath, get14Project());
JREContainerInitializer initializer = new JREContainerInitializer();
// store the current library settings
@@ -119,22 +119,22 @@
assertTrue("Libraries should not be empty", originalLibs.length > 0);
IClasspathEntry[] originalEntries = container.getClasspathEntries();
assertEquals("Libraries should be same size as classpath entries", originalLibs.length, originalEntries.length);
-
+
// ensure we can update
assertTrue("Initializer will not accept update", initializer.canUpdateClasspathContainer(containerPath, get14Project()));
-
+
// update to an empty set of libraries
FakeContainer fakeContainer = new FakeContainer();
initializer.requestClasspathContainerUpdate(containerPath, get14Project(), fakeContainer);
-
+
// ensure the library locations are now empty on the new VM
LibraryLocation[] newLibs = JavaRuntime.getLibraryLocations(newVM);
assertEquals("Libraries should be empty", 0, newLibs.length);
-
+
// re-set to original libraries
fakeContainer.setEntries(originalEntries);
initializer.requestClasspathContainerUpdate(containerPath, get14Project(), fakeContainer);
-
+
// ensure libraries are restored
newLibs = JavaRuntime.getLibraryLocations(newVM);
assertEquals("Libraries should be restored", originalLibs.length, newLibs.length);
@@ -142,13 +142,13 @@
LibraryLocation location = newLibs[i];
LibraryLocation origi = originalLibs[i];
assertEquals("Library should be the equal", origi.getSystemLibraryPath().toFile(), location.getSystemLibraryPath().toFile());
- }
+ }
}
-
-
+
+
/**
* Tests library comparison case sensitivity.
- *
+ *
* @throws CoreException
*/
public void testLibraryCaseSensitivity() {
@@ -166,17 +166,17 @@
set1[i] = new LibraryLocation(p1, null, null);
set2[i] = new LibraryLocation(p2, null, null);
}
- boolean equal = JRERuntimeClasspathEntryResolver.isSameArchives(set1, set2);
+ boolean equal = JRERuntimeClasspathEntryResolver.isSameArchives(set1, set2);
if (caseSensitive) {
assertFalse("Libraries should *not* be equal on case sensitive platform", equal);
} else {
assertTrue("Libraries *should* be equal on case sensitive platform", equal);
}
- }
-
+ }
+
/**
* Tests that an index can be added to a {@link LibraryLocation}
- *
+ *
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=399098
* @since 3.8.100
*/
@@ -214,11 +214,11 @@
// and it should have a value of the original indexURL in its string form.
assertEquals(indexURL.toString(), indexloc);
}
-
+
/**
* Tests that an index can be added to a {@link LibraryLocation} and that successive calls to
* {@link JavaRuntime#getLibraryLocations(IVMInstall)} does not erase the index infos
- *
+ *
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=399098
* @since 3.8.100
*/
@@ -254,5 +254,5 @@
// return the index URL
URL indexURL = indexPath.toFile().toURI().toURL();
return indexURL;
- }
+ }
}
\ No newline at end of file
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/ClasspathProviderTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/ClasspathProviderTests.java
index 3538ae5..f6c5e0c 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/ClasspathProviderTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/ClasspathProviderTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -35,7 +35,7 @@
* Tests runtime classpath provider extension point
*/
public class ClasspathProviderTests extends AbstractDebugTest {
-
+
public ClasspathProviderTests(String name) {
super(name);
}
@@ -43,20 +43,20 @@
public void testEmptyProvider() throws Exception {
ILaunchConfiguration config = getLaunchConfiguration("Breakpoints");
ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
-
+
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_CLASSPATH_PROVIDER, "org.eclipse.jdt.debug.tests.EmptyClasspathProvider");
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_SOURCE_PATH_PROVIDER, "org.eclipse.jdt.debug.tests.EmptyClasspathProvider");
-
+
IRuntimeClasspathProvider cpProvider = JavaRuntime.getClasspathProvider(wc);
IRuntimeClasspathProvider spProvider = JavaRuntime.getSourceLookupPathProvider(wc);
-
+
assertNotNull("Did not retrieve classpath provider", cpProvider);
assertNotNull("Did not retrieve source path provider", spProvider);
-
+
assertEquals("Classpath should be empty", 0, cpProvider.computeUnresolvedClasspath(config).length);
assertEquals("Source path should be empty", 0, spProvider.computeUnresolvedClasspath(config).length);
}
-
+
/**
* Test that a variable set to the location of an archive resolves properly.
*/
@@ -72,7 +72,7 @@
assertEquals("Resolved path not correct", archive.getFullPath(), resolved[0].getPath());
assertEquals("Resolved path not correct", archive.getLocation(), new Path(resolved[0].getLocation()));
}
-
+
/**
* Test that a variable set to the location of an archive via variable
* extension resolves properly.
@@ -91,7 +91,7 @@
}
// BOOTPATH TESTS
-
+
/**
* Test that a variable added to the bootpath is resolved to be on the bootpath.
*/
@@ -107,12 +107,12 @@
assertEquals("Should be one resolved entry", 1, resolved.length);
assertEquals("Resolved path not correct", archive.getFullPath(), resolved[0].getPath());
assertEquals("Resolved path not correct", archive.getLocation(), new Path(resolved[0].getLocation()));
- assertEquals("Resolved entry should be on bootpath", IRuntimeClasspathEntry.BOOTSTRAP_CLASSES, resolved[0].getClasspathProperty());
+ assertEquals("Resolved entry should be on bootpath", IRuntimeClasspathEntry.BOOTSTRAP_CLASSES, resolved[0].getClasspathProperty());
}
-
+
/**
* Test that an extended variable added to the bootpath is resolved to be on the bootpath.
- */
+ */
public void testBootpathVariableExtensionResolution() throws Exception {
IResource archive = get14Project().getProject().getFolder("src").getFile("A.jar");
IProject root = get14Project().getProject();
@@ -125,9 +125,9 @@
assertEquals("Should be one resolved entry", 1, resolved.length);
assertEquals("Resolved path not correct", archive.getFullPath(), resolved[0].getPath());
assertEquals("Resolved path not correct", archive.getLocation(), new Path(resolved[0].getLocation()));
- assertEquals("Resolved entry should be on bootpath", IRuntimeClasspathEntry.BOOTSTRAP_CLASSES, resolved[0].getClasspathProperty());
+ assertEquals("Resolved entry should be on bootpath", IRuntimeClasspathEntry.BOOTSTRAP_CLASSES, resolved[0].getClasspathProperty());
}
-
+
/**
* Test that a project added to the bootpath is resolved to be on the bootpath.
*/
@@ -140,9 +140,9 @@
IRuntimeClasspathEntry[] resolved = JavaRuntime.resolveRuntimeClasspathEntry(runtimeClasspathEntry, get14Project());
assertEquals("Should be one resolved entry", 1, resolved.length);
assertEquals("Resolved path not correct", outputFolder.getLocation().toOSString(), resolved[0].getLocation());
- assertEquals("Resolved entry should be on bootpath", IRuntimeClasspathEntry.BOOTSTRAP_CLASSES, resolved[0].getClasspathProperty());
+ assertEquals("Resolved entry should be on bootpath", IRuntimeClasspathEntry.BOOTSTRAP_CLASSES, resolved[0].getClasspathProperty());
}
-
+
/**
* Test that a container added to the bootpath is resolved to have all entries on
* the boothpath.
@@ -155,7 +155,7 @@
assertEquals("Entry should be on bootpath", IRuntimeClasspathEntry.BOOTSTRAP_CLASSES, resolved[i].getClasspathProperty());
}
}
-
+
/**
* Test that a jar added to the bootpath is resolved to be on the bootpath.
*/
@@ -169,12 +169,12 @@
assertEquals("Should be one resolved entry", 1, resolved.length);
assertEquals("Resolved path not correct", archive.getFullPath(), resolved[0].getPath());
assertEquals("Resolved path not correct", archive.getLocation(), new Path(resolved[0].getLocation()));
- assertEquals("Resolved entry should be on bootpath", IRuntimeClasspathEntry.BOOTSTRAP_CLASSES, resolved[0].getClasspathProperty());
+ assertEquals("Resolved entry should be on bootpath", IRuntimeClasspathEntry.BOOTSTRAP_CLASSES, resolved[0].getClasspathProperty());
}
-
+
/**
* Test that a folder added to the bootpath is resolved to be on the bootpath.
- */
+ */
public void testBootpathFolderResolution() throws Exception {
IResource folder = get14Project().getProject().getFolder("src");
assertTrue("Folder does not exist", folder.exists());
@@ -185,9 +185,9 @@
assertEquals("Should be one resolved entry", 1, resolved.length);
assertEquals("Resolved path not correct", folder.getFullPath(), resolved[0].getPath());
assertEquals("Resolved path not correct", folder.getLocation(), new Path(resolved[0].getLocation()));
- assertEquals("Resolved entry should be on bootpath", IRuntimeClasspathEntry.BOOTSTRAP_CLASSES, resolved[0].getClasspathProperty());
+ assertEquals("Resolved entry should be on bootpath", IRuntimeClasspathEntry.BOOTSTRAP_CLASSES, resolved[0].getClasspathProperty());
}
-
+
/**
* Test that a project with non-default output locations placed on the bootpath
* resolves to entries on the bootpath.
@@ -203,11 +203,11 @@
IRuntimeClasspathEntry entry = resolved[i];
assertEquals("Resolved entry should be on bootpath", IRuntimeClasspathEntry.BOOTSTRAP_CLASSES, entry.getClasspathProperty());
}
-
+
}
-
+
// USER CLASSES TESTS
-
+
/**
* Test that a variable added to the user application classpath is resolved to be on
* the user application classpath.
@@ -224,13 +224,13 @@
assertEquals("Should be one resolved entry", 1, resolved.length);
assertEquals("Resolved path not correct", archive.getFullPath(), resolved[0].getPath());
assertEquals("Resolved path not correct", archive.getLocation(), new Path(resolved[0].getLocation()));
- assertEquals("Resolved entry should be on user classpath", IRuntimeClasspathEntry.USER_CLASSES, resolved[0].getClasspathProperty());
+ assertEquals("Resolved entry should be on user classpath", IRuntimeClasspathEntry.USER_CLASSES, resolved[0].getClasspathProperty());
}
-
+
/**
* Test that an extended variable added to the user classpath is resolved to be
* on the user classpath.
- */
+ */
public void testUserClassesVariableExtensionResolution() throws Exception {
IResource archive = get14Project().getProject().getFolder("src").getFile("A.jar");
IProject root = get14Project().getProject();
@@ -243,9 +243,9 @@
assertEquals("Should be one resolved entry", 1, resolved.length);
assertEquals("Resolved path not correct", archive.getFullPath(), resolved[0].getPath());
assertEquals("Resolved path not correct", archive.getLocation(), new Path(resolved[0].getLocation()));
- assertEquals("Resolved entry should be on user classpath", IRuntimeClasspathEntry.USER_CLASSES, resolved[0].getClasspathProperty());
+ assertEquals("Resolved entry should be on user classpath", IRuntimeClasspathEntry.USER_CLASSES, resolved[0].getClasspathProperty());
}
-
+
/**
* Test that a project added to the user classpath is resolved to be on the
* user classpath.
@@ -259,9 +259,9 @@
IRuntimeClasspathEntry[] resolved = JavaRuntime.resolveRuntimeClasspathEntry(runtimeClasspathEntry, get14Project());
assertEquals("Should be one resolved entry", 1, resolved.length);
assertEquals("Resolved path not correct", outputFolder.getLocation().toOSString(), resolved[0].getLocation());
- assertEquals("Resolved entry should be on user classpath", IRuntimeClasspathEntry.USER_CLASSES, resolved[0].getClasspathProperty());
+ assertEquals("Resolved entry should be on user classpath", IRuntimeClasspathEntry.USER_CLASSES, resolved[0].getClasspathProperty());
}
-
+
/**
* Test that a container added to the user classpath is resolved to have all
* entries on the user classpath.
@@ -274,7 +274,7 @@
assertEquals("Entry should be on user classpath", IRuntimeClasspathEntry.USER_CLASSES, resolved[i].getClasspathProperty());
}
}
-
+
/**
* Test that a jar added to the user classpath is resolved to be on the user classpath.
*/
@@ -288,13 +288,13 @@
assertEquals("Should be one resolved entry", 1, resolved.length);
assertEquals("Resolved path not correct", archive.getFullPath(), resolved[0].getPath());
assertEquals("Resolved path not correct", archive.getLocation(), new Path(resolved[0].getLocation()));
- assertEquals("Resolved entry should be on user classpath", IRuntimeClasspathEntry.USER_CLASSES, resolved[0].getClasspathProperty());
+ assertEquals("Resolved entry should be on user classpath", IRuntimeClasspathEntry.USER_CLASSES, resolved[0].getClasspathProperty());
}
-
+
/**
* Test that a folder added to the user classpath is resolved to be on the
* user classpath.
- */
+ */
public void testUserClassesFolderResolution() throws Exception {
IResource folder = get14Project().getProject().getFolder("src");
assertTrue("Folder does not exist", folder.exists());
@@ -305,9 +305,9 @@
assertEquals("Should be one resolved entry", 1, resolved.length);
assertEquals("Resolved path not correct", folder.getFullPath(), resolved[0].getPath());
assertEquals("Resolved path not correct", folder.getLocation(), new Path(resolved[0].getLocation()));
- assertEquals("Resolved entry should be on user classpath", IRuntimeClasspathEntry.USER_CLASSES, resolved[0].getClasspathProperty());
+ assertEquals("Resolved entry should be on user classpath", IRuntimeClasspathEntry.USER_CLASSES, resolved[0].getClasspathProperty());
}
-
+
/**
* Test that a project with non-default output locations placed on the user classpath
* resolves to entries on the user classpath.
@@ -323,11 +323,11 @@
IRuntimeClasspathEntry entry = resolved[i];
assertEquals("Resolved entry should be on user classpath", IRuntimeClasspathEntry.USER_CLASSES, entry.getClasspathProperty());
}
-
+
}
-
+
// STANDARD CLASSES TESTS
-
+
/**
* Test that a variable added to the default bootpath is resolved to be on
* the default bootpath.
@@ -344,13 +344,13 @@
assertEquals("Should be one resolved entry", 1, resolved.length);
assertEquals("Resolved path not correct", archive.getFullPath(), resolved[0].getPath());
assertEquals("Resolved path not correct", archive.getLocation(), new Path(resolved[0].getLocation()));
- assertEquals("Resolved entry should be on default bootpath", IRuntimeClasspathEntry.STANDARD_CLASSES, resolved[0].getClasspathProperty());
+ assertEquals("Resolved entry should be on default bootpath", IRuntimeClasspathEntry.STANDARD_CLASSES, resolved[0].getClasspathProperty());
}
-
+
/**
* Test that an extended variable added to the default bootpath is resolved to be
* on the default bootpath.
- */
+ */
public void testStandardClassesVariableExtensionResolution() throws Exception {
IResource archive = get14Project().getProject().getFolder("src").getFile("A.jar");
IProject root = get14Project().getProject();
@@ -363,9 +363,9 @@
assertEquals("Should be one resolved entry", 1, resolved.length);
assertEquals("Resolved path not correct", archive.getFullPath(), resolved[0].getPath());
assertEquals("Resolved path not correct", archive.getLocation(), new Path(resolved[0].getLocation()));
- assertEquals("Resolved entry should be on default bootpath", IRuntimeClasspathEntry.STANDARD_CLASSES, resolved[0].getClasspathProperty());
+ assertEquals("Resolved entry should be on default bootpath", IRuntimeClasspathEntry.STANDARD_CLASSES, resolved[0].getClasspathProperty());
}
-
+
/**
* Test that a project added to the default bootpath is resolved to be on the
* default bootpath.
@@ -379,9 +379,9 @@
IRuntimeClasspathEntry[] resolved = JavaRuntime.resolveRuntimeClasspathEntry(runtimeClasspathEntry, get14Project());
assertEquals("Should be one resolved entry", 1, resolved.length);
assertEquals("Resolved path not correct", outputFolder.getLocation().toOSString(), resolved[0].getLocation());
- assertEquals("Resolved entry should be on default bootpath", IRuntimeClasspathEntry.STANDARD_CLASSES, resolved[0].getClasspathProperty());
+ assertEquals("Resolved entry should be on default bootpath", IRuntimeClasspathEntry.STANDARD_CLASSES, resolved[0].getClasspathProperty());
}
-
+
/**
* Test that a container added to the default bootpath is resolved to have all
* entries on the default bootpath.
@@ -394,7 +394,7 @@
assertEquals("Entry should be on default bootpath", IRuntimeClasspathEntry.STANDARD_CLASSES, resolved[i].getClasspathProperty());
}
}
-
+
/**
* Test that a jar added to the default bootpath is resolved to be on the
* default bootpath.
@@ -409,13 +409,13 @@
assertEquals("Should be one resolved entry", 1, resolved.length);
assertEquals("Resolved path not correct", archive.getFullPath(), resolved[0].getPath());
assertEquals("Resolved path not correct", archive.getLocation(), new Path(resolved[0].getLocation()));
- assertEquals("Resolved entry should be on default bootpath", IRuntimeClasspathEntry.STANDARD_CLASSES, resolved[0].getClasspathProperty());
+ assertEquals("Resolved entry should be on default bootpath", IRuntimeClasspathEntry.STANDARD_CLASSES, resolved[0].getClasspathProperty());
}
-
+
/**
* Test that a folder added to the default bootpath is resolved to be on the
* default bootpath.
- */
+ */
public void testStandardClassesFolderResolution() throws Exception {
IResource folder = get14Project().getProject().getFolder("src");
assertTrue("Folder does not exist", folder.exists());
@@ -426,9 +426,9 @@
assertEquals("Should be one resolved entry", 1, resolved.length);
assertEquals("Resolved path not correct", folder.getFullPath(), resolved[0].getPath());
assertEquals("Resolved path not correct", folder.getLocation(), new Path(resolved[0].getLocation()));
- assertEquals("Resolved entry should be on default bootpath", IRuntimeClasspathEntry.STANDARD_CLASSES, resolved[0].getClasspathProperty());
+ assertEquals("Resolved entry should be on default bootpath", IRuntimeClasspathEntry.STANDARD_CLASSES, resolved[0].getClasspathProperty());
}
-
+
/**
* Test that a project with non-default output locations placed on the default bootpath
* resolves to entries on the default bootpath.
@@ -444,13 +444,13 @@
IRuntimeClasspathEntry entry = resolved[i];
assertEquals("Resolved entry should be on default bootpath", IRuntimeClasspathEntry.STANDARD_CLASSES, entry.getClasspathProperty());
}
-
- }
-
+
+ }
+
/**
* Tests that default classpath computation works for a project with mulitple
* output locations.
- *
+ *
* @throws Exception
*/
public void testMultiOutputDefaultClasspath() throws Exception {
@@ -461,42 +461,42 @@
IFolder bin2 = p.getFolder("bin2");
String location1 = bin1.getLocation().toOSString();
String location2 = bin2.getLocation().toOSString();
-
+
List<String> list = new ArrayList<String>();
for (int i = 0; i < entries.length; i++) {
list.add(entries[i]);
}
-
+
assertTrue("Classpath is missing " + location1, list.contains(location1));
assertTrue("Classpath is missing " + location2, list.contains(location2));
-
+
}
-
+
/**
* Tests that default classpath computation works for a project with a default
* output location.
- *
+ *
* @throws Exception
*/
public void testSingleOutputDefaultClasspath() throws Exception {
IJavaProject project = get14Project();
String[] entries = JavaRuntime.computeDefaultRuntimeClassPath(project);
-
+
IFolder bin = ResourcesPlugin.getWorkspace().getRoot().getFolder(project.getOutputLocation());
String location = bin.getLocation().toOSString();
-
+
List<String> list = new ArrayList<String>();
for (int i = 0; i < entries.length; i++) {
list.add(entries[i]);
}
-
+
assertTrue("Classpath is missing " + location, list.contains(location));
-
- }
-
+
+ }
+
/**
* Tests that a buildpath with a relative (../..) classpath entry will resolve properly.
- *
+ *
* @throws Exception
*/
public void testRelativeClasspathEntry() throws Exception {
@@ -513,7 +513,7 @@
JavaProjectHelper.addContainerEntry(project, path);
// add relative entry - point to A.jar in DebugTests/src
JavaProjectHelper.addLibrary(project, new Path("../DebugTests/src/A.jar"));
-
+
// test runtime class path resolution
String[] entries = JavaRuntime.computeDefaultRuntimeClassPath(project);
String jarPath = get14Project().getProject().getLocation().append("src").append("A.jar").toOSString();
@@ -521,16 +521,16 @@
for (int i = 0; i < entries.length; i++) {
list.add(entries[i]);
}
-
+
// delete the project
pro.delete(false, null);
-
+
assertTrue("Classpath is missing " + jarPath, list.contains(jarPath));
}
-
+
/**
* Tests that a variable with a relative (../..) path will resolve properly.
- *
+ *
* @throws Exception
*/
public void testVariableWithRelativePath() throws Exception {
@@ -547,9 +547,9 @@
JavaProjectHelper.addContainerEntry(project, path);
// add relative entry - point to A.jar in DebugTests/src
String varName = "RELATIVE_DEBUG_TESTS";
- JavaCore.setClasspathVariable(varName, new Path("../DebugTests"), null);
+ JavaCore.setClasspathVariable(varName, new Path("../DebugTests"), null);
JavaProjectHelper.addVariableEntry(project, new Path("RELATIVE_DEBUG_TESTS/src/A.jar"), null, null);
-
+
// test runtime class path resolution
String[] entries = JavaRuntime.computeDefaultRuntimeClassPath(project);
String jarPath = get14Project().getProject().getLocation().append("src").append("A.jar").toOSString();
@@ -557,10 +557,10 @@
for (int i = 0; i < entries.length; i++) {
list.add(entries[i]);
}
-
+
// delete the project
pro.delete(false, null);
-
+
assertTrue("Classpath is missing " + jarPath, list.contains(jarPath));
- }
+ }
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/ClasspathVariableTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/ClasspathVariableTests.java
index 2f98533..a0129d3 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/ClasspathVariableTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/ClasspathVariableTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -27,7 +27,7 @@
* Tests for classpath variables
*/
public class ClasspathVariableTests extends AbstractDebugTest {
-
+
/**
* Constructor
* @param name the name of the test
@@ -48,7 +48,7 @@
assertEquals("Should be one resolved entry", 1, resolved.length);
assertEquals("Entries should be equal", entry, resolved[0]);
}
-
+
/**
* test JRE resolution
* @throws CoreException
@@ -64,7 +64,7 @@
assertTrue("no default libs", libs.length > 0);
assertEquals("Should resolve to location of local JRE", libs[0].getSystemLibraryPath().toOSString().toLowerCase(), resolved[0].getPath().toOSString().toLowerCase());
}
-
+
/**
* Test that a variable set to the location of an archive via variable
* extension resolves properly, with a null source attachment.
@@ -83,8 +83,8 @@
assertEquals("Resolved path not correct", archive.getFullPath(), resolved[0].getPath());
assertEquals("Resolved path not correct", archive.getLocation(), new Path(resolved[0].getLocation()));
assertNull("Should be null source attachment", resolved[0].getSourceAttachmentPath());
- }
-
+ }
+
/**
* Test that a variable set to the location of an archive via variable
* extension resolves properly, with a source attachment rooted with a null
@@ -104,11 +104,11 @@
assertEquals("Resolved path not correct", archive.getFullPath(), resolved[0].getPath());
assertEquals("Resolved path not correct", archive.getLocation(), new Path(resolved[0].getLocation()));
assertNull("Should be null source attachment", resolved[0].getSourceAttachmentPath());
- }
-
+ }
+
/**
* Test a class path entry with variable extensions for archive and source attachment.
- *
+ *
* @throws Exception
*/
public void testVariableArchiveAndSourceAttachmentWithExtension() throws Exception {
@@ -124,11 +124,11 @@
assertEquals("Resolved path not correct", archive.getFullPath(), resolved[0].getPath());
assertEquals("Resolved path not correct", archive.getLocation(), new Path(resolved[0].getLocation()));
assertEquals("Resolved source attachment not correct", archive.getLocation(), new Path(resolved[0].getSourceAttachmentLocation()));
- }
-
+ }
+
/**
* Test a class path entry with variable extensions for archive and source attachment.
- *
+ *
* @throws Exception
*/
public void testProjectResolutionWithVariableArchiveAndSourceAttachmentWithExtension() throws Exception {
@@ -145,5 +145,5 @@
assertEquals("Resolved path not correct", archive.getFullPath(), resolved[0].getPath());
assertEquals("Resolved path not correct", archive.getLocation(), new Path(resolved[0].getLocation()));
assertEquals("Resolved source attachment not correct", archive.getLocation(), new Path(resolved[0].getSourceAttachmentLocation()));
- }
+ }
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/ConsoleInputTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/ConsoleInputTests.java
index 263ba0f..f147e17 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/ConsoleInputTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/ConsoleInputTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -36,38 +36,38 @@
* Tests console input.
*/
public class ConsoleInputTests extends AbstractDebugTest implements IConsoleLineTrackerExtension {
-
+
protected List<String> fLinesRead = new ArrayList<String>();
-
+
protected boolean fStarted = false;
-
+
protected boolean fStopped = false;
-
+
protected IConsole fConsole = null;
-
+
protected Object fConsoleLock = new Object();
protected Object fLock = new Object();
-
-
+
+
public static TestSuite suite() {
return new OrderedTestSuite(ConsoleInputTests.class, new String[] {
- "testMultiLineInput",
+ "testMultiLineInput",
"testEOF",
"testDeleteAllEnteredText"
});
}
-
+
public ConsoleInputTests(String name) {
super(name);
}
-
+
@Override
protected void setUp() throws Exception {
super.setUp();
fStarted = false;
fStopped = false;
}
-
+
/**
* Writes text to the console with line feeds (like pasting multiple lines).
* The lines with line delimiters should be echoed back. The text remaining
@@ -88,7 +88,7 @@
assertNotNull("Console is null", fConsole);
String[] list = appendAndGet(fConsole, "one\ntwo\nexit", 4);
verifyOutput(new String[]{"one", "two", "exitone", "two"}, list);
-
+
// end the program
list = appendAndGet(fConsole, "three\n", 3);
verifyOutput(new String[]{"three", "exitthree", IInternalDebugCoreConstants.EMPTY_STRING}, list);
@@ -97,8 +97,8 @@
ConsoleLineTracker.setDelegate(null);
launch.getProcesses()[0].terminate();
}
- }
-
+ }
+
/**
* Tests closing standard in
*/
@@ -116,7 +116,7 @@
assertNotNull("Console is null", fConsole);
String[] list = appendAndGet(fConsole, "one\ntwo\n", 4);
verifyOutput(new String[]{"one", "two", "one", "two"}, list);
-
+
// send EOF
IStreamsProxy streamsProxy = launch.getProcesses()[0].getStreamsProxy();
assertTrue("should be an IStreamsProxy2", streamsProxy instanceof IStreamsProxy2);
@@ -143,19 +143,19 @@
ConsoleLineTracker.setDelegate(null);
launch.getProcesses()[0].terminate();
}
- }
-
+ }
+
private void verifyOutput(String[] expected, String[] actual) {
for (int i = 0; i < actual.length; i++) {
assertEquals("Wrong message", expected[i], actual[i]);
}
}
-
+
/**
* Appends the given text to the given console and waits for the number
* of lines to be written to the console. Returns the lines written to
* the console.
- *
+ *
* @param console
* @param text
* @param linesExpected
@@ -175,7 +175,7 @@
}
}
});
-
+
int attempts = 0;
while (fLinesRead.size() < linesExpected) {
spinEventLoop();
@@ -192,10 +192,10 @@
assertEquals("Wrong number of lines", linesExpected, fLinesRead.size());
return fLinesRead.toArray(new String[0]);
}
-
+
/**
* Appends the given text to the given console. Text should not have new lines.
- *
+ *
* @param console
* @param text
* @throws Exception
@@ -213,11 +213,11 @@
}
});
spinEventLoop();
- }
-
+ }
+
/**
* Deletes all text in the given console.
- *
+ *
* @param console
* @throws Exception
*/
@@ -235,7 +235,7 @@
});
spinEventLoop();
}
-
+
/**
* @see org.eclipse.debug.ui.console.IConsoleLineTracker#dispose()
*/
@@ -283,11 +283,11 @@
fLock.notifyAll();
}
}
-
+
/**
* Tests the scenario reported in bug 241394 - 'a', backspace, 'b', backspace, 'c', Enter.
* Result should be 'c'.
- *
+ *
* @throws Exception
*/
public void testDeleteAllEnteredText() throws Exception {
@@ -308,11 +308,11 @@
deleteAll(fConsole);
String[] list = appendAndGet(fConsole, "c\n", 2);
verifyOutput(new String[]{"c", "c"}, list);
-
+
} finally {
ConsoleLineTracker.setDelegate(null);
launch.getProcesses()[0].terminate();
- }
+ }
}
private void spinEventLoop() {
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/ConsoleTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/ConsoleTests.java
index 8190f1f..2af5a90 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/ConsoleTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/ConsoleTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -25,38 +25,38 @@
* Tests console line tracker.
*/
public class ConsoleTests extends AbstractDebugTest {
-
+
public ConsoleTests(String name) {
super(name);
}
-
+
class TestConsole extends MessageConsole {
-
+
public boolean fInit = false;
public boolean fDispose = false;
public TestConsole(boolean autoLifecycle) {
super("Life's like that", null, autoLifecycle);
}
-
+
@Override
protected void init() {
super.init();
fInit = true;
}
-
+
@Override
protected void dispose() {
super.dispose();
fDispose = true;
}
-
+
}
-
- /**
+
+ /**
* Test that when a process is removed from a launch, the associated
* console is closed.
- *
+ *
* @throws Exception
*/
public void testRemoveProcess() throws Exception {
@@ -84,12 +84,12 @@
IConsole console = DebugUITools.getConsole(otherTarget);
assertNull("Console should no longer exist", console);
}
- });
+ });
} finally {
terminateAndRemove(target);
- }
- }
-
+ }
+ }
+
public void testAutoLifecycle() {
TestConsole console = new TestConsole(true);
IConsoleManager consoleManager = ConsolePlugin.getDefault().getConsoleManager();
@@ -98,7 +98,7 @@
assertTrue("Console was not initialized", console.fInit);
assertTrue("Console was not disposed", console.fDispose);
}
-
+
public void testManualLifecycle() {
TestConsole console = new TestConsole(false);
IConsoleManager consoleManager = ConsolePlugin.getDefault().getConsoleManager();
@@ -107,6 +107,6 @@
assertTrue("Console was initialized", !console.fInit);
assertTrue("Console was disposed", !console.fDispose);
console.dispose();
- }
+ }
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/DebugEventTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/DebugEventTests.java
index e52119d..524771b 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/DebugEventTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/DebugEventTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -27,19 +27,19 @@
public DebugEventTests(String name) {
super(name);
}
-
+
/**
- * Ensure that a model specific event can be dispatched
+ * Ensure that a model specific event can be dispatched
*/
public void testModelSpecificEvent() {
DebugEvent event = new DebugEvent(this, DebugEvent.MODEL_SPECIFIC, 5000);
event.setData("TEST");
-
+
DebugEventWaiter waiter = new DebugEventWaiter(DebugEvent.MODEL_SPECIFIC);
DebugPlugin.getDefault().fireDebugEventSet(new DebugEvent[] {event});
waiter.waitForEvent();
DebugEvent received = waiter.getEvent();
-
+
assertEquals("Incorrect detail", 5000, received.getDetail());
assertEquals("incorrect user data", "TEST", received.getData());
assertEquals("incorrect source", this, received.getSource());
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/EEDefinitionTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/EEDefinitionTests.java
index 0503e6d..3b5b0b1 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/EEDefinitionTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/EEDefinitionTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Jesper S Moller - Bug 421938: [1.8] ExecutionEnvironmentDescription#getVMArguments does not preserve VM arguments
@@ -37,20 +37,20 @@
* Tests for ".ee" files - installed JRE definition files
*/
public class EEDefinitionTests extends AbstractDebugTest {
-
+
public static IPath TEST_EE_FILE = null;
{
if (Platform.OS_WIN32.equals(Platform.getOS())) {
- TEST_EE_FILE = new Path("testfiles/test-jre/bin/test-foundation11-win32.ee");
+ TEST_EE_FILE = new Path("testfiles/test-jre/bin/test-foundation11-win32.ee");
} else {
TEST_EE_FILE = new Path("testfiles/test-jre/bin/test-foundation11.ee");
}
}
-
+
public EEDefinitionTests(String name) {
super(name);
}
-
+
/**
* Tests that the EE file is a valid file
*/
@@ -61,7 +61,7 @@
IStatus status = EEVMType.validateDefinitionFile(description);
assertTrue("Invalid install location", status.isOK());
}
-
+
/**
* Tests that the EE install location validation returns an INFO status.
*/
@@ -72,8 +72,8 @@
assertNotNull("Missing EE VM type", vmType);
IStatus status = vmType.validateInstallLocation(file);
assertTrue("Invalid install location", status.getSeverity() == IStatus.INFO);
- }
-
+ }
+
/**
* Tests libraries for the EE file
*/
@@ -87,11 +87,11 @@
for (int i = 0; i < expected.length; i++) {
if (i == 4) {
// ext1 and ext2 can be in either order due to file system ordering
- assertTrue("Wrong library", expected[i].equals(libs[i].getSystemLibraryPath().lastSegment()) ||
+ assertTrue("Wrong library", expected[i].equals(libs[i].getSystemLibraryPath().lastSegment()) ||
expected[i].equals(libs[i+1].getSystemLibraryPath().lastSegment()));
} else if (i == 5) {
// ext1 and ext2 can be in either order due to file system ordering
- assertTrue("Wrong library", expected[i].equals(libs[i].getSystemLibraryPath().lastSegment()) ||
+ assertTrue("Wrong library", expected[i].equals(libs[i].getSystemLibraryPath().lastSegment()) ||
expected[i].equals(libs[i-1].getSystemLibraryPath().lastSegment()));
} else {
assertEquals("Wrong library", expected[i], libs[i].getSystemLibraryPath().lastSegment());
@@ -101,7 +101,7 @@
}
}
}
-
+
/**
* Tests source attachments
*/
@@ -115,11 +115,11 @@
for (int i = 0; i < expected.length; i++) {
if (i == 4) {
// ext1 and ext2 can be in either order due to file system ordering
- assertTrue("Wrong attachment", expected[i].equals(libs[i].getSystemLibrarySourcePath().lastSegment()) ||
+ assertTrue("Wrong attachment", expected[i].equals(libs[i].getSystemLibrarySourcePath().lastSegment()) ||
expected[i].equals(libs[i+1].getSystemLibrarySourcePath().lastSegment()));
} else if (i == 5) {
// ext1 and ext2 can be in either order due to file system ordering
- assertTrue("Wrong attachment", expected[i].equals(libs[i].getSystemLibrarySourcePath().lastSegment()) ||
+ assertTrue("Wrong attachment", expected[i].equals(libs[i].getSystemLibrarySourcePath().lastSegment()) ||
expected[i].equals(libs[i-1].getSystemLibrarySourcePath().lastSegment()));
} else if (i == 6){
assertEquals("Wrong attachment", Path.EMPTY, libs[i].getSystemLibrarySourcePath());
@@ -127,8 +127,8 @@
assertEquals("Wrong attachment", expected[i], libs[i].getSystemLibrarySourcePath().lastSegment());
}
}
- }
-
+ }
+
/**
* Tests default libraries for an EE VM type are empty.
*/
@@ -140,7 +140,7 @@
LibraryLocation[] libs = vmType.getDefaultLibraryLocations(file);
assertEquals("Wrong number of libraries", 0, libs.length);
}
-
+
/**
* Tests that a javadoc location can be specified.
*/
@@ -157,10 +157,10 @@
}
assertEquals("Incorrect javadoc location", expectedLocation, location);
}
-
+
/**
* Tests asking for the index from the EE file
- *
+ *
* @throws Exception
* @since 3.9.0
*/
@@ -177,7 +177,7 @@
}
assertEquals("Incorrect index location", expectedLocation, location);
}
-
+
/**
* Tests that a name with spaces can be specified.
*/
@@ -187,8 +187,8 @@
ExecutionEnvironmentDescription ee = new ExecutionEnvironmentDescription(file);
String name = ee.getProperty(ExecutionEnvironmentDescription.EE_NAME);
assertEquals("Incorrect vm name", "Eclipse JDT Test JRE Definition", name);
- }
-
+ }
+
/**
* Tests default VM arguments. All arguments from the EE file should get passed through in the
* same order to the command line.
@@ -211,7 +211,7 @@
prev = next;
}
}
-
+
/**
* Test compatible environments
*/
@@ -224,7 +224,7 @@
assertNotNull("Missing EE VM type", vmType);
VMStandin standin = JavaRuntime.createVMFromDefinitionFile(file, "test-ee-file", "test-ee-file-id");
install = standin.convertToRealVM();
-
+
IExecutionEnvironmentsManager manager = JavaRuntime.getExecutionEnvironmentsManager();
IExecutionEnvironment[] envs = manager.getExecutionEnvironments();
boolean found11 = false;
@@ -244,18 +244,18 @@
}
}
}
-
+
protected File getEEFile() {
return JavaTestPlugin.getDefault().getFileInPlugin(TEST_EE_FILE);
}
-
+
protected IVMInstallType getVMInstallType() {
return JavaRuntime.getVMInstallType(EEVMType.ID_EE_VM_TYPE);
}
-
+
/**
* Tests raw EE properties map.
- *
+ *
* @throws CoreException
*/
public void testParseProperties() throws CoreException {
@@ -263,19 +263,19 @@
assertNotNull("Missing EE file", file);
ExecutionEnvironmentDescription desc = new ExecutionEnvironmentDescription(file);
Map<String, String> map = desc.getProperties();
-
+
// validate expected properties
validateProperty(ExecutionEnvironmentDescription.EXECUTABLE, "jrew.txt" , map);
validateProperty(ExecutionEnvironmentDescription.EXECUTABLE_CONSOLE, "jre.txt", map);
validateProperty("-XspecialArg:123", "", map);
validateProperty("-XspecialArg2", "456", map);
-
+
}
-
+
protected void validateProperty(String key, String value, Map<String, String> properties) {
assertEquals("Unexpeted value for: " + key, value, properties.get(key));
}
-
+
/**
* Tests that a name with spaces can be specified.
*/
@@ -284,5 +284,5 @@
assertNotNull("Missing EE file", file);
ExecutionEnvironmentDescription ee = new ExecutionEnvironmentDescription(file);
validateProperty("-Dee.empty", "", ee.getProperties());
- }
+ }
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/EnvironmentTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/EnvironmentTests.java
index b4bcbc8..0b0ad85 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/EnvironmentTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/EnvironmentTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -24,7 +24,7 @@
import org.eclipse.osgi.service.environment.Constants;
public class EnvironmentTests extends AbstractDebugTest {
-
+
public EnvironmentTests(String name) {
super(name);
}
@@ -41,7 +41,7 @@
assertEquals("env vars should be case insensitive", path1, path2);
}
}
-
+
/**
* Test that we can override a variable in a case insensitive way on Windows
*/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/EventSetTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/EventSetTests.java
index ab340f9..294fdd1 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/EventSetTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/EventSetTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -23,7 +23,7 @@
* Tests event sets.
*/
public class EventSetTests extends AbstractDebugTest {
-
+
public EventSetTests(String name) {
super(name);
}
@@ -34,7 +34,7 @@
// add two breakpoints at the same location
bps.add(createLineBreakpoint(88, typeName));
bps.add(createLineBreakpoint(88, typeName));
-
+
IJavaThread thread= null;
try {
@@ -52,11 +52,11 @@
bps.remove(hits[i]);
}
assertTrue("breakpoint collection should now be empty", bps.isEmpty());
-
+
}
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/ExecutionEnvironmentTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/ExecutionEnvironmentTests.java
index 0edd82b..354c32a 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/ExecutionEnvironmentTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/ExecutionEnvironmentTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -30,11 +30,11 @@
* Tests for execution environments
*/
public class ExecutionEnvironmentTests extends AbstractDebugTest {
-
+
public ExecutionEnvironmentTests(String name) {
super(name);
}
-
+
public void testGetEnvironments() throws Exception {
IExecutionEnvironment[] executionEnvironments = JavaRuntime.getExecutionEnvironmentsManager().getExecutionEnvironments();
assertTrue("Should be at least one environment", executionEnvironments.length > 0);
@@ -46,11 +46,11 @@
}
assertTrue("Did not find environment J2SE-1.4", false);
}
-
+
public void testAnalyze() throws Exception {
IVMInstall vm = JavaRuntime.getDefaultVMInstall();
IExecutionEnvironmentsManager manager = JavaRuntime.getExecutionEnvironmentsManager();
-
+
IExecutionEnvironment environment = manager.getEnvironment(JavaProjectHelper.J2SE_1_4_EE_NAME);
assertNotNull("Missing environment J2SE-1.4", environment);
IVMInstall[] installs = environment.getCompatibleVMs();
@@ -63,7 +63,7 @@
}
assertTrue("vm should be J2SE-1.4 compliant", false);
}
-
+
public void testAccessRuleParticipants() throws Exception {
IExecutionEnvironmentsManager manager = JavaRuntime.getExecutionEnvironmentsManager();
IExecutionEnvironment environment = manager.getEnvironment("org.eclipse.jdt.debug.tests.environment.j2se14x");
@@ -82,7 +82,7 @@
assertEquals("Wrong rule", "non_accessible", rules[3].getPattern().toString());
}
}
-
+
public void testNoAccessRuleParticipants() throws Exception {
IExecutionEnvironmentsManager manager = JavaRuntime.getExecutionEnvironmentsManager();
IExecutionEnvironment environment = manager.getEnvironment("org.eclipse.jdt.debug.tests.environment.j2se13x");
@@ -96,8 +96,8 @@
IAccessRule[] rules = accessRules[i];
assertEquals("wrong number of rules for lib", 0, rules.length);
}
- }
-
+ }
+
public void testAccessRuleParticipantsWithShortCircut() throws Exception {
IExecutionEnvironmentsManager manager = JavaRuntime.getExecutionEnvironmentsManager();
IExecutionEnvironment environment = manager.getEnvironment("org.eclipse.jdt.debug.tests.environment.j2se15x");
@@ -113,7 +113,7 @@
assertEquals("Wrong rule", "**/*", rules[0].getPattern().toString());
}
}
-
+
/**
* Tests that a project bound to an EE has access rules.
*/
@@ -140,7 +140,7 @@
}
assertTrue("did not find JRE libs on classpath", foundLib);
}
-
+
/**
* Tests that a project bound to a specific JRE has no access rules.
*/
@@ -165,12 +165,12 @@
}
}
}
- assertTrue("did not find JRE library on classpath", foundLib);
- }
-
+ assertTrue("did not find JRE library on classpath", foundLib);
+ }
+
/**
* Tests that default access rules appear for system packages when a profile file is specified.
- *
+ *
* @throws Exception
*/
public void testDefaultSystemPackageAccessRules() throws Exception {
@@ -189,12 +189,12 @@
assertEquals("Wrong rule", "one/two/*", rules[1].getPattern().toString());
assertEquals("Wrong rule", "three/four/*", rules[2].getPattern().toString());
assertEquals("Wrong rule", "**/*", rules[3].getPattern().toString());
- }
+ }
}
-
+
/**
* Tests that a location can be resolved for ${ee_home:J2SE-1.4}
- *
+ *
* @throws Exception
*/
public void testEEHomeVariable() throws Exception {
@@ -205,10 +205,10 @@
IVMInstall install = JavaRuntime.getVMInstall(JavaRuntime.newJREContainerPath(ee));
assertEquals(install.getInstallLocation().getAbsolutePath(), result);
}
-
+
/**
* Tests that a location cannot be resolved for ${ee_home}
- *
+ *
* @throws Exception
*/
public void testEEHomeVariableMissingArgument() throws Exception {
@@ -220,10 +220,10 @@
}
assertNotNull("Test should have thrown an exception", null);
}
-
+
/**
* Tests that a location cannot be resolved for ${ee_home:bogus}
- *
+ *
* @throws Exception
*/
public void testEEHomeVariableInvalidArgument() throws Exception {
@@ -234,5 +234,5 @@
return; // expected
}
assertNotNull("Test should have thrown an exception", null);
- }
+ }
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/HcrTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/HcrTests.java
index 1f5d26f..70a3a7d 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/HcrTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/HcrTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -29,9 +29,9 @@
* Tests hot code replace
*/
public class HcrTests extends AbstractDebugTest {
-
+
class HCRListener implements IJavaHotCodeReplaceListener {
-
+
boolean notified = false;
IJavaDebugTarget target = null;
@@ -62,19 +62,19 @@
notified = true;
notifyAll();
}
-
+
/**
* Returns whether notified (yet).
- *
+ *
* @return whether notified
*/
public synchronized boolean wasNotified() {
return notified;
}
-
+
/**
* Waits for notification and returns whether notified.
- *
+ *
* @return
*/
public synchronized boolean waitNotification() {
@@ -86,17 +86,17 @@
}
return notified;
}
-
+
}
-
+
public HcrTests(String name) {
super(name);
}
-
+
/* (non-Javadoc)
- *
+ *
* Revert the source file after the test.
- *
+ *
* @see junit.framework.TestCase#tearDown()
*/
@Override
@@ -117,17 +117,17 @@
waitForBuild();
}
super.tearDown();
- }
+ }
public void testSimpleHcr() throws Exception {
String typeName = "org.eclipse.debug.tests.targets.HcrClass";
- createLineBreakpoint(39, typeName);
-
+ createLineBreakpoint(39, typeName);
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
IJavaDebugTarget target = (IJavaDebugTarget)thread.getDebugTarget();
if (target.supportsHotCodeReplace()) {
@@ -151,13 +151,13 @@
assertTrue("Could not find code to replace", index > 0);
String newCode = contents.substring(0, index) + "\"Two\"" + contents.substring(index + 5);
buffer.setContents(newCode);
-
+
// save contents
DebugElementEventWaiter waiter = new DebugElementEventWaiter(DebugEvent.SUSPEND, thread);
cu.commitWorkingCopy(true, null);
waitForBuild();
waiter.waitForEvent();
-
+
// should have dropped to frame 'one'
frame = (IJavaStackFrame)thread.getTopStackFrame();
assertNotNull("No top stack frame", frame);
@@ -169,11 +169,11 @@
throw new TestAgainException("Retest - the correct method name was not present after HCR");
}
assertEquals("Should have dropped to method 'one'", "one", frame.getMethodName());
-
+
// resume to breakpoint
createLineBreakpoint(39, typeName);
thread = resume(thread);
-
+
// value of 'x' should now be "Two"
frame = (IJavaStackFrame)thread.getTopStackFrame();
variable = findVariable(frame, "x");
@@ -185,24 +185,24 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
/**
* Tests a general (plug-in) listener.
- *
+ *
* @throws Exception
*/
public void testGeneralHcrListener() throws Exception {
String typeName = "org.eclipse.debug.tests.targets.HcrClass";
- createLineBreakpoint(39, typeName);
+ createLineBreakpoint(39, typeName);
HCRListener listener = new HCRListener();
JDIDebugModel.addHotCodeReplaceListener(listener);
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
IJavaDebugTarget target = (IJavaDebugTarget)thread.getDebugTarget();
if (target.supportsHotCodeReplace()) {
// look at the value of 'x' - it should be "One"
@@ -224,7 +224,7 @@
assertTrue("Could not find code to replace", index > 0);
String newCode = contents.substring(0, index) + "\"Two\"" + contents.substring(index + 5);
buffer.setContents(newCode);
-
+
// save contents
cu.commitWorkingCopy(true, null);
waitForBuild();
@@ -236,17 +236,17 @@
terminateAndRemove(thread);
removeAllBreakpoints();
JDIDebugModel.removeHotCodeReplaceListener(listener);
- }
+ }
}
-
+
/**
* Tests that a target specific listener overrides a generic listener.
- *
+ *
* @throws Exception
*/
public void testSpecificHcrListener() throws Exception {
String typeName = "org.eclipse.debug.tests.targets.HcrClass";
- createLineBreakpoint(39, typeName);
+ createLineBreakpoint(39, typeName);
HCRListener listener = new HCRListener();
HCRListener listener2 = new HCRListener();
JDIDebugModel.addHotCodeReplaceListener(listener);
@@ -254,7 +254,7 @@
try {
thread= launchToBreakpoint(typeName);
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
IJavaDebugTarget target = (IJavaDebugTarget)thread.getDebugTarget();
if (target.supportsHotCodeReplace()) {
target.addHotCodeReplaceListener(listener2);
@@ -277,7 +277,7 @@
assertTrue("Could not find code to replace", index > 0);
String newCode = contents.substring(0, index) + "\"Two\"" + contents.substring(index + 5);
buffer.setContents(newCode);
-
+
// save contents
cu.commitWorkingCopy(true, null);
waitForBuild();
@@ -290,18 +290,18 @@
terminateAndRemove(thread);
removeAllBreakpoints();
JDIDebugModel.removeHotCodeReplaceListener(listener);
- }
- }
-
+ }
+ }
+
/**
- * Tests HCR in a local type with the same name as the enclosing
+ * Tests HCR in a local type with the same name as the enclosing
* method
* @throws Exception
* @since 3.8.100
*/
public void testHCRLocalType() throws Exception {
String typeName = "org.eclipse.debug.tests.targets.HcrClass2";
- createLineBreakpoint(33, typeName);
+ createLineBreakpoint(33, typeName);
HCRListener listener = new HCRListener();
JDIDebugModel.addHotCodeReplaceListener(listener);
IJavaThread thread= null;
@@ -325,7 +325,7 @@
assertTrue("Could not find code to replace", index > 0);
String newCode = contents.substring(0, index) + "\"Local#run\"" + contents.substring(index + 13);
buffer.setContents(newCode);
-
+
DebugEventWaiter waiter = new DebugEventWaiter(DebugEvent.SUSPEND);
cu.commitWorkingCopy(true, null);
waitForBuild();
@@ -345,16 +345,16 @@
JDIDebugModel.removeHotCodeReplaceListener(listener);
}
}
-
+
/**
* Tests HCR in a local type
* @throws Exception
- *
+ *
* @since 3.8.100
*/
public void testHCRLocalType2() throws Exception {
String typeName = "org.eclipse.debug.tests.targets.HcrClass2";
- createLineBreakpoint(37, typeName);
+ createLineBreakpoint(37, typeName);
HCRListener listener = new HCRListener();
JDIDebugModel.addHotCodeReplaceListener(listener);
IJavaThread thread= null;
@@ -378,7 +378,7 @@
assertTrue("Could not find code to replace", index > 0);
String newCode = contents.substring(0, index) + "\"Local#run2\"" + contents.substring(index + 14);
buffer.setContents(newCode);
-
+
DebugEventWaiter waiter = new DebugEventWaiter(DebugEvent.SUSPEND);
cu.commitWorkingCopy(true, null);
waitForBuild();
@@ -398,16 +398,16 @@
JDIDebugModel.removeHotCodeReplaceListener(listener);
}
}
-
+
/**
* Tests HCR in a local type defined in a constructor
* @throws Exception
- *
+ *
* @since 3.8.100
*/
public void testHCRLocalType3() throws Exception {
String typeName = "org.eclipse.debug.tests.targets.HcrClass2";
- createLineBreakpoint(19, typeName);
+ createLineBreakpoint(19, typeName);
HCRListener listener = new HCRListener();
JDIDebugModel.addHotCodeReplaceListener(listener);
IJavaThread thread= null;
@@ -431,7 +431,7 @@
assertTrue("Could not find code to replace", index > 0);
String newCode = contents.substring(0, index) + "\"CLocal#run\"" + contents.substring(index + 14);
buffer.setContents(newCode);
-
+
DebugEventWaiter waiter = new DebugEventWaiter(DebugEvent.SUSPEND);
cu.commitWorkingCopy(true, null);
waitForBuild();
@@ -451,17 +451,17 @@
JDIDebugModel.removeHotCodeReplaceListener(listener);
}
}
-
+
/**
- * Tests HCR in an anonymous type with the same name as the method
+ * Tests HCR in an anonymous type with the same name as the method
* where the anonymous type was defined
- *
+ *
* @throws Exception
* @since 3.8.100
*/
public void testHCRAnonymousType() throws Exception {
String typeName = "org.eclipse.debug.tests.targets.HcrClass3";
- createLineBreakpoint(34, typeName);
+ createLineBreakpoint(34, typeName);
HCRListener listener = new HCRListener();
JDIDebugModel.addHotCodeReplaceListener(listener);
IJavaThread thread= null;
@@ -485,7 +485,7 @@
assertTrue("Could not find code to replace", index > 0);
String newCode = contents.substring(0, index) + "\"NEW_CODE\"" + contents.substring(index + 11);
buffer.setContents(newCode);
-
+
DebugEventWaiter waiter = new DebugEventWaiter(DebugEvent.SUSPEND);
cu.commitWorkingCopy(true, null);
waitForBuild();
@@ -506,7 +506,7 @@
JDIDebugModel.removeHotCodeReplaceListener(listener);
}
}
-
+
/**
* Tests HCR in an anonymous type defined in a method
* @throws Exception
@@ -514,7 +514,7 @@
*/
public void testHCRAnonymousType2() throws Exception {
String typeName = "org.eclipse.debug.tests.targets.HcrClass3";
- createLineBreakpoint(44, typeName);
+ createLineBreakpoint(44, typeName);
HCRListener listener = new HCRListener();
JDIDebugModel.addHotCodeReplaceListener(listener);
IJavaThread thread= null;
@@ -538,7 +538,7 @@
assertTrue("Could not find code to replace", index > 0);
String newCode = contents.substring(0, index) + "\"NEW_CODE\"" + contents.substring(index + 11);
buffer.setContents(newCode);
-
+
DebugEventWaiter waiter = new DebugEventWaiter(DebugEvent.SUSPEND);
cu.commitWorkingCopy(true, null);
waitForBuild();
@@ -558,7 +558,7 @@
JDIDebugModel.removeHotCodeReplaceListener(listener);
}
}
-
+
/**
* Tests HCR in an anonymous type defined in a constructor
* @throws Exception
@@ -566,7 +566,7 @@
*/
public void testHCRAnonymousType3() throws Exception {
String typeName = "org.eclipse.debug.tests.targets.HcrClass3";
- createLineBreakpoint(24, typeName);
+ createLineBreakpoint(24, typeName);
HCRListener listener = new HCRListener();
JDIDebugModel.addHotCodeReplaceListener(listener);
IJavaThread thread= null;
@@ -590,7 +590,7 @@
assertTrue("Could not find code to replace", index > 0);
String newCode = contents.substring(0, index) + "\"NEW_CODE\"" + contents.substring(index + 11);
buffer.setContents(newCode);
-
+
DebugEventWaiter waiter = new DebugEventWaiter(DebugEvent.SUSPEND);
cu.commitWorkingCopy(true, null);
waitForBuild();
@@ -610,7 +610,7 @@
JDIDebugModel.removeHotCodeReplaceListener(listener);
}
}
-
+
/**
* Tests HCR on a method called from a constructor
* @throws Exception
@@ -618,7 +618,7 @@
*/
public void testHCRConstructor() throws Exception {
String typeName = "org.eclipse.debug.tests.targets.HcrClass4";
- createLineBreakpoint(21, typeName);
+ createLineBreakpoint(21, typeName);
HCRListener listener = new HCRListener();
JDIDebugModel.addHotCodeReplaceListener(listener);
IJavaThread thread= null;
@@ -642,7 +642,7 @@
assertTrue("Could not find code to replace", index > 0);
String newCode = contents.substring(0, index) + "\"HcrClass4#run\"" + contents.substring(index + 17);
buffer.setContents(newCode);
-
+
DebugEventWaiter waiter = new DebugEventWaiter(DebugEvent.SUSPEND);
cu.commitWorkingCopy(true, null);
waitForBuild();
@@ -662,7 +662,7 @@
JDIDebugModel.removeHotCodeReplaceListener(listener);
}
}
-
+
/**
* Tests HCR within a constructor
* @throws Exception
@@ -670,7 +670,7 @@
*/
public void testHCRConstructor2() throws Exception {
String typeName = "org.eclipse.debug.tests.targets.HcrClass4";
- createLineBreakpoint(16, typeName);
+ createLineBreakpoint(16, typeName);
HCRListener listener = new HCRListener();
JDIDebugModel.addHotCodeReplaceListener(listener);
IJavaThread thread= null;
@@ -694,7 +694,7 @@
assertTrue("Could not find code to replace", index > 0);
String newCode = contents.substring(0, index) + "\"Construct\"" + contents.substring(index + 13);
buffer.setContents(newCode);
-
+
DebugEventWaiter waiter = new DebugEventWaiter(DebugEvent.SUSPEND);
cu.commitWorkingCopy(true, null);
waitForBuild();
@@ -715,7 +715,7 @@
JDIDebugModel.removeHotCodeReplaceListener(listener);
}
}
-
+
/**
* Tests HCR on an inner type method with the same name as the enclosing type
* method it was called from
@@ -724,14 +724,14 @@
*/
public void testHCRInnerType() throws Exception {
String typeName = "org.eclipse.debug.tests.targets.HcrClass5";
- createLineBreakpoint(23, typeName);
+ createLineBreakpoint(23, typeName);
HCRListener listener = new HCRListener();
JDIDebugModel.addHotCodeReplaceListener(listener);
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
IJavaDebugTarget target = (IJavaDebugTarget)thread.getDebugTarget();
if (target.supportsHotCodeReplace()) {
IJavaStackFrame frame = (IJavaStackFrame)thread.getTopStackFrame();
@@ -750,7 +750,7 @@
assertTrue("Could not find code to replace", index > 0);
String newCode = contents.substring(0, index) + "\"InnerClass#run\"" + contents.substring(index + 18);
buffer.setContents(newCode);
-
+
DebugEventWaiter waiter = new DebugEventWaiter(DebugEvent.SUSPEND);
cu.commitWorkingCopy(true, null);
waitForBuild();
@@ -771,7 +771,7 @@
JDIDebugModel.removeHotCodeReplaceListener(listener);
}
}
-
+
/**
* Tests HCR on an inner type method
* @throws Exception
@@ -779,14 +779,14 @@
*/
public void testHCRInnerType2() throws Exception {
String typeName = "org.eclipse.debug.tests.targets.HcrClass5";
- createLineBreakpoint(27, typeName);
+ createLineBreakpoint(27, typeName);
HCRListener listener = new HCRListener();
JDIDebugModel.addHotCodeReplaceListener(listener);
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
IJavaDebugTarget target = (IJavaDebugTarget)thread.getDebugTarget();
if (target.supportsHotCodeReplace()) {
IJavaStackFrame frame = (IJavaStackFrame)thread.getTopStackFrame();
@@ -805,7 +805,7 @@
assertTrue("Could not find code to replace", index > 0);
String newCode = contents.substring(0, index) + "\"InnerClass#run2\"" + contents.substring(index + 19);
buffer.setContents(newCode);
-
+
DebugEventWaiter waiter = new DebugEventWaiter(DebugEvent.SUSPEND);
cu.commitWorkingCopy(true, null);
waitForBuild();
@@ -826,7 +826,7 @@
JDIDebugModel.removeHotCodeReplaceListener(listener);
}
}
-
+
/**
* Tests HCR on a constructor in an inner type
* @throws Exception
@@ -834,14 +834,14 @@
*/
public void testHCRInnerType3() throws Exception {
String typeName = "org.eclipse.debug.tests.targets.HcrClass5";
- createLineBreakpoint(18, typeName);
+ createLineBreakpoint(18, typeName);
HCRListener listener = new HCRListener();
JDIDebugModel.addHotCodeReplaceListener(listener);
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
IJavaDebugTarget target = (IJavaDebugTarget)thread.getDebugTarget();
if (target.supportsHotCodeReplace()) {
IJavaStackFrame frame = (IJavaStackFrame)thread.getTopStackFrame();
@@ -860,7 +860,7 @@
assertTrue("Could not find code to replace", index > 0);
String newCode = contents.substring(0, index) + "\"Construct\"" + contents.substring(index + 13);
buffer.setContents(newCode);
-
+
DebugEventWaiter waiter = new DebugEventWaiter(DebugEvent.SUSPEND);
cu.commitWorkingCopy(true, null);
waitForBuild();
@@ -882,7 +882,7 @@
JDIDebugModel.removeHotCodeReplaceListener(listener);
}
}
-
+
/**
* Tests HCR on an enclosing method called from an inner type
* method with the same name
@@ -891,14 +891,14 @@
*/
public void testHCRInnerType4() throws Exception {
String typeName = "org.eclipse.debug.tests.targets.HcrClass5";
- createLineBreakpoint(33, typeName);
+ createLineBreakpoint(33, typeName);
HCRListener listener = new HCRListener();
JDIDebugModel.addHotCodeReplaceListener(listener);
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
IJavaDebugTarget target = (IJavaDebugTarget)thread.getDebugTarget();
if (target.supportsHotCodeReplace()) {
IJavaStackFrame frame = (IJavaStackFrame)thread.getTopStackFrame();
@@ -917,7 +917,7 @@
assertTrue("Could not find code to replace", index > 0);
String newCode = contents.substring(0, index) + "\"LocalHCR#run\"" + contents.substring(index + 16);
buffer.setContents(newCode);
-
+
DebugEventWaiter waiter = new DebugEventWaiter(DebugEvent.SUSPEND);
cu.commitWorkingCopy(true, null);
waitForBuild();
@@ -938,7 +938,7 @@
JDIDebugModel.removeHotCodeReplaceListener(listener);
}
}
-
+
/**
* Tests HCR on an enclosing method called from an inner type
* method
@@ -947,14 +947,14 @@
*/
public void testHCRInnerType5() throws Exception {
String typeName = "org.eclipse.debug.tests.targets.HcrClass5";
- createLineBreakpoint(37, typeName);
+ createLineBreakpoint(37, typeName);
HCRListener listener = new HCRListener();
JDIDebugModel.addHotCodeReplaceListener(listener);
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
IJavaDebugTarget target = (IJavaDebugTarget)thread.getDebugTarget();
if (target.supportsHotCodeReplace()) {
IJavaStackFrame frame = (IJavaStackFrame)thread.getTopStackFrame();
@@ -973,7 +973,7 @@
assertTrue("Could not find code to replace", index > 0);
String newCode = contents.substring(0, index) + "\"LocalHCR#outerrun\"" + contents.substring(index +21);
buffer.setContents(newCode);
-
+
DebugEventWaiter waiter = new DebugEventWaiter(DebugEvent.SUSPEND);
cu.commitWorkingCopy(true, null);
waitForBuild();
@@ -994,7 +994,7 @@
JDIDebugModel.removeHotCodeReplaceListener(listener);
}
}
-
+
/**
* Tests HCR on a local type defined in an inner type
* @throws Exception
@@ -1002,14 +1002,14 @@
*/
public void testHCRLocalInner() throws Exception {
String typeName = "org.eclipse.debug.tests.targets.HcrClass9";
- createLineBreakpoint(19, typeName);
+ createLineBreakpoint(19, typeName);
HCRListener listener = new HCRListener();
JDIDebugModel.addHotCodeReplaceListener(listener);
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
IJavaDebugTarget target = (IJavaDebugTarget)thread.getDebugTarget();
if (target.supportsHotCodeReplace()) {
IJavaStackFrame frame = (IJavaStackFrame)thread.getTopStackFrame();
@@ -1028,7 +1028,7 @@
assertTrue("Could not find code to replace", index > 0);
String newCode = contents.substring(0, index) + "\"Inner$Local#run\"" + contents.substring(index +19);
buffer.setContents(newCode);
-
+
DebugEventWaiter waiter = new DebugEventWaiter(DebugEvent.SUSPEND);
cu.commitWorkingCopy(true, null);
waitForBuild();
@@ -1049,7 +1049,7 @@
JDIDebugModel.removeHotCodeReplaceListener(listener);
}
}
-
+
/**
* Tests HCR on a local type defined in an anonymous type
* @throws Exception
@@ -1057,14 +1057,14 @@
*/
public void testHCRLocalAnonymous() throws Exception {
String typeName = "org.eclipse.debug.tests.targets.HcrClass8";
- createLineBreakpoint(24, typeName);
+ createLineBreakpoint(24, typeName);
HCRListener listener = new HCRListener();
JDIDebugModel.addHotCodeReplaceListener(listener);
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
IJavaDebugTarget target = (IJavaDebugTarget)thread.getDebugTarget();
if (target.supportsHotCodeReplace()) {
IJavaStackFrame frame = (IJavaStackFrame)thread.getTopStackFrame();
@@ -1083,7 +1083,7 @@
assertTrue("Could not find code to replace", index > 0);
String newCode = contents.substring(0, index) + "\"Inner$Local#run\"" + contents.substring(index +19);
buffer.setContents(newCode);
-
+
DebugEventWaiter waiter = new DebugEventWaiter(DebugEvent.SUSPEND);
cu.commitWorkingCopy(true, null);
waitForBuild();
@@ -1104,7 +1104,7 @@
JDIDebugModel.removeHotCodeReplaceListener(listener);
}
}
-
+
/**
* Tests HCR on an inner type defined in a local type
* @throws Exception
@@ -1112,14 +1112,14 @@
*/
public void testHCRInnerLocal() throws Exception {
String typeName = "org.eclipse.debug.tests.targets.HcrClass7";
- createLineBreakpoint(19, typeName);
+ createLineBreakpoint(19, typeName);
HCRListener listener = new HCRListener();
JDIDebugModel.addHotCodeReplaceListener(listener);
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
IJavaDebugTarget target = (IJavaDebugTarget)thread.getDebugTarget();
if (target.supportsHotCodeReplace()) {
IJavaStackFrame frame = (IJavaStackFrame)thread.getTopStackFrame();
@@ -1138,7 +1138,7 @@
assertTrue("Could not find code to replace", index > 0);
String newCode = contents.substring(0, index) + "\"Local$Inner#run\"" + contents.substring(index +19);
buffer.setContents(newCode);
-
+
DebugEventWaiter waiter = new DebugEventWaiter(DebugEvent.SUSPEND);
cu.commitWorkingCopy(true, null);
waitForBuild();
@@ -1159,7 +1159,7 @@
JDIDebugModel.removeHotCodeReplaceListener(listener);
}
}
-
+
/**
* Tests HCR on an anonymous type defined in a local type
* @throws Exception
@@ -1167,14 +1167,14 @@
*/
public void testHCRAnnonymousLocal() throws Exception {
String typeName = "org.eclipse.debug.tests.targets.HcrClass6";
- createLineBreakpoint(23, typeName);
+ createLineBreakpoint(23, typeName);
HCRListener listener = new HCRListener();
JDIDebugModel.addHotCodeReplaceListener(listener);
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
IJavaDebugTarget target = (IJavaDebugTarget)thread.getDebugTarget();
if (target.supportsHotCodeReplace()) {
IJavaStackFrame frame = (IJavaStackFrame)thread.getTopStackFrame();
@@ -1193,7 +1193,7 @@
assertTrue("Could not find code to replace", index > 0);
String newCode = contents.substring(0, index) + "\"Local$Inner#run\"" + contents.substring(index +19);
buffer.setContents(newCode);
-
+
DebugEventWaiter waiter = new DebugEventWaiter(DebugEvent.SUSPEND);
cu.commitWorkingCopy(true, null);
waitForBuild();
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/InstanceFilterTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/InstanceFilterTests.java
index fc7a221..9d3f330 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/InstanceFilterTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/InstanceFilterTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -26,19 +26,19 @@
/**
* Tests instance filters on breakpoints.
- *
+ *
* These tests only "run" on VMs that support instance breakpoints,
* such as JDK 1.4.1.
*/
public class InstanceFilterTests extends AbstractDebugTest {
-
+
public InstanceFilterTests(String name) {
super(name);
}
/**
* Instance filter on a line breakpoint
- *
+ *
* @throws Exception
*/
public void testLineBreakpoint() throws Exception {
@@ -46,8 +46,8 @@
// main
IJavaLineBreakpoint mainBreakpoint = createLineBreakpoint(39, typeName);
// simpleMethod
- IJavaLineBreakpoint simpleMethod = createLineBreakpoint(19, typeName);
-
+ IJavaLineBreakpoint simpleMethod = createLineBreakpoint(19, typeName);
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
@@ -55,7 +55,7 @@
IBreakpoint hit = getBreakpoint(thread);
assertNotNull("suspended, but not by breakpoint", hit);
assertEquals("hit wrong breakpoint", mainBreakpoint, hit);
-
+
// can only do test if the VM supports instance filters
if (supportsInstanceBreakpoints(thread)) {
// restrict breakpoint in simpleMethod to object 1
@@ -69,15 +69,15 @@
IJavaObject object2 = (IJavaObject)var2.getValue();
assertNotNull(object1);
assertNotNull(object2);
-
+
simpleMethod.addInstanceFilter(object1);
-
+
// resume the thread
thread= resume(thread);
IBreakpoint[] breakpoints = thread.getBreakpoints();
assertEquals("should be a breakpoint", 1, breakpoints.length);
assertEquals("should be in simpleMethod", simpleMethod, breakpoints[0]);
-
+
// receiver should be object1
frame = (IJavaStackFrame)thread.getTopStackFrame();
assertNotNull(frame);
@@ -87,12 +87,12 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Instance filter on a method entry breakpoint
- *
+ *
* @throws Exception
*/
public void testMethodEntryBreakpoint() throws Exception {
@@ -100,8 +100,8 @@
// main
IJavaLineBreakpoint mainBreakpoint = createLineBreakpoint(39, typeName);
// simpleMethod
- IJavaMethodBreakpoint simpleMethod = createMethodBreakpoint(typeName, "simpleMethod", "()V", true, false);
-
+ IJavaMethodBreakpoint simpleMethod = createMethodBreakpoint(typeName, "simpleMethod", "()V", true, false);
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
@@ -109,7 +109,7 @@
IBreakpoint hit = getBreakpoint(thread);
assertNotNull("suspended, but not by breakpoint", hit);
assertEquals("hit wrong breakpoint", mainBreakpoint, hit);
-
+
// can only do test if the VM supports instance filters
if (supportsInstanceBreakpoints(thread)) {
// restrict breakpoint in simpleMethod to object 1
@@ -123,15 +123,15 @@
IJavaObject object2 = (IJavaObject)var2.getValue();
assertNotNull(object1);
assertNotNull(object2);
-
+
simpleMethod.addInstanceFilter(object1);
-
+
// resume the thread
thread= resume(thread);
IBreakpoint[] breakpoints = thread.getBreakpoints();
assertEquals("should be a breakpoint", 1, breakpoints.length);
assertEquals("should be in simpleMethod", simpleMethod, breakpoints[0]);
-
+
// receiver should be object1
frame = (IJavaStackFrame)thread.getTopStackFrame();
assertNotNull(frame);
@@ -146,12 +146,12 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
/**
* Instance filter on a method exit breakpoint
- *
+ *
* @throws Exception
*/
public void testMethodExitBreakpoint() throws Exception {
@@ -159,8 +159,8 @@
// main
IJavaLineBreakpoint mainBreakpoint = createLineBreakpoint(39, typeName);
// simpleMethod
- IJavaMethodBreakpoint simpleMethod = createMethodBreakpoint(typeName, "simpleMethod", "()V", false, true);
-
+ IJavaMethodBreakpoint simpleMethod = createMethodBreakpoint(typeName, "simpleMethod", "()V", false, true);
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
@@ -168,7 +168,7 @@
IBreakpoint hit = getBreakpoint(thread);
assertNotNull("suspended, but not by breakpoint", hit);
assertEquals("hit wrong breakpoint", mainBreakpoint, hit);
-
+
// can only do test if the VM supports instance filters
if (supportsInstanceBreakpoints(thread)) {
// restrict breakpoint in simpleMethod to object 1
@@ -182,15 +182,15 @@
IJavaObject object2 = (IJavaObject)var2.getValue();
assertNotNull(object1);
assertNotNull(object2);
-
+
simpleMethod.addInstanceFilter(object1);
-
+
// resume the thread
thread= resume(thread);
IBreakpoint[] breakpoints = thread.getBreakpoints();
assertEquals("should be a breakpoint", 1, breakpoints.length);
assertEquals("should be in simpleMethod", simpleMethod, breakpoints[0]);
-
+
// receiver should be object1
frame = (IJavaStackFrame)thread.getTopStackFrame();
assertNotNull(frame);
@@ -205,12 +205,12 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
+ }
+ }
/**
* Instance filter on an exception breakpoint
- *
+ *
* @throws Exception
*/
public void testExceptionBreakpoint() throws Exception {
@@ -218,8 +218,8 @@
// main
IJavaLineBreakpoint mainBreakpoint = createLineBreakpoint(39, typeName);
// exception breakpoint
- IJavaExceptionBreakpoint npe = createExceptionBreakpoint("java.lang.NullPointerException", true, true);
-
+ IJavaExceptionBreakpoint npe = createExceptionBreakpoint("java.lang.NullPointerException", true, true);
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
@@ -227,7 +227,7 @@
IBreakpoint hit = getBreakpoint(thread);
assertNotNull("suspended, but not by breakpoint", hit);
assertEquals("hit wrong breakpoint", mainBreakpoint, hit);
-
+
// can only do test if the VM supports instance filters
if (supportsInstanceBreakpoints(thread)) {
// restrict breakpoint in simpleMethod to object 1
@@ -241,15 +241,15 @@
IJavaObject object2 = (IJavaObject)var2.getValue();
assertNotNull(object1);
assertNotNull(object2);
-
+
npe.addInstanceFilter(object1);
-
+
// resume the thread
thread= resume(thread);
IBreakpoint[] breakpoints = thread.getBreakpoints();
assertEquals("should be a breakpoint", 1, breakpoints.length);
assertEquals("should be in throwNPE", npe, breakpoints[0]);
-
+
// receiver should be object1
frame = (IJavaStackFrame)thread.getTopStackFrame();
assertNotNull(frame);
@@ -259,12 +259,12 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Instance filter on an access watchpoint
- *
+ *
* @throws Exception
*/
public void testAccessWatchpoint() throws Exception {
@@ -272,8 +272,8 @@
// main
IJavaLineBreakpoint mainBreakpoint = createLineBreakpoint(39, typeName);
// exception breakpoint
- IJavaWatchpoint watchpoint = createWatchpoint(typeName, "field", true, false);
-
+ IJavaWatchpoint watchpoint = createWatchpoint(typeName, "field", true, false);
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
@@ -281,7 +281,7 @@
IBreakpoint hit = getBreakpoint(thread);
assertNotNull("suspended, but not by breakpoint", hit);
assertEquals("hit wrong breakpoint", mainBreakpoint, hit);
-
+
// can only do test if the VM supports instance filters
if (supportsInstanceBreakpoints(thread)) {
// restrict breakpoint in simpleMethod to object 1
@@ -295,20 +295,20 @@
IJavaObject object2 = (IJavaObject)var2.getValue();
assertNotNull(object1);
assertNotNull(object2);
-
+
watchpoint.addInstanceFilter(object1);
-
+
// resume the thread
thread= resume(thread);
IBreakpoint[] breakpoints = thread.getBreakpoints();
assertEquals("should be a breakpoint", 1, breakpoints.length);
assertEquals("should be in access method", watchpoint, breakpoints[0]);
-
- // in "accessField"
+
+ // in "accessField"
frame = (IJavaStackFrame)thread.getTopStackFrame();
assertNotNull(frame);
assertEquals("should be in access method", "accessField", frame.getMethodName());
-
+
// receiver should be object1
IJavaObject receiver = frame.getThis();
assertEquals("should be in object1 context", object1, receiver);
@@ -316,12 +316,12 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Instance filter on an modification watchpoint
- *
+ *
* @throws Exception
*/
public void testModificationWatchpoint() throws Exception {
@@ -331,8 +331,8 @@
// exception breakpoint
IJavaWatchpoint watchpoint = createWatchpoint(typeName, "field", false, true);
// disable to avoid variable initializer
- watchpoint.setEnabled(false);
-
+ watchpoint.setEnabled(false);
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
@@ -340,7 +340,7 @@
IBreakpoint hit = getBreakpoint(thread);
assertNotNull("suspended, but not by breakpoint", hit);
assertEquals("hit wrong breakpoint", mainBreakpoint, hit);
-
+
// can only do test if the VM supports instance filters
if (supportsInstanceBreakpoints(thread)) {
// restrict breakpoint in simpleMethod to object 1
@@ -354,23 +354,23 @@
IJavaObject object2 = (IJavaObject)var2.getValue();
assertNotNull(object1);
assertNotNull(object2);
-
+
watchpoint.addInstanceFilter(object1);
-
+
// enable watchpoint
watchpoint.setEnabled(true);
-
+
// resume the thread
thread= resume(thread);
IBreakpoint[] breakpoints = thread.getBreakpoints();
assertEquals("should be a breakpoint", 1, breakpoints.length);
assertEquals("should be in modification method", watchpoint, breakpoints[0]);
-
- // in "modifyField"
+
+ // in "modifyField"
frame = (IJavaStackFrame)thread.getTopStackFrame();
assertNotNull(frame);
assertEquals("should be in modify method", "modifyField", frame.getMethodName());
-
+
// receiver should be object1
IJavaObject receiver = frame.getThis();
assertEquals("should be in object1 context", object1, receiver);
@@ -378,17 +378,17 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
/**
* Returns whether the associated target supports instance breakpoints
- *
+ *
* @param thread
* @return boolean
*/
private boolean supportsInstanceBreakpoints(IJavaThread thread) {
IJavaDebugTarget target = (IJavaDebugTarget)thread.getDebugTarget();
return target.supportsInstanceBreakpoints();
- }
+ }
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/InstanceVariableTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/InstanceVariableTests.java
index f538fb1..b4bf175 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/InstanceVariableTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/InstanceVariableTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -25,16 +25,16 @@
import org.eclipse.jdt.debug.tests.AbstractDebugTest;
public class InstanceVariableTests extends AbstractDebugTest {
-
+
public InstanceVariableTests(String name) {
super(name);
}
public void testGetField() throws Exception {
String typeName = "InstanceVariablesTests";
-
- ILineBreakpoint bp = createLineBreakpoint(30, typeName);
-
+
+ ILineBreakpoint bp = createLineBreakpoint(30, typeName);
+
IJavaThread thread= null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -42,42 +42,42 @@
IJavaStackFrame frame = (IJavaStackFrame)thread.getTopStackFrame();
IVariable ivt = findVariable(frame, "ivt");
assertNotNull("Could not find variable 'ivt'", ivt);
-
+
// retrieve an instance var
IJavaObject value = (IJavaObject)ivt.getValue();
assertNotNull(value);
IJavaVariable pubStr = value.getField("pubStr", false);
assertNotNull(pubStr);
assertEquals("value should be 'redefined public'", pubStr.getValue().getValueString(), "redefined public");
-
+
// retrieve an instance var in superclass
IJavaVariable privStr = value.getField("privStr", false);
assertNotNull(privStr);
- assertEquals("value should be 'private'", privStr.getValue().getValueString(), "private");
-
+ assertEquals("value should be 'private'", privStr.getValue().getValueString(), "private");
+
// retrieve an instance var in super class with same name
pubStr = value.getField("pubStr", true);
assertNotNull(pubStr);
- assertEquals("value should be 'public'", pubStr.getValue().getValueString(), "public");
+ assertEquals("value should be 'public'", pubStr.getValue().getValueString(), "public");
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
public void testGetDeclaredFieldNames() throws Exception {
String typeName = "InstanceVariablesTests";
-
- ILineBreakpoint bp = createLineBreakpoint(28, typeName);
-
+
+ ILineBreakpoint bp = createLineBreakpoint(28, typeName);
+
IJavaThread thread= null;
try {
thread= launchToLineBreakpoint(typeName, bp);
-
+
IJavaStackFrame frame = (IJavaStackFrame)thread.getTopStackFrame();
IJavaObject object = frame.getThis();
assertNotNull("'this' is null", object);
-
+
String[] names = ((IJavaReferenceType)object.getJavaType()).getDeclaredFieldNames();
assertEquals("Should be 7 declared fields", 7, names.length);
List<String> fields = new ArrayList<String>();
@@ -95,14 +95,14 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
public void testGetDeclaredFieldNamesInSubclass() throws Exception {
String typeName = "InstanceVariablesTests";
-
- ILineBreakpoint bp = createLineBreakpoint(30, typeName);
-
+
+ ILineBreakpoint bp = createLineBreakpoint(30, typeName);
+
IJavaThread thread= null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -111,7 +111,7 @@
IVariable ivt = findVariable(frame, "ivt");
assertNotNull("Could not find variable 'ivt'", ivt);
IJavaObject object = (IJavaObject)ivt.getValue();
-
+
String[] names = ((IJavaReferenceType)object.getJavaType()).getDeclaredFieldNames();
assertEquals("Should be 3 declared fields", 3, names.length);
List<String> fields = new ArrayList<String>();
@@ -125,14 +125,14 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
public void testGetAllFieldNamesInSubclass() throws Exception {
String typeName = "InstanceVariablesTests";
-
- ILineBreakpoint bp = createLineBreakpoint(30, typeName);
-
+
+ ILineBreakpoint bp = createLineBreakpoint(30, typeName);
+
IJavaThread thread= null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -141,21 +141,21 @@
IVariable ivt = findVariable(frame, "ivt");
assertNotNull("Could not find variable 'ivt'", ivt);
IJavaObject object = (IJavaObject)ivt.getValue();
-
+
String[] names = ((IJavaReferenceType)object.getJavaType()).getAllFieldNames();
assertTrue("Should be at least 10 fields", names.length >= 10);
// note: can be > 10 if Object defines any inst vars (depends on class libs)
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
public void testEvaluationAssignments() throws Exception {
String typeName = "InstanceVariablesTests";
-
- ILineBreakpoint bp = createLineBreakpoint(28, typeName);
-
+
+ ILineBreakpoint bp = createLineBreakpoint(28, typeName);
+
IJavaThread thread= null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -164,11 +164,11 @@
IVariable pubStr = findVariable(frame, "pubStr");
assertNotNull("Could not find variable 'pubStr'", pubStr);
assertEquals("'pubStr' value should be 'public'", "public", pubStr.getValue().getValueString());
-
- evaluate("pubStr = \"hello\";", frame);
+
+ evaluate("pubStr = \"hello\";", frame);
// the value should have changed
assertEquals("'pubStr' value should be 'hello'", "hello", pubStr.getValue().getValueString());
-
+
evaluate("pubStr = null;", frame);
// the value should have changed
assertEquals("'pubStr' value should be 'null'", ((IJavaDebugTarget)frame.getDebugTarget()).nullValue(), pubStr.getValue());
@@ -176,14 +176,14 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
public void testValueHasChanged() throws Exception {
String typeName = "VariableChanges";
-
- ILineBreakpoint bp = createLineBreakpoint(21, typeName);
-
+
+ ILineBreakpoint bp = createLineBreakpoint(21, typeName);
+
IJavaThread thread= null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -191,27 +191,27 @@
IJavaStackFrame frame = (IJavaStackFrame)thread.getTopStackFrame();
IVariable count = findVariable(frame, "count");
IVariable i = findVariable(frame, "i");
-
+
assertNotNull("could not find variable 'count'", count);
assertNotNull("could not find variable 'i'", i);
-
+
// on first suspend, change should be false
count.getValue();
i.getValue();
assertFalse("count should not have changed", count.hasValueChanged());
assertFalse("i should not have changed", i.hasValueChanged());
-
+
// after a step over "count++" it should have changed
stepOver(frame);
-
+
// count should have changed, and i should not
count.getValue();
- i.getValue();
+ i.getValue();
assertTrue("count should have changed value", count.hasValueChanged());
assertFalse("i should still be the same", i.hasValueChanged());
-
+
stepOver(frame);
-
+
// now count should be the same, and i should have changed
count.getValue();
i.getValue();
@@ -221,6 +221,6 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/InstructionPointerTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/InstructionPointerTests.java
index 959194f..86fae60 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/InstructionPointerTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/InstructionPointerTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/JDWPTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/JDWPTests.java
index 0ac88e9..4f35bf7 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/JDWPTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/JDWPTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -26,7 +26,7 @@
/**
* Tests raw JDWP commands sent to a target.
- *
+ *
* @since 3.3
*/
public class JDWPTests extends AbstractDebugTest {
@@ -41,13 +41,13 @@
/**
* Sends a request to the VirtualMachine Command Set (byte 1) to ask for
- * the VM Capabilities (byte 12)
+ * the VM Capabilities (byte 12)
* @throws Exception
*/
public void testCapabilities() throws Exception {
String typeName = "Breakpoints";
ILineBreakpoint bp = createLineBreakpoint(52, typeName);
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -57,29 +57,29 @@
// VM capabilities
byte[] reply = jdiTarget.sendCommand((byte)1, (byte)12, null);
JdwpReplyPacket packet = (JdwpReplyPacket) JdwpPacket.build(reply);
-
+
assertEquals("Unexpected error code in reply packet", 0, packet.errorCode());
DataInputStream replyData = packet.dataInStream();
// should be 7 booleans in reply
for (int i = 0; i < 7; i++) {
replyData.readBoolean();
}
- assertEquals("Should be no available bytes", 0, replyData.available());
+ assertEquals("Should be no available bytes", 0, replyData.available());
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
- * Sends a request to the VirtualMachine Command Set (byte 1) to ask
+ * Sends a request to the VirtualMachine Command Set (byte 1) to ask
* for ClassesBySignature (byte 2)
* @throws Exception
*/
public void testClassesBySingature() throws Exception {
String typeName = "Breakpoints";
ILineBreakpoint bp = createLineBreakpoint(52, typeName);
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -95,11 +95,11 @@
assertEquals("Unexpected error code in reply packet", 0, packet.errorCode());
DataInputStream replyData = packet.dataInStream();
// should be 1 type in reply
- assertEquals("Wrong number of types", 1, replyData.readInt());
+ assertEquals("Wrong number of types", 1, replyData.readInt());
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/JavaDebugTargetTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/JavaDebugTargetTests.java
index 463f1ca..e45d6e0 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/JavaDebugTargetTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/JavaDebugTargetTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -16,7 +16,7 @@
/**
* Tests IJavaDebugTarget API
- *
+ *
* @since 3.4
*/
public class JavaDebugTargetTests extends AbstractDebugTest {
@@ -28,7 +28,7 @@
public void testGetVMName() throws Exception {
String typeName = "Breakpoints";
createLineBreakpoint(52, typeName);
-
+
IJavaThread thread= null;
try {
// do not register launch - see bug 130911
@@ -42,11 +42,11 @@
removeAllBreakpoints();
}
}
-
+
public void testGetVersion() throws Exception {
String typeName = "Breakpoints";
createLineBreakpoint(52, typeName);
-
+
IJavaThread thread= null;
try {
// do not register launch - see bug 130911
@@ -59,6 +59,6 @@
terminateAndRemove(thread);
removeAllBreakpoints();
}
- }
-
+ }
+
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/JavaLibraryPathTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/JavaLibraryPathTests.java
index 6cfa822..3a63a1c 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/JavaLibraryPathTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/JavaLibraryPathTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -41,15 +41,15 @@
/**
* Tests for native classpath entries.
- *
+ *
* @since 3.1
*/
public class JavaLibraryPathTests extends AbstractDebugTest {
-
+
public JavaLibraryPathTests(String name) {
super(name);
}
-
+
/**
* Create test projects "PathTests1/2/3"
*/
@@ -59,14 +59,14 @@
createProject("PathTests1");
createProject("PathTests2");
}
-
+
@Override
protected void tearDown() throws Exception {
deleteProject("PathTests1");
deleteProject("PathTests2");
super.tearDown();
}
-
+
private IJavaProject createProject(String name) throws Exception {
IProject pro = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
if (pro.exists()) {
@@ -75,14 +75,14 @@
IJavaProject project = JavaProjectHelper.createJavaProject(name, "bin");
return project;
}
-
+
private void deleteProject(String name) throws Exception {
IProject pro = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
if (pro.exists()) {
pro.delete(true, true, null);
}
}
-
+
private void addToClasspath(IJavaProject jproject, IClasspathEntry cpe) throws JavaModelException {
IClasspathEntry[] oldEntries= jproject.getRawClasspath();
for (int i= 0; i < oldEntries.length; i++) {
@@ -95,8 +95,8 @@
System.arraycopy(oldEntries, 0, newEntries, 0, nEntries);
newEntries[nEntries]= cpe;
jproject.setRawClasspath(newEntries, null);
- }
-
+ }
+
public void testRequiredProjectExplicitPath() throws Exception {
// add required project with one java library path entry
IPath path = ResourcesPlugin.getWorkspace().getRoot().getLocation();
@@ -105,12 +105,12 @@
addToClasspath(getJavaProject("PathTests2"), entry);
entry = JavaCore.newProjectEntry(new Path("PathTests2").makeAbsolute());
addToClasspath(getJavaProject("PathTests1"), entry);
-
+
String[] strings = JavaRuntime.computeJavaLibraryPath(getJavaProject("PathTests1"), true);
assertEquals("Wrong number of entries", 1, strings.length);
assertEquals("Wrong entry", path.toFile().getCanonicalPath(), new File(strings[0]).getCanonicalPath());
}
-
+
public void testVMArgsForRequiredProjectExplicitPath() throws Exception {
// add required project with one java library path entry
IPath path = ResourcesPlugin.getWorkspace().getRoot().getLocation();
@@ -119,7 +119,7 @@
addToClasspath(getJavaProject("PathTests2"), entry);
entry = JavaCore.newProjectEntry(new Path("PathTests2").makeAbsolute());
addToClasspath(getJavaProject("PathTests1"), entry);
-
+
ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
ILaunchConfigurationType type = manager.getLaunchConfigurationType(IJavaLaunchConfigurationConstants.ID_JAVA_APPLICATION);
ILaunchConfigurationWorkingCopy workingCopy = type.newInstance(null, "testVMArgsForRequiredProjectExplicitPath");
@@ -131,8 +131,8 @@
String arguments = launcher.getVMArguments(workingCopy);
String expect = "-Djava.library.path=\"" + path.toFile().getAbsolutePath() + "\"";
assertTrue("wrong VM args", arguments.indexOf(expect) >= 0);
- }
-
+ }
+
public void testMultiVMArgsForRequiredProjectExplicitPath() throws Exception {
// add required project with one java library path entry
IPath path = ResourcesPlugin.getWorkspace().getRoot().getLocation();
@@ -142,7 +142,7 @@
addToClasspath(getJavaProject("PathTests2"), entry);
entry = JavaCore.newProjectEntry(new Path("PathTests2").makeAbsolute());
addToClasspath(getJavaProject("PathTests1"), entry);
-
+
ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
ILaunchConfigurationType type = manager.getLaunchConfigurationType(IJavaLaunchConfigurationConstants.ID_JAVA_APPLICATION);
ILaunchConfigurationWorkingCopy workingCopy = type.newInstance(null, "testVMArgsForRequiredProjectExplicitPath");
@@ -154,7 +154,7 @@
String arguments = launcher.getVMArguments(workingCopy);
String expect = "-Djava.library.path=\"" + path.toFile().getAbsolutePath() + File.pathSeparator + path2.toFile().getAbsolutePath() + "\"";
assertTrue("wrong VM args", arguments.indexOf(expect) >= 0);
- }
+ }
public void testNoRequiredProjectExplicitPath() throws Exception {
// add required project with one java library path entry
@@ -164,11 +164,11 @@
addToClasspath(getJavaProject("PathTests2"), entry);
entry = JavaCore.newProjectEntry(new Path("PathTests2").makeAbsolute());
addToClasspath(getJavaProject("PathTests1"), entry);
-
+
String[] strings = JavaRuntime.computeJavaLibraryPath(getJavaProject("PathTests1"), false);
assertEquals("Wrong number of entries", 0, strings.length);
}
-
+
public void testStringVariablePath() throws Exception {
//add A.jar
File jar = JavaTestPlugin.getDefault().getFileInPlugin(new Path("testjars" + File.separator + "A.jar"));
@@ -182,7 +182,7 @@
IClasspathAttribute attribute = JavaRuntime.newLibraryPathsAttribute(new String[]{path});
IClasspathEntry entry = JavaCore.newLibraryEntry(new Path(jar.getAbsolutePath()), null, null, new IAccessRule[0], new IClasspathAttribute[]{attribute}, false);
addToClasspath(getJavaProject("PathTests1"), entry);
-
+
String[] strings = JavaRuntime.computeJavaLibraryPath(getJavaProject("PathTests1"), false);
assertEquals("Wrong number of entries", 1, strings.length);
assertEquals("Wrong entry", jar.getCanonicalFile().getCanonicalPath(), new File(strings[0]).getCanonicalPath());
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/LineTrackerTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/LineTrackerTests.java
index f275f30..bbffc19 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/LineTrackerTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/LineTrackerTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -38,34 +38,34 @@
* Tests console line tracker.
*/
public class LineTrackerTests extends AbstractDebugTest implements IConsoleLineTrackerExtension {
-
+
protected String[] fLines = new String[] {
"one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten"
};
-
+
protected IJavaDebugTarget fTarget;
-
+
protected List<String> fLinesRead = new ArrayList<String>();
-
+
protected boolean fStarted = false;
-
+
protected boolean fStopped = false;
-
+
protected IConsole fConsole = null;
-
+
protected Object fLock = new Object();
-
+
public LineTrackerTests(String name) {
super(name);
}
-
+
@Override
protected void setUp() throws Exception {
super.setUp();
fStarted = false;
fStopped = false;
}
-
+
@Override
protected void tearDown() throws Exception {
// delete references and gc to free memory.
@@ -73,12 +73,12 @@
fLines = null;
fLinesRead.clear();
fLinesRead = null;
-
+
System.gc();
super.tearDown();
- }
-
-
+ }
+
+
public void testSimpleLineCounter() throws Exception {
ConsoleLineTracker.setDelegate(this);
fTarget = null;
@@ -95,15 +95,15 @@
// there are 10 lines and one "empty line" (i.e. the last "new line")
assertEquals("Wrong number of lines output", 11, fLinesRead.size());
for (int i = 0; i < 10; i++) {
- assertEquals("Line " + i + " not equal", fLines[i], fLinesRead.get(i));
+ assertEquals("Line " + i + " not equal", fLines[i], fLinesRead.get(i));
}
assertEquals("Should be an empty last line", IInternalDebugCoreConstants.EMPTY_STRING, fLinesRead.get(10));
} finally {
ConsoleLineTracker.setDelegate(null);
terminateAndRemove(fTarget);
}
- }
-
+ }
+
/**
* This program prints the final line without a new line
* @throws Exception
@@ -123,17 +123,17 @@
assertTrue("Did not receive 'stopped' notification", fStopped);
assertEquals("Wrong number of lines", 10, fLinesRead.size());
for (int i = 0; i < 10; i++) {
- assertEquals("Line " + i + " not equal", fLines[i], fLinesRead.get(i));
+ assertEquals("Line " + i + " not equal", fLines[i], fLinesRead.get(i));
}
} finally {
ConsoleLineTracker.setDelegate(null);
terminateAndRemove(fTarget);
}
- }
-
+ }
+
/**
* Test 10,000 lines of output.
- *
+ *
* @throws Exception
*/
public void testFlood() throws Exception {
@@ -143,7 +143,7 @@
ILaunchConfiguration config = getLaunchConfiguration("FloodConsole");
assertNotNull("Could not locate launch configuration", config);
launch = config.launch(ILaunchManager.RUN_MODE, null);
-
+
synchronized (fLock) {
if (!fStopped) {
fLock.wait(480000);
@@ -158,8 +158,8 @@
launch.getProcesses()[0].terminate();
DebugPlugin.getDefault().getLaunchManager().removeLaunch(launch);
}
- }
-
+ }
+
public void testHyperLink() throws Exception {
try {
ConsoleLineTracker.setDelegate(this);
@@ -212,7 +212,7 @@
fLock.notifyAll();
}
}
-
+
/**
* Tests that stack traces appear with hyperlinks
*/
@@ -249,9 +249,9 @@
ConsoleLineTracker.setDelegate(null);
jdiUIPreferences.setValue(IJDIPreferencesConstants.PREF_SUSPEND_ON_UNCAUGHT_EXCEPTIONS, suspendOnException);
terminateAndRemove(fTarget);
- }
+ }
}
-
+
public void testStringConcatenation() throws Exception {
ConsoleLineTracker.setDelegate(this);
String typeName = "PrintConcatenation";
@@ -275,7 +275,7 @@
terminateAndRemove(fTarget);
}
}
-
+
public void testIntConcatenation() throws Exception {
ConsoleLineTracker.setDelegate(this);
String typeName = "PrintConcatenation";
@@ -299,7 +299,7 @@
terminateAndRemove(fTarget);
}
}
-
+
private void dumpOnError(int expectedLines) {
if (fLinesRead.size() != expectedLines) {
Iterator<String> lines = fLinesRead.iterator();
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/LiteralTests17.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/LiteralTests17.java
index 9aa129a..8501b07 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/LiteralTests17.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/LiteralTests17.java
@@ -20,13 +20,13 @@
/**
* Tests that the new forms allowed in literals in Java 7 work as expected
- *
+ *
* @since 3.1.200
*/
public class LiteralTests17 extends AbstractDebugTest {
public static final String LITERAL_TYPE_NAME = "Literals17";
-
+
/**
* Constructor
*/
@@ -41,7 +41,7 @@
protected IJavaProject getProjectContext() {
return get17Project();
}
-
+
/**
* Perform the evaluation on the given snippet and return the value
* @param snippet
@@ -56,19 +56,19 @@
IEvaluationResult result = evaluate(snippet, thread);
assertNotNull("There must be an evaluation result", result);
assertTrue("There must be no errors in the result", !result.hasErrors());
- return result.getValue();
+ return result.getValue();
}
finally {
terminateAndRemove(thread);
removeAllBreakpoints();
}
}
-
+
/**
- * Runs evaluations on the two given snippets returning the value from the second snippet. This method allows us to
+ * Runs evaluations on the two given snippets returning the value from the second snippet. This method allows us to
* run two snippets on the same thread where the second snippet may or may not depend on the state change from the
* first snippet
- *
+ *
* @param snippet
* @param snippet2
* @return the {@link IEvaluationResult}
@@ -85,17 +85,17 @@
result = evaluate(snippet2, thread);
assertNotNull("There must be an evaluation result", result);
assertTrue("There must be no errors in the result", !result.hasErrors());
- return result.getValue();
+ return result.getValue();
}
finally {
terminateAndRemove(thread);
removeAllBreakpoints();
}
}
-
+
/**
* Tests that an addition evaluation with an int with underscores in it works
- *
+ *
* @throws Exception
*/
public void testUnderscoreIntEval() throws Exception {
@@ -105,10 +105,10 @@
JDIPrimitiveValue val = (JDIPrimitiveValue) value;
assertTrue("The new integer value should be 11", val.getIntValue() == 11);
}
-
+
/**
* Tests that we can assign a variable value to an int with underscores
- *
+ *
* @throws Exception
*/
public void testUnderscoreIntVarAssignment() throws Exception {
@@ -118,10 +118,10 @@
JDIPrimitiveValue val = (JDIPrimitiveValue) value;
assertTrue("The new integer value should be 12", val.getIntValue() == 12);
}
-
+
/**
* Tests that an addition evaluation with a short with underscores in it works
- *
+ *
* @throws Exception
*/
public void testUnderscoreShortEval() throws Exception {
@@ -131,10 +131,10 @@
JDIPrimitiveValue val = (JDIPrimitiveValue) value;
assertTrue("The new short value should be 11", val.getShortValue() == 11);
}
-
+
/**
* Tests that we can assign a variable value to a short with underscores
- *
+ *
* @throws Exception
*/
public void testUnderscoreShortVarAssignment() throws Exception {
@@ -144,10 +144,10 @@
JDIPrimitiveValue val = (JDIPrimitiveValue) value;
assertTrue("The new short value should be 12", val.getShortValue() == 12);
}
-
+
/**
* Tests that an addition evaluation with a byte with underscores in it works
- *
+ *
* @throws Exception
*/
public void testUnderscoreByteEval() throws Exception {
@@ -157,10 +157,10 @@
JDIPrimitiveValue val = (JDIPrimitiveValue) value;
assertTrue("The new byte value should be 9", val.getByteValue() == 9);
}
-
+
/**
* Tests that we can assign a variable value to a short with underscores
- *
+ *
* @throws Exception
*/
public void testUnderscoreByteVarAssignment() throws Exception {
@@ -170,10 +170,10 @@
JDIPrimitiveValue val = (JDIPrimitiveValue) value;
assertTrue("The new byte value should be 12", val.getByteValue() == 12);
}
-
+
/**
* Tests that an addition evaluation with a long with underscores in it works
- *
+ *
* @throws Exception
*/
public void testUnderscoreLongEval() throws Exception {
@@ -183,10 +183,10 @@
JDIPrimitiveValue val = (JDIPrimitiveValue) value;
assertTrue("The new long value should be 11", val.getLongValue() == 11);
}
-
+
/**
* Tests that we can assign a variable value to a long with underscores
- *
+ *
* @throws Exception
*/
public void testUnderscoreLongVarAssignment() throws Exception {
@@ -196,10 +196,10 @@
JDIPrimitiveValue val = (JDIPrimitiveValue) value;
assertTrue("The new long value should be 12", val.getLongValue() == 12);
}
-
+
/**
* Tests that an addition evaluation with a float with underscores in it works
- *
+ *
* @throws Exception
*/
public void testUnderscoreFloatEval() throws Exception {
@@ -209,10 +209,10 @@
JDIPrimitiveValue val = (JDIPrimitiveValue) value;
assertTrue("The new float value should be 4.1415", val.getFloatValue() == 4.1415F);
}
-
+
/**
* Tests that we can assign a variable value to a float with underscores
- *
+ *
* @throws Exception
*/
public void testUnderscoreFloatVarAssignment() throws Exception {
@@ -222,10 +222,10 @@
JDIPrimitiveValue val = (JDIPrimitiveValue) value;
assertTrue("The new float value should be 7.1415", val.getFloatValue() == 7.1415F);
}
-
+
/**
* Tests that an addition evaluation with a double with underscores in it works
- *
+ *
* @throws Exception
*/
public void testUnderscoreDoubleEval() throws Exception {
@@ -235,10 +235,10 @@
JDIPrimitiveValue val = (JDIPrimitiveValue) value;
assertTrue("The new double value should be 11.556", val.getDoubleValue() == 11.556D);
}
-
+
/**
* Tests that we can assign a variable value to a double with underscores
- *
+ *
* @throws Exception
*/
public void testUnderscoreDoubleVarAssignment() throws Exception {
@@ -248,10 +248,10 @@
JDIPrimitiveValue val = (JDIPrimitiveValue) value;
assertTrue("The new double value should be 16.556", val.getDoubleValue() == 16.555999999999997D);
}
-
+
/**
* Tests that an addition evaluation with a binary literal with underscores in it works
- *
+ *
* @throws Exception
*/
public void testUnderscoreBinaryEval() throws Exception {
@@ -261,10 +261,10 @@
JDIPrimitiveValue val = (JDIPrimitiveValue) value;
assertTrue("The new integer value should be 9", val.getIntValue() == 9);
}
-
+
/**
* Tests that we can assign a variable value to a binary literal with underscores
- *
+ *
* @throws Exception
*/
public void testUnderscoreBinaryVarAssignment() throws Exception {
@@ -274,10 +274,10 @@
JDIPrimitiveValue val = (JDIPrimitiveValue) value;
assertTrue("The new integer value should be 17", val.getIntValue() == 17);
}
-
+
/**
* Tests that an addition evaluation with a hex with underscores in it works
- *
+ *
* @throws Exception
*/
public void testUnderscoreHexEval() throws Exception {
@@ -287,10 +287,10 @@
JDIPrimitiveValue val = (JDIPrimitiveValue) value;
assertTrue("The new integer value should be 17", val.getIntValue() == 17);
}
-
+
/**
* Tests that we can assign a variable value to a hex with underscores
- *
+ *
* @throws Exception
*/
public void testUnderscoreHexVarAssignment() throws Exception {
@@ -300,10 +300,10 @@
JDIPrimitiveValue val = (JDIPrimitiveValue) value;
assertTrue("The new integer value should be 257", val.getIntValue() == 257);
}
-
+
/**
* Tests that an addition evaluation with an octal with underscores in it works
- *
+ *
* @throws Exception
*/
public void testUnderscoreOctEval() throws Exception {
@@ -313,10 +313,10 @@
JDIPrimitiveValue val = (JDIPrimitiveValue) value;
assertTrue("The new integer value should be 9", val.getIntValue() == 9);
}
-
+
/**
* Tests that we can assign a variable value to an octal with underscores
- *
+ *
* @throws Exception
*/
public void testUnderscoreOctVarAssignment() throws Exception {
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/LocalVariableTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/LocalVariableTests.java
index c8a2477..952e9cc 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/LocalVariableTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/LocalVariableTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -26,9 +26,9 @@
import org.eclipse.jdt.internal.debug.core.model.JDINullValue;
public class LocalVariableTests extends AbstractDebugTest implements IValueDetailListener {
-
+
String fDetail = null;
-
+
public LocalVariableTests(String name) {
super(name);
}
@@ -40,8 +40,8 @@
*/
public void testFindConflicting1() throws Exception {
String typeName = "LocalVariableTests2";
- ILineBreakpoint bp = createLineBreakpoint(21, typeName);
-
+ ILineBreakpoint bp = createLineBreakpoint(21, typeName);
+
IJavaThread thread= null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -56,9 +56,9 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Tests if the correct parameter variable is found when it shadows a field variable
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=384458
@@ -66,8 +66,8 @@
*/
public void testFindConflicting2() throws Exception {
String typeName = "LocalVariableTests2";
- ILineBreakpoint bp = createLineBreakpoint(25, typeName);
-
+ ILineBreakpoint bp = createLineBreakpoint(25, typeName);
+
IJavaThread thread= null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -79,14 +79,14 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
public void testSimpleVisibility() throws Exception {
String typeName = "LocalVariablesTests";
-
- ILineBreakpoint bp = createLineBreakpoint(18, typeName);
-
+
+ ILineBreakpoint bp = createLineBreakpoint(18, typeName);
+
IJavaThread thread= null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -94,37 +94,37 @@
IJavaStackFrame frame = (IJavaStackFrame)thread.getTopStackFrame();
IJavaVariable[] vars = frame.getLocalVariables();
assertEquals("Should be no visible locals", 0, vars.length);
-
+
stepOver(frame);
frame = (IJavaStackFrame)thread.getTopStackFrame();
stepOver(frame);
frame = (IJavaStackFrame)thread.getTopStackFrame();
-
+
vars = frame.getLocalVariables();
- assertEquals("Should be one visible local", 1, vars.length);
+ assertEquals("Should be one visible local", 1, vars.length);
assertEquals("Visible var should be 'i1'", "i1", vars[0].getName());
-
+
stepOver(frame);
frame = (IJavaStackFrame)thread.getTopStackFrame();
stepOver(frame);
frame = (IJavaStackFrame)thread.getTopStackFrame();
-
+
vars = frame.getLocalVariables();
- assertEquals("Should be two visible locals", 2, vars.length);
- assertEquals("Visible var 1 should be 'i1'", "i1", vars[0].getName());
+ assertEquals("Should be two visible locals", 2, vars.length);
+ assertEquals("Visible var 1 should be 'i1'", "i1", vars[0].getName());
assertEquals("Visible var 2 should be 'i2'", "i2", vars[1].getName());
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
public void testEvaluationAssignments() throws Exception {
String typeName = "LocalVariablesTests";
-
- ILineBreakpoint bp = createLineBreakpoint(22, typeName);
-
+
+ ILineBreakpoint bp = createLineBreakpoint(22, typeName);
+
IJavaThread thread= null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -134,35 +134,35 @@
IVariable i1 = findVariable(frame, "i1");
assertNotNull("Could not find variable 'i1'", i1);
assertEquals("'i1' value should be '0'", target.newValue(0), i1.getValue());
-
+
IVariable i2 = findVariable(frame, "i2");
assertNotNull("Could not find variable 'i2'", i2);
assertEquals("'i2' value should be '1'", target.newValue(1), i2.getValue());
-
- evaluate("i1 = 73;", frame);
+
+ evaluate("i1 = 73;", frame);
// the value should have changed
assertEquals("'i1' value should be '73'", target.newValue(73), i1.getValue());
-
+
evaluate("i2 = i1;", frame);
// the value should have changed
assertEquals("'i2' value should be '73'", target.newValue(73), i2.getValue());
-
+
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
protected void doArrayDetailTestNonDefPkg(String varName, String expectedDetails) throws Exception {
doArrayDetailTest(varName, expectedDetails, "org.eclipse.debug.tests.targets.ArrayDetailTests", 64);
}
-
+
protected void doArrayDetailTestDefPkg(String varName, String expectedDetails) throws Exception {
doArrayDetailTest(varName, expectedDetails, "ArrayDetailTestsDef", 63);
- }
-
+ }
+
protected void doArrayDetailTest(String varName, String expectedDetails, String mainName, int lineNumber) throws Exception {
- ILineBreakpoint bp = createLineBreakpoint(lineNumber, mainName);
+ ILineBreakpoint bp = createLineBreakpoint(lineNumber, mainName);
IDebugModelPresentation presentation = DebugUITools.newDebugModelPresentation();
IJavaThread thread= null;
try {
@@ -173,7 +173,7 @@
IVariable var = findVariable(frame, varName);
assertNotNull("Could not find variable " + varName, var);
IValue value = var.getValue();
-
+
synchronized (this) {
fDetail = null;
presentation.computeDetail(value, this);
@@ -181,13 +181,13 @@
}
assertNotNull("Details not computed", fDetail);
assertEquals(expectedDetails, fDetail);
-
+
} finally {
presentation.dispose();
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
+ }
+ }
@Override
public void detailComputed(IValue value, String result) {
@@ -195,54 +195,54 @@
fDetail = result;
notifyAll();
}
-
+
}
-
+
public void testStringArrayDetails() throws Exception {
doArrayDetailTestNonDefPkg("strings", "[0, 1, 10, 11, 100]");
}
-
+
public void testIntArrayDetails() throws Exception {
doArrayDetailTestNonDefPkg("primitives", "[0, 1, 2, 3, 4]");
}
-
+
public void testTopLevelTypeArrayDetails() throws Exception {
doArrayDetailTestNonDefPkg("outers", "[OutermostObject, OutermostObject, OutermostObject, OutermostObject, OutermostObject]");
}
-
+
public void testInnerTypeDetails() throws Exception {
doArrayDetailTestNonDefPkg("middle", "[anInnerObject, anInnerObject, anInnerObject, anInnerObject, anInnerObject]");
}
-
+
public void testNestedInnerTypeDetails() throws Exception {
doArrayDetailTestNonDefPkg("inners", "[aSecondInnerObject, aSecondInnerObject, aSecondInnerObject, aSecondInnerObject, aSecondInnerObject]");
}
-
+
public void testInterfaceTypeDetails() throws Exception {
doArrayDetailTestNonDefPkg("runs", "[Runnable, Runnable, Runnable, Runnable, Runnable]");
}
-
+
public void testStringArrayDetailsDefPkg() throws Exception {
doArrayDetailTestDefPkg("strings", "[0, 1, 10, 11, 100]");
}
-
+
public void testIntArrayDetailsDefPkg() throws Exception {
doArrayDetailTestDefPkg("primitives", "[0, 1, 2, 3, 4]");
}
-
+
public void testTopLevelTypeArrayDetailsDefPkg() throws Exception {
doArrayDetailTestDefPkg("outers", "[OutermostObject, OutermostObject, OutermostObject, OutermostObject, OutermostObject]");
}
-
+
public void testInnerTypeDetailsDefPkg() throws Exception {
doArrayDetailTestDefPkg("middle", "[anInnerObject, anInnerObject, anInnerObject, anInnerObject, anInnerObject]");
}
-
+
public void testNestedInnerTypeDetailsDefPkg() throws Exception {
doArrayDetailTestDefPkg("inners", "[aSecondInnerObject, aSecondInnerObject, aSecondInnerObject, aSecondInnerObject, aSecondInnerObject]");
}
-
+
public void testInterfaceTypeDetailsDefPkg() throws Exception {
doArrayDetailTestDefPkg("runs", "[Runnable, Runnable, Runnable, Runnable, Runnable]");
- }
+ }
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/ProcessTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/ProcessTests.java
index ff4174e..c0d867e 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/ProcessTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/ProcessTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -23,7 +23,7 @@
* Tests IProcess.
*/
public class ProcessTests extends AbstractDebugTest {
-
+
public ProcessTests(String name) {
super(name);
}
@@ -31,7 +31,7 @@
public void testExitValueNormal() throws Exception {
String typeName = "Breakpoints";
ILineBreakpoint bp = createLineBreakpoint(43, typeName);
-
+
IJavaThread thread= null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -51,13 +51,13 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Tests that an already terminated java.lang.Process behaves properly when
* wrapped in an IProcess.
- *
+ *
* @throws Exception
*/
public void testAlreadyTerminatedProcess() throws Exception {
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/RemoteJavaApplicationTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/RemoteJavaApplicationTests.java
index c236a33..ed1a22b 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/RemoteJavaApplicationTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/RemoteJavaApplicationTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -39,7 +39,7 @@
* Tests attaching to a remote java application
*/
public class RemoteJavaApplicationTests extends AbstractDebugTest {
-
+
public RemoteJavaApplicationTests(String name) {
super(name);
}
@@ -51,7 +51,7 @@
public void testAttach() throws Exception {
String typeName = "Breakpoints";
createLineBreakpoint(52, typeName);
-
+
// create launch config to launch VM in debug mode waiting for attach
ILaunchConfigurationType type = getLaunchManager().getLaunchConfigurationType(IJavaLaunchConfigurationConstants.ID_JAVA_APPLICATION);
ILaunchConfigurationWorkingCopy config = type.newInstance(null, "Launch Remote VM");
@@ -61,9 +61,9 @@
// use 'java' instead of 'javaw' to launch tests (javaw is problematic on JDK1.4.2)
Map<String, String> map = new HashMap<String, String>(1);
map.put(IJavaLaunchConfigurationConstants.ATTR_JAVA_COMMAND, "java");
- config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_TYPE_SPECIFIC_ATTRS_MAP, map);
+ config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_TYPE_SPECIFIC_ATTRS_MAP, map);
ILaunchConfiguration launchRemoteVMConfig = config.doSave();
-
+
// create a launch config to do the attach
type = getLaunchManager().getLaunchConfigurationType(IJavaLaunchConfigurationConstants.ID_REMOTE_JAVA_APPLICATION);
config = type.newInstance(null, "Remote Breakpoints");
@@ -77,15 +77,15 @@
while (iter.hasNext()) {
String key = iter.next();
Connector.Argument arg = def.get(key);
- argMap.put(key, arg.toString());
+ argMap.put(key, arg.toString());
}
- config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_CONNECT_MAP, argMap);
- ILaunchConfiguration attachConfig = config.doSave();
-
+ config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_CONNECT_MAP, argMap);
+ ILaunchConfiguration attachConfig = config.doSave();
+
// launch remote VM
ILaunch launch = launchRemoteVMConfig.launch(ILaunchManager.RUN_MODE, null);
-
- // attach
+
+ // attach
IJavaThread thread= null;
try {
CoreException exception = null;
@@ -119,9 +119,9 @@
terminateAndRemove(thread);
removeAllBreakpoints();
DebugPlugin.getDefault().getLaunchManager().removeLaunch(launch);
- }
+ }
}
-
+
/**
* Tests a Standard (Socket Listen) VM connection.
* @throws Exception
@@ -129,7 +129,7 @@
public void testListen() throws Exception {
String typeName = "Breakpoints";
createLineBreakpoint(52, typeName);
-
+
// create a launch config to listen for the vm
ILaunchConfigurationType type = getLaunchManager().getLaunchConfigurationType(IJavaLaunchConfigurationConstants.ID_REMOTE_JAVA_APPLICATION);
ILaunchConfigurationWorkingCopy config = type.newInstance(null, "Remote Breakpoints");
@@ -143,10 +143,10 @@
while (iter.hasNext()) {
String key = iter.next();
Connector.Argument arg = def.get(key);
- argMap.put(key, arg.toString());
+ argMap.put(key, arg.toString());
}
- config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_CONNECT_MAP, argMap);
- ILaunchConfiguration listenConfig = config.doSave();
+ config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_CONNECT_MAP, argMap);
+ ILaunchConfiguration listenConfig = config.doSave();
// create launch config to launch VM that will connect to the waiting listener
type = getLaunchManager().getLaunchConfigurationType(IJavaLaunchConfigurationConstants.ID_JAVA_APPLICATION);
@@ -157,18 +157,18 @@
// use 'java' instead of 'javaw' to launch tests (javaw is problematic on JDK1.4.2)
Map<String, String> map = new HashMap<String, String>(1);
map.put(IJavaLaunchConfigurationConstants.ATTR_JAVA_COMMAND, "java");
- config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_TYPE_SPECIFIC_ATTRS_MAP, map);
+ config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_TYPE_SPECIFIC_ATTRS_MAP, map);
ILaunchConfiguration launchRemoteVMConfig = config.doSave();
-
+
ILaunch listenerLaunch = null;
IJavaThread thread = null;
-
-
+
+
try {
-
+
DebugEventWaiter waiter= new DebugElementKindEventDetailWaiter(DebugEvent.MODEL_SPECIFIC, IProcess.class, IJavaLaunchConfigurationConstants.DETAIL_CONFIG_READY_TO_ACCEPT_REMOTE_VM_CONNECTION);
waiter.setTimeout(DEFAULT_TIMEOUT);
-
+
IProcess process = null;
CoreException exception = null;
int attempts = 0;
@@ -188,14 +188,14 @@
if (exception != null) {
throw exception;
}
-
+
assertNotNull("Launch of the not successful", process);
listenerLaunch = process.getLaunch();
-
-
+
+
waiter= new DebugElementKindEventDetailWaiter(DebugEvent.SUSPEND, IJavaThread.class, DebugEvent.BREAKPOINT);
waiter.setTimeout(DEFAULT_TIMEOUT);
-
+
exception = null;
attempts = 0;
connected = false;
@@ -223,8 +223,8 @@
int stackLine = thread.getTopStackFrame().getLineNumber();
assertTrue("line numbers of breakpoint and stack frame do not match", lineNumber == stackLine);
breakpoint.delete();
-
-
+
+
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/RuntimeClasspathEntryTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/RuntimeClasspathEntryTests.java
index af0bc8e..7e09c26 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/RuntimeClasspathEntryTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/RuntimeClasspathEntryTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -24,7 +24,7 @@
* Tests runtime classpath entry creation/restoration.
*/
public class RuntimeClasspathEntryTests extends AbstractDebugTest {
-
+
public RuntimeClasspathEntryTests(String name) {
super(name);
}
@@ -32,53 +32,53 @@
public void testProjectEntry() throws Exception {
IProject project = get14Project().getProject();
IRuntimeClasspathEntry entry = JavaRuntime.newProjectRuntimeClasspathEntry(get14Project());
-
+
assertEquals("Paths should be equal", project.getFullPath(), entry.getPath());
assertEquals("Resources should be equal", project, entry.getResource());
assertEquals("Should be of type project", IRuntimeClasspathEntry.PROJECT, entry.getType());
assertEquals("Should be a user entry", IRuntimeClasspathEntry.USER_CLASSES, entry.getClasspathProperty());
-
+
String memento = entry.getMemento();
IRuntimeClasspathEntry restored = JavaRuntime.newRuntimeClasspathEntry(memento);
assertEquals("Entries should be equal", entry, restored);
}
-
+
public void testJRELIBVariableEntry() throws Exception {
IClasspathEntry cpe = JavaCore.newVariableEntry(new Path(JavaRuntime.JRELIB_VARIABLE), new Path(JavaRuntime.JRESRC_VARIABLE), new Path(JavaRuntime.JRESRCROOT_VARIABLE));
IRuntimeClasspathEntry entry = JavaRuntime.newVariableRuntimeClasspathEntry(new Path(JavaRuntime.JRELIB_VARIABLE));
entry.setSourceAttachmentPath(cpe.getSourceAttachmentPath());
entry.setSourceAttachmentRootPath(cpe.getSourceAttachmentRootPath());
-
+
assertEquals("Paths should be equal", cpe.getPath(), entry.getPath());
assertNull("Resource should be null", entry.getResource());
assertEquals("Should be of type varirable", IRuntimeClasspathEntry.VARIABLE, entry.getType());
assertEquals("Should be a standard entry", IRuntimeClasspathEntry.STANDARD_CLASSES, entry.getClasspathProperty());
-
+
String memento = entry.getMemento();
IRuntimeClasspathEntry restored = JavaRuntime.newRuntimeClasspathEntry(memento);
assertEquals("Entries should be equal", entry, restored);
-
+
IVMInstall vm = JavaRuntime.getDefaultVMInstall();
LibraryLocation[] libs = vm.getLibraryLocations();
if (libs == null) {
libs = vm.getVMInstallType().getDefaultLibraryLocations(vm.getInstallLocation());
}
assertTrue("there is at least one system lib", libs.length >= 1);
-
- }
-
+
+ }
+
/**
* Tests that a project can be launched if it contains the JRE_CONTAINER variable
* instead of JRE_LIB
- *
+ *
* XXX: test waiting for bug fix in JCORE - unable to bind container if there
* is no corresponding classpath entry.
*//*
public void testJREContainerEntry() throws Exception {
ILaunchConfiguration lc = getLaunchConfiguration("Breakpoints");
ILaunchConfigurationWorkingCopy wc = lc.copy("Breakpoints_JRE_CONTAINER");
-
+
IRuntimeClasspathEntry[] cp = JavaRuntime.getClasspathProvider(lc).computeUnresolvedClasspath(lc);
IRuntimeClasspathEntry removed = null;
List entries = new ArrayList(cp.length);
@@ -86,16 +86,16 @@
for (int i = 0; i < cp.length; i++) {
if (cp[i].getType() == IRuntimeClasspathEntry.VARIABLE) {
removed = cp[i];
- cp[i] = JavaRuntime.newRuntimeContainerClasspathEntry(new Path(JavaRuntime.JRE_CONTAINER), IRuntimeClasspathEntry.STANDARD_CLASSES);
+ cp[i] = JavaRuntime.newRuntimeContainerClasspathEntry(new Path(JavaRuntime.JRE_CONTAINER), IRuntimeClasspathEntry.STANDARD_CLASSES);
}
entries.add(cp[i].getMemento());
}
-
+
assertNotNull("Did not replace entry", removed);
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_DEFAULT_CLASSPATH, false);
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_CLASSPATH, entries);
lc = wc.doSave();
-
+
createLineBreakpoint(52, "Breakpoints");
IJavaThread thread= null;
try {
@@ -106,22 +106,22 @@
removeAllBreakpoints();
}
} */
-
+
public void testJREContainerEquality() throws Exception {
IRuntimeClasspathEntry entry1 = JavaRuntime.newRuntimeContainerClasspathEntry(new Path(JavaRuntime.JRE_CONTAINER), IRuntimeClasspathEntry.STANDARD_CLASSES, get14Project());
IRuntimeClasspathEntry entry2 = JavaRuntime.newRuntimeContainerClasspathEntry(new Path(JavaRuntime.JRE_CONTAINER), IRuntimeClasspathEntry.STANDARD_CLASSES, getMultiOutputProject());
assertEquals("JRE containers should be equal no matter which project", entry1, entry2);
}
-
+
public void testExampleContainerEqualityNegative() throws Exception {
IRuntimeClasspathEntry entry1 = JavaRuntime.newRuntimeContainerClasspathEntry(new Path("org.eclipse.jdt.debug.tests.TestClasspathContainer"), IRuntimeClasspathEntry.USER_CLASSES, get14Project());
IRuntimeClasspathEntry entry2 = JavaRuntime.newRuntimeContainerClasspathEntry(new Path("org.eclipse.jdt.debug.tests.TestClasspathContainer"), IRuntimeClasspathEntry.USER_CLASSES, getMultiOutputProject());
assertFalse("Example containers should *not* be equal for different projects", entry1.equals(entry2));
}
-
+
public void testExampleContainerEqualityPositive() throws Exception {
IRuntimeClasspathEntry entry1 = JavaRuntime.newRuntimeContainerClasspathEntry(new Path("org.eclipse.jdt.debug.tests.TestClasspathContainer"), IRuntimeClasspathEntry.USER_CLASSES, get14Project());
IRuntimeClasspathEntry entry2 = JavaRuntime.newRuntimeContainerClasspathEntry(new Path("org.eclipse.jdt.debug.tests.TestClasspathContainer"), IRuntimeClasspathEntry.USER_CLASSES, get14Project());
assertEquals("Example containers should be equal for same project", entry1, entry2);
- }
+ }
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/StaticVariableTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/StaticVariableTests.java
index c47128a..d8a8617 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/StaticVariableTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/StaticVariableTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -18,16 +18,16 @@
import org.eclipse.jdt.debug.tests.AbstractDebugTest;
public class StaticVariableTests extends AbstractDebugTest {
-
+
public StaticVariableTests(String name) {
super(name);
}
public void testSetValue() throws Exception {
String typeName = "StaticVariablesTests";
-
- ILineBreakpoint bp = createLineBreakpoint(40, typeName);
-
+
+ ILineBreakpoint bp = createLineBreakpoint(40, typeName);
+
IJavaThread thread= null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -35,14 +35,14 @@
IJavaStackFrame frame = (IJavaStackFrame)thread.getTopStackFrame();
IVariable pubStr = findVariable(frame, "pubStr");
assertNotNull("Could not find variable 'pubStr'", pubStr);
-
+
assertEquals("Value should be 'public'","public", pubStr.getValue().getValueString());
pubStr.setValue(((IJavaDebugTarget)frame.getDebugTarget()).newValue("test"));
assertEquals("Value should be 'test'","test", pubStr.getValue().getValueString());
-
+
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/StratumTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/StratumTests.java
index 9a223bc..ffe9f36 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/StratumTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/StratumTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -20,20 +20,20 @@
* Tests strata.
*/
public class StratumTests extends AbstractDebugTest {
-
+
public StratumTests(String name) {
super(name);
}
/**
* Test available strata on a type.
- *
+ *
* @throws Exception
*/
public void testAvailableStrata() throws Exception {
String typeName = "Breakpoints";
- createLineBreakpoint(81, typeName);
-
+ createLineBreakpoint(81, typeName);
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
@@ -45,18 +45,18 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Test default stratum on a type.
- *
+ *
* @throws Exception
*/
public void testDefaultStratum() throws Exception {
String typeName = "Breakpoints";
- createLineBreakpoint(81, typeName);
-
+ createLineBreakpoint(81, typeName);
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
@@ -67,18 +67,18 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
+ }
+ }
/**
* Test set / get default stratum on a java debug target.
- *
+ *
* @throws Exception
*/
public void testSetGetDefaultStratum() throws Exception {
String typeName = "Breakpoints";
- createLineBreakpoint(81, typeName);
-
+ createLineBreakpoint(81, typeName);
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
@@ -92,7 +92,7 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
public void testGetLineInStratum() throws Exception {
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/StringSubstitutionTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/StringSubstitutionTests.java
index 889651b..f662d3e 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/StringSubstitutionTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/StringSubstitutionTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -43,12 +43,12 @@
* Tests string substitutions
*/
public class StringSubstitutionTests extends AbstractDebugTest implements IValueVariableListener {
-
+
// change notification
public IValueVariable[] fAdded;
public IValueVariable[] fChanged;
public IValueVariable[] fRemoved;
-
+
public StringSubstitutionTests(String name) {
super(name);
}
@@ -56,27 +56,27 @@
/**
* Returns the value variable with the given name or <code>null</code>
* if none.
- *
- * @param name variable name
+ *
+ * @param name variable name
* @return value variable with the given name or <code>null</code>
* if none
*/
protected IValueVariable getValueVariable(String name) {
return VariablesPlugin.getDefault().getStringVariableManager().getValueVariable(name);
}
-
+
/**
* Returns the context variable with the given name or <code>null</code>
* if none.
- *
- * @param name variable name
+ *
+ * @param name variable name
* @return context variable with the given name or <code>null</code>
* if none
*/
protected IDynamicVariable getContextVariable(String name) {
return VariablesPlugin.getDefault().getStringVariableManager().getDynamicVariable(name);
- }
-
+ }
+
/**
* Tests value variable initializer
*/
@@ -84,8 +84,8 @@
IValueVariable variable = getValueVariable("VALUE_VAR_WITH_INITIALIZER");
checkValueVariableProperties(variable, "VALUE_VAR_WITH_INITIALIZER", "sample value variable", "initial-value", true, false);
assertEquals("Contributing plugin ID was incorrect.","org.eclipse.jdt.debug.tests",VariablesPlugin.getDefault().getStringVariableManager().getContributingPluginId(variable));
- }
-
+ }
+
/**
* Tests value variable with an initial value
*/
@@ -94,7 +94,7 @@
checkValueVariableProperties(variable, "VALUE_VAR_WITH_VALUE", "sample value variable", "initial-value", true, false);
assertEquals("Contributing plugin ID was incorrect.","org.eclipse.jdt.debug.tests",VariablesPlugin.getDefault().getStringVariableManager().getContributingPluginId(variable));
}
-
+
/**
* Tests value variable initializer set to read only
*/
@@ -102,8 +102,8 @@
IValueVariable variable = getValueVariable("VALUE_VAR_WITH_INITIALIZER_READ_ONLY");
checkValueVariableProperties(variable, "VALUE_VAR_WITH_INITIALIZER_READ_ONLY", "sample value variable", "initial-value", true, true);
assertEquals("Contributing plugin ID was incorrect.","org.eclipse.jdt.debug.tests",VariablesPlugin.getDefault().getStringVariableManager().getContributingPluginId(variable));
- }
-
+ }
+
/**
* Tests value variable with an initial value set to read only
*/
@@ -112,31 +112,31 @@
checkValueVariableProperties(variable, "VALUE_VAR_WITH_VALUE_READ_ONLY", "sample value variable", "initial-value", true, true);
assertEquals("Contributing plugin ID was incorrect.","org.eclipse.jdt.debug.tests",VariablesPlugin.getDefault().getStringVariableManager().getContributingPluginId(variable));
}
-
+
/**
* Tests value variables created using string variable manager API
*/
public void testCreatedValueVariables() throws Exception {
IValueVariable variable = VariablesPlugin.getDefault().getStringVariableManager().newValueVariable("createdVariable", "sample value variable");
checkValueVariableProperties(variable, "createdVariable", "sample value variable", null, false, false);
-
+
variable = VariablesPlugin.getDefault().getStringVariableManager().newValueVariable("createdVariable", "sample value variable");
variable.setValue("initial-value");
checkValueVariableProperties(variable, "createdVariable", "sample value variable", "initial-value", false, false);
-
+
variable = VariablesPlugin.getDefault().getStringVariableManager().newValueVariable("createdVariable2", "sample value variable",false,"initial-value");
checkValueVariableProperties(variable, "createdVariable2", "sample value variable", "initial-value", false, false);
-
+
variable = VariablesPlugin.getDefault().getStringVariableManager().newValueVariable("createdVariable3", "sample value variable",true,"initial-value");
checkValueVariableProperties(variable, "createdVariable3", "sample value variable", "initial-value", false, true);
}
-
+
protected IValueVariable copy(IValueVariable variable) {
IStringVariableManager manager = VariablesPlugin.getDefault().getStringVariableManager();
IValueVariable variable2 = manager.newValueVariable(variable.getName(), variable.getDescription(), variable.isReadOnly(), variable.getValue());
return variable2;
}
-
+
/**
* Tests the setValue and setDescription methods of value variables
*/
@@ -150,7 +150,7 @@
copy.setValue("new value");
assertEquals("new description", copy.getDescription());
assertEquals("new value", copy.getValue());
-
+
variable = getValueVariable("VALUE_VAR_WITH_VALUE");
copy = copy(variable);
assertEquals(variable.getDescription(), copy.getDescription());
@@ -159,7 +159,7 @@
copy.setValue("new value");
assertEquals("new description", copy.getDescription());
assertEquals("new value", copy.getValue());
-
+
variable = VariablesPlugin.getDefault().getStringVariableManager().newValueVariable("createdVariable", "A variable created in code");
copy = copy(variable);
assertEquals(variable.getDescription(), copy.getDescription());
@@ -168,7 +168,7 @@
copy.setValue("new value");
assertEquals("new description", copy.getDescription());
assertEquals("new value", copy.getValue());
-
+
variable = VariablesPlugin.getDefault().getStringVariableManager().newValueVariable("createdVariable3", "A variable created in code",true,"initial-value");
copy = copy(variable);
assertEquals(variable.getDescription(), copy.getDescription());
@@ -176,9 +176,9 @@
copy.setDescription("new description");
copy.setValue("new value"); // Value shouldn't change because variable is read only.
assertEquals("new description", copy.getDescription());
- assertEquals(variable.getValue(), copy.getValue());
+ assertEquals(variable.getValue(), copy.getValue());
}
-
+
/**
* Tests that the properties of the passed variable match the expected values passed as parameters
*/
@@ -200,17 +200,17 @@
String value = variable.getValue("ONE");
assertEquals("the arg is ONE", value);
}
-
+
/**
* Tests a context variable with no argument
- */
+ */
public void testContextWithoutArg() throws CoreException {
IDynamicVariable variable = getContextVariable("SAMPLE_DYNAMIC_VAR");
assertNotNull("Missing SAMPLE_DYNAMIC_VAR", variable);
String value = variable.getValue(null);
- assertEquals("no arg", value);
+ assertEquals("no arg", value);
}
-
+
/**
* Test an expression with no variable references
*/
@@ -219,7 +219,7 @@
String result = doSubs(expression);
assertEquals(expression, result);
}
-
+
/**
* Test an expression with a value variable reference
*/
@@ -228,7 +228,7 @@
String result = doSubs(expression);
assertEquals("something initial-value else", result);
}
-
+
/**
* Test an expression with a context variable reference
*/
@@ -237,7 +237,7 @@
String result = doSubs(expression);
assertEquals("something no arg else", result);
}
-
+
/**
* Test an expression with a context variable reference and arg
*/
@@ -245,8 +245,8 @@
String expression = "something ${SAMPLE_DYNAMIC_VAR:TWO} else";
String result = doSubs(expression);
assertEquals("something the arg is TWO else", result);
- }
-
+ }
+
/**
* Test an expression with multiple references
*/
@@ -254,11 +254,11 @@
String expression = "${SAMPLE_DYNAMIC_VAR:TWO} ${VALUE_VAR_WITH_INITIALIZER} ${VALUE_VAR_WITH_VALUE}";
String result = doSubs(expression);
assertEquals("the arg is TWO initial-value initial-value", result);
- }
-
+ }
+
/**
* Perform substitutions on the given expression.
- *
+ *
* @param expression source expression
* @return the result after performing substitutions
*/
@@ -275,7 +275,7 @@
String result = doSubs(expression);
assertEquals("the arg is initial-value", result);
}
-
+
/**
* Test recursive resolution
*/
@@ -292,7 +292,7 @@
manager.removeVariables(new IValueVariable[]{variable});
}
}
-
+
/**
* Test for simple cycling references like ${A} -> ${B} -> ${A}
*/
@@ -312,13 +312,13 @@
IStatus status = ce.getStatus();
if (status.getSeverity() != IStatus.ERROR || status.getCode() != VariablesPlugin.REFERENCE_CYCLE_ERROR) {
throw ce;
- }
+ }
}
} finally {
manager.removeVariables(new IValueVariable[]{var1, var2});
}
}
-
+
/**
* Test for cycling references in cases where original expression is never duplicated
* eg. ${A} -> ${B}z -> ${A}z -> ${B}zz
@@ -339,20 +339,20 @@
IStatus status = ce.getStatus();
if (status.getSeverity() != IStatus.ERROR || status.getCode() != VariablesPlugin.REFERENCE_CYCLE_ERROR) {
throw ce;
- }
+ }
}
} finally {
manager.removeVariables(new IValueVariable[]{var1, var2});
}
}
-
+
/**
* Test for proper handling of infinite variable reference cycles in cases where
* resolving two variables results in a third
* eg ${A} = "${"
* ${B} = "C}
* ${C} = ${A}${B}
- * In this case any references to ${C} or ${A}${B} cannot be resolved
+ * In this case any references to ${C} or ${A}${B} cannot be resolved
*/
public void testDividedRecursiveReferenceCycles() throws CoreException {
IStringVariableManager manager = VariablesPlugin.getDefault().getStringVariableManager();
@@ -372,13 +372,13 @@
IStatus status = ce.getStatus();
if (status.getSeverity() != IStatus.ERROR || status.getCode() != VariablesPlugin.REFERENCE_CYCLE_ERROR) {
throw ce;
- }
+ }
}
} finally {
manager.removeVariables(new IValueVariable[]{var1, var2, var3});
- }
+ }
}
-
+
/**
* Test a string with an open ended reference. The open ended expression
* will not be translated.
@@ -388,10 +388,10 @@
String result = doSubs(expression);
assertEquals("${SAMPLE_DYNAMIC_VAR:initial-value", result);
}
-
+
/**
* Test that we receive proper add notification.
- *
+ *
* @throws CoreException
*/
public void testAddNotificaiton() throws CoreException {
@@ -412,10 +412,10 @@
manager.removeVariables(new IValueVariable[]{one, two});
}
}
-
+
/**
* Test that we receive proper change notification.
- *
+ *
* @throws CoreException
*/
public void testChangeNotificaiton() throws CoreException {
@@ -431,15 +431,15 @@
two.setValue("2");
assertNotNull("no change notifications", fChanged);
assertEquals("should be 1 change notification", 1, fChanged.length);
- assertEquals(two, fChanged[0]);
+ assertEquals(two, fChanged[0]);
} finally {
manager.removeVariables(new IValueVariable[]{one, two});
}
- }
-
+ }
+
/**
* Test that we receive proper remove notification.
- *
+ *
* @throws CoreException
*/
public void testRemoveNotificaiton() throws CoreException {
@@ -460,7 +460,7 @@
} finally {
manager.removeVariables(new IValueVariable[]{one, two});
}
- }
+ }
/* (non-Javadoc)
* @see junit.framework.TestCase#setUp()
*/
@@ -510,7 +510,7 @@
public void variablesRemoved(IValueVariable[] variables) {
fRemoved = variables;
}
-
+
/**
* Test the <code>${workspace_loc}</code> variable.
*/
@@ -528,7 +528,7 @@
String result = doSubs(expression);
assertEquals(get14Project().getProject().getFolder("src").getLocation().toOSString(), result);
}
-
+
/**
* Test the <code>${project_loc}</code> variable with a project name argument
*/
@@ -537,7 +537,7 @@
String result = doSubs(expression);
assertEquals(get14Project().getProject().getLocation().toOSString(), result);
}
-
+
/**
* Test the <code>${project_loc}</code> variable with a folder path argument
*/
@@ -546,7 +546,7 @@
String result = doSubs(expression);
assertEquals(get14Project().getProject().getLocation().toOSString(), result);
}
-
+
/**
* Test the <code>${project_loc}</code> variable with a folder selected
*/
@@ -557,7 +557,7 @@
String result = doSubs(expression);
assertEquals(resource.getProject().getLocation().toOSString(), result);
}
-
+
/**
* Test the <code>${project_path}</code> variable with a project name argument
*/
@@ -566,7 +566,7 @@
String result = doSubs(expression);
assertEquals(get14Project().getProject().getFullPath().toOSString(), result);
}
-
+
/**
* Test the <code>${project_path}</code> variable with a file selected
*/
@@ -576,8 +576,8 @@
setSelection(resource);
String result = doSubs(expression);
assertEquals(resource.getProject().getFullPath().toOSString(), result);
- }
-
+ }
+
/**
* Test the <code>${project_path}</code> variable with a folder path argument
*/
@@ -586,7 +586,7 @@
String result = doSubs(expression);
assertEquals(get14Project().getProject().getFullPath().toOSString(), result);
}
-
+
/**
* Test the <code>${project_name}</code> variable with a project name argument
*/
@@ -595,7 +595,7 @@
String result = doSubs(expression);
assertEquals(get14Project().getProject().getName(), result);
}
-
+
/**
* Test the <code>${project_name}</code> variable with a project selected
*/
@@ -605,8 +605,8 @@
setSelection(resource);
String result = doSubs(expression);
assertEquals(resource.getProject().getName(), result);
- }
-
+ }
+
/**
* Test the <code>${project_name}</code> variable with a folder path argument
*/
@@ -615,7 +615,7 @@
String result = doSubs(expression);
assertEquals(get14Project().getProject().getName(), result);
}
-
+
/**
* Test the <code>${container_loc}</code> variable with a folder name argument.
* Will resolve to the container of the specified folder.
@@ -625,7 +625,7 @@
String result = doSubs(expression);
assertEquals(get14Project().getProject().getLocation().toOSString(), result);
}
-
+
/**
* Test the <code>${container_loc}</code> variable with a folder selected.
* Will resolve to the container of the specified folder.
@@ -637,7 +637,7 @@
String result = doSubs(expression);
assertEquals(resource.getParent().getLocation().toOSString(), result);
}
-
+
/**
* Test the <code>${container_path}</code> variable with a folder name argument.
* Will resolve to the container of the specified folder.
@@ -647,19 +647,19 @@
String result = doSubs(expression);
assertEquals(get14Project().getProject().getFullPath().toOSString(), result);
}
-
+
/**
* Test the <code>${container_path}</code> variable with a folder selected.
* Will resolve to the container of the specified folder.
*/
public void testContainerPathSelectFolder() throws CoreException {
String expression = "${container_path}";
- IResource resource = get14Project().getProject().getFolder("src");
+ IResource resource = get14Project().getProject().getFolder("src");
setSelection(resource);
String result = doSubs(expression);
assertEquals(resource.getParent().getFullPath().toOSString(), result);
}
-
+
/**
* Test the <code>${container_name}</code> variable with a folder name argument.
* Will resolve to the container of the specified folder.
@@ -669,19 +669,19 @@
String result = doSubs(expression);
assertEquals(get14Project().getProject().getName(), result);
}
-
+
/**
* Test the <code>${container_name}</code> variable with a folder selected.
* Will resolve to the container of the specified folder.
*/
public void testContainerNameSelectFolder() throws CoreException {
String expression = "${container_name}";
- IResource resource = get14Project().getProject().getFolder("src");
+ IResource resource = get14Project().getProject().getFolder("src");
setSelection(resource);
String result = doSubs(expression);
assertEquals(resource.getParent().getName(), result);
}
-
+
/**
* Test the <code>${resource_loc}</code> variable with a folder name argument.
*/
@@ -690,7 +690,7 @@
String result = doSubs(expression);
assertEquals(get14Project().getProject().getFolder("src").getLocation().toOSString(), result);
}
-
+
/**
* Test the <code>${resource_loc}</code> variable with a folder selected.
*/
@@ -700,8 +700,8 @@
setSelection(resource);
String result = doSubs(expression);
assertEquals(resource.getLocation().toOSString(), result);
- }
-
+ }
+
/**
* Test the <code>${resource_path}</code> variable with a folder name argument.
*/
@@ -716,12 +716,12 @@
*/
public void testResourcePathSelectFile() throws CoreException {
String expression = "${resource_path}";
- IResource resource = get14Project().getProject().getFile(".classpath");
+ IResource resource = get14Project().getProject().getFile(".classpath");
setSelection(resource);
String result = doSubs(expression);
assertEquals(resource.getFullPath().toOSString(), result);
- }
-
+ }
+
/**
* Test the <code>${resource_name}</code> variable with a folder name argument.
*/
@@ -729,7 +729,7 @@
String expression = "${resource_name:DebugTests/src}";
String result = doSubs(expression);
assertEquals(get14Project().getProject().getFolder("src").getName(), result);
- }
+ }
/**
* Test the <code>${resource_name}</code> variable with a file selected.
@@ -749,25 +749,25 @@
public void testLocalJavaApplicationParameters() throws CoreException {
IResource resource = get14Project().getProject().getFile(".classpath");
setSelection(resource);
-
+
ILaunchConfiguration config = getLaunchConfiguration("Breakpoints");
ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, "${project_name}");
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, "${resource_name}");
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, "${project_loc}");
-
+
JavaLaunchDelegate delegate = new JavaLaunchDelegate();
-
+
assertEquals(resource.getProject().getName(), delegate.getProgramArguments(wc));
assertEquals(resource.getName(), delegate.getVMArguments(wc));
File workingDir = delegate.getWorkingDirectory(wc);
assertNotNull(workingDir);
assertEquals(resource.getProject().getLocation().toOSString(), workingDir.toString());
}
-
+
/**
* Sets the selected resource in the navigator view.
- *
+ *
* @param resource resource to select or <code>null</code> if empty
*/
protected void setSelection(final IResource resource) {
@@ -794,23 +794,23 @@
} catch (PartInitException e) {
assertNotNull("Failed to open navigator view", null);
}
-
+
}
};
DebugUIPlugin.getStandardDisplay().syncExec(r);
}
-
+
/**
* Test the <code>${selected_resource_path}</code> variable with a file selected.
*/
public void testSelectedResourcePathFile() throws CoreException {
String expression = "${selected_resource_path}";
- IResource resource = get14Project().getProject().getFile(".classpath");
+ IResource resource = get14Project().getProject().getFile(".classpath");
setSelection(resource);
String result = doSubs(expression);
assertEquals(resource.getFullPath().toOSString(), result);
- }
-
+ }
+
/**
* Test the <code>${selected_resource_name}</code> variable with a file selected.
*/
@@ -821,7 +821,7 @@
String result = doSubs(expression);
assertEquals(resource.getName(), result);
}
-
+
/**
* Test the <code>${selected_resource_loc}</code> variable with a folder selected.
*/
@@ -831,8 +831,8 @@
setSelection(resource);
String result = doSubs(expression);
assertEquals(resource.getLocation().toOSString(), result);
- }
-
+ }
+
/**
* Test the <code>${selected_resource_loc}</code> variable an empty selection
*/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/TypeTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/TypeTests.java
index 7f77e4e..afa2b26 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/TypeTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/TypeTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -26,7 +26,7 @@
* Tests equality of Java types.
*/
public class TypeTests extends AbstractDebugTest {
-
+
public TypeTests(String name) {
super(name);
}
@@ -41,8 +41,8 @@
// threading
bps.add(createLineBreakpoint(66, typeName));
// InnerRunnable.run
- bps.add(createLineBreakpoint(61, typeName));
-
+ bps.add(createLineBreakpoint(61, typeName));
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
@@ -56,15 +56,15 @@
int lineNumber = breakpoint.getLineNumber();
IJavaStackFrame frame = (IJavaStackFrame)thread.getTopStackFrame();
types[index] = frame.getReferenceType();
-
+
if (index == 1) {
assertEquals("First two types should be the same", types[0], types[1]);
}
-
+
if (index == 2) {
assertTrue("Last two types should be different", !types[0].equals(types[2]));
}
-
+
index++;
int stackLine = frame.getLineNumber();
assertTrue("line numbers of breakpoint and stack frame do not match", lineNumber == stackLine);
@@ -77,9 +77,9 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
public void testClassLoader() throws Exception {
String typeName = "Breakpoints";
List<IJavaLineBreakpoint> bps = new ArrayList<IJavaLineBreakpoint>();
@@ -88,7 +88,7 @@
bps.add(createLineBreakpoint(88, typeName));
IJavaObject[] loaders = new IJavaObject[2];
int index = 0;
-
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
@@ -103,11 +103,11 @@
IJavaStackFrame frame = (IJavaStackFrame)thread.getTopStackFrame();
loaders[index] = frame.getReferenceType().getClassLoaderObject();
assertNotNull("class loader cannot be null", loaders[index]);
-
+
if (index == 1) {
assertEquals("First two class loaders should be the same", loaders[0], loaders[1]);
}
-
+
index++;
int stackLine = frame.getLineNumber();
assertTrue("line numbers of breakpoint and stack frame do not match", lineNumber == stackLine);
@@ -120,7 +120,7 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/VMInstallTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/VMInstallTests.java
index bbbe697..f7a9b46 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/VMInstallTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/VMInstallTests.java
@@ -38,7 +38,7 @@
public VMInstallTests() {
super("VM Install tests");
}
-
+
/**
* Constructor
* @param name the name of the test
@@ -57,7 +57,7 @@
String javaVersion = vm2.getJavaVersion();
assertNotNull("default VM is missing java.version", javaVersion);
}
-
+
/**
* Test acquiring the set of system properties
* @throws CoreException
@@ -72,7 +72,7 @@
String value = map.get("user.home");
assertNotNull("missing user.home", value);
}
-
+
/**
* Test acquiring the set of system properties that have been asked for - they should be cached in JDT launching
* @throws CoreException
@@ -89,17 +89,17 @@
//check the prefs
String key = getSystemPropertyKey(def, "user.home");
value = Platform.getPreferencesService().getString(
- LaunchingPlugin.ID_PLUGIN,
- key,
- null,
+ LaunchingPlugin.ID_PLUGIN,
+ key,
+ null,
null);
assertNotNull("'user.home' system property should be cached", value);
}
-
+
/**
* Tests the new support for {@link ILibraryLocationResolver}s asking for {@link LibraryLocation}s
* using the {@link JavaRuntime#getLibraryLocations(IVMInstall)}s API
- *
+ *
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=399798
* @throws Exception
*/
@@ -107,7 +107,7 @@
VMInstallTestsLibraryLocationResolver.isTesting = true;
IVMInstall vm = JavaRuntime.getDefaultVMInstall();
assertNotNull("There must be a default VM", vm);
-
+
//invalidate it, causing a reset, then collect it again
vm.getVMInstallType().disposeVMInstall(vm.getId());
vm = JavaRuntime.getDefaultVMInstall();
@@ -123,10 +123,10 @@
vm.getVMInstallType().disposeVMInstall(vm.getId());
}
}
-
+
/**
* Tests the {@link ILibraryLocationResolver} asking for libs using an EE description file
- *
+ *
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=399798
* @throws Exception
*/
@@ -146,10 +146,10 @@
VMInstallTestsLibraryLocationResolver.isTesting = false;
}
}
-
+
/**
* Tests the {@link ILibraryLocationResolver} asking for libs directly from the backing type of the {@link IVMInstall}
- *
+ *
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=399798
* @throws Exception
*/
@@ -162,7 +162,7 @@
vm.getVMInstallType().disposeVMInstall(vm.getId());
vm = JavaRuntime.getDefaultVMInstall();
assertNotNull("There must be a default VM", vm);
-
+
LibraryLocation[] locs = vm.getVMInstallType().getDefaultLibraryLocations(vm.getInstallLocation());
assertResolvedLibraryLocations(locs);
}
@@ -171,11 +171,11 @@
vm.getVMInstallType().disposeVMInstall(vm.getId());
}
}
-
+
/**
* Tests the {@link ILibraryLocationResolver} asking for libs using an EE description file that provides
* a source path for the ext dirs does *not* get overridden by the resolver
- *
+ *
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=399798
* @throws Exception
*/
@@ -203,10 +203,10 @@
VMInstallTestsLibraryLocationResolver.isTesting = false;
}
}
-
+
/**
* Checks the given {@link LibraryLocation}s to ensure they reference the testing resolver paths
- *
+ *
* @param locs
*/
void assertResolvedLibraryLocations(LibraryLocation[] locs) {
@@ -221,16 +221,16 @@
assertTrue("The source root path should be 'src' for ext lib ["+locpath+"]", root.toString().equals("src"));
URL url = locs[i].getJavadocLocation();
assertNotNull("There should be a Javadoc URL set for ext lib ["+locpath+"]", url);
- assertTrue("There should be a javadoc path of test_resolver_javadoc.zip on the ext lib ["+locpath+"]",
+ assertTrue("There should be a javadoc path of test_resolver_javadoc.zip on the ext lib ["+locpath+"]",
url.getPath().indexOf("test_resolver_javadoc.zip") > -1);
url = locs[i].getIndexLocation();
assertNotNull("There should be an index path of test_resolver_index.index on the ext lib ["+locpath+"]", url);
- assertTrue("There should be an index path of test_resolver_index.index on the ext lib ["+locpath+"]",
+ assertTrue("There should be an index path of test_resolver_index.index on the ext lib ["+locpath+"]",
url.getPath().indexOf("test_resolver_index.index") > -1);
}
}
}
-
+
/**
* Creates a {@link VMStandin} for the given EE file. Does not return <code>null</code>
* @param filename
@@ -244,11 +244,11 @@
assertNotNull("the VM standin should exist for "+filename, vm);
return vm;
}
-
+
/**
* Generates a key used to cache system property for this VM in this plug-ins
* preference store.
- *
+ *
* @param property system property name
* @return preference store key
*/
@@ -263,5 +263,5 @@
buffer.append(property);
return buffer.toString();
}
-
+
}
\ No newline at end of file
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/VMInstallTestsLibraryLocationResolver.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/VMInstallTestsLibraryLocationResolver.java
index 08c779a..e4ec68e 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/VMInstallTestsLibraryLocationResolver.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/VMInstallTestsLibraryLocationResolver.java
@@ -32,7 +32,7 @@
if (!isTesting) {
return false;
}
-
+
for (int i = 0; i < path.segmentCount(); i++) {
if ("ext".equals(path.segment(i))) {
return !JavaFxLibraryResolver.JFXRT_JAR.equals(path.lastSegment());
@@ -43,7 +43,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.jdt.launching.ILibraryLocationResolver#getPackageRoot(org.eclipse.core.runtime.IPath)
*/
@Override
@@ -56,7 +56,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.jdt.launching.ILibraryLocationResolver#getSourcePath(org.eclipse.core.runtime.IPath)
*/
@Override
@@ -72,7 +72,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.jdt.launching.ILibraryLocationResolver#getJavadocLocation(org.eclipse.core.runtime.IPath)
*/
@Override
@@ -93,7 +93,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.jdt.launching.ILibraryLocationResolver#getIndexLocation(org.eclipse.core.runtime.IPath)
*/
@Override
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/WatchExpressionTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/WatchExpressionTests.java
index 3d1d081..96ea0ee 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/WatchExpressionTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/WatchExpressionTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -35,11 +35,11 @@
* WatchExpressionTests
*/
public class WatchExpressionTests extends AbstractDebugTest {
-
+
public WatchExpressionTests(String name) {
super(name);
}
-
+
/**
* Test a watch expression that is created before a program is executed.
*/
@@ -53,7 +53,7 @@
DebugElementEventWaiter waiter = new ExpressionWaiter(DebugEvent.CHANGE, expression);
waiter.setTimeout(60000);
thread= launchToBreakpoint(typeName);
- assertNotNull("Breakpoint not hit within timeout period", thread);
+ assertNotNull("Breakpoint not hit within timeout period", thread);
Object source = waiter.waitForEvent();
assertNotNull("Watch expression did not change", source);
IValue value = expression.getValue();
@@ -65,16 +65,16 @@
terminateAndRemove(thread);
removeAllBreakpoints();
removeAllExpressions();
- }
+ }
}
-
+
/**
* Test a watch expression that is created while a program is suspended.
- *
+ *
* see bug 81519. This test is flawed as expressions added to the manager
* are note updated automatically. They are updated by the action that
* creates the expression, or when a selection change occurrs in the debug view.
- * This test can pass as the ordering of expression addition and selection
+ * This test can pass as the ordering of expression addition and selection
* change events can vary. However, it it attempting to test behavior that
* does not exist, and is removed from the test suite.
*/
@@ -86,12 +86,12 @@
try {
thread= launchToBreakpoint(typeName);
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
// create the expression, waiter, and then add it (to be evaluated)
expression = getExpressionManager().newWatchExpression("((Integer)fVector.get(3)).intValue()");
DebugElementEventWaiter waiter = new ExpressionWaiter(DebugEvent.CHANGE, expression);
getExpressionManager().addExpression(expression);
-
+
Object source = waiter.waitForEvent();
assertNotNull("Watch expression did not change", source);
IValue value = expression.getValue();
@@ -103,12 +103,12 @@
terminateAndRemove(thread);
removeAllBreakpoints();
removeAllExpressions();
- }
+ }
}
-
+
/**
* Test a watch expression updates while stepping.
- *
+ *
* THIS TEST HAS BEEN DISABLED DUE TO BUG 228400
*/
public void DisabledtestStepping() throws Exception {
@@ -121,7 +121,7 @@
DebugElementEventWaiter waiter = new ExpressionWaiter(DebugEvent.CHANGE, expression);
waiter.setTimeout(60000);
thread= launchToBreakpoint(typeName);
- assertNotNull("Breakpoint not hit within timeout period", thread);
+ assertNotNull("Breakpoint not hit within timeout period", thread);
Object source = waiter.waitForEvent();
assertNotNull("Watch expression did not change", source);
IValue value = expression.getValue();
@@ -129,42 +129,42 @@
IJavaDebugTarget target = (IJavaDebugTarget)thread.getDebugTarget();
IJavaValue compare = target.newValue(0);
assertEquals("Watch expression should be 0", compare, value);
-
+
// now step once - should still be 0
waiter = new ExpressionWaiter(DebugEvent.CHANGE, expression);
stepOver((IJavaStackFrame)thread.getTopStackFrame());
source = waiter.waitForEvent();
assertNotNull("Watch expression did not change", source);
-
+
// check for errors
dumpErrors(expression);
assertFalse("Should not have errors in expression", expression.hasErrors());
-
+
// now step again - should be 1
waiter = new ExpressionWaiter(DebugEvent.CHANGE, expression);
stepOver((IJavaStackFrame)thread.getTopStackFrame());
source = waiter.waitForEvent();
assertNotNull("Watch expression did not change", source);
-
+
// check for errors
dumpErrors(expression);
assertFalse("Should not have errors in expression", expression.hasErrors());
-
- value = expression.getValue();
+
+ value = expression.getValue();
// create comparison value
compare = target.newValue(1);
assertEquals("Watch expression should be 1", compare, value);
-
+
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
removeAllExpressions();
- }
+ }
}
-
+
/**
* Dumps any error messages to the console.
- *
+ *
* @param expression
*/
private void dumpErrors(IWatchExpression expression) {
@@ -179,13 +179,13 @@
/**
* Returns the expression manager
- *
+ *
* @return expression manager
*/
protected IExpressionManager getExpressionManager() {
return DebugPlugin.getDefault().getExpressionManager();
}
-
+
/**
* Ensure the expression view is visible
*/
@@ -207,7 +207,7 @@
}
});
}
-
+
/**
* Removes all expressions from the manager
*/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/WorkingDirectoryTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/WorkingDirectoryTests.java
index f1d6c16..d439db5 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/WorkingDirectoryTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/WorkingDirectoryTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -25,15 +25,15 @@
* Tests working directories.
*/
public class WorkingDirectoryTests extends AbstractDebugTest {
-
+
public WorkingDirectoryTests(String name) {
super(name);
}
public void testDefaultWorkingDirectory() throws Exception {
String typeName = "WorkingDirectoryTest";
- createLineBreakpoint(16, typeName);
-
+ createLineBreakpoint(16, typeName);
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
@@ -43,15 +43,15 @@
IVariable var = thread.findVariable("dir");
String dir = var.getValue().getValueString();
IPath path = new Path(dir);
- assertEquals("default working dir should be the project directory.", get14Project().getProject().getLocation(), path);
+ assertEquals("default working dir should be the project directory.", get14Project().getProject().getLocation(), path);
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
- * Sets the working directory attribute of the test launch config
+ * Sets the working directory attribute of the test launch config
* @param path
*/
protected void setWorkingDirectory(IPath path) throws CoreException {
@@ -88,7 +88,7 @@
setWorkingDirectory(null);
}
}
-
+
public void testAbsoluteWorkingDirectory() throws Exception {
String typeName = "WorkingDirectoryTest";
createLineBreakpoint(16, typeName);
@@ -110,5 +110,5 @@
removeAllBreakpoints();
setWorkingDirectory(null);
}
- }
+ }
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/WorkspaceSourceContainerTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/WorkspaceSourceContainerTests.java
index e64bfec..7d6e4f9 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/WorkspaceSourceContainerTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/WorkspaceSourceContainerTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -21,11 +21,11 @@
* Tests source containers
*/
public class WorkspaceSourceContainerTests extends AbstractDebugTest {
-
+
public WorkspaceSourceContainerTests(String name) {
super(name);
}
-
+
/**
* Returns a workspace source container.
*/
@@ -36,10 +36,10 @@
WorkspaceSourceContainer container = new WorkspaceSourceContainer();
director.setSourceContainers(new ISourceContainer[]{container});
return container;
- }
+ }
/**
* Tests creation and restoring from a memento.
- *
+ *
* @throws Exception
*/
public void testWorkspaceSourceContainerMemento() throws Exception {
@@ -47,7 +47,7 @@
String memento = container.getType().getMemento(container);
ISourceContainer restore = container.getType().createSourceContainer(memento);
assertEquals("Workspace source container memento failed", container, restore);
- }
+ }
public void testSimpleSourceLookupPositive() throws Exception {
IFolder folder = get14Project().getProject().getFolder("src");
@@ -56,13 +56,13 @@
assertEquals("Expected 1 result", 1, objects.length);
assertEquals("Wrong file", folder.getFile("Breakpoints.java"), objects[0]);
}
-
+
public void testSimpleSourceLookupNegative() throws Exception {
WorkspaceSourceContainer container = getContainer(false);
Object[] objects = container.findSourceElements("FileNotFound.java");
assertEquals("Expected 0 files", 0, objects.length);
- }
-
+ }
+
public void testQualifiedSourceLookupPositive() throws Exception {
IFolder folder = get14Project().getProject().getFolder("src");
WorkspaceSourceContainer container = getContainer(false);
@@ -70,13 +70,13 @@
assertEquals("Expected 1 result", 1, objects.length);
assertEquals("Wrong file", folder.getFile("org/eclipse/debug/tests/targets/InfiniteLoop.java"), objects[0]);
}
-
+
public void testQualifiedSourceLookupNegative() throws Exception {
WorkspaceSourceContainer container = getContainer(false);
Object[] objects = container.findSourceElements("a/b/c/FileNotFound.java");
assertEquals("Expected 0 files", 0, objects.length);
- }
-
+ }
+
public void testCaseSensitiveQualifiedSourceLookup() throws Exception {
IFolder folder = get14Project().getProject().getFolder("src");
WorkspaceSourceContainer container = getContainer(false);
@@ -89,5 +89,5 @@
assertEquals("Expected 1 result", 1, objects.length);
assertEquals("Wrong file", folder.getFile("org/eclipse/debug/tests/targets/InfiniteLoop.java"), objects[0]);
}
- }
+ }
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/ArrayAllocationTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/ArrayAllocationTests.java
index f7ca16e..8e77db0 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/ArrayAllocationTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/ArrayAllocationTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/ArrayAssignmentTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/ArrayAssignmentTests.java
index 08223e1..efafb75 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/ArrayAssignmentTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/ArrayAssignmentTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/ArrayInitializationTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/ArrayInitializationTests.java
index c96799f..20f9c2d 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/ArrayInitializationTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/ArrayInitializationTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/ArrayValueTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/ArrayValueTests.java
index 5b53ae3..8cf01cd 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/ArrayValueTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/ArrayValueTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/BooleanAssignmentOperatorsTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/BooleanAssignmentOperatorsTests.java
index a0c237a..8574f07 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/BooleanAssignmentOperatorsTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/BooleanAssignmentOperatorsTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/BooleanOperatorsTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/BooleanOperatorsTests.java
index e7190bc..a01bafa 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/BooleanOperatorsTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/BooleanOperatorsTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/ByteAssignmentOperatorsTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/ByteAssignmentOperatorsTests.java
index 9013e8a..627b695 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/ByteAssignmentOperatorsTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/ByteAssignmentOperatorsTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/ByteOperatorsTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/ByteOperatorsTests.java
index 83a7aed..219b96e 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/ByteOperatorsTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/ByteOperatorsTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/CharAssignmentOperatorsTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/CharAssignmentOperatorsTests.java
index 085d478..336829a 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/CharAssignmentOperatorsTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/CharAssignmentOperatorsTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/CharOperatorsTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/CharOperatorsTests.java
index 4ab00ef..28edace 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/CharOperatorsTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/CharOperatorsTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/DoubleAssignmentOperatorsTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/DoubleAssignmentOperatorsTests.java
index 9a1f714..5bd05cb 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/DoubleAssignmentOperatorsTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/DoubleAssignmentOperatorsTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/DoubleOperatorsTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/DoubleOperatorsTests.java
index 00e3142..9651386 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/DoubleOperatorsTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/DoubleOperatorsTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/FieldValueTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/FieldValueTests.java
index 58d2bf6..1d2827a 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/FieldValueTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/FieldValueTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/FloatAssignmentOperatorsTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/FloatAssignmentOperatorsTests.java
index aa38415..1f0ad83 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/FloatAssignmentOperatorsTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/FloatAssignmentOperatorsTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/FloatOperatorsTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/FloatOperatorsTests.java
index abc4f19..9ee50f5 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/FloatOperatorsTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/FloatOperatorsTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/GeneralEvalTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/GeneralEvalTests.java
index 4c15a2b..6dfdd34 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/GeneralEvalTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/GeneralEvalTests.java
@@ -16,12 +16,12 @@
/**
* Tests that evaluations in non-generified source
- *
+ *
* @since 3.8.100
*/
public class GeneralEvalTests extends AbstractDebugTest {
-
+
/**
* @param name
*/
@@ -48,7 +48,7 @@
terminateAndRemove(thread);
}
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=329294
* @throws Exception
@@ -68,7 +68,7 @@
terminateAndRemove(thread);
}
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=329294
* @throws Exception
@@ -88,7 +88,7 @@
terminateAndRemove(thread);
}
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=329294
* @throws Exception
@@ -108,7 +108,7 @@
terminateAndRemove(thread);
}
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=401270
* @throws Exception
@@ -129,7 +129,7 @@
terminateAndRemove(thread);
}
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=401270
* @throws Exception
@@ -150,7 +150,7 @@
terminateAndRemove(thread);
}
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=401270
* @throws Exception
@@ -171,7 +171,7 @@
terminateAndRemove(thread);
}
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=401270
* @throws Exception
@@ -192,7 +192,7 @@
terminateAndRemove(thread);
}
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=401270
* @throws Exception
@@ -213,7 +213,7 @@
terminateAndRemove(thread);
}
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=401270
* @throws Exception
@@ -234,7 +234,7 @@
terminateAndRemove(thread);
}
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=401270
* @throws Exception
@@ -255,7 +255,7 @@
terminateAndRemove(thread);
}
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=401270
* @throws Exception
@@ -276,7 +276,7 @@
terminateAndRemove(thread);
}
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=401270
* @throws Exception
@@ -297,7 +297,7 @@
terminateAndRemove(thread);
}
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=401270
* @throws Exception
@@ -318,7 +318,7 @@
terminateAndRemove(thread);
}
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=401270
* @throws Exception
@@ -339,7 +339,7 @@
terminateAndRemove(thread);
}
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=401270
* @throws Exception
@@ -360,7 +360,7 @@
terminateAndRemove(thread);
}
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=401270
* @throws Exception
@@ -381,7 +381,7 @@
terminateAndRemove(thread);
}
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=401270
* @throws Exception
@@ -402,7 +402,7 @@
terminateAndRemove(thread);
}
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=401270
* @throws Exception
@@ -423,7 +423,7 @@
terminateAndRemove(thread);
}
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=401270
* @throws Exception
@@ -444,7 +444,7 @@
terminateAndRemove(thread);
}
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=403028
* @throws Exception
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/GenericsEvalTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/GenericsEvalTests.java
index f7c2c65..7d98177 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/GenericsEvalTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/GenericsEvalTests.java
@@ -17,7 +17,7 @@
/**
* Group of tests that evaluate operations involving generics
- *
+ *
* @since 3.8
*/
public class GenericsEvalTests extends AbstractDebugTest {
@@ -33,11 +33,11 @@
protected IJavaProject getProjectContext() {
return get15Project();
}
-
+
/**
- * Evaluates a generified snippet with a simple single
+ * Evaluates a generified snippet with a simple single
* generic statement
- *
+ *
* @throws Exception
*/
public void testEvalGenerics1() throws Exception {
@@ -55,11 +55,11 @@
terminateAndRemove(thread);
}
}
-
+
/**
- * Evaluates a generified snippet with a simple single
+ * Evaluates a generified snippet with a simple single
* generic statement
- *
+ *
* @throws Exception
*/
public void testEvalGenerics2() throws Exception {
@@ -77,11 +77,11 @@
terminateAndRemove(thread);
}
}
-
+
/**
- * Evaluates a generified snippet with a simple single
+ * Evaluates a generified snippet with a simple single
* generic statement
- *
+ *
* @throws Exception
*/
public void testEvalGenerics3() throws Exception {
@@ -99,7 +99,7 @@
terminateAndRemove(thread);
}
}
-
+
public void testEvalGenerics4() throws Exception {
IJavaThread thread = null;
try {
@@ -115,7 +115,7 @@
terminateAndRemove(thread);
}
}
-
+
public void testEvalGenerics5() throws Exception {
IJavaThread thread = null;
try {
@@ -131,7 +131,7 @@
terminateAndRemove(thread);
}
}
-
+
public void testEvalGenerics6() throws Exception {
IJavaThread thread = null;
try {
@@ -147,7 +147,7 @@
terminateAndRemove(thread);
}
}
-
+
public void testEvalGenerics7() throws Exception {
IJavaThread thread = null;
try {
@@ -163,7 +163,7 @@
terminateAndRemove(thread);
}
}
-
+
public void testEvalGenerics8() throws Exception {
IJavaThread thread = null;
try {
@@ -179,7 +179,7 @@
terminateAndRemove(thread);
}
}
-
+
public void testEvalGenerics9() throws Exception {
IJavaThread thread = null;
try {
@@ -195,7 +195,7 @@
terminateAndRemove(thread);
}
}
-
+
public void testEvalGeneric10() throws Exception {
IJavaThread thread = null;
try {
@@ -211,7 +211,7 @@
terminateAndRemove(thread);
}
}
-
+
public void testEvalGeneric11() throws Exception {
IJavaThread thread = null;
try {
@@ -227,7 +227,7 @@
terminateAndRemove(thread);
}
}
-
+
public void testEvalGeneric12() throws Exception {
IJavaThread thread = null;
try {
@@ -244,7 +244,7 @@
terminateAndRemove(thread);
}
}
-
+
public void testEvalGeneric13() throws Exception {
IJavaThread thread = null;
try {
@@ -261,7 +261,7 @@
terminateAndRemove(thread);
}
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=329294
* @throws Exception
@@ -281,7 +281,7 @@
terminateAndRemove(thread);
}
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=329294
* @throws Exception
@@ -301,7 +301,7 @@
terminateAndRemove(thread);
}
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=329294
* @throws Exception
@@ -321,7 +321,7 @@
terminateAndRemove(thread);
}
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=329294
* @throws Exception
@@ -341,7 +341,7 @@
terminateAndRemove(thread);
}
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=329294
* @throws Exception
@@ -361,7 +361,7 @@
terminateAndRemove(thread);
}
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=329294
* @throws Exception
@@ -381,7 +381,7 @@
terminateAndRemove(thread);
}
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=329294
* @throws Exception
@@ -401,7 +401,7 @@
terminateAndRemove(thread);
}
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=329294
* @throws Exception
@@ -421,7 +421,7 @@
terminateAndRemove(thread);
}
}
-
+
/**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=329294
* @throws Exception
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/IntAssignmentOperatorsTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/IntAssignmentOperatorsTests.java
index 1330be1..52eb6e5 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/IntAssignmentOperatorsTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/IntAssignmentOperatorsTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/IntOperatorsTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/IntOperatorsTests.java
index e0f29c5..7d853e2 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/IntOperatorsTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/IntOperatorsTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/Java8Tests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/Java8Tests.java
index 1b04c09..9603f96 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/Java8Tests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/Java8Tests.java
@@ -8,7 +8,7 @@
* This is an implementation of an early-draft specification developed under the Java
* Community Process (JCP) and is made available for testing and evaluation purposes
* only. The code is not compatible with any specification of the JCP.
- *
+ *
* Contributors:
* Jesper S. Møller - initial API and implementation
* Jesper Steen Møller - bug 426903: [1.8] Cannot evaluate super call to default method
@@ -25,7 +25,7 @@
/**
* Group of tests that evaluate operations involving generics
- *
+ *
* @since 3.8
*/
public class Java8Tests extends AbstractDebugTest {
@@ -41,11 +41,11 @@
protected IJavaProject getProjectContext() {
return get18Project();
}
-
+
/**
- * Evaluates a generified snippet with a simple single
+ * Evaluates a generified snippet with a simple single
* generic statement
- *
+ *
* @throws Exception
*/
public void testEvalDefaultMethod() throws Exception {
@@ -66,7 +66,7 @@
/**
* Evaluates a snippet in the context of interface method generic statement
- *
+ *
* @throws Exception
*/
public void testEvalInterfaceMethod() throws Exception {
@@ -85,10 +85,10 @@
terminateAndRemove(thread);
}
}
-
+
/**
* Evaluates a snippet in the context of interface method generic statement
- *
+ *
* @throws Exception
*/
public void testBugEvalIntfSuperDefault() throws Exception {
@@ -111,7 +111,7 @@
/**
* Evaluates a static method on an object generic statement
- *
+ *
* @throws Exception
*/
public void testEvalStatictMethod() throws Exception {
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/LabelTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/LabelTests.java
index 3b9a98f..73e9c76 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/LabelTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/LabelTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -26,7 +26,7 @@
protected void end() throws Exception {
destroyFrame();
}
-
+
// if break
public void testIfBreak() throws Throwable {
try {
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/LocalVarAssignmentTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/LocalVarAssignmentTests.java
index 5bfb4a0..14baacb 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/LocalVarAssignmentTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/LocalVarAssignmentTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -28,7 +28,7 @@
destroyFrame();
}
- //
+ //
public void testByte() throws Throwable {
try {
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/LocalVarValueTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/LocalVarValueTests.java
index 5024f73..ad9de1f 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/LocalVarValueTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/LocalVarValueTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -28,7 +28,7 @@
destroyFrame();
}
- //
+ //
public void testByte() throws Throwable {
try {
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/LongAssignmentOperatorsTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/LongAssignmentOperatorsTests.java
index bcd98de..418e6e7 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/LongAssignmentOperatorsTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/LongAssignmentOperatorsTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/LongOperatorsTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/LongOperatorsTests.java
index 78a7717..fc128ed 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/LongOperatorsTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/LongOperatorsTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/LoopTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/LoopTests.java
index 47484b2..cc08acb 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/LoopTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/LoopTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -68,7 +68,7 @@
end();
}
}
-
+
// while break
public void testWhileBreak() throws Throwable {
try {
@@ -110,7 +110,7 @@
end();
}
}
-
+
// while continue
public void testWhileContinue() throws Throwable {
try {
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_120.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_120.java
index 3c44d49..b528500 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_120.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_120.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_145.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_145.java
index 8cdf0f5..a222ebb 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_145.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_145.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_155.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_155.java
index 53dadfa..96d9200 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_155.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_155.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_179.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_179.java
index cd3efca..af76bbe 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_179.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_179.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_203.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_203.java
index abba283..a1b0993 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_203.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_203.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_214.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_214.java
index 5d08005..a19f2b6 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_214.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_214.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_252.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_252.java
index 0f52c4f..1830d00 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_252.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_252.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_279.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_279.java
index ed4df56..4f8b7b8 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_279.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_279.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_304.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_304.java
index df00470..37bcccc 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_304.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_304.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_315.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_315.java
index c5cd5d9..0ae9a66 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_315.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_315.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_354.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_354.java
index 8c3cc32..57ebb01 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_354.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_354.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_381.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_381.java
index c440ff0..aa19f60 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_381.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_381.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_406.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_406.java
index 3e3f6a2..75d9805 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_406.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_406.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_417.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_417.java
index 89ebabf..385c917 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_417.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_417.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_455.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_455.java
index 94de64e..25aa07a 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_455.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_455.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_481.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_481.java
index 1044c2e..0481dc9 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_481.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_481.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_506.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_506.java
index ef0b70d..6db2849 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_506.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_506.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_517.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_517.java
index d26d682..9a289ae 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_517.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_517.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_529.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_529.java
index 53ed194..482aca1 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_529.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_529.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_566.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_566.java
index a721dba..f4b8587 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_566.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_566.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_592.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_592.java
index ec2e2fc..28d5008 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_592.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_592.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_616.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_616.java
index e292b5d..bce39a5 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_616.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_616.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_626.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_626.java
index 01e82b2..63d7f3e 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_626.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_626.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_65.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_65.java
index d4979ad..511b17e 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_65.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_65.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_664.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_664.java
index 8d0f789..ca65243 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_664.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_664.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_69.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_69.java
index 453178f..fbd25a2 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_69.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_69.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_690.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_690.java
index 471fa99..c0b0308 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_690.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_690.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_714.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_714.java
index 33447ab..68198f3 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_714.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_714.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_724.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_724.java
index ff0cf21..a645556 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_724.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_724.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_739.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_739.java
index 7d8ee2a..697b256 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_739.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_739.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_94.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_94.java
index b46e9cb..f6b64c1 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_94.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NestedTypeFieldValue_94.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NumericTypesCastTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NumericTypesCastTests.java
index bd50c04..7db1324 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NumericTypesCastTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/NumericTypesCastTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/QualifiedFieldValueTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/QualifiedFieldValueTests.java
index 4c5e819..e029bc6 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/QualifiedFieldValueTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/QualifiedFieldValueTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/QualifiedStaticFieldValueTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/QualifiedStaticFieldValueTests.java
index c7a1d24..5bd79b6 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/QualifiedStaticFieldValueTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/QualifiedStaticFieldValueTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/QualifiedStaticFieldValueTests2.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/QualifiedStaticFieldValueTests2.java
index 8931f4c..086dfa1 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/QualifiedStaticFieldValueTests2.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/QualifiedStaticFieldValueTests2.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/ShortAssignmentOperatorsTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/ShortAssignmentOperatorsTests.java
index 161e8c5..561fca8 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/ShortAssignmentOperatorsTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/ShortAssignmentOperatorsTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/ShortOperatorsTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/ShortOperatorsTests.java
index eb3a262..72fc416 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/ShortOperatorsTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/ShortOperatorsTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/StaticFieldValueTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/StaticFieldValueTests.java
index defe22b..9321ef8 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/StaticFieldValueTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/StaticFieldValueTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/StaticFieldValueTests2.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/StaticFieldValueTests2.java
index 4075ff5..71c0002 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/StaticFieldValueTests2.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/StaticFieldValueTests2.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/StringPlusAssignmentOpTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/StringPlusAssignmentOpTests.java
index f5b4558..7260deb 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/StringPlusAssignmentOpTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/StringPlusAssignmentOpTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/StringPlusOpTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/StringPlusOpTests.java
index 311864a..e58613d 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/StringPlusOpTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/StringPlusOpTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/Tests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/Tests.java
index 2e455f6..1ae02ac 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/Tests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/Tests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -39,7 +39,7 @@
static final String xString = "\"minus three\"";
static final String xBoolean = "true";
static final String xNull = "null";
-
+
static byte xByteValue = (byte)-3;
static char xCharValue = (char)-3;
static short xShortValue = (short)-3;
@@ -61,7 +61,7 @@
static final String xVarString = "xVarString";
static final String xVarBoolean = "xVarBoolean";
// static final String xVarNull = "xVarNull";
-
+
static final byte xVarByteValue = (byte)-5;
static final char xVarCharValue = (char)-5;
static final short xVarShortValue = (short)-5;
@@ -94,7 +94,7 @@
static final String yStringValue = "eight";
static final boolean yBooleanValue = false;
static final Object yNullValue = null;
-
+
static final String yVarByte = "yVarByte";
static final String yVarChar = "yVarChar";
static final String yVarShort = "yVarShort";
@@ -105,7 +105,7 @@
static final String yVarString = "yVarString";
static final String yVarBoolean = "yVarBoolean";
// static final String yVarNull = "yVarNull";
-
+
static final byte yVarByteValue = (byte)7;
static final char yVarCharValue = (char)7;
static final short yVarShortValue = (short)7;
@@ -116,7 +116,7 @@
static final String yVarStringValue = "seven";
static final boolean yVarBooleanValue = false;
// static final Object yVarNullValue = null;
-
+
static final String xFieldByte = "xFieldByte";
static final String xFieldChar = "xFieldChar";
static final String xFieldShort = "xFieldShort";
@@ -156,7 +156,7 @@
static final String yStaticFieldDouble = "yStaticFieldDouble";
static final String yStaticFieldString = "yStaticFieldString";
static final String yStaticFieldBoolean = "yStaticFieldBoolean";
-
+
static final byte xFieldByteValue = -2;
static final char xFieldCharValue = (char)-2;
static final short xFieldShortValue = -2;
@@ -196,7 +196,7 @@
static final double yStaticFieldDoubleValue = 6.5;
static final String yStaticFieldStringValue = "six";
static final boolean yStaticFieldBooleanValue = false;
-
+
static final String xArrayByte = "xArrayByte";
static final String xArrayChar = "xArrayChar";
static final String xArrayShort = "xArrayShort";
@@ -236,8 +236,8 @@
static final double[] yArrayDoubleValue = new double[]{7.6, 8.7, 9.8};
static final String[] yArrayStringValue = new String[]{"seven", "eight", "nine"};
static final boolean[] yArrayBooleanValue = new boolean[]{false, true, false};
-
-
+
+
static final String plusOp = "+";
static final String minusOp = "-";
static final String multiplyOp = "*";
@@ -273,8 +273,8 @@
static final String postfixPlusPlusOp = "++";
static final String prefixMinusMinusOp = "--";
static final String postfixMinusMinusOp = "--";
-
-
+
+
static final String aInt = "a";
static final String bInt = "b";
static final String cInt = "c";
@@ -347,7 +347,7 @@
static final String hStringValue_2 = "eight";
static final String iStringValue_2 = "nine";
static final String jStringValue_2 = "zero";
-
+
static final String EMPTY= "";
static final String THIS= "this.";
static final String T_T= "EvalNestedTypeTests.";
@@ -401,7 +401,7 @@
static final String I_FB= "i_fb.";
static final String I_FC= "i_fc.";
static final String I_FD= "i_fd.";
-
+
/**
* Constructor for Tests.
@@ -412,24 +412,24 @@
}
static protected IJavaThread fSuspendeeThread;
-
+
static protected IJavaStackFrame fFrame;
-
+
static protected ICompilationUnit fCu;
-
+
static protected IEvaluationEngine fEngine;
-
+
static protected IValue eval(String command) {
-
+
class Listener implements IEvaluationListener {
IEvaluationResult fResult;
-
+
@Override
public void evaluationComplete(IEvaluationResult result) {
fResult= result;
}
-
+
public IEvaluationResult getResult() {
return fResult;
}
@@ -463,19 +463,19 @@
}
return result.getValue();
}
-
+
protected void initializeFrame(String testClass, int breakPointLine, int numberFrames) throws Exception {
fFrame = getStackFrame(breakPointLine, numberFrames, 0, 0, testClass);
fEngine = getEvaluationEngine((IJavaDebugTarget)fFrame.getDebugTarget(), get14Project());
}
-
+
protected void initializeFrame(String testClass, int breakPointLine, int numberFrames, int hitCount) throws Exception {
fFrame = getStackFrame(breakPointLine, numberFrames, 0, hitCount, testClass);
fEngine = getEvaluationEngine((IJavaDebugTarget)fFrame.getDebugTarget(), get14Project());
}
-
+
protected void destroyFrame() throws Exception {
try {
terminateAndRemove(fSuspendeeThread);
@@ -487,13 +487,13 @@
}
fFrame = null;
}
-
-
+
+
protected IEvaluationEngine getEvaluationEngine(IJavaDebugTarget vm, IJavaProject project) {
IEvaluationEngine engine = EvaluationManager.newAstEvaluationEngine(project, vm);
return engine;
- }
-
+ }
+
protected IJavaStackFrame getStackFrame(int breakpointLine, int numberFrames, int frameNumber, int hitCount, String testClass) throws Exception {
IJavaLineBreakpoint breakpoint= createLineBreakpoint(breakpointLine, testClass);
breakpoint.setHitCount(hitCount);
@@ -503,5 +503,5 @@
IStackFrame stackFrame= stackFrames[frameNumber];
return (IJavaStackFrame)stackFrame;
}
-
+
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TestsAnonymousClassVariable.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TestsAnonymousClassVariable.java
index 53217e8..6e81696 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TestsAnonymousClassVariable.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TestsAnonymousClassVariable.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -16,7 +16,7 @@
public class TestsAnonymousClassVariable extends Tests {
/**
* Constructor for TestsAnonymousClassVariable.
- *
+ *
* @param name
*/
public TestsAnonymousClassVariable(String name) {
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TestsArrays.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TestsArrays.java
index 93cbe54..d409581 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TestsArrays.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TestsArrays.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TestsBreakpointConditions.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TestsBreakpointConditions.java
index 55cb146..d00abe6 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TestsBreakpointConditions.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TestsBreakpointConditions.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TestsNestedTypes1.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TestsNestedTypes1.java
index 7cc1b53..08808eb 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TestsNestedTypes1.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TestsNestedTypes1.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TestsNestedTypes2.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TestsNestedTypes2.java
index 68586c1..d0a1883 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TestsNestedTypes2.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TestsNestedTypes2.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TestsNumberLiteral.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TestsNumberLiteral.java
index c20b366..fe293f3 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TestsNumberLiteral.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TestsNumberLiteral.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TestsOperators1.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TestsOperators1.java
index 915500f..b3c918c 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TestsOperators1.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TestsOperators1.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TestsOperators2.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TestsOperators2.java
index 7395651..24e789f 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TestsOperators2.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TestsOperators2.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TestsTypeHierarchy1.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TestsTypeHierarchy1.java
index b3eaae6..550fb10 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TestsTypeHierarchy1.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TestsTypeHierarchy1.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TestsTypeHierarchy2.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TestsTypeHierarchy2.java
index 39468cb..a54b2d5 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TestsTypeHierarchy2.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TestsTypeHierarchy2.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_119_1.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_119_1.java
index fd21425..d840282 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_119_1.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_119_1.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_146_1.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_146_1.java
index 73891d1..c18101b 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_146_1.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_146_1.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_32_1.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_32_1.java
index 66fcdfb..fc31093 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_32_1.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_32_1.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_32_2.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_32_2.java
index a46a805..80b1029 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_32_2.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_32_2.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_32_3.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_32_3.java
index 6513de7..ed44acb 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_32_3.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_32_3.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_32_4.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_32_4.java
index 3954994..69055ed 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_32_4.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_32_4.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_32_5.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_32_5.java
index 70fddb1..b3dca8f 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_32_5.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_32_5.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_32_6.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_32_6.java
index 1df5827..f5b131c 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_32_6.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_32_6.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_68_1.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_68_1.java
index 3bc0d5b..f89c236 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_68_1.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_68_1.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_68_2.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_68_2.java
index 5cdad0e..76a9e3d 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_68_2.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_68_2.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_68_3.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_68_3.java
index 6a43401..8539848 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_68_3.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/TypeHierarchy_68_3.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/VariableDeclarationTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/VariableDeclarationTests.java
index 048b0de..cf0f5b8 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/VariableDeclarationTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/VariableDeclarationTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/XfixOperatorsTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/XfixOperatorsTests.java
index 800d623..2d14d0f 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/XfixOperatorsTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/XfixOperatorsTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/generator/NestedTypeTestGenerator.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/generator/NestedTypeTestGenerator.java
index e738261..63236e9 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/generator/NestedTypeTestGenerator.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/generator/NestedTypeTestGenerator.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -70,13 +70,13 @@
static final int I_FC= 37;
static final int I_FD= 38;
- static final String[] qualifiers=
+ static final String[] qualifiers=
{"T_T", "T_T_A", "T_A", "T_T_A_AA", "T_A_AA", "T_AA", "T_T_this", "T_T_Athis", "T_A_this", "T_B_this",
"T_C_this", "T_E_this", "I_A", "I_AA", "I_AB", "I_AC", "I_AD", "I_AE", "I_AF", "I_B",
"I_BB", "I_BC", "I_BD", "I_C", "I_CB", "I_CC", "I_CD", "I_D", "I_DB", "I_DC",
"I_DD", "I_E", "I_EB", "I_EC", "I_ED", "I_F", "I_FB", "I_FC", "I_FD", "T_T_B",
"T_B", "T_T_B_BB", "T_B_BB", "T_BB", "T_T_A_AB", "T_A_AB", "T_AB"};
-
+
static final int [] qualifiersLevel=
{0, 1, 1, 2, 2, 2, 0, 1, 1, 1,
1, 1, 1, 2, 2, 2, 2, 2, 2, 1,
@@ -118,10 +118,10 @@
gen_evalNestedTypeTestStatic();
System.out.println("done");
}
-
+
public static void gen_AA_aa() throws Exception {
StringBuffer code= new StringBuffer();
-
+
createTest('b', 2, code);
createTest('c', 2, code);
createTest('d', 2, code);
@@ -137,13 +137,13 @@
createTestThis('i', 2, code);
createTestThis('j', 2, code);
createTestsStaticFields_A(code);
-
+
createJavaFile(code, 65, 4);
}
-
+
public static void gen_AA_aaStatic() throws Exception {
StringBuffer code= new StringBuffer();
-
+
createTest('b', 2, code);
createTest('d', 2, code);
createTest('f', 2, code);
@@ -153,10 +153,10 @@
createJavaFile(code, 69, 4);
}
-
+
public static void gen_AB_ab() throws Exception {
StringBuffer code= new StringBuffer();
-
+
createTest('b', 2, code);
createTest('c', 2, code);
createTest('d', 2, code);
@@ -177,13 +177,13 @@
createTestQualifier(T_A_this, 'd', code);
createTestQualifier(T_A_this, 'g', code);
createTestQualifier(T_A_this, 'h', code);
-
+
createJavaFile(code, 94, 4);
}
public static void gen_AC_ac() throws Exception {
StringBuffer code= new StringBuffer();
-
+
createTest('b', 2, code);
createTest('g', 2, code);
createTest('h', 2, code);
@@ -192,13 +192,13 @@
createTestQualifier(T_A_this, 'd', code);
createTestQualifier(T_A_this, 'g', code);
createTestQualifier(T_A_this, 'h', code);
-
+
createJavaFile(code, 120, 4);
}
-
+
public static void gen_AD_ad() throws Exception {
StringBuffer code= new StringBuffer();
-
+
createTest('b', 2, code);
createTest('g', 2, code);
createTest('h', 2, code);
@@ -207,13 +207,13 @@
createTestQualifier(T_A_this, 'd', code);
createTestQualifier(T_A_this, 'g', code);
createTestQualifier(T_A_this, 'h', code);
-
+
createJavaFile(code, 145, 4);
}
-
+
public static void gen_A_a() throws Exception {
StringBuffer code= new StringBuffer();
-
+
createTest('b', 1, code);
createTest('c', 1, code);
createTest('d', 1, code);
@@ -231,33 +231,33 @@
createTestQualifier(I_AB, 'f', code);
createTestQualifier(I_AB, 'i', code);
createTestQualifier(I_AB, 'j', code);
-
+
createJavaFile(code, 155, 3);
}
-
+
public static void gen_AE_ae() throws Exception {
StringBuffer code= new StringBuffer();
-
+
createTest('b', 2, code);
createTest('h', 2, code);
createTestsStaticFields_A(code);
-
+
createJavaFile(code, 179, 4);
}
-
+
public static void gen_AF_af() throws Exception {
StringBuffer code= new StringBuffer();
-
+
createTest('b', 2, code);
createTest('h', 2, code);
createTestsStaticFields_A(code);
-
+
createJavaFile(code, 203, 4);
}
-
+
public static void gen_A_aStatic() throws Exception {
StringBuffer code= new StringBuffer();
-
+
createTest('b', 1, code);
createTest('d', 1, code);
createTest('f', 1, code);
@@ -269,13 +269,13 @@
createTestQualifier(I_AA, 'f', code);
createTestQualifier(I_AA, 'i', code);
createTestQualifier(I_AA, 'j', code);
-
+
createJavaFile(code, 214, 3);
}
-
+
public static void gen_BB_bb() throws Exception {
StringBuffer code= new StringBuffer();
-
+
createTest('a', 2, code);
createTest('b', 2, code);
createTest('c', 2, code);
@@ -303,13 +303,13 @@
createTestQualifier(T_T_this, 'd', code);
createTestQualifier(T_T_this, 'e', code);
createTestQualifier(T_T_this, 'f', code);
-
+
createJavaFile(code, 252, 4);
}
public static void gen_BC_bc() throws Exception {
StringBuffer code= new StringBuffer();
-
+
createTest('a', 2, code);
createTest('b', 2, code);
createTest('g', 2, code);
@@ -325,13 +325,13 @@
createTestQualifier(T_T_this, 'd', code);
createTestQualifier(T_T_this, 'e', code);
createTestQualifier(T_T_this, 'f', code);
-
+
createJavaFile(code, 279, 4);
}
public static void gen_BD_bd() throws Exception {
StringBuffer code= new StringBuffer();
-
+
createTest('a', 2, code);
createTest('b', 2, code);
createTest('g', 2, code);
@@ -347,13 +347,13 @@
createTestQualifier(T_T_this, 'd', code);
createTestQualifier(T_T_this, 'e', code);
createTestQualifier(T_T_this, 'f', code);
-
+
createJavaFile(code, 304, 4);
}
public static void gen_B_b() throws Exception {
StringBuffer code= new StringBuffer();
-
+
createTest('a', 1, code);
createTest('b', 1, code);
createTest('c', 1, code);
@@ -379,13 +379,13 @@
createTestQualifier(I_BB, 'f', code);
createTestQualifier(I_BB, 'i', code);
createTestQualifier(I_BB, 'j', code);
-
+
createJavaFile(code, 315, 3);
}
public static void gen_CB_cb() throws Exception {
StringBuffer code= new StringBuffer();
-
+
createTest('a', 2, code);
createTest('b', 2, code);
createTestsStaticFields(code);
@@ -395,13 +395,13 @@
createTestQualifier(T_T_this, 'd', code);
createTestQualifier(T_T_this, 'e', code);
createTestQualifier(T_T_this, 'f', code);
-
+
createJavaFile(code, 354, 4);
}
public static void gen_CC_cc() throws Exception {
StringBuffer code= new StringBuffer();
-
+
createTest('a', 2, code);
createTest('b', 2, code);
createTestsStaticFields(code);
@@ -411,13 +411,13 @@
createTestQualifier(T_T_this, 'd', code);
createTestQualifier(T_T_this, 'e', code);
createTestQualifier(T_T_this, 'f', code);
-
+
createJavaFile(code, 381, 4);
}
public static void gen_CD_cd() throws Exception {
StringBuffer code= new StringBuffer();
-
+
createTest('a', 2, code);
createTest('b', 2, code);
createTestsStaticFields(code);
@@ -427,13 +427,13 @@
createTestQualifier(T_T_this, 'd', code);
createTestQualifier(T_T_this, 'e', code);
createTestQualifier(T_T_this, 'f', code);
-
+
createJavaFile(code, 406, 4);
}
public static void gen_C_c() throws Exception {
StringBuffer code= new StringBuffer();
-
+
createTest('a', 1, code);
createTest('b', 1, code);
createTest('e', 1, code);
@@ -445,13 +445,13 @@
createTestQualifier(T_T_this, 'd', code);
createTestQualifier(T_T_this, 'e', code);
createTestQualifier(T_T_this, 'f', code);
-
+
createJavaFile(code, 417, 3);
}
public static void gen_DB_db() throws Exception {
StringBuffer code= new StringBuffer();
-
+
createTest('a', 2, code);
createTest('b', 2, code);
createTestsStaticFields(code);
@@ -461,13 +461,13 @@
createTestQualifier(T_T_this, 'd', code);
createTestQualifier(T_T_this, 'e', code);
createTestQualifier(T_T_this, 'f', code);
-
+
createJavaFile(code, 455, 4);
}
public static void gen_DC_dc() throws Exception {
StringBuffer code= new StringBuffer();
-
+
createTest('a', 2, code);
createTest('b', 2, code);
createTestsStaticFields(code);
@@ -477,13 +477,13 @@
createTestQualifier(T_T_this, 'd', code);
createTestQualifier(T_T_this, 'e', code);
createTestQualifier(T_T_this, 'f', code);
-
+
createJavaFile(code, 481, 4);
}
public static void gen_DD_dd() throws Exception {
StringBuffer code= new StringBuffer();
-
+
createTest('a', 2, code);
createTest('b', 2, code);
createTestsStaticFields(code);
@@ -493,13 +493,13 @@
createTestQualifier(T_T_this, 'd', code);
createTestQualifier(T_T_this, 'e', code);
createTestQualifier(T_T_this, 'f', code);
-
+
createJavaFile(code, 506, 4);
}
public static void gen_D_d() throws Exception {
StringBuffer code= new StringBuffer();
-
+
createTest('a', 1, code);
createTest('b', 1, code);
createTest('e', 1, code);
@@ -511,14 +511,14 @@
createTestQualifier(T_T_this, 'd', code);
createTestQualifier(T_T_this, 'e', code);
createTestQualifier(T_T_this, 'f', code);
-
+
createJavaFile(code, 517, 3);
}
-
+
public static void gen_evalNestedTypeTest() throws Exception {
StringBuffer code= new StringBuffer();
-
-
+
+
createTest('a', 0, code);
createTest('b', 0, code);
createTest('c', 0, code);
@@ -542,87 +542,87 @@
createTestQualifier(I_BB, 'f', code);
createTestQualifier(I_BB, 'i', code);
createTestQualifier(I_BB, 'j', code);
-
+
createJavaFile(code, 529, 2);
}
public static void gen_EB_eb() throws Exception {
StringBuffer code= new StringBuffer();
-
+
createTest('b', 2, code);
createTestsStaticFields(code);
-
+
createJavaFile(code, 566, 4);
}
public static void gen_EC_ec() throws Exception {
StringBuffer code= new StringBuffer();
-
+
createTest('b', 2, code);
createTestsStaticFields(code);
-
+
createJavaFile(code, 592, 4);
}
public static void gen_ED_ed() throws Exception {
StringBuffer code= new StringBuffer();
-
+
createTest('b', 2, code);
createTestsStaticFields(code);
-
+
createJavaFile(code, 616, 4);
}
public static void gen_E_e() throws Exception {
StringBuffer code= new StringBuffer();
-
+
createTest('b', 1, code);
createTest('f', 1, code);
createTestsStaticFields(code);
-
+
createJavaFile(code, 626, 3);
}
-
+
public static void gen_FB_fb() throws Exception {
StringBuffer code= new StringBuffer();
-
+
createTest('b', 2, code);
createTestsStaticFields(code);
-
+
createJavaFile(code, 664, 4);
}
public static void gen_FC_fc() throws Exception {
StringBuffer code= new StringBuffer();
-
+
createTest('b', 2, code);
createTestsStaticFields(code);
-
+
createJavaFile(code, 690, 4);
}
public static void gen_FD_fd() throws Exception {
StringBuffer code= new StringBuffer();
-
+
createTest('b', 2, code);
createTestsStaticFields(code);
-
+
createJavaFile(code, 714, 4);
}
public static void gen_F_f() throws Exception {
StringBuffer code= new StringBuffer();
-
+
createTest('b', 1, code);
createTest('f', 1, code);
createTestsStaticFields(code);
-
+
createJavaFile(code, 724, 3);
}
-
+
public static void gen_evalNestedTypeTestStatic() throws Exception {
StringBuffer code= new StringBuffer();
-
+
createTest('b', 0, code);
createTest('d', 0, code);
createTest('f', 0, code);
@@ -643,20 +643,20 @@
createTestQualifier(I_AB, 'f', code);
createTestQualifier(I_AB, 'i', code);
createTestQualifier(I_AB, 'j', code);
-
+
createJavaFile(code, 739, 2);
}
-
+
public static void gen_main() throws Exception {
StringBuffer code= new StringBuffer();
-
+
createTestsStaticFields(code);
createJavaFile(code, 745, 1);
}
// ------------------------------
-
+
public static void createTestsStaticFields(StringBuffer code) {
createTestQualifier(T_T, 'b', code);
createTestQualifier(T_T, 'd', code);
@@ -688,7 +688,7 @@
createTestQualifier(T_B_BB, 'f', code);
createTestQualifier(T_B_BB, 'j', code);
}
-
+
public static void createTestsStaticFields_A(StringBuffer code) {
createTestsStaticFields(code);
createTestQualifier(T_AA, 'd', code);
@@ -698,76 +698,76 @@
createTestQualifier(T_AB, 'f', code);
createTestQualifier(T_AB, 'j', code);
}
-
+
public static void createTestsStaticFields_B(StringBuffer code) {
createTestsStaticFields(code);
createTestQualifier(T_BB, 'd', code);
createTestQualifier(T_BB, 'f', code);
createTestQualifier(T_BB, 'j', code);
}
-
+
// ------------------------------
-
+
public static void createTest(char variable, int level, StringBuffer code) {
code.append("\tpublic void testEvalNestedTypeTest_" + variable + "() throws Throwable {\n");
tryBlockBegin(code);
-
+
genCodeEval(IInternalDebugCoreConstants.EMPTY_STRING + variable + "Int", true, code);
genCodeReturnTypeCheck(IInternalDebugCoreConstants.EMPTY_STRING + variable, "int", true, code);
genCodeReturnValueCheckPrimitiveType(IInternalDebugCoreConstants.EMPTY_STRING + variable, "int", "Int", variable + "IntValue_" + level, true, code);
code.append("\n");
-
+
genCodeEval(IInternalDebugCoreConstants.EMPTY_STRING + variable + "String", false, code);
genCodeReturnTypeCheck(IInternalDebugCoreConstants.EMPTY_STRING + variable, "java.lang.String", false, code);
genCodeReturnValueCheckStringType(IInternalDebugCoreConstants.EMPTY_STRING + variable, variable + "StringValue_" + level, true, code);
-
+
tryBlockEnd(code);
code.append("\t}\n\n");
}
-
+
public static void createTestThis(char variable, int level, StringBuffer code) {
code.append("\tpublic void testEvalNestedTypeTest_this_" + variable + "() throws Throwable {\n");
tryBlockBegin(code);
-
+
genCodeEval("THIS + " + variable + "Int", true, code);
genCodeReturnTypeCheck(IInternalDebugCoreConstants.EMPTY_STRING + variable, "int", true, code);
genCodeReturnValueCheckPrimitiveType(IInternalDebugCoreConstants.EMPTY_STRING + variable, "int", "Int", variable + "IntValue_" + level, true, code);
code.append("\n");
-
+
genCodeEval("THIS + " + variable + "String", false, code);
genCodeReturnTypeCheck(IInternalDebugCoreConstants.EMPTY_STRING + variable, "java.lang.String", false, code);
genCodeReturnValueCheckStringType(IInternalDebugCoreConstants.EMPTY_STRING + variable, variable + "StringValue_" + level, true, code);
-
+
tryBlockEnd(code);
code.append("\t}\n\n");
}
-
-
-
+
+
+
public static void createTestQualifier(int qualifier, char variable, StringBuffer code) {
String strQualifier= qualifiers[qualifier];
code.append("\tpublic void testEvalNestedTypeTest_" + strQualifier + "_" + variable + "() throws Throwable {\n");
tryBlockBegin(code);
-
+
genCodeEval(strQualifier + " + " + variable + "Int", true, code);
genCodeReturnTypeCheck(IInternalDebugCoreConstants.EMPTY_STRING + strQualifier + "_" + variable, "int", true, code);
genCodeReturnValueCheckPrimitiveType(IInternalDebugCoreConstants.EMPTY_STRING + strQualifier + "_" + variable, "int", "Int", variable + "IntValue_" + qualifiersLevel[qualifier], true, code);
code.append("\n");
-
+
genCodeEval(strQualifier + " + " + variable + "String", false, code);
genCodeReturnTypeCheck(IInternalDebugCoreConstants.EMPTY_STRING + strQualifier + "_" + variable, "java.lang.String", false, code);
genCodeReturnValueCheckStringType(IInternalDebugCoreConstants.EMPTY_STRING + strQualifier + "_" + variable, variable + "StringValue_" + qualifiersLevel[qualifier], true, code);
-
+
tryBlockEnd(code);
code.append("\t}\n\n");
}
-
+
//---------------------
-
+
public static void createJavaFile(StringBuffer tests, int lineNumber, int numberFrames) throws Exception {
-
+
StringBuffer code= new StringBuffer();
-
+
code.append("/*******************************************************************************\n");
code.append(" * Copyright (c) 2002, 2003 IBM Corporation and others.\n");
code.append(" * All rights reserved. This program and the accompanying materials \n");
@@ -796,11 +796,11 @@
code.append("\tprotected void end() throws Exception {\n");
code.append("\t\tdestroyFrame();\n");
code.append("\t}\n\n");
-
+
code.append(tests.toString());
-
+
code.append("}\n");
-
+
try (Writer file = new FileWriter(new File("NestedTypeFieldValue_" + lineNumber + ".java").getAbsoluteFile())) {
file.write(code.toString());
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/generator/OtherTestsGenerator.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/generator/OtherTestsGenerator.java
index d93e356..b34c075 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/generator/OtherTestsGenerator.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/generator/OtherTestsGenerator.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -17,7 +17,7 @@
public class OtherTestsGenerator extends TestGenerator {
public static void main(String[] args) throws Exception {
-
+
genTestsOperators1();
genTestsOperators2();
genTestsArray();
@@ -26,7 +26,7 @@
genTestsTypeHierarchy1();
genTestsTypeHierarchy2();
genTestNumberLiteral();
-
+
genInstanceOfTests();
System.out.println("done");
@@ -34,29 +34,29 @@
public static void genTestsOperators1() throws Exception {
StringBuffer code= new StringBuffer();
-
+
genTestTypeBinaryOpTypeBinaryPromotion(T_int, Op_plus, T_int, code);
genTestTypeBinaryOpTypeBinaryPromotion(T_String, Op_plus, T_String, code);
genTestLocalVarValue(T_int, code);
genTestLocalVarValue(T_String, code);
-
+
createJavaFile(code, "TestsOperators1", "EvalSimpleTests", 37, 1, 1);
}
public static void genTestsOperators2() throws Exception {
StringBuffer code= new StringBuffer();
-
+
genTestLocalVarAssignment(T_int, code);
genTestLocalVarAssignment(T_String, code);
genTestTypeAssignmentOpType(T_int, Op_plusAss, T_int, code);
genTestTypeAssignmentOpType(T_String, Op_plusAss, T_String, code);
-
+
createJavaFile(code, "TestsOperators2", "EvalSimpleTests", 37, 1, 1);
}
-
+
public static void genTestsArray() throws Exception {
StringBuffer code= new StringBuffer();
-
+
genTestArrayValue(T_int, code);
genTestArrayLength(T_int, code);
genTestArrayAssignment(T_int, code);
@@ -66,13 +66,13 @@
genTestArrayLength(T_String, code);
genTestArrayAssignment(T_String, code);
genTestArrayInitialization(T_String, code);
-
+
createJavaFile(code, "TestsArrays", "EvalArrayTests", 37, 1, 1);
}
public static void genTestsNestedTypes1() throws Exception {
StringBuffer code= new StringBuffer();
-
+
NestedTypeTestGenerator.createTest('a', 2, code);
NestedTypeTestGenerator.createTest('d', 2, code);
NestedTypeTestGenerator.createTest('e', 2, code);
@@ -104,7 +104,7 @@
public static void genTestsNestedTypes2() throws Exception {
StringBuffer code= new StringBuffer();
-
+
NestedTypeTestGenerator.createTest('f', 0, code);
NestedTypeTestGenerator.createTestQualifier(NestedTypeTestGenerator.T_T, 'b', code);
NestedTypeTestGenerator.createTestQualifier(NestedTypeTestGenerator.T_T_A, 'd', code);
@@ -131,7 +131,7 @@
public static void genTestsTypeHierarchy1() throws Exception {
StringBuffer code= new StringBuffer();
-
+
TypeHierarchyTestsGenerator.createTestQualifier(TypeHierarchyTestsGenerator.IAA, TypeHierarchyTestsGenerator.M1, code);
TypeHierarchyTestsGenerator.createTestQualifier(TypeHierarchyTestsGenerator.AA, TypeHierarchyTestsGenerator.M2, code);
TypeHierarchyTestsGenerator.createTestQualifier(TypeHierarchyTestsGenerator.AB, TypeHierarchyTestsGenerator.S2, code);
@@ -146,7 +146,7 @@
TypeHierarchyTestsGenerator.createTestQualifier(TypeHierarchyTestsGenerator.CC, TypeHierarchyTestsGenerator.M2, code);
TypeHierarchyTestsGenerator.createTestQualifier(TypeHierarchyTestsGenerator.CC, TypeHierarchyTestsGenerator.M4, code);
TypeHierarchyTestsGenerator.createTestQualifier(TypeHierarchyTestsGenerator.CC, TypeHierarchyTestsGenerator.M6, code);
-
+
TypeHierarchyTestsGenerator.createTestQualifier(TypeHierarchyTestsGenerator.N_A, TypeHierarchyTestsGenerator.M1, code);
TypeHierarchyTestsGenerator.createTestQualifier(TypeHierarchyTestsGenerator.N_B, TypeHierarchyTestsGenerator.M1, code);
TypeHierarchyTestsGenerator.createTestQualifier(TypeHierarchyTestsGenerator.N_B, TypeHierarchyTestsGenerator.M2, code);
@@ -162,7 +162,7 @@
StringBuffer code= new StringBuffer();
TypeHierarchyTestsGenerator.createTest_TestC(code, TypeHierarchyTestsGenerator.CC);
-
+
createJavaFile(code, "TestsTypeHierarchy2", "EvalTypeHierarchyTests", 119, 2, 1, false);
}
@@ -190,7 +190,7 @@
createTestNumberLiteral1("0xDadaCafe", T_int, code);
createTestNumberLiteral1("1996", T_int, code);
createTestNumberLiteral1("0x00FF00FF", T_int, code);
-
+
createTestNumberLiteral1("0L", T_long, code);
createTestNumberLiteral1("00L", T_long, code);
createTestNumberLiteral1("0x0L", T_long, code);
@@ -208,7 +208,7 @@
createTestNumberLiteral1("0x100000000L", T_long, code);
createTestNumberLiteral1("2147483648L", T_long, code);
createTestNumberLiteral1("0xC0B0L", T_long, code);
-
+
createTestNumberLiteral2("3.40282347e+38f", T_float, code);
createTestNumberLiteral2("1.40239846e-45f", T_float, code);
createTestNumberLiteral2("1e1f", T_float, code);
@@ -236,7 +236,7 @@
*/
private static void createTestNumberLiteral1(String literal, int type, StringBuffer code) {
String tName= fTypeName[type];
-
+
code.append("\tpublic void test" + literal.replace('-', 'N').replace('.', '_').replace('+', 'P') + "() throws Throwable {\n");
tryBlockBegin(code);
genCodeEval("\"" + literal + '"', true, code);
@@ -251,7 +251,7 @@
*/
private static void createTestNumberLiteral2(String literal, int type, StringBuffer code) {
String tName= fTypeName[type];
-
+
code.append("\tpublic void test" + literal.replace('-', 'N').replace('.', '_').replace('+', 'P') + "() throws Throwable {\n");
tryBlockBegin(code);
genCodeEval("\"" + literal + '"', true, code);
@@ -268,11 +268,11 @@
public static void createJavaFile(StringBuffer tests, String className, String testClass, int lineNumber, int numberFrames, int hitCount) throws Exception {
createJavaFile(tests, className, testClass, lineNumber, numberFrames, hitCount, true);
}
-
+
public static void createJavaFile(StringBuffer tests, String className, String testClass, int lineNumber, int numberFrames, int hitCount, boolean importJDIObjectValue) throws Exception {
-
+
StringBuffer code= new StringBuffer();
-
+
code.append("/*******************************************************************************\n");
code.append(" * Copyright (c) 2002, 2003 IBM Corporation and others.\n");
code.append(" * All rights reserved. This program and the accompanying materials \n");
@@ -303,14 +303,14 @@
code.append("\tprotected void end() throws Exception {\n");
code.append("\t\tdestroyFrame();\n");
code.append("\t}\n\n");
-
+
code.append(tests.toString());
-
+
code.append("}\n");
-
+
try (Writer file = new FileWriter(new File(className + ".java").getAbsoluteFile())) {
file.write(code.toString());
}
-
+
}
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/generator/TestGenerator.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/generator/TestGenerator.java
index 749bd32..46622de 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/generator/TestGenerator.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/generator/TestGenerator.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -17,15 +17,15 @@
import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
public class TestGenerator {
-
+
static protected int getPromotionType(int left, int right) {
return fTypeTable[left][right];
}
-
+
static protected int getUnaryPromotionType(int type) {
return fTypeTable[type][T_int];
}
-
+
static protected boolean needCast(int type1, int type2) {
if (type1 == type2) {
return false;
@@ -62,7 +62,7 @@
static final int T_int = 10;
static final int T_String = 11;
static final int T_null = 12;
-
+
private static final int[][] fTypeTable= {
/* undefined */ {T_undefined, T_undefined, T_undefined, T_undefined, T_undefined, T_undefined, T_undefined, T_undefined, T_undefined, T_undefined, T_undefined, T_undefined, T_undefined},
/* object */ {T_undefined, T_undefined, T_undefined, T_undefined, T_undefined, T_undefined, T_undefined, T_undefined, T_undefined, T_undefined, T_undefined, T_String, T_undefined},
@@ -78,11 +78,11 @@
/* String */ {T_undefined, T_String, T_String, T_String, T_String, T_String, T_undefined, T_String, T_String, T_String, T_String, T_String, T_String},
/* null */ {T_undefined, T_undefined, T_undefined, T_undefined, T_undefined, T_undefined, T_undefined, T_undefined, T_undefined, T_undefined, T_undefined, T_String, T_undefined},
};
-
+
static final String[] fTypeName = new String[] {"undefined", "java.lang.Object", "char", "byte", "short", "boolean", "void", "long", "double", "float", "int", "java.lang.String", "null"};
static final String[] typeUpperName = new String[] {"Undefined", "Object", "Char", "Byte", "Short", "Boolean", "Void", "Long", "Double", "Float", "Int", "String", "Null"};
-
+
static final int Op_plus = 0;
static final int Op_minus = 1;
static final int Op_multiply = 2;
@@ -118,17 +118,17 @@
static final int Op_postfixPlusPlus = 32;
static final int Op_prefixMinusMinus = 33;
static final int Op_postfixMinusMinus = 34;
-
+
static final String[] opSymbol = new String[] {"+", "-", "*", "/", "%", ">", ">=", "<", "<=", "==", "!=", "<<", ">>", ">>>", "|", "&", "^", "~", "!", "=", "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=", "|=", "&=", "^=", "++", "++", "--", "--"};
-
+
static final String[] opName = new String[] {"plus", "minus", "multiply", "divide", "remainder", "greater", "greaterEqual", "less", "lessEqual", "equalEqual", "notEqual", "leftShift", "rightShift", "unsignedRightShift", "or", "and", "xor", "twiddle", "not", "equal", "plusAssignment", "minusAssignment", "multiplyAssignment", "divideAssignment", "remainderAssignment", "leftShiftAssignment", "rightShiftAssignment", "unsignedRightShiftAssignment", "orAssignment", "andAssignment", "xorAssignment", "prefixPlusPlus", "postfixPlusPlus", "prefixMinusMinus", "postfixMinusMinus"};
-
+
static final String[] opUpperName = new String[] {"Plus", "Minus", "Multiply", "Divide", "Remainder", "Greater", "GreaterEqual", "Less", "LessEqual", "EqualEqual", "NotEqual", "LeftShift", "RightShift", "UnsignedRightShift", "Or", "And", "Xor", "Twiddle", "Not", "Equal", "PlusAssignment", "MinusAssignment", "MultiplyAssignment", "DivideAssignment", "RemainderAssignment", "LeftShiftAssignment", "RightShiftAssignment", "UnsignedRightShiftAssignment", "OrAssignment", "AndAssignment", "XorAssignment", "PrefixPlusPlus", "PostfixPlusPlus", "PrefixMinusMinus", "PostfixMinusMinus"};
-
+
static final String[] immediate = new String[] {"x", "y"};
-
+
static final String[] fVariable = new String[] {"xVar", "yVar", "xArray", "yArray"};
-
+
static final String[] field = new String[] {"xField", "yField", "xStaticField", "yStaticField"};
static final String[] prefixList = new String[] {"foo.", "EvalTypeTests.", IInternalDebugCoreConstants.EMPTY_STRING};
@@ -138,7 +138,7 @@
* in the correct package location.
*/
static public void main(String[] args) throws Exception {
-
+
genTestsNumericTypeAllOpsAllTypes(T_byte);
genTestsNumericTypeAllOpsAllTypes(T_char);
genTestsNumericTypeAllOpsAllTypes(T_short);
@@ -148,11 +148,11 @@
genTestsNumericTypeAllOpsAllTypes(T_double);
genTestsBooleanAllOpsBoolean();
genTestsStringPlusOpAllTypes();
-
+
genTestsLocalVarValue();
-
+
genTestsLocalVarAssignment();
-
+
genTestsNumericTypeAllAssignmentOpsAllTypes(T_byte);
genTestsNumericTypeAllAssignmentOpsAllTypes(T_char);
genTestsNumericTypeAllAssignmentOpsAllTypes(T_short);
@@ -162,33 +162,33 @@
genTestsNumericTypeAllAssignmentOpsAllTypes(T_double);
genTestsBooleanAllAssignmentOpsBoolean();
genTestsStringPlusAssignmentOpAllTypes();
-
+
genTestsNumericTypeCast();
-
+
genTestsAllIntegerTypesAllXfixOps();
-
+
genTestsQualifiedFieldValue();
genTestsQualifiedStaticFieldValue();
genTestsFieldValue();
genTestsStaticFieldValue();
-
+
genTestsArrayValue();
genTestsArrayAssignment();
genTestsArrayAllocation();
genTestsArrayInitialization();
System.out.println("done");
-
+
}
//-------------------------------
-
+
public static void genTestsNumericTypeAllOpsAllTypes(int type) throws Exception {
-
+
StringBuffer code = new StringBuffer();
-
+
String className = typeUpperName[type] + "OperatorsTests";
-
+
genTestsNumericTypeArithmeticOpNumericTypes(type, Op_plus, code);
genTestTypeBinaryOpTypeBinaryPromotion(type, Op_plus, T_String, code);
genTestsNumericTypeArithmeticOpNumericTypes(type, Op_minus, code);
@@ -209,36 +209,36 @@
genTestsIntegerTypeBooleanOpIntegerTypes(type, Op_and, code);
genTestsIntegerTypeBooleanOpIntegerTypes(type, Op_xor, code);
}
-
+
genTestUnaryOpNumericType(type, Op_plus, code);
genTestUnaryOpNumericType(type, Op_minus, code);
if (type != T_float && type != T_double) {
genTestUnaryOpNumericType(type, Op_twiddle, code);
}
-
+
createJavaFile(className, "EvalSimpleTests", 15, 1, true, code);
}
-
+
public static void genTestsBooleanAllOpsBoolean() throws Exception {
StringBuffer code = new StringBuffer();
-
+
String className = "BooleanOperatorsTests";
-
+
genTestBooleanBinaryOpBoolean(Op_or, code);
genTestBooleanBinaryOpBoolean(Op_and, code);
genTestBooleanBinaryOpBoolean(Op_xor, code);
genTestUnaryOpBoolean(Op_not, code);
-
+
createJavaFile(className, "EvalSimpleTests", 15, 1, false, code);
}
-
+
public static void genTestsStringPlusOpAllTypes() throws Exception {
-
+
StringBuffer code = new StringBuffer();
-
+
String className = "StringPlusOpTests";
-
+
code.append("\t// " + fTypeName[T_String] + " " + opSymbol[Op_plus] + " {" + fTypeName[T_byte] + ", " + fTypeName[T_char] + ", " + fTypeName[T_short] + ", " + fTypeName[T_int] + ", " + fTypeName[T_long] + ", " + fTypeName[T_String] + ", " + fTypeName[T_null] + "}\n" +
"\n");
@@ -251,18 +251,18 @@
genTestTypeBinaryOpTypeBinaryPromotion(T_String, Op_plus, T_boolean, code);
genTestTypeBinaryOpTypeBinaryPromotion(T_String, Op_plus, T_String, code);
genTestTypeBinaryOpTypeBinaryPromotion(T_String, Op_plus, T_null, code);
-
+
createJavaFile(className, "EvalSimpleTests", 15, 1, true, false, code);
}
-
+
public static void genTestsLocalVarValue() throws Exception {
StringBuffer code = new StringBuffer();
-
+
String className = "LocalVarValueTests";
-
+
code.append("\t// \n" +
"\n");
-
+
genTestLocalVarValue(T_byte, code);
genTestLocalVarValue(T_char, code);
genTestLocalVarValue(T_short, code);
@@ -276,15 +276,15 @@
createJavaFile(className, "EvalSimpleTests", 37, 1, true, code);
}
-
+
public static void genTestsLocalVarAssignment() throws Exception {
StringBuffer code = new StringBuffer();
-
+
String className = "LocalVarAssignmentTests";
-
+
code.append("\t// \n" +
"\n");
-
+
genTestLocalVarAssignment(T_byte, code);
genTestLocalVarAssignment(T_char, code);
genTestLocalVarAssignment(T_short, code);
@@ -294,16 +294,16 @@
genTestLocalVarAssignment(T_double, code);
genTestLocalVarAssignment(T_String, code);
genTestLocalVarAssignment(T_boolean, code);
-
+
createJavaFile(className, "EvalSimpleTests", 37, 1, true, code);
}
-
+
public static void genTestsNumericTypeAllAssignmentOpsAllTypes(int type) throws Exception {
-
+
StringBuffer code = new StringBuffer();
-
+
String className = typeUpperName[type] + "AssignmentOperatorsTests";
-
+
genTestsNumericTypeArithmeticAssignmentOpNumericTypes(type, Op_plusAss, code);
genTestsNumericTypeArithmeticAssignmentOpNumericTypes(type, Op_minusAss, code);
genTestsNumericTypeArithmeticAssignmentOpNumericTypes(type, Op_multiplyAss, code);
@@ -317,38 +317,38 @@
genTestsIntegerTypeArithmeticAssignmentOpIntegerTypes(type, Op_andAss, code);
genTestsIntegerTypeArithmeticAssignmentOpIntegerTypes(type, Op_xorAss, code);
}
-
-
+
+
createJavaFile(className, "EvalSimpleTests", 37, 1, false, code);
}
public static void genTestsBooleanAllAssignmentOpsBoolean() throws Exception {
StringBuffer code = new StringBuffer();
-
+
String className = "BooleanAssignmentOperatorsTests";
-
+
code.append("\t// " + fTypeName[T_boolean] + " " + opSymbol[Op_orAss] + " " + fTypeName[T_boolean] + "\n" +
"\n");
genTestTypeAssignmentOpType(T_boolean, Op_orAss, T_boolean, code);
-
+
code.append("\t// " + fTypeName[T_boolean] + " " + opSymbol[Op_andAss] + " " + fTypeName[T_boolean] + "\n" +
"\n");
genTestTypeAssignmentOpType(T_boolean, Op_andAss, T_boolean, code);
-
+
code.append("\t// " + fTypeName[T_boolean] + " " + opSymbol[Op_xorAss] + " " + fTypeName[T_boolean] + "\n" +
"\n");
genTestTypeAssignmentOpType(T_boolean, Op_xorAss, T_boolean, code);
-
+
createJavaFile(className, "EvalSimpleTests", 37, 1, false, code);
}
-
+
public static void genTestsStringPlusAssignmentOpAllTypes() throws Exception {
-
+
StringBuffer code = new StringBuffer();
-
+
String className = "StringPlusAssignmentOpTests";
-
+
code.append("\t// " + fTypeName[T_String] + " " + opSymbol[Op_plusAss] + " {" + fTypeName[T_byte] + ", " + fTypeName[T_char] + ", " + fTypeName[T_short] + ", " + fTypeName[T_int] + ", " + fTypeName[T_long] + ", " + fTypeName[T_String] + ", " + fTypeName[T_null] + "}\n" +
"\n");
@@ -361,15 +361,15 @@
genTestTypeAssignmentOpType(T_String, Op_plusAss, T_double, code);
genTestTypeAssignmentOpType(T_String, Op_plusAss, T_String, code);
genTestTypeAssignmentOpType(T_String, Op_plusAss, T_null, code);
-
+
createJavaFile(className, "EvalSimpleTests", 37, 1, true, false, code);
}
-
+
public static void genTestsNumericTypeCast() throws Exception {
StringBuffer code = new StringBuffer();
-
+
String className = "NumericTypesCastTests";
-
+
genTestsNumericTypeCast(T_byte, code);
genTestsNumericTypeCast(T_char, code);
genTestsNumericTypeCast(T_short, code);
@@ -377,15 +377,15 @@
genTestsNumericTypeCast(T_long, code);
genTestsNumericTypeCast(T_float, code);
genTestsNumericTypeCast(T_double, code);
-
+
createJavaFile(className, "EvalSimpleTests", 15, 1, false, code);
}
-
+
public static void genTestsAllIntegerTypesAllXfixOps() throws Exception {
StringBuffer code = new StringBuffer();
-
+
String className = "XfixOperatorsTests";
-
+
genTestsNumericTypeAllXfixOps(T_byte, code);
genTestsNumericTypeAllXfixOps(T_char, code);
genTestsNumericTypeAllXfixOps(T_short, code);
@@ -393,15 +393,15 @@
genTestsNumericTypeAllXfixOps(T_long, code);
genTestsNumericTypeAllXfixOps(T_float, code);
genTestsNumericTypeAllXfixOps(T_double, code);
-
+
createJavaFile(className, "EvalSimpleTests", 37, 1, false, code);
}
-
+
public static void genTestsQualifiedFieldValue() throws Exception {
StringBuffer code = new StringBuffer();
-
+
String className = "QualifiedFieldValueTests";
-
+
genTestFieldValue(T_byte, 0, code);
genTestFieldValue(T_char, 0, code);
genTestFieldValue(T_short, 0, code);
@@ -414,12 +414,12 @@
createJavaFile(className, "EvalTypeTests", 73, 1, true, code);
}
-
+
public static void genTestsQualifiedStaticFieldValue() throws Exception {
StringBuffer code = new StringBuffer();
-
+
String className = "QualifiedStaticFieldValueTests";
-
+
genTestStaticFieldValue(T_byte, 0, code);
genTestStaticFieldValue(T_char, 0, code);
genTestStaticFieldValue(T_short, 0, code);
@@ -433,9 +433,9 @@
createJavaFile(className, "EvalTypeTests", 73, 1, true, code);
code = new StringBuffer();
-
+
className = "QualifiedStaticFieldValueTests2";
-
+
genTestStaticFieldValue(T_byte, 1, code);
genTestStaticFieldValue(T_char, 1, code);
genTestStaticFieldValue(T_short, 1, code);
@@ -448,12 +448,12 @@
createJavaFile(className, "EvalTypeTests", 73, 1, true, code);
}
-
+
public static void genTestsFieldValue() throws Exception {
StringBuffer code = new StringBuffer();
-
+
String className = "FieldValueTests";
-
+
genTestFieldValue(T_byte, 2, code);
genTestFieldValue(T_char, 2, code);
genTestFieldValue(T_short, 2, code);
@@ -466,12 +466,12 @@
createJavaFile(className, "EvalTypeTests", 63, 2, true, code);
}
-
+
public static void genTestsStaticFieldValue() throws Exception {
StringBuffer code = new StringBuffer();
-
+
String className = "StaticFieldValueTests";
-
+
genTestStaticFieldValue(T_byte, 2, code);
genTestStaticFieldValue(T_char, 2, code);
genTestStaticFieldValue(T_short, 2, code);
@@ -485,15 +485,15 @@
createJavaFile(className, "EvalTypeTests", 63, 2, true, code);
className = "StaticFieldValueTests2";
-
+
createJavaFile(className, "EvalTypeTests", 67, 2, true, code);
}
-
+
public static void genTestsArrayValue() throws Exception {
StringBuffer code = new StringBuffer();
-
+
String className = "ArrayValueTests";
-
+
genTestArrayLength(T_byte, code);
genTestArrayLength(T_char, code);
genTestArrayLength(T_short, code);
@@ -516,12 +516,12 @@
createJavaFile(className, "EvalArrayTests", 37, 1, true, code);
}
-
+
public static void genTestsArrayAssignment() throws Exception {
StringBuffer code = new StringBuffer();
-
+
String className = "ArrayAssignmentTests";
-
+
genTestArrayAssignment(T_byte, code);
genTestArrayAssignment(T_char, code);
genTestArrayAssignment(T_short, code);
@@ -534,12 +534,12 @@
createJavaFile(className, "EvalArrayTests", 37, 1, true, code);
}
-
+
public static void genTestsArrayAllocation() throws Exception {
StringBuffer code = new StringBuffer();
-
+
String className = "ArrayAllocationTests";
-
+
genTestArrayAllocation(T_byte, code);
genTestArrayAllocation(T_char, code);
genTestArrayAllocation(T_short, code);
@@ -552,12 +552,12 @@
createJavaFile(className, "EvalArrayTests", 37, 1, false, code);
}
-
+
public static void genTestsArrayInitialization() throws Exception {
StringBuffer code = new StringBuffer();
-
+
String className = "ArrayInitializationTests";
-
+
genTestArrayInitialization(T_byte, code);
genTestArrayInitialization(T_char, code);
genTestArrayInitialization(T_short, code);
@@ -571,12 +571,12 @@
createJavaFile(className, "EvalArrayTests", 37, 1, true, code);
}
//----------------------------
-
+
public static void genTestsNumericTypeArithmeticOpNumericTypes(int type, int op, StringBuffer code) {
-
+
code.append("\t// " + fTypeName[type] + " " + opSymbol[op] + " {" + fTypeName[T_byte] + ", " + fTypeName[T_char] + ", " + fTypeName[T_short] + ", " + fTypeName[T_int] + ", " + fTypeName[T_long] + ", " + fTypeName[T_float] + ", " + fTypeName[T_double] + "}\n" +
"\n");
-
+
genTestTypeBinaryOpTypeBinaryPromotion(type, op, T_byte, code);
genTestTypeBinaryOpTypeBinaryPromotion(type, op, T_char, code);
genTestTypeBinaryOpTypeBinaryPromotion(type, op, T_short, code);
@@ -584,14 +584,14 @@
genTestTypeBinaryOpTypeBinaryPromotion(type, op, T_long, code);
genTestTypeBinaryOpTypeBinaryPromotion(type, op, T_float, code);
genTestTypeBinaryOpTypeBinaryPromotion(type, op, T_double, code);
-
+
}
-
+
public static void genTestsNumericTypeComparisonOpNumericTypes(int type, int op, StringBuffer code) {
-
+
code.append("\t// " + fTypeName[type] + " " + opSymbol[op] + " {" + fTypeName[T_byte] + ", " + fTypeName[T_char] + ", " + fTypeName[T_short] + ", " + fTypeName[T_int] + ", " + fTypeName[T_long] + ", " + fTypeName[T_float] + ", " + fTypeName[T_double] + "}\n" +
"\n");
-
+
genTestTypeBinaryOpTypeBooleanResult(type, op, T_byte, code);
genTestTypeBinaryOpTypeBooleanResult(type, op, T_char, code);
genTestTypeBinaryOpTypeBooleanResult(type, op, T_short, code);
@@ -599,35 +599,35 @@
genTestTypeBinaryOpTypeBooleanResult(type, op, T_long, code);
genTestTypeBinaryOpTypeBooleanResult(type, op, T_float, code);
genTestTypeBinaryOpTypeBooleanResult(type, op, T_double, code);
-
+
}
-
+
public static void genTestsIntegerTypeShiftOpIntegerTypes(int type, int op, StringBuffer code) {
-
+
code.append("\t// " + fTypeName[type] + " " + opSymbol[op] + " {" + fTypeName[T_byte] + ", " + fTypeName[T_char] + ", " + fTypeName[T_short] + ", " + fTypeName[T_int] + ", " + fTypeName[T_long] + "}\n" +
"\n");
-
+
genTestTypeBinaryOpTypeUnaryPromotion(type, op, T_byte, code);
genTestTypeBinaryOpTypeUnaryPromotion(type, op, T_char, code);
genTestTypeBinaryOpTypeUnaryPromotion(type, op, T_short, code);
genTestTypeBinaryOpTypeUnaryPromotion(type, op, T_int, code);
genTestTypeBinaryOpTypeUnaryPromotion(type, op, T_long, code);
-
+
}
-
+
public static void genTestsIntegerTypeBooleanOpIntegerTypes(int type, int op, StringBuffer code) {
-
+
code.append("\t// " + fTypeName[type] + " " + opSymbol[op] + " {" + fTypeName[T_byte] + ", " + fTypeName[T_char] + ", " + fTypeName[T_short] + ", " + fTypeName[T_int] + ", " + fTypeName[T_long] + "}\n" +
"\n");
-
+
genTestTypeBinaryOpTypeBinaryPromotion(type, op, T_byte, code);
genTestTypeBinaryOpTypeBinaryPromotion(type, op, T_char, code);
genTestTypeBinaryOpTypeBinaryPromotion(type, op, T_short, code);
genTestTypeBinaryOpTypeBinaryPromotion(type, op, T_int, code);
genTestTypeBinaryOpTypeBinaryPromotion(type, op, T_long, code);
-
+
}
-
+
public static void genTestsNumericTypeArithmeticAssignmentOpNumericTypes(int type, int op, StringBuffer code) {
code.append("\t// " + fTypeName[type] + " " + opSymbol[op] + " {" + fTypeName[T_byte] + ", " + fTypeName[T_char] + ", " + fTypeName[T_short] + ", " + fTypeName[T_int] + ", " + fTypeName[T_long] + ", " + fTypeName[T_float] + ", " + fTypeName[T_double] + "}\n" +
@@ -642,7 +642,7 @@
genTestTypeAssignmentOpType(type, op, T_double, code);
}
-
+
public static void genTestsIntegerTypeArithmeticAssignmentOpIntegerTypes(int type, int op, StringBuffer code) {
code.append("\t// " + fTypeName[type] + " " + opSymbol[op] + " {" + fTypeName[T_byte] + ", " + fTypeName[T_char] + ", " + fTypeName[T_short] + ", " + fTypeName[T_int] + ", " + fTypeName[T_long] + ", " + fTypeName[T_float] + ", " + fTypeName[T_double] + "}\n" +
@@ -655,12 +655,12 @@
genTestTypeAssignmentOpType(type, op, T_long, code);
}
-
+
public static void genTestsNumericTypeCast(int type, StringBuffer code) {
-
+
code.append("\t// (" + fTypeName[type] + ") {" + fTypeName[T_byte] + ", " + fTypeName[T_char] + ", " + fTypeName[T_short] + ", " + fTypeName[T_int] + ", " + fTypeName[T_long] + ", " + fTypeName[T_float] + ", " + fTypeName[T_double] + "}\n" +
"\n");
-
+
genTestNumericTypeCast(type, T_byte, code);
genTestNumericTypeCast(type, T_char, code);
genTestNumericTypeCast(type, T_short, code);
@@ -668,31 +668,31 @@
genTestNumericTypeCast(type, T_long, code);
genTestNumericTypeCast(type, T_float, code);
genTestNumericTypeCast(type, T_double, code);
-
+
}
public static void genTestsNumericTypeAllXfixOps(int type, StringBuffer code) {
-
+
code.append("\t// {" + opSymbol[Op_prefixPlusPlus] + ", " + opSymbol[Op_prefixMinusMinus] + "} " + fTypeName[type] + "\n" +
"\t// " + fTypeName[type] + " {" + opSymbol[Op_postfixPlusPlus] + ", " + opSymbol[Op_postfixMinusMinus] + "}\n" +
"\n");
-
+
genTestNumericTypePrefixOp(type, Op_prefixPlusPlus, code);
genTestNumericTypePrefixOp(type, Op_prefixMinusMinus, code);
genTestNumericTypePostfixOp(type, Op_postfixPlusPlus, code);
genTestNumericTypePostfixOp(type, Op_postfixMinusMinus, code);
}
-
+
//----------------------------
public static void genTestTypeBinaryOpTypeBinaryPromotion(int type1, int op, int type2, StringBuffer code) {
-
+
int promotedType = getPromotionType(type1, type2);
-
+
String t1UName = typeUpperName[type1];
String t2UName = typeUpperName[type2];
String oUName = opUpperName[op];
-
+
code.append("\tpublic void test" + t1UName + oUName + t2UName + "() throws Throwable {\n");
tryBlockBegin(code);
genCodeBinaryOp(type1, op, type2, promotedType, 0, 1, true, code);
@@ -703,13 +703,13 @@
}
public static void genTestTypeBinaryOpTypeBooleanResult(int type1, int op, int type2, StringBuffer code) {
-
+
int promotedType = T_boolean;
-
+
String t1UName = typeUpperName[type1];
String t2UName = typeUpperName[type2];
String oUName = opUpperName[op];
-
+
code.append("\tpublic void test" + t1UName + oUName + t2UName + "() throws Throwable {\n");
tryBlockBegin(code);
genCodeBinaryOp(type1, op, type2, promotedType, 0, 1, true, code);
@@ -723,13 +723,13 @@
}
public static void genTestTypeBinaryOpTypeUnaryPromotion(int type1, int op, int type2, StringBuffer code) {
-
+
int promotedType = getUnaryPromotionType(type1);
-
+
String t1UName = typeUpperName[type1];
String t2UName = typeUpperName[type2];
String oUName = opUpperName[op];
-
+
code.append("\tpublic void test" + t1UName + oUName + t2UName + "() throws Throwable {\n");
tryBlockBegin(code);
genCodeBinaryOp(type1, op, type2, promotedType, 0, 1, true, code);
@@ -738,17 +738,17 @@
tryBlockEnd(code);
code.append("\t}\n\n");
}
-
+
public static void genTestBooleanBinaryOpBoolean(int op, StringBuffer code) {
-
+
int type = T_boolean;
-
+
String uName = typeUpperName[type];
String oUName = opUpperName[op];
-
+
code.append("\t// " + fTypeName[type] + " " + opSymbol[op] + " " + fTypeName[type] + "\n" +
"\n");
-
+
code.append("\tpublic void test" + uName + oUName + uName + "() throws Throwable {\n");
tryBlockBegin(code);
genCodeBinaryOp(type, op, type, type, 0, 0, true, code);
@@ -764,17 +764,17 @@
}
public static void genTestUnaryOpNumericType(int type, int op, StringBuffer code) {
-
+
int promotedType = getUnaryPromotionType(type);
-
+
String tName = fTypeName[type];
String tUName = typeUpperName[type];
String oSymbol = opSymbol[op];
String oUName = opUpperName[op];
-
+
code.append("\t// " + oSymbol + " " + tName + "\n" +
"\n");
-
+
code.append("\tpublic void test" + oUName + tUName + "() throws Throwable {\n");
tryBlockBegin(code);
genCodeUnaryOp(type, op, promotedType, 0, true, code);
@@ -785,15 +785,15 @@
}
public static void genTestUnaryOpBoolean(int op, StringBuffer code) {
-
+
int type = T_boolean;
-
+
String uName = typeUpperName[type];
String oUName = opUpperName[op];
-
+
code.append("\t// " + opSymbol[op] + " " + fTypeName[type] + "\n" +
"\n");
-
+
code.append("\tpublic void test" + oUName + uName + "() throws Throwable {\n");
tryBlockBegin(code);
genCodeUnaryOp(type, op, type, 0, true, code);
@@ -806,7 +806,7 @@
public static void genTestLocalVarValue(int type, StringBuffer code ) {
String tUName = typeUpperName[type];
-
+
code.append("\tpublic void test" + tUName + "() throws Throwable {\n");
tryBlockBegin(code);
genCodeLocalVarValue(type, 0, true, code);
@@ -815,10 +815,10 @@
tryBlockEnd(code);
code.append("\t}\n\n");
}
-
+
public static void genTestLocalVarAssignment(int type, StringBuffer code) {
String tUName = typeUpperName[type];
-
+
code.append("\tpublic void test" + tUName + "() throws Throwable {\n");
tryBlockBegin(code);
genCodeLocalVarAssignment(type, 0, 0, true, code);
@@ -831,13 +831,13 @@
tryBlockEnd(code);
code.append("\t}\n\n");
}
-
+
public static void genTestTypeAssignmentOpType(int type1, int op, int type2, StringBuffer code) {
-
+
String t1UName = typeUpperName[type1];
String t2UName = typeUpperName[type2];
String oUName = opUpperName[op];
-
+
code.append("\tpublic void test" + t1UName + oUName + t2UName + "() throws Throwable {\n");
tryBlockBegin(code);
genCodeSetTmp("tmp" + fVariable[0], type1, Op_equal, fVariable[0] + t1UName + "Value", true, code);
@@ -856,12 +856,12 @@
tryBlockEnd(code);
code.append("\t}\n\n");
}
-
+
public static void genTestNumericTypeCast(int type1, int type2, StringBuffer code) {
-
+
String t1UName = typeUpperName[type1];
String t2UName = typeUpperName[type2];
-
+
code.append("\tpublic void test" + t1UName + "Cast" + t2UName + "() throws Throwable {\n");
tryBlockBegin(code);
genCodeCast(type1, type2, 0, true, code);
@@ -869,9 +869,9 @@
genCodeCast(type1, type2, 1, false, code);
tryBlockEnd(code);
code.append("\t}\n\n");
-
+
}
-
+
public static void genTestNumericTypePrefixOp(int type, int op, StringBuffer code) {
String tUName = typeUpperName[type];
@@ -902,7 +902,7 @@
public static void genTestFieldValue(int type, int prefix, StringBuffer code ) {
String tUName = typeUpperName[type];
-
+
code.append("\tpublic void test" + tUName + "FieldValue() throws Throwable {\n");
tryBlockBegin(code);
genCodeFieldValue(type, 0, prefix, true, code);
@@ -911,10 +911,10 @@
tryBlockEnd(code);
code.append("\t}\n\n");
}
-
+
public static void genTestStaticFieldValue(int type, int prefix, StringBuffer code ) {
String tUName = typeUpperName[type];
-
+
code.append("\tpublic void test" + tUName + "StaticFieldValue() throws Throwable {\n");
tryBlockBegin(code);
genCodeFieldValue(type, 2, prefix, true, code);
@@ -923,10 +923,10 @@
tryBlockEnd(code);
code.append("\t}\n\n");
}
-
+
public static void genTestArrayValue(int type, StringBuffer code ) {
String tUName = typeUpperName[type];
-
+
code.append("\tpublic void test" + tUName + "ArrayValue() throws Throwable {\n");
tryBlockBegin(code);
genCodeArrayValue(type, 2, 0, true, code);
@@ -943,10 +943,10 @@
tryBlockEnd(code);
code.append("\t}\n\n");
}
-
+
public static void genTestArrayLength(int type, StringBuffer code ) {
String tUName = typeUpperName[type];
-
+
code.append("\tpublic void test" + tUName + "ArrayLength() throws Throwable {\n");
tryBlockBegin(code);
genCodeArrayLength(type, 2, true, code);
@@ -955,10 +955,10 @@
tryBlockEnd(code);
code.append("\t}\n\n");
}
-
+
public static void genTestArrayAssignment(int type, StringBuffer code ) {
String tUName = typeUpperName[type];
-
+
code.append("\tpublic void test" + tUName + "ArrayAssignment() throws Throwable {\n");
tryBlockBegin(code);
genCodeArrayAssignment(type, 2, 0, 0, true, code);
@@ -975,10 +975,10 @@
tryBlockEnd(code);
code.append("\t}\n\n");
}
-
+
public static void genTestArrayAllocation(int type, StringBuffer code) {
String tUName = typeUpperName[type];
-
+
code.append("\tpublic void test" + tUName + "ArrayAllocation() throws Throwable {\n");
tryBlockBegin(code);
genCodeArrayAllocation(type, 2, 0, true, code);
@@ -990,7 +990,7 @@
public static void genTestArrayInitialization(int type, StringBuffer code) {
String tUName = typeUpperName[type];
-
+
code.append("\tpublic void test" + tUName + "ArrayAllocation() throws Throwable {\n");
tryBlockBegin(code);
genCodeArrayInitialization(type, 2, true, code);
@@ -1003,7 +1003,7 @@
//-------------------------------
public static void genCodeBinaryOp(int type1, int op, int type2, int resultType, int var1, int var2, boolean first, StringBuffer code) {
-
+
String t1Name = fTypeName[type1];
String t1UName = typeUpperName[type1];
String t2Name = fTypeName[type2];
@@ -1014,7 +1014,7 @@
String oSymbol = opSymbol[op];
String v1Name = immediate[var1];
String v2Name = immediate[var2];
-
+
genCodeEval(v1Name + t1UName + " + " + oName + "Op + " + v2Name + t2UName, first, code);
genCodeReturnTypeCheck(t1Name + " " + oName + " " + t2Name, resName, first, code);
switch (resultType) {
@@ -1032,7 +1032,7 @@
}
public static void genCodeUnaryOp(int type, int op, int resultType, int var, boolean first, StringBuffer code) {
-
+
String tName = fTypeName[type];
String tUName = typeUpperName[type];
String resName = fTypeName[resultType];
@@ -1049,7 +1049,7 @@
genCodeReturnValueCheckPrimitiveType(oName + " " + tName, resName, resUName, oSymbol + " " + vName + tUName + "Value", first, code);
}
}
-
+
public static void genCodeLocalVarValue(int type, int var, boolean first, StringBuffer code) {
String tUName = typeUpperName[type];
String vName = fVariable[var];
@@ -1058,7 +1058,7 @@
}
public static void genCodeLocalVarValue(int type, int var, String referenceExpression, boolean first, StringBuffer code) {
-
+
String tName = fTypeName[type];
String tUName = typeUpperName[type];
String vName = fVariable[var];
@@ -1078,9 +1078,9 @@
break;
}
}
-
+
public static void genCodeLocalVarAssignment(int type, int var, int imm, boolean first, StringBuffer code) {
-
+
String tName = fTypeName[type];
String tUName = typeUpperName[type];
String vName = fVariable[var];
@@ -1103,7 +1103,7 @@
}
genCodeLocalVarValue(type, var, iName + tUName + "Value", false, code);
}
-
+
public static void genCodeAssignmentOp(int type1, int op, int type2, int var, int imm, boolean first, StringBuffer code) {
String t1Name = fTypeName[type1];
String t1UName = typeUpperName[type1];
@@ -1112,7 +1112,7 @@
String oName = opName[op];
String vName = fVariable[var];
String iName = immediate[imm];
-
+
genCodeEval(vName + t1UName + " + " + oName + "Op + " + iName + t2UName, first, code);
genCodeReturnTypeCheck(t1Name + " " + oName + " " + t2Name, t1Name, first, code);
switch (type1) {
@@ -1129,7 +1129,7 @@
}
genCodeLocalVarValue(type1, var, "tmp" + vName, false, code);
}
-
+
public static void genCodeCast(int type1, int type2, int imm, boolean first, StringBuffer code) {
String t1Name = fTypeName[type1];
String t1UName = typeUpperName[type1];
@@ -1145,14 +1145,14 @@
genCodeReturnValueCheckPrimitiveType("(" + t1Name + ") " + t2Name, t1Name, t1UName, (needCast(type1, type2) ? "( " + t1Name + ") " : IInternalDebugCoreConstants.EMPTY_STRING) + iName + t2UName + "Value", first, code);
}
}
-
+
public static void genCodePrefixOp(int type, int op, int var, boolean first, StringBuffer code) {
String tName = fTypeName[type];
String tUName = typeUpperName[type];
String vName = fVariable[var];
String oName = opName[op];
String oSymbol = opSymbol[op];
-
+
genCodeSetTmp("tmp" + vName, type, Op_equal, vName + tUName + "Value", true, code);
genCodeEval(oName + "Op + " + vName + tUName, first, code);
genCodeReturnTypeCheck(oName + " " + tName, tName, first, code);
@@ -1163,14 +1163,14 @@
}
genCodeLocalVarValue(type, var, "tmp" + vName, false, code);
}
-
+
public static void genCodePostfixOp(int type, int op, int var, boolean first, StringBuffer code) {
String tName = fTypeName[type];
String tUName = typeUpperName[type];
String vName = fVariable[var];
String oName = opName[op];
String oSymbol = opSymbol[op];
-
+
genCodeSetTmp("tmp" + vName, type, Op_equal, vName + tUName + "Value", true, code);
genCodeEval(vName + tUName + " + " + oName + "Op", first, code);
genCodeReturnTypeCheck(tName + " " + oName, tName, first, code);
@@ -1181,7 +1181,7 @@
}
genCodeLocalVarValue(type, var, "tmp" + vName, false, code);
}
-
+
public static void genCodeFieldValue(int type, int var, int prefix, boolean first, StringBuffer code) {
String tUName = typeUpperName[type];
String fName = field[var];
@@ -1190,7 +1190,7 @@
}
public static void genCodeFieldValue(int type, int var, int prefix, String referenceExpression, boolean first, StringBuffer code) {
-
+
String tName = fTypeName[type];
String tUName = typeUpperName[type];
String fName = field[var];
@@ -1211,18 +1211,18 @@
break;
}
}
-
+
public static void genCodeArrayLength(int type, int var, boolean first, StringBuffer code) {
-
+
String tUName = typeUpperName[type];
String vName = fVariable[var];
-
+
genCodeArrayLength(type, var, vName + tUName + "Value.length", first, code);
-
+
}
public static void genCodeArrayLength(int type, int var, String referenceExpression, boolean first, StringBuffer code) {
-
+
String tName = fTypeName[type];
String tUName = typeUpperName[type];
String vName = fVariable[var];
@@ -1231,9 +1231,9 @@
genCodeReturnTypeCheck(tName + " array length", fTypeName[T_int], first,code);
genCodeReturnValueCheckPrimitiveType(tName + " array length", fTypeName[T_int], typeUpperName[T_int], referenceExpression, first, code);
}
-
+
public static void genCodeArrayValue(int type, int var, int index, boolean first, StringBuffer code) {
-
+
String tUName = typeUpperName[type];
String vName = fVariable[var];
@@ -1241,7 +1241,7 @@
}
public static void genCodeArrayValue(int type, int var, int index, String referenceExpression, boolean first, StringBuffer code) {
-
+
String tName = fTypeName[type];
String tUName = typeUpperName[type];
String vName = fVariable[var];
@@ -1261,9 +1261,9 @@
break;
}
}
-
+
public static void genCodeArrayAssignment(int type, int var, int index, int imm, boolean first, StringBuffer code) {
-
+
String tName = fTypeName[type];
String tUName = typeUpperName[type];
String vName = fVariable[var];
@@ -1286,7 +1286,7 @@
}
genCodeArrayValue(type, var, index, iName + tUName + "Value", false, code);
}
-
+
public static void genCodeArrayAllocation(int type, int var, int dim, boolean first, StringBuffer code) {
String tName = fTypeName[type];
String tUName = typeUpperName[type];
@@ -1309,7 +1309,7 @@
String vName = fVariable[var];
String oName = opName[Op_equal];
String i1Name = immediate[(var + 1) % 2];
-
+
String value = IInternalDebugCoreConstants.EMPTY_STRING;
boolean f = true;
for (int i = 0; i < var; i ++) {
@@ -1334,18 +1334,18 @@
genCodeArrayValue(type, var, i, immediate[i % 2] + tUName + "Value", false, code);
}
}
-
+
//----------------------------
-
+
public static void genCodeEval(String expression, boolean first, StringBuffer code) {
code.append("\t\t" + ((first)? "IValue " : IInternalDebugCoreConstants.EMPTY_STRING) + "value = eval(" + expression + ");\n");
}
-
+
public static void genCodeReturnTypeCheck(String test, String typeName, boolean first, StringBuffer code) {
code.append("\t\t" + ((first)? "String " : IInternalDebugCoreConstants.EMPTY_STRING) + "typeName = value.getReferenceTypeName();\n" +
"\t\tassertEquals(\"" + test + " : wrong type : \", \"" + typeName + "\", typeName);\n");
}
-
+
public static void genCodeReturnValueCheckPrimitiveType(String test, String resType, String uResType, String referenceExpression, boolean first, StringBuffer code) {
code.append("\t\t" + ((first)? resType + " " : IInternalDebugCoreConstants.EMPTY_STRING) + resType + "Value = ((IJavaPrimitiveValue)value).get" + uResType + "Value();\n" +
"\t\tassertEquals(\"" + test + " : wrong result : \", " + referenceExpression + ", " + resType+ "Value);\n");
@@ -1369,8 +1369,8 @@
public static void genCodeSetTmp(String varName, int type, int op, String value, boolean init , StringBuffer code) {
code.append("\t\t" + ((init)? fTypeName[type] + " " : IInternalDebugCoreConstants.EMPTY_STRING) + varName + " " + opSymbol[op] + " " + value + ";\n");
}
-
-
+
+
public static void tryBlockBegin(StringBuffer code) {
code.append("\t\ttry {\n\t\tinit();\n");
}
@@ -1384,11 +1384,11 @@
public static void createJavaFile(String className, String testClass, int breakPointLine, int frameNumber, boolean importJDIObjectValue, StringBuffer tests) throws Exception {
createJavaFile(className, testClass, breakPointLine, frameNumber, importJDIObjectValue, true, tests);
}
-
+
public static void createJavaFile(String className, String testClass, int breakPointLine, int frameNumber, boolean importJDIObjectValue, boolean importIJavaPrimitiveValue, StringBuffer tests) throws Exception {
-
+
StringBuffer code = new StringBuffer();
-
+
code.append("/*******************************************************************************\n");
code.append(" * Copyright (c) 2002, 2003 IBM Corporation and others.\n");
code.append(" * All rights reserved. This program and the accompanying materials \n");
@@ -1401,7 +1401,7 @@
code.append(" *******************************************************************************/\n");
code.append("package org.eclipse.jdt.debug.tests.eval;\n\n" +
"import org.eclipse.debug.core.model.IValue;\n");
-
+
if (importIJavaPrimitiveValue) {
code.append("import org.eclipse.jdt.debug.core.IJavaPrimitiveValue;\n");
}
@@ -1422,14 +1422,14 @@
"\tprotected void end() throws Exception {\n" +
"\t\tdestroyFrame();\n" +
"\t}\n\n");
-
+
code.append(tests);
-
+
code.append("\n}\n");
-
+
try (Writer file = new FileWriter(new File(className + ".java").getAbsoluteFile())) {
file.write(code.toString());
}
-
+
}
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/generator/TypeHierarchyTestsGenerator.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/generator/TypeHierarchyTestsGenerator.java
index 8b00b30..aa38e5a 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/generator/TypeHierarchyTestsGenerator.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/generator/TypeHierarchyTestsGenerator.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -33,10 +33,10 @@
static int N_A= 12;
static int N_B= 13;
static int N_C= 14;
-
+
static int SUPER_A= 15;
static int SUPER_B= 16;
-
+
static int M1= 0;
static int M2= 1;
static int S2= 2;
@@ -46,13 +46,13 @@
static int M5= 6;
static int M6= 7;
static int S6= 8;
-
+
static String[] qualifiers= new String[] {
"iaa", "iab", "iac", "aa", "ab", "ac", "ibb", "ibc", "bb", "bc",
"icc", "cc", "new A()", "new B()", "new C()" ,"super" , "super"};
-
+
static String[] methods= new String[] {"m1", "m2", "s2", "m3", "m4", "s4", "m5", "m6", "s6"};
-
+
static int[] staticLevel= new int[] {
0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
2, 2, 0, 1, 2, 0, 1};
@@ -60,7 +60,7 @@
static int[] instanceLevel= new int[] {
0, 1, 2, 0, 1, 2, 1, 2, 1, 2,
2, 2, 0, 1, 2, 0, 1};
-
+
static int[][] values= new int[][] {
{ 1, 2, 9},
{ 11, 22, 99, 33, 44, 88},
@@ -79,13 +79,13 @@
gen_cc_testA();
gen_cc_testB();
gen_cc_testC();
-
+
System.out.println("done");
}
-
+
public static void gen_main() throws Exception {
StringBuffer code= new StringBuffer();
-
+
createTestQualifier(IAA, M1, code);
createTestQualifier(IAB, M1, code);
createTestQualifier(IAC, M1, code);
@@ -126,7 +126,7 @@
createTestQualifier(CC, M5, code);
createTestQualifier(CC, M6, code);
createTestQualifier(CC, S6, code);
-
+
createTestQualifier(N_A, M1, code);
createTestQualifier(N_A, M2, code);
createTestQualifier(N_A, S2, code);
@@ -148,12 +148,12 @@
createJavaFile(code, 146, 1, 1);
}
-
+
public static void gen_aa_testA() throws Exception {
StringBuffer code= new StringBuffer();
createTest_TestA(code, AA);
-
+
createJavaFile(code, 32, 2, 1);
}
@@ -161,7 +161,7 @@
StringBuffer code= new StringBuffer();
createTest_TestA(code, AB);
-
+
createJavaFile(code, 32, 2, 2);
}
@@ -169,7 +169,7 @@
StringBuffer code= new StringBuffer();
createTest_TestA(code, AC);
-
+
createJavaFile(code, 32, 2, 3);
}
@@ -177,7 +177,7 @@
StringBuffer code= new StringBuffer();
createTest_TestA(code, BB);
-
+
createJavaFile(code, 32, 2, 4);
}
@@ -185,7 +185,7 @@
StringBuffer code= new StringBuffer();
createTest_TestA(code, BC);
-
+
createJavaFile(code, 32, 2, 5);
}
@@ -193,7 +193,7 @@
StringBuffer code= new StringBuffer();
createTest_TestA(code, CC);
-
+
createJavaFile(code, 32, 2, 6);
}
@@ -201,7 +201,7 @@
StringBuffer code= new StringBuffer();
createTest_TestB(code, BB);
-
+
createJavaFile(code, 68, 2, 1);
}
@@ -209,7 +209,7 @@
StringBuffer code= new StringBuffer();
createTest_TestB(code, BC);
-
+
createJavaFile(code, 68, 2, 2);
}
@@ -217,7 +217,7 @@
StringBuffer code= new StringBuffer();
createTest_TestB(code, CC);
-
+
createJavaFile(code, 68, 2, 3);
}
@@ -225,11 +225,11 @@
StringBuffer code= new StringBuffer();
createTest_TestC(code, CC);
-
+
createJavaFile(code, 119, 2, 1);
}
- //-------------
+ //-------------
public static void createTest_TestA(StringBuffer code, int qualifier) {
createTest(instanceLevel[qualifier], M1, code);
@@ -270,7 +270,7 @@
String strMethod= methods[method];
code.append("\tpublic void testEvalNestedTypeTest_" + strMethod + "() throws Throwable {\n");
tryBlockBegin(code);
-
+
genCodeEval("\"" + strMethod + "()\"", true, code);
genCodeReturnTypeCheck(strMethod, "int", true, code);
genCodeReturnValueCheckPrimitiveType(strMethod, "int", "Int", IInternalDebugCoreConstants.EMPTY_STRING + values[level][method], true, code);
@@ -278,8 +278,8 @@
tryBlockEnd(code);
code.append("\t}\n\n");
}
-
-
+
+
public static void createTestQualifier(int qualifier, int method, StringBuffer code) {
String strQualifier= qualifiers[qualifier];
String nameQualifier= strQualifier.replace('(', '_').replace(')', '_').replace(' ', '_');
@@ -287,7 +287,7 @@
int[] level= ((method + 1) % 3 == 0) ? staticLevel : instanceLevel;
code.append("\tpublic void testEvalNestedTypeTest_" + nameQualifier + "_" + strMethod + "() throws Throwable {\n");
tryBlockBegin(code);
-
+
genCodeEval("\"" + strQualifier + "." + strMethod + "()\"", true, code);
genCodeReturnTypeCheck(strQualifier + "." + strMethod, "int", true, code);
genCodeReturnValueCheckPrimitiveType(strQualifier + "." + strMethod, "int", "Int", IInternalDebugCoreConstants.EMPTY_STRING + values[level[qualifier]][method], true, code);
@@ -295,14 +295,14 @@
tryBlockEnd(code);
code.append("\t}\n\n");
}
-
+
//------------
-
-
+
+
public static void createJavaFile(StringBuffer tests, int lineNumber, int numberFrames, int hitCount) throws Exception {
-
+
StringBuffer code= new StringBuffer();
-
+
code.append("/*******************************************************************************\n");
code.append(" * Copyright (c) 2002, 2003 IBM Corporation and others.\n");
code.append(" * All rights reserved. This program and the accompanying materials \n");
@@ -330,14 +330,14 @@
code.append("\tprotected void end() throws Exception {\n");
code.append("\t\tdestroyFrame();\n");
code.append("\t}\n\n");
-
+
code.append(tests.toString());
-
+
code.append("}\n");
-
+
try (Writer file = new FileWriter(new File("TypeHierarchy_" + lineNumber + "_" + hitCount + ".java").getAbsoluteFile())) {
file.write(code.toString());
}
-
+
}
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/ConfigurationEncodingTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/ConfigurationEncodingTests.java
index 5b18b41..7efa453 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/ConfigurationEncodingTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/ConfigurationEncodingTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -21,7 +21,7 @@
import org.eclipse.jdt.debug.tests.AbstractDebugTest;
/**
- * Tests for the new capability of getting the file encoding for a launch configuration given a variety of
+ * Tests for the new capability of getting the file encoding for a launch configuration given a variety of
* scenarios
* @since 3.4
*/
@@ -42,7 +42,7 @@
protected Preferences getResourcesPreferences() {
return ResourcesPlugin.getPlugin().getPluginPreferences();
}
-
+
/**
* Returns the default workbench encoding
* @return the default workbench encoding
@@ -50,7 +50,7 @@
protected String getDefaultEncoding() {
return getResourcesPreferences().getDefaultString(ResourcesPlugin.PREF_ENCODING);
}
-
+
/**
* Tests that if no encoding is set on the configuration and there is no encoding changes to the workspace pref
* than the encoding retrieved for the configuration matches the system encoding
@@ -74,7 +74,7 @@
System.setProperty("file.encoding", oldsystemencoding);
}
}
-
+
/**
* Tests that if a specific encoding is set for the workspace and there is no encoding set on the configuration
* than the returned encoding matches the workspace pref
@@ -95,7 +95,7 @@
getResourcesPreferences().setValue(ResourcesPlugin.PREF_ENCODING, (oldencoding == null ? getDefaultEncoding() : oldencoding));
}
}
-
+
/**
* Tests that if a specific encoding is set on the configuration itself that that is the encoding returned
*/
@@ -125,7 +125,7 @@
copy.doSave();
}
}
-
+
/**
* Tests that if there is no specified encoding for the config itself, and there is a mapped resource,
* the encoding will come from the mapped resource (if a specific one is set)
@@ -156,9 +156,9 @@
copy.doSave();
}
}
-
+
/**
- * Tests that if there is no specific encoding set on the config and there is more than one mapped resource,
+ * Tests that if there is no specific encoding set on the config and there is more than one mapped resource,
* the first mapped resource is used to derive the encoding
*/
public void testGetSpecificResourcesEncoding() throws CoreException {
@@ -196,5 +196,5 @@
copy.doSave();
}
}
-
+
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/ConfigurationResourceMappingTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/ConfigurationResourceMappingTests.java
index 4d2265a..a819723 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/ConfigurationResourceMappingTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/ConfigurationResourceMappingTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -29,7 +29,7 @@
public ConfigurationResourceMappingTests(String name) {
super(name);
}
-
+
/**
* Tests that setting the mapped resources to <code>null</code> removes
* the resource mapping
@@ -58,9 +58,9 @@
copy.doSave();
}
}
-
+
/**
- * Tests that setting the resource mapping to an empty array of <code>IResource</code> removes
+ * Tests that setting the resource mapping to an empty array of <code>IResource</code> removes
* the resource mapping
*/
public void testRemovingMappedResources2() throws CoreException {
@@ -87,7 +87,7 @@
copy.doSave();
}
}
-
+
/**
* Tests that a single element array can be set as a mapped resource
*/
@@ -139,5 +139,5 @@
copy.doSave();
}
}
-
+
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/ContributedTabTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/ContributedTabTests.java
index ddc551f..b85f4e5 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/ContributedTabTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/ContributedTabTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -27,7 +27,7 @@
/**
* This test class provides test methods for contributing tabs to a given (existing)
* tab group and their relative placement (if applicable)
- *
+ *
* @since 3.3
*/
public class ContributedTabTests extends AbstractDebugTest {
@@ -39,9 +39,9 @@
public ContributedTabTests(String name) {
super(name);
}
-
+
/**
- * Checks to make sure that all of the contributed tabs to the java tab group are present
+ * Checks to make sure that all of the contributed tabs to the java tab group are present
* @throws CoreException
*/
public void testContributedTab() throws CoreException {
@@ -59,7 +59,7 @@
contribs.add(JavaAlernateModeTab.class);
assertTrue("java tab group should contain all contributed tabs", tabset.containsAll(contribs)); //$NON-NLS-1$
}
-
+
/**
* Checks to make sure that a contributed tab with a relative placement to an existing tab is in the correct place
* @throws CoreException
@@ -81,7 +81,7 @@
assertTrue("The TestTab1 must appear in the tab listing", found);
assertTrue("The TestTab1 must appear after the MainTab", idx > 0); //$NON-NLS-1$
}
-
+
/**
* Checks to see that if a contributor supplies a bad tab id as a placement id that the tab will be added
* to the end of the group
@@ -94,9 +94,9 @@
ILaunchConfigurationTab[] tabs = javagroup.getTabs();
assertTrue("Alternate tab should be the last tab in the group", tabs[tabs.length-1].getClass().equals(JavaAlernateModeTab.class)); //$NON-NLS-1$
}
-
+
/**
- * Checks to see that the two tabs following the arguments tab are TestTab2, and TestTab3. They can be in either order depending
+ * Checks to see that the two tabs following the arguments tab are TestTab2, and TestTab3. They can be in either order depending
* on when they were loaded, so this test only checks that they are the next two following tabs not their order
* @throws CoreException
*/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/LaunchConfigurationManagerTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/LaunchConfigurationManagerTests.java
index bfb1e5f..df7eac9 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/LaunchConfigurationManagerTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/LaunchConfigurationManagerTests.java
@@ -27,19 +27,19 @@
/**
* This class tests all the public methods of the launch configuration manager
- * @since 3.4
+ * @since 3.4
*/
public class LaunchConfigurationManagerTests extends AbstractDebugTest {
private LaunchConfigurationManager fLCM = DebugUIPlugin.getDefault().getLaunchConfigurationManager();
-
+
public LaunchConfigurationManagerTests(String name) {
super(name);
}
/**
* Asserts that the given array of shortcut identifiers appear in the given list of {@link LaunchShortcutExtension}s
- *
+ *
* @param ids the shortcut identifiers
* @param shortcuts the complete list of shortcuts of type {@link LaunchShortcutExtension}
*/
@@ -56,7 +56,7 @@
assertTrue("the launch shortcut "+ids[i]+" was not found", found);
}
}
-
+
/**
* Asserts that the given list of {@link ILaunchConfigurationType} identifiers all appear in the given list of {@link ILaunchConfigurationType} identifiers
* @param ids the list of {@link ILaunchConfigurationType} identifiers
@@ -74,7 +74,7 @@
assertTrue("the launch configuration type "+ids[i]+" was not found", found);
}
}
-
+
/**
* tests that the singleton object returned is always the same
*/
@@ -82,7 +82,7 @@
assertNotNull("The launch configuration manager cannot be null", fLCM);
assertEquals("The retruned instance of the manager should always be the same", fLCM, DebugUIPlugin.getDefault().getLaunchConfigurationManager());
}
-
+
/**
* tests that shortcut extensions are loaded properly by the manager
*/
@@ -91,7 +91,7 @@
List<LaunchShortcutExtension> list = fLCM.getLaunchShortcuts();
assertTrue("The listing of shortcuts cannot be empty", list.size() > 2);
}
-
+
/**
* tests that the java shortcut is found for a resource with a main method
*/
@@ -102,7 +102,7 @@
List<LaunchShortcutExtension> list = fLCM.getLaunchShortcuts(resource);
assertShortcuts(new String[] {"org.eclipse.jdt.debug.ui.localJavaShortcut"}, list);
}
-
+
/**
* tests that the applet shortcut is found for a resource that extends applet
*/
@@ -113,7 +113,7 @@
List<LaunchShortcutExtension> list = fLCM.getLaunchShortcuts(resource);
assertShortcuts(new String[] {"org.eclipse.jdt.debug.ui.javaAppletShortcut"}, list);
}
-
+
/**
* test that the correct shortcuts are returned for a resource which is an applet and has a main method
*/
@@ -124,7 +124,7 @@
List<LaunchShortcutExtension> list = fLCM.getLaunchShortcuts(resource);
assertShortcuts(new String[] {"org.eclipse.jdt.debug.ui.localJavaShortcut", "org.eclipse.jdt.debug.ui.javaAppletShortcut"}, list);
}
-
+
/**
* tests that shortcuts for given categories are returned, in this case the 'testing' category
*/
@@ -133,7 +133,7 @@
List<LaunchShortcutExtension> list = fLCM.getLaunchShortcuts("testing");
assertTrue("there should be the testing shortcut", list.size() == 1);
}
-
+
/**
* tests that a specific launch group can be found given its id
*/
@@ -142,7 +142,7 @@
LaunchGroupExtension ext = fLCM.getLaunchGroup("org.eclipse.debug.ui.launchGroup.run");
assertNotNull("the run launch group should exist", ext);
}
-
+
/**
* tests that a launch group exists for a given configuration and mode,
* in this case we are testing that a group exists for a java application config
@@ -155,7 +155,7 @@
ILaunchGroup group = DebugUITools.getLaunchGroup(configuration, "debug");
assertNotNull("the launch group for a java app config in debug mode should exist", group);
}
-
+
/**
* tests that all of the launch groups can be acquired, there should be at least 3 of
* them (run, debug, profile)
@@ -166,7 +166,7 @@
assertNotNull("the listing of launch groups cannot be null", groups);
assertTrue("there shoulod be at least 3 launch groups", groups.length > 2);
}
-
+
/**
* tests that the default launch group for run mode is the launch group
* contributed by debug
@@ -177,7 +177,7 @@
assertNotNull("the default launch group cannot be null", group);
assertTrue("the default launch group for run mode should be the debug contribution", group.getIdentifier().equals("org.eclipse.debug.ui.launchGroup.run"));
}
-
+
/**
* tests that the default launch group for debug mode is the launch group
* contributed by debug
@@ -188,7 +188,7 @@
assertNotNull("the default launch group cannot be null", group);
assertTrue("the default launch group for debug mode should be the debug contribution", group.getIdentifier().equals("org.eclipse.debug.ui.launchGroup.debug"));
}
-
+
/**
* tests that the correct corresponding launch config types are found for a given resource,
* in this test the applet and local java types should be found
@@ -200,7 +200,7 @@
String[] types = fLCM.getApplicableConfigurationTypes(resource);
assertTypes(new String[] {"org.eclipse.jdt.launching.localJavaApplication", "org.eclipse.jdt.launching.javaApplet"}, types);
}
-
+
/**
* tests that configuration applicable to specific resources can be found
*/
@@ -212,7 +212,7 @@
assertNotNull("the listing cannot be null", list);
assertTrue("there should be at least one configuration for this resource", list.length > 0);
}
-
+
/**
* Tests that a launch group does not exist for a given configuration and mode that it does not support.
* In this case we are testing that a group does not exist for a java application config
@@ -224,5 +224,5 @@
assertNotNull("the ThrowsNPE configuration should exist", configuration);
ILaunchGroup group = DebugUITools.getLaunchGroup(configuration, ILaunchManager.PROFILE_MODE);
assertNull("the launch group for a java app config in profile mode should *not* exist", group);
- }
+ }
}
\ No newline at end of file
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/LaunchConfigurationTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/LaunchConfigurationTests.java
index 13f3ed4..1f66299 100755
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/LaunchConfigurationTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/LaunchConfigurationTests.java
@@ -33,22 +33,22 @@
protected TestConfiguration(String name, IContainer container) {
super(name, container);
}
-
+
public String getSimpleNameProxy(String fileName) {
return getSimpleName(fileName);
}
-
+
public void setNameProxy(String name) {
setName(name);
}
-
+
public String getFileNameProxy() {
return getFileName();
}
}
-
+
TestConfiguration config = new TestConfiguration("Test", null);
-
+
/**
* Constructor
* @param name
@@ -59,7 +59,7 @@
/**
* Tests the {@link LaunchConfiguration#getSimpleName} method
- *
+ *
* @throws Exception
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=332410
*/
@@ -79,10 +79,10 @@
name = config.getSimpleNameProxy("launch.foo.bar");
assertEquals("Did not get expected name: 'launch.foo.bar'", "launch.foo.bar", name);
}
-
+
/**
* Tests the {@link LaunchConfiguration#setName} method
- *
+ *
* @throws Exception
*/
public void testSetName() throws Exception {
@@ -92,10 +92,10 @@
//reset the name
config.setNameProxy("Test");
}
-
+
/**
* Tests the {@link LaunchConfiguration#getFileName} method
- *
+ *
* @throws Exception
*/
public void testGetFileName() throws Exception {
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/LaunchDelegateTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/LaunchDelegateTests.java
index 1d6aea4..b7944b5 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/LaunchDelegateTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/LaunchDelegateTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -31,7 +31,7 @@
* Tests for launch delegates
*/
public class LaunchDelegateTests extends AbstractDebugTest {
-
+
/**
* Constructor
* @param name
@@ -39,7 +39,7 @@
public LaunchDelegateTests(String name) {
super(name);
}
-
+
/**
* Ensures a launch delegate can provide a launch object for
* a launch.
@@ -54,7 +54,7 @@
ILaunch launch = workingCopy.launch(ILaunchManager.DEBUG_MODE, null);
manager.removeLaunch(launch);
}
-
+
/**
* Tests that a delegate extension can provide the source path computer.
*/
@@ -65,7 +65,7 @@
ISourcePathComputer sourcePathComputer = configurationType.getSourcePathComputer();
assertEquals("Wrong source path computer", "org.eclipse.jdt.debug.tests.testSourcePathComputer", sourcePathComputer.getId()); //$NON-NLS-1$ //$NON-NLS-2$
}
-
+
/**
* Tests that a delegate extension can provide the source locator.
*/
@@ -76,10 +76,10 @@
String sourceLocatorId = configurationType.getSourceLocatorId();
assertEquals("Wrong source locater id", "org.eclipse.jdt.debug.tests.testSourceLocator", sourceLocatorId); //$NON-NLS-1$ //$NON-NLS-2$
}
-
+
/**
* Test launch delegate for mixed launch mode.
- * @throws CoreException
+ * @throws CoreException
*/
public void testMixedModeDelegate() throws CoreException {
ILaunchManager manager = getLaunchManager();
@@ -94,7 +94,7 @@
assertEquals("Wrong number of delegates", 1, delegates.length); //$NON-NLS-1$
assertTrue("Wrong delegate", delegates[0].getDelegate() instanceof AlternateDelegate); //$NON-NLS-1$
}
-
+
/**
* Tests if the java launch delegate was found as one of the delegates for debug mode.
* @throws CoreException
@@ -117,7 +117,7 @@
}
assertTrue("The java launch delegate was not one of the returned delegates", found); //$NON-NLS-1$
}
-
+
/**
* Tests correct delegate is found for alternate mode.
* @throws CoreException
@@ -133,8 +133,8 @@
assertTrue("missing delegate", delegates.length > 0); //$NON-NLS-1$
assertEquals("Wrong number of delegates", 1, delegates.length); //$NON-NLS-1$
assertTrue("Wrong delegate", delegates[0].getDelegate() instanceof AlternateDelegate); //$NON-NLS-1$
- }
-
+ }
+
/**
* Checks that the delegate definition is collecting and parsing mode combination information properly from both the delegate
* contribution and from modeCombination child elements
@@ -155,7 +155,7 @@
assertTrue("Wrong delegate", delegates[0].getDelegate() instanceof AlternateDelegate); //$NON-NLS-1$
}
}
-
+
/**
* Checks that all applicable delegates are found for given types and mode combinations
* @throws CoreException
@@ -177,7 +177,7 @@
HashSet<Object> ds = new HashSet<Object>(Arrays.asList(new Object[] {TestLaunchDelegate1.class, TestLaunchDelegate2.class}));
assertTrue("There must be only TestLaunchDelegate1 and TestLaunchDelegate2 as registered delegates for the mode alternate2 and the local java type", ds.containsAll(dels)); //$NON-NLS-1$
}
-
+
/**
* Checks to see the even with a partial match of a mode combination it will indicate that it does not support the specified modes
*/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/LaunchModeTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/LaunchModeTests.java
index 0079725..460398c 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/LaunchModeTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/LaunchModeTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -47,7 +47,7 @@
* LaunchModeTests
*/
public class LaunchModeTests extends AbstractDebugTest {
-
+
private ILaunchConfiguration fConfiguration;
private String fMode;
@@ -60,7 +60,7 @@
/**
* Called by launch "TestModeLaunchDelegate" delegate when launch method invoked.
- *
+ *
* @param configuration
* @param mode
*/
@@ -73,7 +73,7 @@
/**
* Tests that launch delegate for "TEST_MODE" and Java applications is invoked when
* "TEST_MODE" is used.
- *
+ *
* @throws CoreException
* @see TestModeLaunchDelegate
*/
@@ -97,7 +97,7 @@
}
}
}
-
+
/**
* Returns the launch configuration set by the TestModeLaunchDelegate, or <code>null</code>
* if no launch configuration was set (the correct delegate was not called).
@@ -111,10 +111,10 @@
System.err.println("Interrupted waiting for launch configuration"); //$NON-NLS-1$
}
}
-
+
return fConfiguration;
}
-
+
/**
* Ensure our contributed launch mode exists.
*/
@@ -130,7 +130,7 @@
assertContains("Missing run mode", ids, ILaunchManager.RUN_MODE); //$NON-NLS-1$
assertContains("Missing TEST_MODE", ids, "alternate"); //$NON-NLS-1$ //$NON-NLS-2$
}
-
+
/**
* Asserts that the array contains the given object
* @param message
@@ -141,10 +141,10 @@
for (int i = 0; i < array.length; i++) {
if (array[i].equals(object)) {
return;
- }
+ }
}
throw new AssertionFailedError(message);
- }
+ }
/**
* Ensure our contributed mode is supported.
@@ -155,41 +155,41 @@
assertNotNull(configuration);
assertTrue("Java application configuration should support TEST_MODE", configuration.supportsMode("TEST_MODE")); //$NON-NLS-1$ //$NON-NLS-2$
assertTrue("Java application type should support TEST_MODE", configuration.getType().supportsMode("TEST_MODE")); //$NON-NLS-1$ //$NON-NLS-2$
-
+
assertTrue("Java application configuration should support debug mode", configuration.supportsMode(ILaunchManager.DEBUG_MODE)); //$NON-NLS-1$
assertTrue("Java application type should support debug mode", configuration.getType().supportsMode(ILaunchManager.DEBUG_MODE)); //$NON-NLS-1$
-
+
assertTrue("Java application configuration should support run mode", configuration.supportsMode(ILaunchManager.RUN_MODE)); //$NON-NLS-1$
assertTrue("Java application type should support run mode", configuration.getType().supportsMode(ILaunchManager.RUN_MODE)); //$NON-NLS-1$
}
-
+
/**
* Tests that mode specific tab group contributions work.
* @throws CoreException
*/
public void testModeSpecificTabGroups() throws CoreException {
- ILaunchConfigurationType javaType = getLaunchManager().getLaunchConfigurationType(IJavaLaunchConfigurationConstants.ID_JAVA_APPLICATION);
+ ILaunchConfigurationType javaType = getLaunchManager().getLaunchConfigurationType(IJavaLaunchConfigurationConstants.ID_JAVA_APPLICATION);
ILaunchConfigurationTabGroup standardGroup = LaunchConfigurationPresentationManager.getDefault().getTabGroup(javaType, ILaunchManager.DEBUG_MODE);
ILaunchConfigurationTabGroup testGroup = LaunchConfigurationPresentationManager.getDefault().getTabGroup(javaType, "TEST_MODE"); //$NON-NLS-1$
ILaunchConfigurationDialog dialog = new LaunchConfigurationsDialog(null, DebugUIPlugin.getDefault().getLaunchConfigurationManager().getLaunchGroup(IDebugUIConstants.ID_DEBUG_LAUNCH_GROUP));
standardGroup.createTabs(dialog, ILaunchManager.DEBUG_MODE);
testGroup.createTabs(dialog, "TEST_MODE"); //$NON-NLS-1$
-
+
ILaunchConfigurationTab[] tabs = standardGroup.getTabs();
HashSet<Class<? extends ILaunchConfigurationTab>> tabset = new HashSet<Class<? extends ILaunchConfigurationTab>>();
for(int i = 0; i< tabs.length; i++) {
tabset.add(tabs[i].getClass());
}
Class<?>[] classes = new Class<?>[] {
- JavaMainTab.class,
- JavaArgumentsTab.class,
- JavaJRETab.class,
+ JavaMainTab.class,
+ JavaArgumentsTab.class,
+ JavaJRETab.class,
JavaClasspathTab.class,
- SourceLookupTab.class,
- EnvironmentTab.class,
+ SourceLookupTab.class,
+ EnvironmentTab.class,
CommonTab.class};
assertTrue("Tab set does not contain all default java tabs", tabset.containsAll(new HashSet<Class<?>>(Arrays.asList(classes)))); //$NON-NLS-1$
-
+
tabs = testGroup.getTabs();
assertEquals("Wrong number of tabs in the test group", 4, tabs.length); //$NON-NLS-1$
tabset = new HashSet<Class<? extends ILaunchConfigurationTab>>();
@@ -197,15 +197,15 @@
tabset.add(tabs[i].getClass());
}
classes = new Class<?>[] {
- JavaMainTab.class,
- JavaArgumentsTab.class,
- JavaJRETab.class,
+ JavaMainTab.class,
+ JavaArgumentsTab.class,
+ JavaJRETab.class,
JavaClasspathTab.class};
assertTrue("Test tab set does not contain all default tabs", tabset.containsAll(new HashSet<Class<?>>(Arrays.asList(classes)))); //$NON-NLS-1$
standardGroup.dispose();
testGroup.dispose();
}
-
+
/**
* Tests that the default debug perspective for java applications is debug.
*/
@@ -213,12 +213,12 @@
ILaunchConfigurationType javaType = getLaunchManager().getLaunchConfigurationType(IJavaLaunchConfigurationConstants.ID_JAVA_APPLICATION);
assertEquals("Java debug perspective should be debug", IDebugUIConstants.ID_DEBUG_PERSPECTIVE, DebugUITools.getLaunchPerspective(javaType, ILaunchManager.DEBUG_MODE)); //$NON-NLS-1$
}
-
+
/**
* Test that the default debug perspective for Java Application types is debug.
* Same notion as <code>testDefaultDebugLaunchPerspective()</code>, but using the new API
* for getting perspectives
- *
+ *
* @since 3.3
*/
public void testDefaultDebugLaunchPerspective2() {
@@ -227,20 +227,20 @@
modes.add(ILaunchManager.DEBUG_MODE);
assertEquals("Java debug perspective should be debug", IDebugUIConstants.ID_DEBUG_PERSPECTIVE, DebugUITools.getLaunchPerspective(javaType, null, modes)); //$NON-NLS-1$
}
-
+
/**
* Tests that the default run perspective for java applications is none (<code>null</code>).
*/
public void testDefaultRunLaunchPerspective() {
ILaunchConfigurationType javaType = getLaunchManager().getLaunchConfigurationType(IJavaLaunchConfigurationConstants.ID_JAVA_APPLICATION);
assertNull("Java run perspective should be null", DebugUITools.getLaunchPerspective(javaType, ILaunchManager.RUN_MODE)); //$NON-NLS-1$
- }
-
+ }
+
/**
* Tests that the default run perspective for java applications is none (<code>null</code>).
* Same notion as <code>testDefaultRunLaunchPerspective()</code>, but using the new API for getting
* launch perspectives
- *
+ *
* @since 3.3
*/
public void testDefaultRunLaunchPerspective2() {
@@ -249,7 +249,7 @@
modes.add(ILaunchManager.RUN_MODE);
assertNull("Java run perspective should be null", DebugUITools.getLaunchPerspective(javaType, null, modes)); //$NON-NLS-1$
}
-
+
/**
* Tests that the default debug perspective can be over-ridden and reset
*/
@@ -265,14 +265,14 @@
DebugUITools.setLaunchPerspective(javaType, ILaunchManager.DEBUG_MODE, IDebugUIConstants.PERSPECTIVE_DEFAULT);
assertEquals("Java debug perspective should now be debug", IDebugUIConstants.ID_DEBUG_PERSPECTIVE, //$NON-NLS-1$
DebugUITools.getLaunchPerspective(javaType, ILaunchManager.DEBUG_MODE));
-
- }
-
+
+ }
+
/**
* Tests that the default debug perspective can be over-ridden and reset.
* Same notion as <code>testResetDebugLaunchPerspective()</code>, but using the new API
* for setting an resetting perspectives.
- *
+ *
* @since 3.3
*/
public void testResetDebugLaunchPerspective2() {
@@ -286,14 +286,14 @@
// re-set to default
DebugUITools.setLaunchPerspective(javaType, null, modes, IDebugUIConstants.PERSPECTIVE_DEFAULT);
assertEquals("Java debug perspective should now be debug", IDebugUIConstants.ID_DEBUG_PERSPECTIVE, DebugUITools.getLaunchPerspective(javaType, null, modes)); //$NON-NLS-1$
-
- }
-
+
+ }
+
/**
* Tests that the default debug perspective can be over-ridden and reset
- * Same notion as <code>testResetDebugLaunchPerspective2()</code>, but using the
+ * Same notion as <code>testResetDebugLaunchPerspective2()</code>, but using the
* JDT Java launch delegate instead of <code>null</code>
- *
+ *
* @since 3.3
*/
public void testResetDebugPerspectiveJavaLaunchDelegate() {
@@ -310,7 +310,7 @@
DebugUITools.setLaunchPerspective(javaType, null, modes, IDebugUIConstants.PERSPECTIVE_DEFAULT);
assertEquals("Java debug perspective should now be debug", IDebugUIConstants.ID_DEBUG_PERSPECTIVE, DebugUITools.getLaunchPerspective(javaType, delegate, modes)); //$NON-NLS-1$
}
-
+
/**
* Tests that the default run perspective can be over-ridden and reset
*/
@@ -325,14 +325,14 @@
// re-set to default
DebugUITools.setLaunchPerspective(javaType, ILaunchManager.RUN_MODE, IDebugUIConstants.PERSPECTIVE_DEFAULT);
assertNull("Java run perspective should now be null", //$NON-NLS-1$
- DebugUITools.getLaunchPerspective(javaType, ILaunchManager.RUN_MODE));
- }
-
+ DebugUITools.getLaunchPerspective(javaType, ILaunchManager.RUN_MODE));
+ }
+
/**
* Tests that the default run perspective can be over-ridden and reset.
* Same notion as <code>testResetRunLaunchPerspective()</code>, but using the new API
* for getting/setting/re-setting perspective settings.
- *
+ *
* @since 3.3
*/
public void testResetRunLaunchPerspective2() {
@@ -346,13 +346,13 @@
// re-set to default
DebugUITools.setLaunchPerspective(javaType, ILaunchManager.RUN_MODE, IDebugUIConstants.PERSPECTIVE_DEFAULT);
assertNull("Java run perspective should now be null", DebugUITools.getLaunchPerspective(javaType, null, modes)); //$NON-NLS-1$
- }
-
+ }
+
/**
* Tests that the default debug perspective can be over-ridden and reset
- * Same notion as <code>testResetRunLaunchPerspective2()</code>, but using the
+ * Same notion as <code>testResetRunLaunchPerspective2()</code>, but using the
* JDT Java launch delegate instead of <code>null</code>
- *
+ *
* @since 3.3
*/
public void testResetRunPerspectiveJavaLaunchDelegate() {
@@ -369,11 +369,11 @@
DebugUITools.setLaunchPerspective(javaType, null, modes, IDebugUIConstants.PERSPECTIVE_DEFAULT);
assertNull("Java run perspective should now be null", DebugUITools.getLaunchPerspective(javaType, delegate, modes)); //$NON-NLS-1$
}
-
+
/**
- * Tests that the default launch perspective for the 'debug' modeset and java launch delegate is
+ * Tests that the default launch perspective for the 'debug' modeset and java launch delegate is
* <code>ILaunchManager.DEBUG_MODE</code> using the new API.
- *
+ *
* @since 3.3
*/
public void testDefaultDebugPerspectiveJavaLaunchDelegate() {
@@ -385,11 +385,11 @@
String p = DebugUITools.getLaunchPerspective(javaType, delegate, modes);
assertEquals("Java debug perspective should be debug", IDebugUIConstants.ID_DEBUG_PERSPECTIVE, p); //$NON-NLS-1$
}
-
+
/**
* Tests that the default launch perspective for the 'run' modeset and java launch delegate
* is <code>null/code> using the new API
- *
+ *
* @since 3.3
*/
public void testDefaultRunPerspectiveJavaLaunchDelegate() {
@@ -401,7 +401,7 @@
String p = DebugUITools.getLaunchPerspective(javaType, delegate, modes);
assertNull("Java run perspective should be null", p); //$NON-NLS-1$
}
-
+
/**
* Tests a perspective contributed with a launch tab group.
*/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/LaunchShortcutTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/LaunchShortcutTests.java
index a364ed4..fabc034 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/LaunchShortcutTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/LaunchShortcutTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -20,14 +20,14 @@
/**
* Tests the capabilities of launch shortcuts from the <code>LaunchShortcuts</code> extension point
- *
+ *
* @since 3.3
*/
@SuppressWarnings("deprecation")
public class LaunchShortcutTests extends AbstractDebugTest {
private static String TESTING = "testing"; //$NON-NLS-1$
-
+
/**
* Constructor
* @param name
@@ -35,7 +35,7 @@
public LaunchShortcutTests(String name) {
super(name);
}
-
+
/**
* Tests to see that the local java launch shortcut supports the java
* application launch configuration type
@@ -56,7 +56,7 @@
String typeid = "org.eclipse.jdt.launching.foo"; //$NON-NLS-1$
assertTrue("local java app shortcut should not support foo", !ext.getAssociatedConfigurationTypes().contains(typeid)); //$NON-NLS-1$
}
-
+
/**
* Tests that the java app shortcut supports debug and java perspectives
*/
@@ -65,7 +65,7 @@
assertNotNull("java app shortcut not found", ext); //$NON-NLS-1$
assertTrue("java app shortcut should support debug perspective", ext.getPerspectives().contains("org.eclipse.debug.ui.DebugPerspective")); //$NON-NLS-1$ //$NON-NLS-2$
}
-
+
/**
* Tests that the local java app shortcut does not support some fake perspective foo
*/
@@ -74,7 +74,7 @@
assertNotNull("test shortcut not found", ext); //$NON-NLS-1$
assertTrue("java app shortcut should not support foo perspective", !ext.getPerspectives().contains("org.eclipse.debug.ui.FooPerspective")); //$NON-NLS-1$ //$NON-NLS-2$
}
-
+
/**
* Tests that the testing launch shortcut can be found based on specified perspective and category
*/
@@ -83,7 +83,7 @@
assertNotNull("launch configuration manager cannot be null", lcm); //$NON-NLS-1$
assertTrue("there should be one shortcut for the debug perspective and testing category", lcm.getLaunchShortcuts("org.eclipse.debug.ui.DebugPerspective", TESTING).size() == 1); //$NON-NLS-1$ //$NON-NLS-2$
}
-
+
/**
* Tests that the testing launch shortcut can be found based on the specified category
*/
@@ -92,7 +92,7 @@
assertNotNull("launch configuration manager cannot be null", lcm); //$NON-NLS-1$
assertTrue("there should be one shortcut for the testing category", lcm.getLaunchShortcuts(TESTING).size() == 1); //$NON-NLS-1$
}
-
+
/**
* Tests that shortcuts can be found based on the specified launch configuration type id.
* For this test there should be a minimum of two shortcuts found.
@@ -100,7 +100,7 @@
public void testGetApplicableLaunchShortcuts() {
assertTrue("there should be 2 or more shortcuts", getApplicableLaunchShortcuts("org.eclipse.jdt.launching.localJavaApplication").size() >= 2); //$NON-NLS-1$ //$NON-NLS-2$
}
-
+
/**
* Tests that a description can be retrieved for a specified mode when it is the general description,
* i.e. that the description has been provided in the shortcut definition and is NOT a description child element
@@ -116,10 +116,10 @@
assertNotNull("The description should not be null for debug mode", descr); //$NON-NLS-1$
assertTrue("The description should match the general one: General Description", descr.equals("General Description")); //$NON-NLS-1$ //$NON-NLS-2$
}
-
+
/**
- * Test that the general shortcut description provided is over-loaded with the one
- * specifically provided for the run mode. i.e. the run mode description is provided as a
+ * Test that the general shortcut description provided is over-loaded with the one
+ * specifically provided for the run mode. i.e. the run mode description is provided as a
* child element for the launch shortcut
* @since 3.3
*/
@@ -133,14 +133,14 @@
assertNotNull("The description should not be null for run mode", descr); //$NON-NLS-1$
assertTrue("The description should match the specific run one: Run Description", descr.equals("Run Description")); //$NON-NLS-1$ //$NON-NLS-2$
}
-
+
/**
* Returns a listing of all applicable <code>LaunchShortcutExtension</code>s for the given
* launch configuration type id.
* @param typeid the id of the launch configuration
* @return a listing of <code>LaunchShortcutExtension</code>s that are associated with the specified launch configuration
* type id or an empty list, never <code>null</code>
- *
+ *
* @since 3.3
*/
public List<LaunchShortcutExtension> getApplicableLaunchShortcuts(String typeid) {
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/LaunchTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/LaunchTests.java
index 19c4f68..820d110 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/LaunchTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/LaunchTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -25,11 +25,11 @@
* Tests launch notification.
*/
public class LaunchTests extends AbstractDebugTest implements ILaunchListener {
-
+
private boolean added = false;
private boolean removed = false;
- private boolean terminated = false;
-
+ private boolean terminated = false;
+
/**
* Constructor
* @param name the name of the test
@@ -73,9 +73,9 @@
}
}
assertTrue("Launch should have been terminated", terminated); //$NON-NLS-1$
-
+
getLaunchManager().removeLaunch(launch);
-
+
synchronized (this) {
if (!removed) {
try {
@@ -86,10 +86,10 @@
}
assertTrue("Launch should have been removed", removed); //$NON-NLS-1$
}
-
+
/**
* Tests launching an unregistered launch.
- *
+ *
* @throws Exception
*/
public void testUnregisteredLaunch() throws Exception {
@@ -104,7 +104,7 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
/**
@@ -124,7 +124,7 @@
added = true;
notifyAll();
}
-
+
/**
* @see org.eclipse.debug.core.ILaunchListener#launchChanged(org.eclipse.debug.core.ILaunch)
*/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/LaunchesTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/LaunchesTests.java
index 1076711..989b61e 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/LaunchesTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/LaunchesTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -21,11 +21,11 @@
* Tests launch notification plural
*/
public class LaunchesTests extends AbstractDebugTest implements ILaunchesListener2 {
-
+
private boolean added = false;
private boolean removed = false;
- private boolean terminated = false;
-
+ private boolean terminated = false;
+
/**
* Constructor
* @param name the name of the test
@@ -33,14 +33,14 @@
public LaunchesTests(String name) {
super(name);
}
-
-
+
+
@Override
protected void setUp() throws Exception {
added = false;
removed = false;
- terminated = false;
+ terminated = false;
super.setUp();
}
@@ -53,7 +53,7 @@
public void testDebugMode() throws CoreException {
doMode(ILaunchManager.DEBUG_MODE);
}
-
+
/**
* Tests launch notification in run mode.
* @throws CoreException
@@ -61,7 +61,7 @@
public void testRunMode() throws CoreException {
doMode(ILaunchManager.RUN_MODE);
}
-
+
protected void doMode(String mode) throws CoreException {
String typeName = "Breakpoints"; //$NON-NLS-1$
ILaunchConfiguration configuration = getLaunchConfiguration(typeName);
@@ -86,9 +86,9 @@
}
}
assertTrue("Launch should have been terminated", terminated); //$NON-NLS-1$
-
+
getLaunchManager().removeLaunch(launch);
-
+
synchronized (this) {
if (!removed) {
try {
@@ -97,7 +97,7 @@
}
}
}
- assertTrue("Launch should have been removed", removed); //$NON-NLS-1$
+ assertTrue("Launch should have been removed", removed); //$NON-NLS-1$
}
/**
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/MigrationDelegateTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/MigrationDelegateTests.java
index ee74a68..68c94a8 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/MigrationDelegateTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/MigrationDelegateTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -16,13 +16,13 @@
/**
* Class to test the migration delegate for java type launch configuration migrations
- * Java types in this context only include Local Java Applications, Java Applets, and Remote Java Applications
- *
+ * Java types in this context only include Local Java Applications, Java Applets, and Remote Java Applications
+ *
* @since 3.2
*
*/
public class MigrationDelegateTests extends AbstractDebugTest {
-
+
/**
* constructor
* @param name the name of the test
@@ -30,7 +30,7 @@
public MigrationDelegateTests(String name) {
super(name);
}
-
+
/**
* Runs a normal migration with no problems
* @throws Exception
@@ -38,7 +38,7 @@
public void testStandardMigration() throws Exception {
createLaunchConfiguration("MigrationTests"); //$NON-NLS-1$
ILaunchConfiguration config = getLaunchConfiguration("MigrationTests"); //$NON-NLS-1$
- try{
+ try{
assertTrue("LC: "+config.getName()+" should be a candidate for migration", config.isMigrationCandidate()); //$NON-NLS-1$ //$NON-NLS-2$
config.migrate();
IResource[] mappedResources = config.getMappedResources();
@@ -49,7 +49,7 @@
config = null;
}
}
-
+
/**
* Tests to see if the previously migrated launch configurations are still considered candidates
* @throws Exception
@@ -57,7 +57,7 @@
public void testMigrationAlreadyPerformed() throws Exception {
createLaunchConfiguration("MigrationTests2"); //$NON-NLS-1$
ILaunchConfiguration config = getLaunchConfiguration("MigrationTests2"); //$NON-NLS-1$
- try{
+ try{
assertTrue("LC: "+config.getName()+" should be a candidate for migration", config.isMigrationCandidate()); //$NON-NLS-1$ //$NON-NLS-2$
config.migrate();
assertTrue("LC: "+config.getName()+" should not be a candidate for migration", !config.isMigrationCandidate()); //$NON-NLS-1$ //$NON-NLS-2$
@@ -66,5 +66,5 @@
config = null;
}
}
-
+
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/PListParserTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/PListParserTests.java
index a938b35..a583941 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/PListParserTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/PListParserTests.java
@@ -28,16 +28,16 @@
/**
* Constructs a test
- *
+ *
* @param name test name
*/
public PListParserTests(String name) {
super(name);
}
-
+
/**
* Tests parsing of a sample installed JREs plist from the Mac.
- *
+ *
* @throws Exception
*/
public void testParseJREs() throws Exception {
@@ -61,7 +61,7 @@
map.put("test", Boolean.FALSE);
map.put("testint", new Integer(42));
assertEquals("Incorrect values parsed", map, jres[0]);
-
+
map = new HashMap<String, Comparable<?>>();
map.put("JVMArch", "x86_64");
map.put("JVMBundleID", "com.apple.javajdk16");
@@ -72,7 +72,7 @@
map.put("JVMPlatformVersion", "1.6");
map.put("JVMVersion", "1.6.0_20");
assertEquals("Incorrect values parsed", map, jres[1]);
-
+
map = new HashMap<String, Comparable<?>>();
map.put("JVMArch", "x86_64");
map.put("JVMBundleID", "com.apple.javajdk15");
@@ -90,7 +90,7 @@
/**
* Tests that we parse out the correct number of raw entries from the 'lion' plist output
- *
+ *
* @throws Exception
* @since 3.8
*/
@@ -102,15 +102,15 @@
if (obj instanceof Object[]) {
Object[] jres = (Object[]) obj;
assertEquals("Should be 8 entries in the array", 8, jres.length);
-
+
} else {
assertTrue("Top level object should be an array", false);
}
}
-
+
/**
* Tests that we parse out the correct number of raw entries from the 'now leopard' plist output
- *
+ *
* @throws Exception
* @since 3.8
*/
@@ -122,16 +122,16 @@
if (obj instanceof Object[]) {
Object[] jres = (Object[]) obj;
assertEquals("Should be 2 entries in the array", 2, jres.length);
-
+
} else {
assertTrue("Top level object should be an array", false);
}
}
-
+
/**
* Tests that we can parse out certain {@link VMStandin}s from the 'old' style
* of plist output.
- *
+ *
* @throws Exception
* @since 3.8
*/
@@ -142,11 +142,11 @@
VMStandin[] desc = MacInstalledJREs.parseJREInfo(new FileInputStream(file), null);
assertEquals("There should be 2 JRE descriptions", 2, desc.length);
}
-
+
/**
* Tests that we can parse out certain {@link VMStandin}s from the 'snow leopard' style
* of plist output.
- *
+ *
* @throws Exception
* @since 3.8
*/
@@ -157,11 +157,11 @@
VMStandin[] desc = MacInstalledJREs.parseJREInfo(new FileInputStream(file), null);
assertEquals("There should be 1 JRE description", 1, desc.length);
}
-
+
/**
* Tests that we can parse out certain {@link VMStandin}s from the 'lion' style
* of plist output.
- *
+ *
* @throws Exception
* @since 3.8
*/
@@ -172,14 +172,14 @@
VMStandin[] desc = MacInstalledJREs.parseJREInfo(new FileInputStream(file), null);
assertEquals("There should be 4 JRE descriptions", 4, desc.length);
}
-
+
/**
* Tests that we can parse out certain {@link VMStandin}s from the plist
* output known to be bad - wrong data types.
* <br><br>
- * <code>plist-bad1.xml</code> has a boolean value in place of the VM name for the 1.6 VM,
+ * <code>plist-bad1.xml</code> has a boolean value in place of the VM name for the 1.6 VM,
* but we should still recover the remainder of the VMs defined (3 of them)
- *
+ *
* @throws Exception
* @since 3.8
*/
@@ -191,13 +191,13 @@
VMStandin[] desc = MacInstalledJREs.parseJREInfo(new FileInputStream(file), null);
assertEquals("There should be 3 JRE descriptions", 3, desc.length);
}
-
+
/**
* Tests that we can parse out certain {@link VMStandin}s from the plist
* output known to be bad - missing element.
* <br><br>
* <code>plist-bad2.xml</code> is missing a key element - but still has the value for the key.
- *
+ *
* @throws Exception
* @since 3.8
*/
@@ -209,13 +209,13 @@
VMStandin[] desc = MacInstalledJREs.parseJREInfo(new FileInputStream(file), null);
assertEquals("There should be 3 JRE descriptions", 3, desc.length);
}
-
+
/**
* Tests that we can parse out certain {@link VMStandin}s from the plist
* output known to be bad - corrupt XML syntax.
* <br><br>
* <code>plist-bad3.xml</code> has corrupt XML syntax
- *
+ *
* @throws Exception
* @since 3.8
*/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/ProjectClasspathVariableTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/ProjectClasspathVariableTests.java
index 83d7850..de033d5 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/ProjectClasspathVariableTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/ProjectClasspathVariableTests.java
@@ -29,17 +29,17 @@
import org.eclipse.ui.PartInitException;
/**
- * Tests for the ${project_classpath} variable
+ * Tests for the ${project_classpath} variable
*/
public class ProjectClasspathVariableTests extends AbstractDebugTest {
public ProjectClasspathVariableTests(String name) {
super(name);
}
-
+
/**
* Sets the selected resource in the navigator view.
- *
+ *
* @param resource resource to select or <code>null</code> if empty
*/
protected void setSelection(final IResource resource) {
@@ -66,15 +66,15 @@
} catch (PartInitException e) {
assertNotNull("Failed to open navigator view", null);
}
-
+
}
};
DebugUIPlugin.getStandardDisplay().syncExec(r);
}
-
+
/**
* Tests that a project name must be specified.
- *
+ *
* @throws Exception
*/
public void testMissingProjectName() throws Exception {
@@ -87,10 +87,10 @@
}
assertNotNull("Test should have thrown an exception due to missing project name", null);
}
-
+
/**
* Tests the selected project's classpath.
- *
+ *
* @throws Exception
*/
public void testSelectedProject() throws Exception {
@@ -105,10 +105,10 @@
buffer.append(get14Project().getProject().getFolder("src").getFile("A.jar").getLocation().toOSString());
assertEquals("Wrong classpath", buffer.toString(), cp);
}
-
+
/**
* Tests that a Java project must exist
- *
+ *
* @throws Exception
*/
public void testProjectDoesNotExist() throws Exception {
@@ -120,7 +120,7 @@
}
assertNotNull("Test should have thrown an exception due to project does not exist", null);
}
-
+
public void testProjectClasspath() throws Exception {
IStringVariableManager manager = VariablesPlugin.getDefault().getStringVariableManager();
String projectName = get14Project().getElementName();
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/TabGroupWrapperTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/TabGroupWrapperTests.java
index ab7ae88..3404c04 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/TabGroupWrapperTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/launching/TabGroupWrapperTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -20,7 +20,7 @@
/**
* test class tests the returnable methods of the new <code>LaunchConfigurationTabGroupWrapper</code> to ensure that it returns existing tab group
* elements and all contributions
- *
+ *
* @since 3.3
*/
public class TabGroupWrapperTests extends AbstractDebugTest {
@@ -43,7 +43,7 @@
javagroup.createTabs(getLaunchConfigurationDialog(IDebugUIConstants.ID_RUN_LAUNCH_GROUP), ILaunchManager.RUN_MODE);
assertTrue("There must be at least 11 tabs", javagroup.getTabs().length >= 11); //$NON-NLS-1$
}
-
+
/**
* Checks to make sure that all of the controls of the tabs (including contributed ones) are disposed on a call to the tab group
* wrapper class
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/BreakpointManagerPerfTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/BreakpointManagerPerfTests.java
index b08e4a2..72f1551 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/BreakpointManagerPerfTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/BreakpointManagerPerfTests.java
@@ -24,11 +24,11 @@
/**
* Tests the performance of various parts of the {@link BreakpointManager}
- *
+ *
* @since 3.8
*/
public class BreakpointManagerPerfTests extends AbstractDebugPerformanceTest {
-
+
/**
* Constructor
* @param name
@@ -39,10 +39,10 @@
static IBreakpoint[] NO_BREAKPOINTS = new IBreakpoint[0];
static String fgTypeName = "BPManagerPerf";
-
+
/**
* Create the given number of breakpoints in the given resource starting from the given line
- *
+ *
* @param count
* @throws Exception
* @return the collection of breakpoints
@@ -72,7 +72,7 @@
assertEquals("the should have been "+count+" breakpoints created", count, bps.size());
return bps.toArray(new IBreakpoint[bps.size()]);
}
-
+
/**
* Tests the time required to start the {@link BreakpointManager}
* @throws Exception
@@ -102,7 +102,7 @@
removeAllBreakpoints();
}
}
-
+
/**
* Tests the time required to start the {@link BreakpointManager}
* @throws Exception
@@ -132,7 +132,7 @@
removeAllBreakpoints();
}
}
-
+
/**
* Tests the time required to start the {@link BreakpointManager}
* @throws Exception
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/PerfBreakpointTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/PerfBreakpointTests.java
index b9a86c4..a700790 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/PerfBreakpointTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/PerfBreakpointTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -53,7 +53,7 @@
IJavaLineBreakpoint bp = createLineBreakpoint(14, typeName);
IJavaThread thread = launchToBreakpoint(typeName, false);
bp.delete();
-
+
try {
DebugPlugin.getDefault().getBreakpointManager().addBreakpointListener(this);
@@ -61,13 +61,13 @@
for (int i = 0; i < lineNumbers.length; i++) {
lineNumbers[i] = 15 + i;
}
-
+
for (int i = 0; i < 10; i++) {
createLineBreakpoints(resource, typeName, lineNumbers);
waitForBreakpointCount(lineNumbers.length);
removeAllBreakpoints();
waitForBreakpointCount(0);
- breakpointCount = 0;
+ breakpointCount = 0;
}
for (int i = 0; i < 100; i++) {
@@ -85,7 +85,7 @@
} finally {
DebugPlugin.getDefault().getBreakpointManager().removeBreakpointListener(this);
removeAllBreakpoints();
-
+
terminateAndRemove(thread);
}
}
@@ -117,7 +117,7 @@
IBreakpoint[] breakpoints = manager.getBreakpoints();
manager.removeBreakpoints(breakpoints, true);
waitForBreakpointCount(0);
-
+
}
lineNumbers = new int[250];
@@ -134,14 +134,14 @@
manager.removeBreakpoints(breakpoints, true);
waitForBreakpointCount(0);
stopMeasuring();
-
+
}
commitMeasurements();
assertPerformance();
} finally {
manager.removeBreakpointListener(this);
removeAllBreakpoints();
-
+
terminateAndRemove(thread);
}
}
@@ -154,7 +154,7 @@
tagAsSummary("Install Method Entry Breakpoints", Dimension.ELAPSED_PROCESS);
String typeName = "LargeSourceFile";
IProject project = get14Project().getProject();
-
+
IJavaLineBreakpoint bp = createLineBreakpoint(14, typeName);
IJavaThread thread = launchToBreakpoint(typeName, false);
bp.delete();
@@ -173,7 +173,7 @@
waitForBreakpointCount(methods.length);
removeAllBreakpoints();
waitForBreakpointCount(0);
-
+
}
for (int i = 0; i < 100; i++) {
@@ -183,7 +183,7 @@
waitForBreakpointCount(methods.length);
stopMeasuring();
removeAllBreakpoints();
-
+
breakpointCount = 0;
}
commitMeasurements();
@@ -191,9 +191,9 @@
} finally {
DebugPlugin.getDefault().getBreakpointManager().removeBreakpointListener(this);
removeAllBreakpoints();
-
+
terminateAndRemove(thread);
- }
+ }
}
/**
@@ -204,7 +204,7 @@
tagAsSummary("Install Watchpoints", Dimension.ELAPSED_PROCESS);
String typeName = "LotsOfFields";
IResource resource = getBreakpointResource(typeName);
-
+
IJavaLineBreakpoint bp = createLineBreakpoint(516, typeName);
IJavaThread thread = launchToBreakpoint(typeName, false);
bp.delete();
@@ -232,7 +232,7 @@
waitForBreakpointCount(fields.length);
stopMeasuring();
removeAllBreakpoints();
-
+
breakpointCount = 0;
}
commitMeasurements();
@@ -240,11 +240,11 @@
} finally {
DebugPlugin.getDefault().getBreakpointManager().removeBreakpointListener(this);
removeAllBreakpoints();
-
+
terminateAndRemove(thread);
- }
+ }
}
-
+
/**
* Waits for the specified breakpoint count to be hit
* @param i
@@ -284,7 +284,7 @@
JDIDebugModel.createMethodBreakpoint(project, typeName, methodName, "()V", true, false, false, -1, -1, -1, 0, true, null);
}
}
-
+
/**
* Creates watchpoints on the specified fields of the specified resource with the given type name
* @param resource
@@ -299,7 +299,7 @@
wp.setModification(true);
}
}
-
+
/**
* @see org.eclipse.debug.core.IBreakpointListener#breakpointAdded(org.eclipse.debug.core.model.IBreakpoint)
*/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/PerfConditionalBreakpointsTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/PerfConditionalBreakpointsTests.java
index 94f3ddc..866a4ee 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/PerfConditionalBreakpointsTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/PerfConditionalBreakpointsTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/PerfConsoleTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/PerfConsoleTests.java
index 523ebf0..1684275 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/PerfConsoleTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/PerfConsoleTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -55,7 +55,7 @@
tagAsSummary("Process Console 10,000 lines: plain output", Dimension.ELAPSED_PROCESS);
runConsole80CharsTest(10000, 75);
}
-
+
/**
* Tests the performance of 10000 lines of stack trace output to the console
* @throws Exception
@@ -66,7 +66,7 @@
}
/**
- * Tests the performance of 10000 lines of wrapped process console output to the console
+ * Tests the performance of 10000 lines of wrapped process console output to the console
* @throws Exception
*/
public void testProcessConsoleWrappedOutput10000Lines() throws Exception {
@@ -95,7 +95,7 @@
}
/**
- * Runs the
+ * Runs the
* @param lines
* @param repeatTest
* @throws Exception
@@ -194,9 +194,9 @@
DebugUITools.launch(workingCopy, ILaunchManager.RUN_MODE);
}
};
-
+
DebugUIPlugin.getStandardDisplay().asyncExec(runnable);
-
+
synchronized (fLock) {
if (!fStopped) {
fLock.wait(360000);
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/PerfContextualLaunchMenu.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/PerfContextualLaunchMenu.java
index f915848..669e850 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/PerfContextualLaunchMenu.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/PerfContextualLaunchMenu.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -21,10 +21,10 @@
import org.eclipse.swt.widgets.Shell;
/**
- * Tests the performance of the contextual launch menu population
+ * Tests the performance of the contextual launch menu population
*/
public class PerfContextualLaunchMenu extends AbstractDebugPerformanceTest {
-
+
/**
* Constructor
* @param name
@@ -40,18 +40,18 @@
public void testContextualLaunchMenu() throws Exception {
setDegradationComment("This test is unreliable as it improved 10x during 3.3 (vs 3.2), and needs to be replaced.");
final PerfTestContextualLaunchAction launchaction = new PerfTestContextualLaunchAction();
-
- ICompilationUnit cu = getCompilationUnit(get14Project(), "src", "org.eclipse.debug.tests.targets", "SourceLookup.java");
+
+ ICompilationUnit cu = getCompilationUnit(get14Project(), "src", "org.eclipse.debug.tests.targets", "SourceLookup.java");
StructuredSelection selection = new StructuredSelection(new Object[] {cu});
launchaction.selectionChanged(new BogusAction(), selection);
-
+
DebugUIPlugin.getStandardDisplay().syncExec(new Runnable() {
@Override
public void run() {
Shell shell = DebugUIPlugin.getStandardDisplay().getActiveShell();
Menu menu = launchaction.getMenu(new Menu(shell));
showMenu(launchaction, menu, 5);
-
+
for(int i=0; i<10; i++) {
try {
System.gc();
@@ -77,10 +77,10 @@
commitMeasurements();
assertPerformance();
}
-
+
private class BogusAction extends Action {
}
-
+
private class PerfTestContextualLaunchAction extends ContextualLaunchAction {
/**
* Constructor
@@ -88,7 +88,7 @@
public PerfTestContextualLaunchAction() {
super(ILaunchManager.RUN_MODE);
}
-
+
void showMenu(Menu menu) {
fillMenu(menu);
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/PerfDebugBaselineTest.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/PerfDebugBaselineTest.java
index bacc100..1d52314 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/PerfDebugBaselineTest.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/PerfDebugBaselineTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -33,12 +33,12 @@
buffer.append("at org.eclipse.jdt.internal.debug.core.model.JDILocalVariable.retrieveValue(JDILocalVariable.java:56\n");
}
String text = buffer.toString();
-
+
//ensure class loading and JIT is done.
for (int i= 0; i < 5; i++) {
findMatches(text);
}
-
+
try {
for (int i= 0; i < 10; i++) {
fPerformanceMeter.start();
@@ -60,7 +60,7 @@
private int findMatches(String text) {
Pattern pattern = Pattern.compile("\\w\\S*\\(\\S*\\.java:\\S*\\)");
Matcher matcher = pattern.matcher(text);
-
+
int count = 0;
while (matcher.find()) {
count++;
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/PerfSteppingTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/PerfSteppingTests.java
index adab869..ce6c674 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/PerfSteppingTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/PerfSteppingTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -21,7 +21,7 @@
* Tests performance of stepping.
*/
public class PerfSteppingTests extends AbstractDebugPerformanceTest {
-
+
/**
* Constructor
* @param name
@@ -29,9 +29,9 @@
public PerfSteppingTests(String name) {
super(name);
}
-
+
class MyFilter implements IDebugEventFilter {
-
+
private IJavaThread fThread = null;
private Object fLock;
private DebugEvent[] EMPTY = new DebugEvent[0];
@@ -45,7 +45,7 @@
fThread = thread;
fLock = lock;
}
-
+
/**
* @see org.eclipse.debug.core.IDebugEventFilter#filterDebugEvents(org.eclipse.debug.core.DebugEvent[])
*/
@@ -64,7 +64,7 @@
}
return events;
}
-
+
/**
* performs a step operation
*/
@@ -81,24 +81,24 @@
assertTrue(e.getMessage(), false);
}
}
-
+
}
-
+
}
/**
* Tests stepping over without taking into account event processing in the UI.
- *
+ *
* @throws Exception
*/
public void testBareStepOver() throws Exception {
String typeName = "PerfLoop";
createLineBreakpoint(20, typeName);
-
+
IJavaThread thread= null;
- try {
+ try {
thread= launchToBreakpoint(typeName, false);
-
+
// warm up
Object lock = new Object();
MyFilter filter = new MyFilter(thread, lock);
@@ -108,14 +108,14 @@
for (int i = 0; i < 100; i++) {
filter.step();
}
- }
- DebugPlugin.getDefault().removeDebugEventFilter(filter);
-
+ }
+ DebugPlugin.getDefault().removeDebugEventFilter(filter);
+
// real test
lock = new Object();
filter = new MyFilter(thread, lock);
DebugPlugin.getDefault().addDebugEventFilter(filter);
-
+
thread.getTopStackFrame();
for (int n= 0; n < 150; n++) {
startMeasuring();
@@ -127,11 +127,11 @@
}
commitMeasurements();
assertPerformance();
-
+
DebugPlugin.getDefault().removeDebugEventFilter(filter);
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/PerfVariableDetailTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/PerfVariableDetailTests.java
index e578db7..f303798 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/PerfVariableDetailTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/PerfVariableDetailTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -27,7 +27,7 @@
public class PerfVariableDetailTests extends AbstractDebugPerformanceTest implements IValueDetailListener {
private Object fLock = new Object();
-
+
/**
* Constructor
* @param name
@@ -45,9 +45,9 @@
fLock.notifyAll();
}
}
-
+
/**
- * Tests the performance of calculating the 'toString' method
+ * Tests the performance of calculating the 'toString' method
* @throws Exception
*/
public void testToStringDetails() throws Exception {
@@ -66,7 +66,7 @@
assertNotNull("Missing variable 'v'", variable);
IDebugModelPresentation presentation = DebugUITools.newDebugModelPresentation("org.eclipse.jdt.debug");
IValue value = variable.getValue();
-
+
// warm up
for (int i = 0; i < 100; i++) {
synchronized (fLock) {
@@ -74,7 +74,7 @@
fLock.wait(30000);
}
}
-
+
// test
for (int i = 0; i < 300; i++) {
startMeasuring();
@@ -86,10 +86,10 @@
}
stopMeasuring();
}
-
+
commitMeasurements();
assertPerformance();
-
+
} finally {
removeAllBreakpoints();
terminateAndRemove(thread);
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/AbstractRefactoringDebugTest.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/AbstractRefactoringDebugTest.java
index 1f04ca3..4636962 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/AbstractRefactoringDebugTest.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/AbstractRefactoringDebugTest.java
@@ -34,7 +34,7 @@
/**
* Common refactoring utils.
- *
+ *
* @since 3.2
*/
public class AbstractRefactoringDebugTest extends AbstractDebugTest {
@@ -42,7 +42,7 @@
public AbstractRefactoringDebugTest(String name) {
super(name);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jdt.debug.tests.AbstractDebugTest#setUp()
*/
@@ -51,11 +51,11 @@
super.setUp();
cleanTestFiles();
}
-
+
/**
* Performs the given refactoring. If a {@link ResourceException} occurs during the refactoring,
* we trap it and throw a {@link TestAgainException} to try the test again.
- *
+ *
* @param refactoring
* @throws Exception
*/
@@ -86,7 +86,7 @@
throw new TestAgainException(ce.getLocalizedMessage());
}
}
-
+
/**
* Clean up all the test files
* @throws CoreException
@@ -116,7 +116,7 @@
if (!fragment.exists()) {
root.createPackageFragment("a.b.c", true, new NullProgressMonitor());
}
-
+
// cleanup MoveeSource / Movee.java
IFile target = project.getFile("src/a/b/Movee.java");
if (target.exists()) {
@@ -144,7 +144,7 @@
if (target.exists()) {
target.delete(true, false, null);
}
-
+
// cleanup MoveeChildSource / MoveeChild.java
target = project.getFile("src/a/b/MoveeChild.java");
if (target.exists()) {
@@ -166,14 +166,14 @@
SearchEngine engine = new SearchEngine();
IJavaSearchScope scope = SearchEngine.createWorkspaceScope();
try {
- engine.searchAllTypeNames(null,
- SearchPattern.R_PATTERN_MATCH | SearchPattern.R_CASE_SENSITIVE,
- "!@$#!@".toCharArray(),
- SearchPattern.R_PATTERN_MATCH | SearchPattern.R_CASE_SENSITIVE,
- IJavaSearchConstants.CLASS,
- scope,
- new TypeNameRequestor() {},
- IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH,
+ engine.searchAllTypeNames(null,
+ SearchPattern.R_PATTERN_MATCH | SearchPattern.R_CASE_SENSITIVE,
+ "!@$#!@".toCharArray(),
+ SearchPattern.R_PATTERN_MATCH | SearchPattern.R_CASE_SENSITIVE,
+ IJavaSearchConstants.CLASS,
+ scope,
+ new TypeNameRequestor() {},
+ IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH,
null);
} catch (CoreException e) {
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/ChangeAnonymousTypeMethodSignatureUnitTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/ChangeAnonymousTypeMethodSignatureUnitTests.java
index bd7b30e..c6ef6cf 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/ChangeAnonymousTypeMethodSignatureUnitTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/ChangeAnonymousTypeMethodSignatureUnitTests.java
@@ -28,10 +28,10 @@
super(name);
}
-
+
public void testAnonymousTypeMethodChange() throws Exception {
try {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$childsMethod()V$1$anonTypeMethod()QString",
@@ -55,16 +55,16 @@
} finally {
removeAllBreakpoints();
}
- }//end testBreakPoint
-
+ }//end testBreakPoint
+
private Refactoring setupRefactor(String root, String packageName, String cuName, String fullTargetName) throws Exception {
IJavaProject javaProject = get14Project();
ICompilationUnit cunit = getCompilationUnit(javaProject, root, packageName, cuName);
IMethod method = (IMethod)(getMember(cunit,fullTargetName));
-
+
ChangeSignatureProcessor processor = new ChangeSignatureProcessor(method);
ProcessorBasedRefactoring ref= new ProcessorBasedRefactoring(processor);
-
+
//configure the processor a little more here!
processor.setNewMethodName("changedMethod");
processor.setNewReturnTypeName("Object");
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/ChangeMethodSignatureUnitTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/ChangeMethodSignatureUnitTests.java
index 849cdf4..e1497f3 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/ChangeMethodSignatureUnitTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/ChangeMethodSignatureUnitTests.java
@@ -32,7 +32,7 @@
public void testPublicTypeMethodChange() throws Exception {
try {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "Movee.java",
type = "Movee",
@@ -60,7 +60,7 @@
public void testInnerTypeMethodChange() throws Exception {
try {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "Movee.java",
type = "Movee$InnerType",
@@ -85,10 +85,10 @@
removeAllBreakpoints();
}
}//end testBreakPoint
-
+
public void testNonPublicTypeMethodChange() throws Exception {
try {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "Movee.java",
type = "NonPublicType",
@@ -96,7 +96,7 @@
methodSig = "()V";
//create breakpoint to test
createMethodBreakpoint(pack,cunit,type,methodName,methodSig,true, false);
-
+
//refactor
Refactoring ref = setupRefactor(src, pack, cunit, type, methodName, methodSig);
performRefactor(ref);
@@ -113,18 +113,18 @@
} finally {
removeAllBreakpoints();
}
- }//end testBreakPoint
-
-
-//////////////////////////////////////////////////////////////////////////////////////
+ }//end testBreakPoint
+
+
+//////////////////////////////////////////////////////////////////////////////////////
private Refactoring setupRefactor(String root, String targetPackageName, String cuName, String typeName, String methodName, String methodSig) throws Exception {
-
+
IJavaProject javaProject = get14Project();
ICompilationUnit cunit = getCompilationUnit(javaProject, root, targetPackageName, cuName);
IType type = getLowestType(cunit, typeName);
-
+
IMethod method = type.getMethod(methodName, Signature.getParameterTypes(methodSig));
-
+
ChangeSignatureProcessor processor = new ChangeSignatureProcessor(method);
ProcessorBasedRefactoring ref= new ProcessorBasedRefactoring(processor);
@@ -143,10 +143,10 @@
}
/**
- *
+ *
* @param cu the CompilationUnit containing the toplevel Type
- * @param input - the type, possibly including inner type,
- * separated by $.
+ * @param input - the type, possibly including inner type,
+ * separated by $.
* eg: EnclosingType$InnerType
* @return the Lowest level inner type specified in input
*/
@@ -163,14 +163,14 @@
}
//has no inner type
return cu.getType(input);
-
+
}
-
+
/**
* Helper method for getLowestType (ICompilationUnit cu, String input)
* @param enclosing name of enclosing Type
- * @param name the typename, possibly including inner type,
- * separated by $.
+ * @param name the typename, possibly including inner type,
+ * separated by $.
* eg: EnclosingType$InnerType
* @return
*/
@@ -184,7 +184,7 @@
}
}
//has no inner type
- return enclosing.getType(name);
-
+ return enclosing.getType(name);
+
}
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/ConvertInnerAnonymousTypeToNestedUnitTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/ConvertInnerAnonymousTypeToNestedUnitTests.java
index a319c4d..d8e7a2d 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/ConvertInnerAnonymousTypeToNestedUnitTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/ConvertInnerAnonymousTypeToNestedUnitTests.java
@@ -30,10 +30,10 @@
super(name);
}
-
+
public void testLineBreakpoint() throws Exception {
try {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$InnerChildType$innerChildsMethod()V$1",
@@ -41,7 +41,7 @@
newAnonTypeName = "a.b.c.MoveeChild$InnerChildType$NewAnonymousClass";
int lineNumber = 40,
newLineNumber = 44;
-
+
//create breakpoint to test
IJavaLineBreakpoint breakpoint = createLineBreakpoint(lineNumber, src, pack, cunit, fullTargetName);
//refactor
@@ -59,16 +59,16 @@
} finally {
removeAllBreakpoints();
}
- }//end testBreakPoint
+ }//end testBreakPoint
public void testMethodBreakpoint() throws Exception {
try {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$InnerChildType$innerChildsMethod()V$1$anonTypeMethod()V",
targetParentType = "MoveeChild$InnerChildType$innerChildsMethod()V$1",
- methodName = "anonTypeMethod",
+ methodName = "anonTypeMethod",
newAnonTypeName = "a.b.c.MoveeChild$InnerChildType$NewAnonymousClass";
//create breakpoint to test
IJavaMethodBreakpoint breakpoint = createMethodBreakpoint(src, pack, cunit,fullTargetName, true, false);
@@ -88,17 +88,17 @@
removeAllBreakpoints();
}
}//end testBreakPoint
-
+
public void testWatchpoint() throws Exception {
try {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$InnerChildType$innerChildsMethod()V$1$anAnonInt",
targetParentType = "MoveeChild$InnerChildType$innerChildsMethod()V$1",
- fieldName = "anAnonInt",
+ fieldName = "anAnonInt",
newAnonTypeName = "a.b.c.MoveeChild$InnerChildType$NewAnonymousClass";
-
+
//create breakpoint to test
IJavaWatchpoint breakpoint = createNestedTypeWatchPoint(src, pack, cunit, fullTargetName, true, true);
//refactor
@@ -116,17 +116,17 @@
} finally {
removeAllBreakpoints();
}
- }//end testBreakPoint
-
+ }//end testBreakPoint
+
public void testClassLoadpoint() throws Exception {
try {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$InnerChildType$innerChildsMethod()V$1",
targetParentType = "MoveeChild$InnerChildType$innerChildsMethod()V$1",
newAnonTypeName = "a.b.c.MoveeChild$InnerChildType$NewAnonymousClass";
-
+
//create breakpoint to test
IJavaClassPrepareBreakpoint breakpoint = createClassPrepareBreakpoint(src, pack, cunit, fullTargetName);
//refactor
@@ -143,23 +143,23 @@
} finally {
removeAllBreakpoints();
}
- }//end testBreakPoint
-
-//////////////////////////////////////////////////////////////////////////////////////
+ }//end testBreakPoint
+
+//////////////////////////////////////////////////////////////////////////////////////
private Refactoring setupRefactor(String root, String packageName, String cuName, String targetName) throws Exception {
IJavaProject javaProject = get14Project();
ICompilationUnit cunit = getCompilationUnit(javaProject, root, packageName, cuName);
IType type = (IType)getMember(cunit,targetName);
-
+
//IDocument compUnitSource = new Document(cunit.getSource());
-
+
ISourceRange typeInfo = type.getSourceRange();
- int target = typeInfo.getOffset();
-
+ int target = typeInfo.getOffset();
+
ConvertAnonymousToNestedRefactoring ref= new ConvertAnonymousToNestedRefactoring(cunit, target, 0);
//configure the ref a little more here!
- ref.setClassName("NewAnonymousClass");
-
+ ref.setClassName("NewAnonymousClass");
+
RefactoringStatus preconditionResult= ref.checkInitialConditions(new NullProgressMonitor());
if(!preconditionResult.isOK())
{
@@ -167,7 +167,7 @@
return null;
}
//configure the ref a little more here!
- ref.setClassName("NewAnonymousClass");
+ ref.setClassName("NewAnonymousClass");
return ref;
}
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/ConvertNonPublicAnonymousTypeToNestedUnitTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/ConvertNonPublicAnonymousTypeToNestedUnitTests.java
index 44920ec..dd6e688 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/ConvertNonPublicAnonymousTypeToNestedUnitTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/ConvertNonPublicAnonymousTypeToNestedUnitTests.java
@@ -29,10 +29,10 @@
public ConvertNonPublicAnonymousTypeToNestedUnitTests(String name) {
super(name);
}
-
+
public void testLineBreakpoint() throws Exception {
try {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "NonPublicChildType$nonPublicChildsMethod()V$1",
@@ -40,7 +40,7 @@
newAnonTypeName = "a.b.c.NonPublicChildType$NewAnonymousClass";
int lineNumber = 56,
newLineNumber = 60;///////VERIFY NEW LINE NUMBER
-
+
//create breakpoint to test
IJavaLineBreakpoint breakpoint = createLineBreakpoint(lineNumber, src, pack, cunit, fullTargetName);
//refactor
@@ -58,11 +58,11 @@
} finally {
removeAllBreakpoints();
}
- }//end testBreakPoint
+ }//end testBreakPoint
public void testMethodBreakpoint() throws Exception {
try {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "NonPublicChildType$nonPublicChildsMethod()V$1$anonTypeMethod()V",
@@ -87,17 +87,17 @@
removeAllBreakpoints();
}
}//end testBreakPoint
-
+
public void testWatchpoint() throws Exception {
try {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "NonPublicChildType$nonPublicChildsMethod()V$1$anAnonInt",
targetParentType = "NonPublicChildType$nonPublicChildsMethod()V$1",
newAnonTypeName = "a.b.c.NonPublicChildType$NewAnonymousClass",
fieldName = "anAnonInt";
-
+
//create breakpoint to test
IJavaWatchpoint breakpoint = createNestedTypeWatchPoint(src, pack, cunit, fullTargetName, true, true);
//refactor
@@ -115,17 +115,17 @@
} finally {
removeAllBreakpoints();
}
- }//end testBreakPoint
-
+ }//end testBreakPoint
+
public void testClassLoadpoint() throws Exception {
try {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "NonPublicChildType$nonPublicChildsMethod()V$1",
targetParentType = "NonPublicChildType$nonPublicChildsMethod()V$1",
newAnonTypeName = "a.b.c.NonPublicChildType$NewAnonymousClass";
-
+
//create breakpoint to test
IJavaClassPrepareBreakpoint breakpoint = createClassPrepareBreakpoint(src, pack, cunit, fullTargetName);
//refactor
@@ -142,23 +142,23 @@
} finally {
removeAllBreakpoints();
}
- }//end testBreakPoint
-
-//////////////////////////////////////////////////////////////////////////////////////
+ }//end testBreakPoint
+
+//////////////////////////////////////////////////////////////////////////////////////
private Refactoring setupRefactor(String root, String packageName, String cuName, String targetName) throws Exception {
IJavaProject javaProject = get14Project();
ICompilationUnit cunit = getCompilationUnit(javaProject, root, packageName, cuName);
IType type = (IType)getMember(cunit,targetName);
-
+
//IDocument compUnitSource = new Document(cunit.getSource());
-
+
ISourceRange typeInfo = type.getSourceRange();
- int target = typeInfo.getOffset();
-
+ int target = typeInfo.getOffset();
+
ConvertAnonymousToNestedRefactoring ref= new ConvertAnonymousToNestedRefactoring(cunit, target, 0);
//configure the ref a little more here!
- ref.setClassName("ThisWillBeErased");//must have *A* name...
-
+ ref.setClassName("ThisWillBeErased");//must have *A* name...
+
//the below actually resets the refactoring fields to defaults.
RefactoringStatus preconditionResult= ref.checkInitialConditions(new NullProgressMonitor());
if(!preconditionResult.isOK())
@@ -167,7 +167,7 @@
return null;
}
//configure the actual new name
- ref.setClassName("NewAnonymousClass");
+ ref.setClassName("NewAnonymousClass");
return ref;
}
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/ConvertPublicAnonymousTypeToNestedUnitTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/ConvertPublicAnonymousTypeToNestedUnitTests.java
index de761e5..c3b52eb 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/ConvertPublicAnonymousTypeToNestedUnitTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/ConvertPublicAnonymousTypeToNestedUnitTests.java
@@ -32,7 +32,7 @@
public void testLineBreakpoint() throws Exception {
try {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$childsMethod()V$1",
@@ -40,7 +40,7 @@
newAnonTypeName = "a.b.c.MoveeChild$NewAnonymousClass";
int lineNumber = 26,
newLineNumber = 30;
-
+
//create breakpoint to test
IJavaLineBreakpoint breakpoint = createLineBreakpoint(lineNumber, src, pack, cunit, fullTargetName);
//refactor
@@ -58,16 +58,16 @@
} finally {
removeAllBreakpoints();
}
- }//end testBreakPoint
+ }//end testBreakPoint
public void testMethodBreakpoint() throws Exception {
try {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$childsMethod()V$1$anonTypeMethod()QString",
targetParentType = "MoveeChild$childsMethod()V$1",
- methodName = "anonTypeMethod",
+ methodName = "anonTypeMethod",
newAnonTypeName = "a.b.c.MoveeChild$NewAnonymousClass";
//create breakpoint to test
IJavaMethodBreakpoint breakpoint = createMethodBreakpoint(src, pack, cunit,fullTargetName, true, false);
@@ -87,17 +87,17 @@
removeAllBreakpoints();
}
}//end testBreakPoint
-
+
public void testWatchpoint() throws Exception {
try {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$childsMethod()V$1$anAnonInt",
targetParentType = "MoveeChild$childsMethod()V$1",
- fieldName = "anAnonInt",
+ fieldName = "anAnonInt",
newAnonTypeName = "a.b.c.MoveeChild$NewAnonymousClass";
-
+
//create breakpoint to test
IJavaWatchpoint breakpoint = createNestedTypeWatchPoint(src, pack, cunit, fullTargetName, true, true);
//refactor
@@ -115,17 +115,17 @@
} finally {
removeAllBreakpoints();
}
- }//end testBreakPoint
-
+ }//end testBreakPoint
+
public void testClassLoadpoint() throws Exception {
try {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$childsMethod()V$1",
targetParentType = "MoveeChild$childsMethod()V$1",
newAnonTypeName = "a.b.c.MoveeChild$NewAnonymousClass";
-
+
//create breakpoint to test
IJavaClassPrepareBreakpoint breakpoint = createClassPrepareBreakpoint(src, pack, cunit, fullTargetName);
//refactor
@@ -142,20 +142,20 @@
} finally {
removeAllBreakpoints();
}
- }//end testBreakPoint
-
+ }//end testBreakPoint
+
private Refactoring setupRefactor(String root, String packageName, String cuName, String targetName) throws Exception {
IJavaProject javaProject = get14Project();
ICompilationUnit cunit = getCompilationUnit(javaProject, root, packageName, cuName);
IType type = (IType)getMember(cunit,targetName);
-
+
ISourceRange typeInfo = type.getSourceRange();
- int target = typeInfo.getOffset();
-
+ int target = typeInfo.getOffset();
+
ConvertAnonymousToNestedRefactoring ref= new ConvertAnonymousToNestedRefactoring(cunit, target, 0);
//configure the ref a little more here!
- ref.setClassName("NewAnonymousClass");
-
+ ref.setClassName("NewAnonymousClass");
+
RefactoringStatus preconditionResult= ref.checkInitialConditions(new NullProgressMonitor());
if(!preconditionResult.isOK())
{
@@ -163,7 +163,7 @@
return null;
}
//configure the ref a little more here!
- ref.setClassName("NewAnonymousClass");
+ ref.setClassName("NewAnonymousClass");
return ref;
}
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/ExtractMethodUnitTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/ExtractMethodUnitTests.java
index 195ff56..a99f719 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/ExtractMethodUnitTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/ExtractMethodUnitTests.java
@@ -51,7 +51,7 @@
removeAllBreakpoints();
}
}//end testLineBreakPoint
-
+
public void testExtractionFromNonPublicType() throws Exception {
try {
int lineNumber = 40;
@@ -75,7 +75,7 @@
removeAllBreakpoints();
}
}//end testLineBreakPoint
-
+
public void testExtractionFromInternalType() throws Exception {
try {
int lineNumber = 29;
@@ -98,21 +98,21 @@
} finally {
removeAllBreakpoints();
}
- }//end testLineBreakPoint
-
-
+ }//end testLineBreakPoint
+
+
/////////////////////////////////////////
-
+
private Refactoring setupRefactor(int lineNumber, String root, String targetPackageName, String cuName) throws Exception {
-
+
IJavaProject javaProject = get14Project();
ICompilationUnit cunit = getCompilationUnit(javaProject, root, targetPackageName, cuName);
-
+
IDocument sourceCUnit = new Document(cunit.getSource());
- IRegion lineInfo = sourceCUnit.getLineInformation(lineNumber-1);//-1 Document considers lineNumber different than createBreakpoint
-
+ IRegion lineInfo = sourceCUnit.getLineInformation(lineNumber-1);//-1 Document considers lineNumber different than createBreakpoint
+
ExtractMethodRefactoring ref= new ExtractMethodRefactoring(cunit,lineInfo.getOffset(), lineInfo.getLength());
-
+
RefactoringStatus preconditionResult= ref.checkInitialConditions(new NullProgressMonitor());
if(!preconditionResult.isOK())
{
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/IntroduceParameterUnitTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/IntroduceParameterUnitTests.java
index f2b26f7..0d05231 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/IntroduceParameterUnitTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/IntroduceParameterUnitTests.java
@@ -73,7 +73,7 @@
removeAllBreakpoints();
}
}//end testLineBreakPoint
-
+
public void testExtractionFromInternalType() throws Exception {
try {
int lineNumber = 29;
@@ -89,26 +89,26 @@
assertTrue("Breakpoint Marker has ceased existing",methodBreakpoint.getMarker().exists());
assertEquals("wrong method Signature", "(QString;)V", methodBreakpoint.getMethodSignature());
assertEquals("wrong type name", "a.b.c.Movee$InnerType", methodBreakpoint.getTypeName());
- assertEquals("breakpoint attached to wrong method","innerTypeMethod",methodBreakpoint.getMethodName());
+ assertEquals("breakpoint attached to wrong method","innerTypeMethod",methodBreakpoint.getMethodName());
} catch (Exception e) {
throw e;
} finally {
removeAllBreakpoints();
}
- }//end testLineBreakPoint
-
-//////////////////////////////////////////////////////////////////////////////////////
+ }//end testLineBreakPoint
+
+//////////////////////////////////////////////////////////////////////////////////////
private Refactoring setupRefactor(int lineNumber, String root, String targetPackageName, String cuName) throws Exception {
-
+
IJavaProject javaProject = get14Project();
ICompilationUnit cunit = getCompilationUnit(javaProject, root, targetPackageName, cuName);
IDocument sourceCUnit = new Document(cunit.getSource());
IRegion lineInfo = sourceCUnit.getLineInformation(lineNumber-1);//-1 Document considers lineNumber different than createBreakpoint
int allowanceForBrackets = 4;
- int itemOffset = lineInfo.getOffset() + lineInfo.getLength() - allowanceForBrackets;
-
+ int itemOffset = lineInfo.getOffset() + lineInfo.getLength() - allowanceForBrackets;
+
IntroduceParameterRefactoring ref= new IntroduceParameterRefactoring(cunit,itemOffset, 0);//0, no length
-
+
RefactoringStatus preconditionResult= ref.checkInitialConditions(new NullProgressMonitor());
if(!preconditionResult.isOK())
{
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/MemberParser.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/MemberParser.java
index 66b1f0f..6d7badb 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/MemberParser.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/MemberParser.java
@@ -32,7 +32,7 @@
import org.eclipse.jdt.internal.core.SourceType;
/**
- * Contains methods to find an IMember within a given path subdivided by the '$' character.
+ * Contains methods to find an IMember within a given path subdivided by the '$' character.
* Syntax:
* Type$InnerType$MethodNameAndSignature$AnonymousTypeDeclarationNumber$FieldName
* eg:<code>
@@ -43,7 +43,7 @@
* {
* Object anon = new Object(){
* int anIntField;
- * String anonTypeMethod() {return "an Example";}
+ * String anonTypeMethod() {return "an Example";}
* }
* }
* }
@@ -54,7 +54,7 @@
* eg:<code>1MyType</code>
*/
public class MemberParser{
-
+
/**
* @param typeQualifiedName
* @return
@@ -83,7 +83,7 @@
if(fragments[fragmentNum].containsJavaResources()){
ICompilationUnit cunits[] = fragments[fragmentNum].getCompilationUnits();
for (int cunitNum = 0; cunitNum < cunits.length; cunitNum++) {
- results.add(cunits[cunitNum]);
+ results.add(cunits[cunitNum]);
}
}
}
@@ -91,7 +91,7 @@
return null;
return results.toArray(new ICompilationUnit[results.size()]);
}
-
+
/**
* @param projects the scope of which you wish to return compilation units
* @return a handle to all compilation units contained by the given projects
@@ -99,12 +99,12 @@
*/
private static ICompilationUnit[] getAllCompilationUnits(IProject[] projects) throws JavaModelException{
return getAllCompilationUnits(getAllPackageFragments(projects));
- }
-
+ }
+
private static ICompilationUnit[] getAllCompilationUnits(String packageName, IProject[] projects)throws JavaModelException {
return getAllCompilationUnits(getAllPackageFragments(packageName, projects));
- }
-
+ }
+
/**
* @param types
* @return an array of all declared methods for the given types
@@ -113,7 +113,7 @@
private static IMethod[] getAllMethods(IType[] types) throws JavaModelException{
if(types==null)
return null;
-
+
final Set<IMethod> results = new HashSet<IMethod>();
for (int typeNum = 0; typeNum < types.length; typeNum++) {
IMethod[] methods = types[typeNum].getMethods();
@@ -125,7 +125,7 @@
return null;
return results.toArray(new SourceMethod[results.size()]);
}
-
+
/**
* @param projects the scope of the return
* @return all package fragments in the scope
@@ -152,7 +152,7 @@
private static IProject[] getAllProjects(){
return ResourcesPlugin.getWorkspace().getRoot().getProjects();
}
-
+
/**
* @param cunits the scope of the search
* @return all types within the scope
@@ -161,7 +161,7 @@
private static IType[] getAllTypes(ICompilationUnit[] cunits) throws JavaModelException {
if(cunits == null)
return null;
-
+
final Set<IType> results = new HashSet<IType>();
for (int cunitNum = 0; cunitNum < cunits.length; cunitNum++) {
IType types[] = cunits[cunitNum].getTypes(); //get all topLevel types
@@ -170,10 +170,10 @@
}
}
if(results.isEmpty())
- return null;
+ return null;
return results.toArray(new IType[results.size()]);
}
-
+
/**
* @param methods the scope of the search
* @return an array of all types declared within the given methods.
@@ -194,8 +194,8 @@
return null;
return results.toArray(new SourceType[results.size()]);
}
-
- /**Will search within the given type and all of it's children - including methods
+
+ /**Will search within the given type and all of it's children - including methods
* and anonymous types for other types.
* @param types the scope of the search
* @return all types within the given scope
@@ -223,11 +223,11 @@
//else
return results.toArray(new SourceType[results.size()]);//possibly change to new IType
}
-
-
+
+
/**
* Returns the Java project with the given name.
- *
+ *
* @param name project name
* @return the Java project with the given name
*/
@@ -235,7 +235,7 @@
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject();
return JavaCore.create(project);
}
-
+
/**
* @param packageName name of the package
* @param projects where to search
@@ -259,11 +259,11 @@
//else
return results.toArray(new IPackageFragment[results.size()]);
}
-
+
private static IProject getProject(String projectName){
return ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
}
-
+
private static IType getType(ArrayList<String> typeList, ICompilationUnit[] cunits) throws JavaModelException{
IType[] types = getAllTypes(cunits);
//if 1st letter is a number, it's anonymous
@@ -295,20 +295,20 @@
else
typeNum++;//check the next type
}
-
+
//else, it is not in the top-level types - check in methods
types = getAllTypes(getAllMethods(types));
if(types==null)
return null;//couldn't find it.
- }//end while
+ }//end while
}
-
+
/**
- * Will search the workspace and return the requested type. The more information given,
+ * Will search the workspace and return the requested type. The more information given,
* the faster the search
* @param typeName the name of the type, with or without qualifiers - it cannot be null
- * e.g. "aType.innerType.1.typeInAnonymousType" or even just "typeInAnonymousType"
- * or "innerType.1.typeInAnonymousType".
+ * e.g. "aType.innerType.1.typeInAnonymousType" or even just "typeInAnonymousType"
+ * or "innerType.1.typeInAnonymousType".
* @param packageName the elemental name of the package containing the given type - may be null
* @param projectName the elemental name of the project containing the given type - may be null
* @return the IType handle to the requested type
@@ -327,7 +327,7 @@
else{
projects = getAllProjects();
}
-
+
//get the Comp.units for those projects
ICompilationUnit cunits[] = null;
if(packageName!=null && packageName.length()>0){
@@ -336,14 +336,14 @@
else{
cunits = getAllCompilationUnits(projects);
}
-
+
return getType(typeList, cunits);
}
-
-
+
+
/**
* @param cu the CompilationUnit containing the toplevel Type
- * @param target - the IMember target, listed in full Syntax, as noted in MemberParser
+ * @param target - the IMember target, listed in full Syntax, as noted in MemberParser
* eg: EnclosingType$InnerType
* @return the Lowest level inner type specified in input
*/
@@ -361,14 +361,14 @@
}
//has no inner type
return cu.getType(target);
-
+
}
-
+
/**
* Helper method for getLowestType (ICompilationUnit cu, String input)
* @param top name of enclosing Type
- * @param tail the typename, possibly including inner type,
- * separated by $.
+ * @param tail the typename, possibly including inner type,
+ * separated by $.
* eg: EnclosingType$InnerType
* @return the designated type, or null if type not found.
*/
@@ -376,10 +376,10 @@
String newtail = tail;
if(newtail==null || newtail.length()==0 )
return top;
-
+
if(!top.exists())
return null;
-
+
//check if there are more nested elements
String head=null;
for(int i=0;i<newtail.length();i++)
@@ -387,7 +387,7 @@
if(newtail.charAt(i)=='$')//nested Item?
{//Enclosing$Inner$MoreInner
head = newtail.substring(0,i);
- newtail = newtail.substring(i+1);
+ newtail = newtail.substring(i+1);
break;//found next item
}
}
@@ -396,19 +396,19 @@
head = newtail;
newtail = null;
}
-
+
if(top instanceof IType)
return getNextFromType(top, head, newtail);
- else
+ else
if(top instanceof IMethod)
return getNextFromMethod(top, head, newtail);
else
if(top instanceof IField)
return getNextFromField(top, head, newtail);
//else there is a problem!
- return getDeepest(top,newtail);
+ return getDeepest(top,newtail);
}
-
+
/**
* @param head the string to parse for a name
* @return the name in the type, given in the format "Occurance#Type"
@@ -421,11 +421,11 @@
{
return head.substring(i);
}
-
+
}
- return IInternalDebugCoreConstants.EMPTY_STRING;//entire thing is a number
+ return IInternalDebugCoreConstants.EMPTY_STRING;//entire thing is a number
}
-
+
/**
* @param head the string to parse for an occurrence
* @return the name in the type, given in the format "Occurance#Type"
@@ -439,7 +439,7 @@
}
return Integer.parseInt(head);//entire thing is a number
}
-
+
/**
* @param head name of method w/ signature at the end
* @return simply the name of the given method, using format:
@@ -454,7 +454,7 @@
}
return null;
}
-
+
/**
* @param top the field in which to search
* @param head the next member to find
@@ -463,14 +463,14 @@
*/
protected IMember getNextFromField(IMember top, String head, String tail) {
IField current = (IField)top;
-
+
IType type = current.getType(getLocalTypeName(head),getLocalTypeOccurrence(head));
- if(type.exists())
+ if(type.exists())
return getDeepest(type,tail);
//else
- return null;//something failed.
+ return null;//something failed.
}
-
+
/**
* @param top the member in which to search
* @param head the next member to find
@@ -480,15 +480,15 @@
protected IMember getNextFromMethod(IMember top, String head, String tail) {
//must be a local or anonymous type
IMethod current = (IMethod)top;
-
+
//is next part a Type?
IType type = current.getType(getLocalTypeName(head), getLocalTypeOccurrence(head));
- if(type.exists())
+ if(type.exists())
return getDeepest(type,tail);
//else
return null;
}
-
+
/**
* @param top the member in which to search
* @param head the next member to find
@@ -497,10 +497,10 @@
*/
protected IMember getNextFromType(IMember top, String head, String tail) {
IType current = (IType)top;
-
+
//is next part a Type?
IMember next = current.getType(head);
- if(next.exists())
+ if(next.exists())
return getDeepest(next,tail);
//else, is next part a Field?
next = current.getField(head);
@@ -513,7 +513,7 @@
//else
return null;//something failed.
}
-
+
/**
* @param head name of method w/ signature at the end
* @return simply the ParameterTypeSignature, using format:
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/MoveCompilationUnitTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/MoveCompilationUnitTests.java
index 5acd60a..bd36ecf 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/MoveCompilationUnitTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/MoveCompilationUnitTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -26,28 +26,28 @@
import org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgDestinationFactory;
import org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgPolicyFactory;
import org.eclipse.ltk.core.refactoring.participants.MoveRefactoring;
-//
+//
//then check number of and location of created breakpoint
/**
- * A set of tests which moves a CompilationUnit and verifies if
- * various breakpoints associated with that C.U. were moved.
+ * A set of tests which moves a CompilationUnit and verifies if
+ * various breakpoints associated with that C.U. were moved.
*/
public class MoveCompilationUnitTests extends AbstractRefactoringDebugTest {
public MoveCompilationUnitTests(String name) {
super(name);
}
-
+
/**
* Performs a move refactoring.
- *
+ *
* @param element element to move
* @param destination destination of move
* @throws Exception
*/
protected void move(IJavaElement element, IJavaElement destination) throws Exception {
IMovePolicy movePolicy= ReorgPolicyFactory.createMovePolicy(
- new IResource[0],
+ new IResource[0],
new IJavaElement[] {element});
JavaMoveProcessor processor= new JavaMoveProcessor(movePolicy);
processor.setDestination(ReorgDestinationFactory.createDestination(destination));
@@ -55,9 +55,9 @@
if(processor.canUpdateJavaReferences()) {
processor.setUpdateReferences(true);
}
- performRefactor(new MoveRefactoring(processor));
+ performRefactor(new MoveRefactoring(processor));
}
-
+
/**
* Tests if a LineBreakPoint was moved appropriately.
* @throws Exception
@@ -82,19 +82,19 @@
removeAllBreakpoints();
}
}//end testLineBreakPoint
-
+
/**
* Tests if a MethodBreakPoint was moved appropriately.
* @throws Exception
- */
+ */
public void testMethodBreakPoint() throws Exception {
IJavaProject javaProject = get14Project();
ICompilationUnit cunit= getCompilationUnit(javaProject, "src", "a.b.c", "Movee.java");
-
+
try {
//create an EntryMethod Breakpoint to test
createMethodBreakpoint("a.b.c.Movee", "testMethod1", "()V", true, false);
- IPackageFragment destination= getPackageFragmentRoot(javaProject, "src").createPackageFragment("a.b", false, null);
+ IPackageFragment destination= getPackageFragmentRoot(javaProject, "src").createPackageFragment("a.b", false, null);
move(cunit, destination);
IBreakpoint[] breakpoints = getBreakpointManager().getBreakpoints();
assertEquals("wrong number of breakpoints", 1, breakpoints.length);
@@ -105,22 +105,22 @@
throw e;
} finally {
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Tests if a WatchPointBreakPoint was moved appropriately.
* @throws Exception
- */
+ */
public void testWatchPointBreakPoint() throws Exception {
IJavaProject javaProject = get14Project();
ICompilationUnit cunit= getCompilationUnit(javaProject, "src", "a.b.c", "Movee.java");
-
+
try {
//create a watchPoint to test
createWatchpoint("a.b.c.Movee", "anInt", true, true);
- IPackageFragment destination= getPackageFragmentRoot(javaProject, "src").createPackageFragment("a.b", false, null);
- move(cunit, destination);
+ IPackageFragment destination= getPackageFragmentRoot(javaProject, "src").createPackageFragment("a.b", false, null);
+ move(cunit, destination);
IBreakpoint[] breakPoints = getBreakpointManager().getBreakpoints();
assertEquals("wrong number of watchpoints", 1, breakPoints .length);
IJavaWatchpoint watchPoint = (IJavaWatchpoint) breakPoints [0];
@@ -130,21 +130,21 @@
throw e;
} finally {
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Tests if a ClassLoadBreakPoint was moved appropriately.
* @throws Exception
- */
+ */
public void testClassLoadBreakPoint() throws Exception {
IJavaProject javaProject = get14Project();
ICompilationUnit cunit= getCompilationUnit(javaProject, "src", "a.b.c", "Movee.java");
-
+
try {
//create a classLoad breakpoint to test
createClassPrepareBreakpoint("a.b.c.Movee");
- IPackageFragment destination= getPackageFragmentRoot(javaProject, "src").createPackageFragment("a.b", false, null);
+ IPackageFragment destination= getPackageFragmentRoot(javaProject, "src").createPackageFragment("a.b", false, null);
move(cunit, destination);
IBreakpoint[] breakpoints = getBreakpointManager().getBreakpoints();
assertEquals("wrong number of breakpoints", 1, breakpoints.length);
@@ -154,6 +154,6 @@
throw e;
} finally {
removeAllBreakpoints();
- }
+ }
}
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/MoveFieldUnitTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/MoveFieldUnitTests.java
index c08ad8f..894665f 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/MoveFieldUnitTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/MoveFieldUnitTests.java
@@ -16,33 +16,33 @@
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.debug.core.IJavaWatchpoint;
-//
+//
//then check number of and location of created breakpoint
/**
- * A set of tests which moves a CompilationUnit and verifies if
- * various breakpoints associated with that C.U. were moved.
+ * A set of tests which moves a CompilationUnit and verifies if
+ * various breakpoints associated with that C.U. were moved.
*/
public class MoveFieldUnitTests extends MoveRefactoringTest {
public MoveFieldUnitTests(String name) {
super(name);
}
-
+
/**
* Tests if a WatchPointBreakPoint was moved appropriately.
* @throws Exception
- */
+ */
public void testPublicTypeFieldMove() throws Exception {
IJavaProject javaProject = get14Project();
ICompilationUnit cunit= getCompilationUnit(javaProject, "src", "a.b.c", "Movee.java");
IJavaElement type = cunit.getType("Movee").getField("anInt");
-
+
try {
//create a watchPoint to test
createWatchpoint("a.b.c.Movee", "anInt", true, true);
-
- refactor(javaProject, type);
-
+
+ refactor(javaProject, type);
+
IBreakpoint[] breakPoints = getBreakpointManager().getBreakpoints();
assertEquals("wrong number of watchpoints", 1, breakPoints .length);
IJavaWatchpoint watchPoint = (IJavaWatchpoint) breakPoints [0];
@@ -52,24 +52,24 @@
throw e;
} finally {
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Tests if a WatchPointBreakPoint was moved appropriately.
* @throws Exception
- */
+ */
public void testInnerTypeFieldMove() throws Exception {
IJavaProject javaProject = get14Project();
ICompilationUnit cunit= getCompilationUnit(javaProject, "src", "a.b.c", "Movee.java");
IJavaElement type = cunit.getType("Movee").getType("InnerType").getField("innerTypeInt");
-
+
try {
//create a watchPoint to test
createWatchpoint("a.b.c.Movee.InnerType", "innerTypeInt", true, true);
-
- refactor(javaProject, type);
-
+
+ refactor(javaProject, type);
+
IBreakpoint[] breakPoints = getBreakpointManager().getBreakpoints();
assertEquals("wrong number of watchpoints", 1, breakPoints .length);
IJavaWatchpoint watchPoint = (IJavaWatchpoint) breakPoints [0];
@@ -79,24 +79,24 @@
throw e;
} finally {
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Tests if a WatchPointBreakPoint was moved appropriately.
* @throws Exception
- */
+ */
public void testNonPublicTypeFieldMove() throws Exception {
IJavaProject javaProject = get14Project();
ICompilationUnit cunit= getCompilationUnit(javaProject, "src", "a.b.c", "Movee.java");
IJavaElement type = cunit.getType("NonPublicType").getField("differentInt");
-
+
try {
//create a watchPoint to test
createWatchpoint("a.b.c","Movee.java", "NonPublicType", "differentInt", true, true);
-
- refactor(javaProject, type);
-
+
+ refactor(javaProject, type);
+
IBreakpoint[] breakPoints = getBreakpointManager().getBreakpoints();
assertEquals("wrong number of watchpoints", 1, breakPoints .length);
IJavaWatchpoint watchPoint = (IJavaWatchpoint) breakPoints [0];
@@ -106,6 +106,6 @@
throw e;
} finally {
removeAllBreakpoints();
- }
- }
+ }
+ }
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/MoveInnerTypeMethodUnitTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/MoveInnerTypeMethodUnitTests.java
index 15c26f2..520175c 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/MoveInnerTypeMethodUnitTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/MoveInnerTypeMethodUnitTests.java
@@ -18,11 +18,11 @@
import org.eclipse.jdt.core.Signature;
import org.eclipse.jdt.debug.core.IJavaLineBreakpoint;
import org.eclipse.jdt.debug.core.IJavaMethodBreakpoint;
-//
+//
//then check number of and location of created breakpoint
/**
- * A set of tests which moves a CompilationUnit and verifies if
- * various breakpoints associated with that C.U. were moved.
+ * A set of tests which moves a CompilationUnit and verifies if
+ * various breakpoints associated with that C.U. were moved.
*/
public class MoveInnerTypeMethodUnitTests extends MoveRefactoringTest {
@@ -42,7 +42,7 @@
int newLineNumber = 20;
//create lineBreakpoint to test
createLineBreakpoint(lineNumber, "a.b.c.Movee$InnerType");
- refactor(javaProject, type);
+ refactor(javaProject, type);
IBreakpoint[] breakpoints = getBreakpointManager().getBreakpoints();
assertEquals("wrong number of breakpoints", 1, breakpoints.length);
IJavaLineBreakpoint lineBreakpoint = (IJavaLineBreakpoint) breakpoints[0];
@@ -55,20 +55,20 @@
removeAllBreakpoints();
}
}//end testLineBreakPoint
-
+
/**
* Tests if a MethodBreakPoint was moved appropriately.
* @throws Exception
- */
+ */
public void testMethodBreakPoint() throws Exception {
IJavaProject javaProject = get14Project();
ICompilationUnit cunit= getCompilationUnit(javaProject, "src", "a.b.c", "Movee.java");
IJavaElement type = cunit.getType("Movee").getType("InnerType").getMethods()[0];
-
+
try {
//create an EntryMethod Breakpoint to test & do so
createMethodBreakpoint("a.b.c.Movee$InnerType", "innerTypeMethod", "()V", true, false);
- refactor(javaProject, type);
+ refactor(javaProject, type);
IBreakpoint[] breakpoints = getBreakpointManager().getBreakpoints();
assertEquals("wrong number of breakpoints", 1, breakpoints.length);
IJavaMethodBreakpoint methodBreakpoint = (IJavaMethodBreakpoint) breakpoints[0];
@@ -78,7 +78,7 @@
throw e;
} finally {
removeAllBreakpoints();
- }
+ }
}
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/MoveInnerTypeToNewFileUnitTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/MoveInnerTypeToNewFileUnitTests.java
index 3c1ff7a..6932cb0 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/MoveInnerTypeToNewFileUnitTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/MoveInnerTypeToNewFileUnitTests.java
@@ -49,8 +49,8 @@
removeAllBreakpoints();
}
}//end testBreakPoint
-
-
+
+
public void testMethodBreakPoint() throws Exception {
try {
//create Breakpoint to test
@@ -70,7 +70,7 @@
removeAllBreakpoints();
}
}//end testBreakPoint
-
+
public void testWatchPoint() throws Exception {
try {
//create Breakpoint to test
@@ -90,7 +90,7 @@
removeAllBreakpoints();
}
}//end testBreakPoint
-
+
public void testClassLoadBreakPoint() throws Exception {
try {
//create Breakpoint to test
@@ -109,12 +109,12 @@
removeAllBreakpoints();
}
}//end testBreakPoint
-
+
private Refactoring setupRefactor(String parentClassName, String className, String root, String targetPackageName, String cuName) throws Exception {
IJavaProject javaProject = get14Project();
IType parentClas= getCompilationUnit(javaProject, root, targetPackageName, cuName).getType(parentClassName);
IType clas= parentClas.getType(className);
-
+
MoveInnerToTopRefactoring ref= new MoveInnerToTopRefactoring(clas, JavaPreferencesSettings.getCodeGenerationSettings(clas.getJavaProject()));
ref.checkInitialConditions(new NullProgressMonitor());
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/MoveInnerTypeUnitTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/MoveInnerTypeUnitTests.java
index 40f4e15..939946b 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/MoveInnerTypeUnitTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/MoveInnerTypeUnitTests.java
@@ -19,11 +19,11 @@
import org.eclipse.jdt.debug.core.IJavaLineBreakpoint;
import org.eclipse.jdt.debug.core.IJavaMethodBreakpoint;
import org.eclipse.jdt.debug.core.IJavaWatchpoint;
-//
+//
//then check number of and location of created breakpoint
/**
- * A set of tests which moves a CompilationUnit and verifies if
- * various breakpoints associated with that C.U. were moved.
+ * A set of tests which moves a CompilationUnit and verifies if
+ * various breakpoints associated with that C.U. were moved.
*/
public class MoveInnerTypeUnitTests extends MoveRefactoringTest {
@@ -42,7 +42,7 @@
int lineNumber = 38;
//create lineBreakpoint to test
createLineBreakpoint(lineNumber, "a.b.c.Movee$InnerType");
- refactor(javaProject, type);
+ refactor(javaProject, type);
IBreakpoint[] breakpoints = getBreakpointManager().getBreakpoints();
assertEquals("wrong number of breakpoints", 1, breakpoints.length);
IJavaLineBreakpoint lineBreakpoint = (IJavaLineBreakpoint) breakpoints[0];
@@ -55,20 +55,20 @@
removeAllBreakpoints();
}
}//end testLineBreakPoint
-
+
/**
* Tests if a MethodBreakPoint was moved appropriately.
* @throws Exception
- */
+ */
public void testMethodBreakPoint() throws Exception {
IJavaProject javaProject = get14Project();
ICompilationUnit cunit= getCompilationUnit(javaProject, "src", "a.b.c", "Movee.java");
IType type = cunit.getType("Movee").getType("InnerType");
-
+
try {
//create an EntryMethod Breakpoint to test & do so
createMethodBreakpoint("a.b.c.Movee$InnerType", "innerTypeMethod", "()V", true, false);
- refactor(javaProject, type);
+ refactor(javaProject, type);
IBreakpoint[] breakpoints = getBreakpointManager().getBreakpoints();
assertEquals("wrong number of breakpoints", 1, breakpoints.length);
IJavaMethodBreakpoint methodBreakpoint = (IJavaMethodBreakpoint) breakpoints[0];
@@ -78,21 +78,21 @@
throw e;
} finally {
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Tests if a WatchPointBreakPoint was moved appropriately.
* @throws Exception
- */
+ */
public void testWatchPointBreakPoint() throws Exception {
IJavaProject javaProject = get14Project();
ICompilationUnit cunit= getCompilationUnit(javaProject, "src", "a.b.c", "Movee.java");
- IType type = cunit.getType("Movee").getType("InnerType");
+ IType type = cunit.getType("Movee").getType("InnerType");
try {
//create a watchPoint to test
createWatchpoint("a.b.c.Movee$InnerType", "innerTypeInt", true, true);
- refactor(javaProject, type);
+ refactor(javaProject, type);
IBreakpoint[] breakPoints = getBreakpointManager().getBreakpoints();
assertEquals("wrong number of watchpoints", 1, breakPoints .length);
IJavaWatchpoint watchPoint = (IJavaWatchpoint) breakPoints [0];
@@ -102,24 +102,24 @@
throw e;
} finally {
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Tests if a ClassLoadBreakPoint was moved appropriately.
* @throws Exception
- */
+ */
public void testClassLoadBreakPoint() throws Exception {
IJavaProject javaProject = get14Project();
ICompilationUnit cunit= getCompilationUnit(javaProject, "src", "a.b.c", "Movee.java");
- IType type = cunit.getType("Movee").getType("InnerType");
-
+ IType type = cunit.getType("Movee").getType("InnerType");
+
try {
//create a classLoad breakpoint to test
createClassPrepareBreakpoint("a.b.c.Movee$InnerType");
-
- refactor(javaProject, type);
-
+
+ refactor(javaProject, type);
+
IBreakpoint[] breakpoints = getBreakpointManager().getBreakpoints();
assertEquals("wrong number of breakpoints", 1, breakpoints.length);
IJavaClassPrepareBreakpoint classPrepareBreakpoint = (IJavaClassPrepareBreakpoint) breakpoints[0];
@@ -128,6 +128,6 @@
throw e;
} finally {
removeAllBreakpoints();
- }
+ }
}
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/MoveNonPublicTypeMethodUnitTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/MoveNonPublicTypeMethodUnitTests.java
index b8a3f98..30bc260 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/MoveNonPublicTypeMethodUnitTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/MoveNonPublicTypeMethodUnitTests.java
@@ -18,11 +18,11 @@
import org.eclipse.jdt.core.Signature;
import org.eclipse.jdt.debug.core.IJavaLineBreakpoint;
import org.eclipse.jdt.debug.core.IJavaMethodBreakpoint;
-//
+//
//then check number of and location of created breakpoint
/**
- * A set of tests which moves a CompilationUnit and verifies if
- * various breakpoints associated with that C.U. were moved.
+ * A set of tests which moves a CompilationUnit and verifies if
+ * various breakpoints associated with that C.U. were moved.
*/
public class MoveNonPublicTypeMethodUnitTests extends MoveRefactoringTest {
@@ -42,7 +42,7 @@
int newLineNumber = 20;
//create lineBreakpoint to test
createLineBreakpoint(lineNumber,"a.b.c","Movee.java","NonPublicType");
- refactor(javaProject, type);
+ refactor(javaProject, type);
IBreakpoint[] breakpoints = getBreakpointManager().getBreakpoints();
assertEquals("wrong number of breakpoints", 1, breakpoints.length);
IJavaLineBreakpoint lineBreakpoint = (IJavaLineBreakpoint) breakpoints[0];
@@ -55,20 +55,20 @@
removeAllBreakpoints();
}
}//end testLineBreakPoint
-
+
/**
* Tests if a MethodBreakPoint was moved appropriately.
* @throws Exception
- */
+ */
public void testMethodBreakPoint() throws Exception {
IJavaProject javaProject = get14Project();
ICompilationUnit cunit= getCompilationUnit(javaProject, "src", "a.b.c", "Movee.java");
IJavaElement type = cunit.getType("NonPublicType").getMethods()[0];//1st method is nonPublicMethod
-
+
try {
//create an EntryMethod Breakpoint to test & do so
createMethodBreakpoint("a.b.c","Movee.java","NonPublicType","nonPublicMethod","()V",true, false);
- refactor(javaProject, type);
+ refactor(javaProject, type);
IBreakpoint[] breakpoints = getBreakpointManager().getBreakpoints();
assertEquals("wrong number of breakpoints", 1, breakpoints.length);
IJavaMethodBreakpoint methodBreakpoint = (IJavaMethodBreakpoint) breakpoints[0];
@@ -78,7 +78,7 @@
throw e;
} finally {
removeAllBreakpoints();
- }
+ }
}
-
+
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/MoveNonPublicTypeUnitTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/MoveNonPublicTypeUnitTests.java
index 1f5133e..5c17e4d 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/MoveNonPublicTypeUnitTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/MoveNonPublicTypeUnitTests.java
@@ -19,11 +19,11 @@
import org.eclipse.jdt.debug.core.IJavaLineBreakpoint;
import org.eclipse.jdt.debug.core.IJavaMethodBreakpoint;
import org.eclipse.jdt.debug.core.IJavaWatchpoint;
-//
+//
//then check number of and location of created breakpoint
/**
- * A set of tests which moves a CompilationUnit and verifies if
- * various breakpoints associated with that C.U. were moved.
+ * A set of tests which moves a CompilationUnit and verifies if
+ * various breakpoints associated with that C.U. were moved.
*/
public class MoveNonPublicTypeUnitTests extends MoveRefactoringTest {
@@ -42,7 +42,7 @@
int lineNumber = 31;
//create lineBreakpoint to test
createLineBreakpoint(lineNumber,"a.b.c","Movee.java","NonPublicType");
- refactor(javaProject, type);
+ refactor(javaProject, type);
IBreakpoint[] breakpoints = getBreakpointManager().getBreakpoints();
assertEquals("wrong number of breakpoints", 1, breakpoints.length);
IJavaLineBreakpoint lineBreakpoint = (IJavaLineBreakpoint) breakpoints[0];
@@ -55,20 +55,20 @@
removeAllBreakpoints();
}
}//end testLineBreakPoint
-
+
/**
* Tests if a MethodBreakPoint was moved appropriately.
* @throws Exception
- */
+ */
public void testMethodBreakPoint() throws Exception {
IJavaProject javaProject = get14Project();
ICompilationUnit cunit= getCompilationUnit(javaProject, "src", "a.b.c", "Movee.java");
IType type = cunit.getType("NonPublicType");
-
+
try {
//create an EntryMethod Breakpoint to test & do so
createMethodBreakpoint("a.b.c","Movee.java","NonPublicType","nonPublicMethod","()V",true, false);
- refactor(javaProject, type);
+ refactor(javaProject, type);
IBreakpoint[] breakpoints = getBreakpointManager().getBreakpoints();
assertEquals("wrong number of breakpoints", 1, breakpoints.length);
IJavaMethodBreakpoint methodBreakpoint = (IJavaMethodBreakpoint) breakpoints[0];
@@ -78,23 +78,23 @@
throw e;
} finally {
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Tests if a WatchPointBreakPoint was moved appropriately.
* @throws Exception
- */
+ */
public void testWatchPointBreakPoint() throws Exception {
IJavaProject javaProject = get14Project();
ICompilationUnit cunit= getCompilationUnit(javaProject, "src", "a.b.c", "Movee.java");
- IType type = cunit.getType("NonPublicType");
+ IType type = cunit.getType("NonPublicType");
try {
//create a watchPoint to test
createNestedTypeWatchPoint("src", "a.b.c", "Movee.java", "NonPublicType$differentInt", true, true);
-
- refactor(javaProject, type);
-
+
+ refactor(javaProject, type);
+
IBreakpoint[] breakPoints = getBreakpointManager().getBreakpoints();
assertEquals("wrong number of watchpoints", 1, breakPoints .length);
IJavaWatchpoint watchPoint = (IJavaWatchpoint) breakPoints [0];
@@ -104,24 +104,24 @@
throw e;
} finally {
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Tests if a ClassLoadBreakPoint was moved appropriately.
* @throws Exception
- */
+ */
public void testClassLoadBreakPoint() throws Exception {
IJavaProject javaProject = get14Project();
ICompilationUnit cunit= getCompilationUnit(javaProject, "src", "a.b.c", "Movee.java");
- IType type = cunit.getType("NonPublicType");
-
+ IType type = cunit.getType("NonPublicType");
+
try {
//create a classLoad breakpoint to test
createClassPrepareBreakpoint("a.b.c","Movee.java","NonPublicType");
-
- refactor(javaProject, type);
-
+
+ refactor(javaProject, type);
+
IBreakpoint[] breakpoints = getBreakpointManager().getBreakpoints();
assertEquals("wrong number of breakpoints", 1, breakpoints.length);
IJavaClassPrepareBreakpoint classPrepareBreakpoint = (IJavaClassPrepareBreakpoint) breakpoints[0];
@@ -130,6 +130,6 @@
throw e;
} finally {
removeAllBreakpoints();
- }
+ }
}
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/MovePublicTypeMethodUnitTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/MovePublicTypeMethodUnitTests.java
index 54bdb68..16c84f0 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/MovePublicTypeMethodUnitTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/MovePublicTypeMethodUnitTests.java
@@ -18,11 +18,11 @@
import org.eclipse.jdt.core.Signature;
import org.eclipse.jdt.debug.core.IJavaLineBreakpoint;
import org.eclipse.jdt.debug.core.IJavaMethodBreakpoint;
-//
+//
//then check number of and location of created breakpoint
/**
- * A set of tests which moves a CompilationUnit and verifies if
- * various breakpoints associated with that C.U. were moved.
+ * A set of tests which moves a CompilationUnit and verifies if
+ * various breakpoints associated with that C.U. were moved.
*/
public class MovePublicTypeMethodUnitTests extends MoveRefactoringTest {
@@ -42,7 +42,7 @@
int newLineNumber = 19;
//create lineBreakpoint to test
createLineBreakpoint(lineNumber, "a.b.c.Movee");
- refactor(javaProject, type);
+ refactor(javaProject, type);
IBreakpoint[] breakpoints = getBreakpointManager().getBreakpoints();
assertEquals("wrong number of breakpoints", 1, breakpoints.length);
IJavaLineBreakpoint lineBreakpoint = (IJavaLineBreakpoint) breakpoints[0];
@@ -55,20 +55,20 @@
removeAllBreakpoints();
}
}//end testLineBreakPoint
-
+
/**
* Tests if a MethodBreakPoint was moved appropriately.
* @throws Exception
- */
+ */
public void testMethodBreakPoint() throws Exception {
IJavaProject javaProject = get14Project();
ICompilationUnit cunit= getCompilationUnit(javaProject, "src", "a.b.c", "Movee.java");
IJavaElement type = cunit.getType("Movee").getMethods()[0];
-
+
try {
//create an EntryMethod Breakpoint to test & do so
createMethodBreakpoint("a.b.c.Movee", "testMethod1", "()V", true, false);
- refactor(javaProject, type);
+ refactor(javaProject, type);
IBreakpoint[] breakpoints = getBreakpointManager().getBreakpoints();
assertEquals("wrong number of breakpoints", 1, breakpoints.length);
IJavaMethodBreakpoint methodBreakpoint = (IJavaMethodBreakpoint) breakpoints[0];
@@ -78,6 +78,6 @@
throw e;
} finally {
removeAllBreakpoints();
- }
+ }
}
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/MoveRefactoringTest.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/MoveRefactoringTest.java
index e470673..5debf3d 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/MoveRefactoringTest.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/MoveRefactoringTest.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -22,7 +22,7 @@
/**
* Common code for setting up and performing a move refactoring.
- *
+ *
* @since 3.4
*/
public class MoveRefactoringTest extends AbstractRefactoringDebugTest {
@@ -42,17 +42,17 @@
*/
protected JavaMoveProcessor setupRefactor(IJavaProject javaProject, IJavaElement type) throws JavaModelException {
IMovePolicy movePolicy= ReorgPolicyFactory.createMovePolicy(
- new IResource[0],
+ new IResource[0],
new IJavaElement[] {type});
JavaMoveProcessor processor= new JavaMoveProcessor(movePolicy);
- IJavaElement destination= getPackageFragmentRoot(javaProject, "src").getPackageFragment("a.b").getCompilationUnit("MoveeRecipient.java");
+ IJavaElement destination= getPackageFragmentRoot(javaProject, "src").getPackageFragment("a.b").getCompilationUnit("MoveeRecipient.java");
processor.setDestination(ReorgDestinationFactory.createDestination(destination));
processor.setReorgQueries(new MockReorgQueries());
if(processor.canUpdateJavaReferences())
processor.setUpdateReferences(true);//assuming is properly set otherwise
return processor;
}
-
+
/** Sets up a refactoring and executes it.
* @param javaProject
* @param cunit
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/PushDownFieldUnitTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/PushDownFieldUnitTests.java
index 4cd97f9..d010b9d 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/PushDownFieldUnitTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/PushDownFieldUnitTests.java
@@ -45,10 +45,10 @@
removeAllBreakpoints();
}
}
-
-
+
+
/////////////////////////////////////////
-
+
/**
* @param parentClassName
* @param className
@@ -59,11 +59,11 @@
* @throws Exception
*/
private Refactoring setupRefactor(String parentClassName, String className, String root, String targetPackageName, String cuName) throws Exception {
-
+
IJavaProject javaProject = get14Project();
IType parentClas= getCompilationUnit(javaProject, root, targetPackageName, cuName).getType(parentClassName);
IField clas= parentClas.getField("anInt");
-
+
PushDownRefactoringProcessor processor = new PushDownRefactoringProcessor(new IField[] {clas});
ProcessorBasedRefactoring ref= new ProcessorBasedRefactoring(processor);
ref.checkInitialConditions(new NullProgressMonitor());
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/PushDownMethodUnitTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/PushDownMethodUnitTests.java
index 2916480..6e4db05 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/PushDownMethodUnitTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/PushDownMethodUnitTests.java
@@ -49,8 +49,8 @@
removeAllBreakpoints();
}
}//end testLineBreakPoint
-
-
+
+
public void testMethodBreakPoint() throws Exception {
try {
//create Breakpoint to test
@@ -70,8 +70,8 @@
removeAllBreakpoints();
}
}//end testBreakPoint
-
-
+
+
private Refactoring setupRefactor(String parentClassName, String className, String root, String targetPackageName, String cuName) throws Exception {
IJavaProject javaProject = get14Project();
IType parentClas= getCompilationUnit(javaProject, root, targetPackageName, cuName).getType(parentClassName);
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/RenameCompilationUnitUnitTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/RenameCompilationUnitUnitTests.java
index 442a245..d572b02 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/RenameCompilationUnitUnitTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/RenameCompilationUnitUnitTests.java
@@ -57,7 +57,7 @@
removeAllBreakpoints();
}
}
-
+
/**
* @param src
* @param pack
@@ -87,7 +87,7 @@
removeAllBreakpoints();
}
}
-
+
/**
* @param src
* @param pack
@@ -147,47 +147,47 @@
removeAllBreakpoints();
}
}
-
+
private Refactoring setupRefactor(String root, String packageName, String cuName) throws Exception {
IJavaProject javaProject = get14Project();
ICompilationUnit cunit = getCompilationUnit(javaProject, root, packageName, cuName);
JavaRenameProcessor proc = new RenameCompilationUnitProcessor(cunit);
proc.setNewElementName("RenamedCompilationUnit.java");
RenameRefactoring ref= new RenameRefactoring(proc);
-
+
//setup final refactoring conditions
RefactoringStatus refactoringStatus= ref.checkAllConditions(new NullProgressMonitor());
if(!refactoringStatus.isOK())
{
System.out.println(refactoringStatus.getMessageMatchingSeverity(refactoringStatus.getSeverity()));
return null;
- }
-
+ }
+
return ref;
}
-
+
public void testInnerAnonmyousTypeClassLoadpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$InnerChildType$innerChildsMethod()V$1",
newTargetLineage = pack+"."+"RenamedCompilationUnit$InnerChildType$1";
runClassLoadBreakpointTest(src, pack, cunit, fullTargetName, newTargetLineage);
- }//end testBreakPoint
+ }//end testBreakPoint
public void testInnerAnonymousTypeLineBreakpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$InnerChildType$innerChildsMethod()V$1",
newTargetLineage = pack+"."+"RenamedCompilationUnit$InnerChildType$1";
int lineNumber = 40;
-
+
runLineBreakpointTest(src, pack, cunit, fullTargetName, newTargetLineage, lineNumber);
- }//end testBreakPoint
-
+ }//end testBreakPoint
+
public void testInnerAnonymousTypeMethodBreakpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$InnerChildType$innerChildsMethod()V$1$anonTypeMethod()V",
@@ -195,126 +195,126 @@
methodName = "anonTypeMethod";
runMethodBreakpointTest(src, pack, cunit, fullTargetName, newTargetLineage, methodName);
}//end testBreakPoint
-
+
public void testInnerAnonymousTypeWatchpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$InnerChildType$innerChildsMethod()V$1$anAnonInt",
newTargetLineage = pack+"."+"RenamedCompilationUnit$InnerChildType$1",
fieldName = "anAnonInt";
-
+
runWatchPointTest(src, pack, cunit, fullTargetName, newTargetLineage, fieldName);
- }//end testBreakPoint
-
+ }//end testBreakPoint
+
public void testInnerClassLoadpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$InnerChildType",
newTargetLineage = pack+"."+"RenamedCompilationUnit$InnerChildType";
-
+
runClassLoadBreakpointTest(src, pack, cunit, fullTargetName, newTargetLineage);
- }//end testBreakPoint
-
+ }//end testBreakPoint
+
public void testInnerLineBreakpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$InnerChildType",
newTargetLineage = pack+"."+"RenamedCompilationUnit$InnerChildType";
int lineNumber = 35;
-
+
runLineBreakpointTest(src, pack, cunit, fullTargetName, newTargetLineage, lineNumber);
- }//end testBreakPoint
-
+ }//end testBreakPoint
+
public void testInnerMethodBreakpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$InnerChildType$innerChildsMethod()V",
newTargetLineage = pack+"."+"RenamedCompilationUnit$InnerChildType",
methodName = "innerChildsMethod";
runMethodBreakpointTest(src, pack, cunit, fullTargetName, newTargetLineage, methodName);
- }//end testBreakPoint
-
+ }//end testBreakPoint
+
public void testInnerWatchpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$InnerChildType$innerChildInt",
newTargetLineage = pack+"."+"RenamedCompilationUnit$InnerChildType",
fieldName = "innerChildInt";
-
+
runWatchPointTest(src, pack, cunit, fullTargetName, newTargetLineage, fieldName);
- }//end testBreakPoint
+ }//end testBreakPoint
public void testNonPublicAnonymousTypeClassLoadpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "NonPublicChildType$nonPublicChildsMethod()V$1",
newTargetLineage = pack+"."+"NonPublicChildType$1";
-
+
runClassLoadBreakpointTest(src, pack, cunit, fullTargetName, newTargetLineage);
- }//end testBreakPoint
-
+ }//end testBreakPoint
+
public void testNonPublicAnonymousTypeLineBreakpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "NonPublicChildType$nonPublicChildsMethod()V$1",
newTargetLineage = pack+"."+"NonPublicChildType$1";
int lineNumber = 56;
-
+
runLineBreakpointTest(src, pack, cunit, fullTargetName, newTargetLineage, lineNumber);
- }//end testBreakPoint
-
+ }//end testBreakPoint
+
public void testNonPublicAnonymousTypeMethodBreakpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "NonPublicChildType$nonPublicChildsMethod()V$1$anonTypeMethod()V",
newTargetLineage = pack+"."+"NonPublicChildType$1",
methodName = "anonTypeMethod";
runMethodBreakpointTest(src, pack, cunit, fullTargetName, newTargetLineage, methodName);
- }//end testBreakPoint
-
+ }//end testBreakPoint
+
public void testNonPublicAnonymousTypeWatchpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "NonPublicChildType$nonPublicChildsMethod()V$1$anAnonInt",
newTargetLineage = pack+"."+"NonPublicChildType$1",
fieldName = "anAnonInt";
-
+
runWatchPointTest(src, pack, cunit, fullTargetName, newTargetLineage, fieldName);
- }//end testBreakPoint
-
+ }//end testBreakPoint
+
public void testNonPublicClassLoadpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "NonPublicChildType",
newTargetLineage = pack+"."+"NonPublicChildType";
-
-
+
+
runClassLoadBreakpointTest(src, pack, cunit, fullTargetName, newTargetLineage);
- }//end testBreakPoint
-
+ }//end testBreakPoint
+
public void testNonPublicLineBreakpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "NonPublicChildType",
newTargetLineage = pack+"."+"NonPublicChildType";
int lineNumber = 51;
-
+
runLineBreakpointTest(src, pack, cunit, fullTargetName, newTargetLineage, lineNumber);
- }//end testBreakPoint
-
+ }//end testBreakPoint
+
public void testNonPublicMethodBreakpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "NonPublicChildType$nonPublicChildsMethod()V$",
@@ -324,100 +324,100 @@
}//end testBreakPoint
public void testNonPublicWatchpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "NonPublicChildType$nonPublicChildInt",
newTargetLineage = pack+"."+"NonPublicChildType",
fieldName = "nonPublicChildInt";
-
+
runWatchPointTest(src, pack, cunit, fullTargetName, newTargetLineage, fieldName);
- }//end testBreakPoint
-
+ }//end testBreakPoint
+
public void testPublicAnonymousTypeClassLoadpoint() throws Exception {
-
- String src = "src",
+
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$childsMethod()V$1",
newTargetLineage = pack+"."+"RenamedCompilationUnit$1";
runClassLoadBreakpointTest(src, pack, cunit, fullTargetName, newTargetLineage);
- }//end testBreakPoint
-
+ }//end testBreakPoint
+
public void testPublicAnonymousTypeLineBreakpoint() throws Exception {
-
- String src = "src",
+
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$childsMethod()V$1",
newTargetLineage = pack+"."+"RenamedCompilationUnit$1";
int lineNumber = 26;
-
+
runLineBreakpointTest(src, pack, cunit, fullTargetName, newTargetLineage, lineNumber);
- }//end testBreakPoint
-
+ }//end testBreakPoint
+
public void testPublicAnonymousTypeMethodBreakpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$childsMethod()V$1$anonTypeMethod()V",
newTargetLineage = pack+"."+"RenamedCompilationUnit$1",
methodName = "anonTypeMethod";
-
+
runMethodBreakpointTest(src, pack, cunit, fullTargetName, newTargetLineage, methodName);
}//end testBreakPoint
-
+
public void testPublicAnonymousTypeWatchpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$childsMethod()V$1$anAnonInt",
newTargetLineage = pack+"."+"RenamedCompilationUnit$1",
fieldName = "anAnonInt";
-
+
runWatchPointTest(src, pack, cunit, fullTargetName, newTargetLineage, fieldName);
- }//end testBreakPoint
-
+ }//end testBreakPoint
+
public void testPublicClassLoadpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild",
newTargetLineage = pack+"."+"RenamedCompilationUnit";
runClassLoadBreakpointTest(src, pack, cunit, fullTargetName, newTargetLineage);
- }//end testBreakPoint
-
+ }//end testBreakPoint
+
public void testPublicLineBreakpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild",
newTargetLineage = pack+"."+"RenamedCompilationUnit";
int lineNumber = 21;
-
+
runLineBreakpointTest(src, pack, cunit, fullTargetName, newTargetLineage, lineNumber);
- }//end testBreakPoint
-
+ }//end testBreakPoint
+
public void testPublicMethodBreakpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$childsMethod()V",
newTargetLineage = pack+"."+"RenamedCompilationUnit",
methodName = "childsMethod";
runMethodBreakpointTest(src, pack, cunit, fullTargetName, newTargetLineage, methodName);
- }//end testBreakPoint
-
+ }//end testBreakPoint
+
public void testPublicWatchpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$aChildInt",
newTargetLineage = pack+"."+"RenamedCompilationUnit",
fieldName = "aChildInt";
runWatchPointTest(src, pack, cunit, fullTargetName, newTargetLineage, fieldName);
- }//end testBreakPoint
-
+ }//end testBreakPoint
+
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/RenameFieldUnitTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/RenameFieldUnitTests.java
index 214a915..d70ff3b 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/RenameFieldUnitTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/RenameFieldUnitTests.java
@@ -57,87 +57,87 @@
removeAllBreakpoints();
}
}
-
+
protected Refactoring setupRefactor(String root, String packageName, String cuName, String fullTargetName) throws Exception {
-
+
IJavaProject javaProject = get14Project();
ICompilationUnit cunit = getCompilationUnit(javaProject, root, packageName, cuName);
IField field = (IField)getMember(cunit, fullTargetName);
JavaRenameProcessor proc = new RenameFieldProcessor(field);
proc.setNewElementName("renamedField");
-
+
RenameRefactoring ref= new RenameRefactoring(proc);
-
+
//setup final refactoring conditions
RefactoringStatus refactoringStatus= ref.checkAllConditions(new NullProgressMonitor());
if(!refactoringStatus.isOK())
{
System.out.println(refactoringStatus.getMessageMatchingSeverity(refactoringStatus.getSeverity()));
return null;
- }
-
+ }
+
return ref;
}
-
- //////////////////////////////////////////////////////////////////////////////////////
-
+
+ //////////////////////////////////////////////////////////////////////////////////////
+
public void testInnerAnonymousTypeWatchpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$InnerChildType$innerChildsMethod()V$1$anAnonInt",
targetLineage = pack+"."+"MoveeChild$InnerChildType$1";
-
+
runWatchPointTest(src, pack, cunit, fullTargetName, targetLineage);
- }//end testBreakPoint
-
+ }//end testBreakPoint
+
public void testInnerWatchpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$InnerChildType$innerChildInt",
targetLineage = pack+"."+"MoveeChild$InnerChildType";
-
+
runWatchPointTest(src, pack, cunit, fullTargetName, targetLineage);
- }//end testBreakPoint
+ }//end testBreakPoint
public void testNonPublicAnonymousTypeWatchpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "NonPublicChildType$nonPublicChildsMethod()V$1$anAnonInt",
targetLineage = pack+"."+"NonPublicChildType$1";
-
+
runWatchPointTest(src, pack, cunit, fullTargetName, targetLineage);
- }//end testBreakPoint
-
+ }//end testBreakPoint
+
public void testNonPublicWatchpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "NonPublicChildType$nonPublicChildInt",
targetLineage = pack+"."+"NonPublicChildType";
-
+
runWatchPointTest(src, pack, cunit, fullTargetName, targetLineage);
- }//end testBreakPoint
-
+ }//end testBreakPoint
+
public void testPublicAnonymousTypeWatchpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$childsMethod()V$1$anAnonInt",
targetLineage = pack+"."+"MoveeChild$1";
-
+
runWatchPointTest(src, pack, cunit, fullTargetName, targetLineage);
- }//end testBreakPoint
-
+ }//end testBreakPoint
+
public void testPublicWatchpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$aChildInt",
targetLineage = pack+"."+"MoveeChild";
runWatchPointTest(src, pack, cunit, fullTargetName, targetLineage);
- }//end testBreakPoint
-
+ }//end testBreakPoint
+
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/RenameInnerTypeUnitTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/RenameInnerTypeUnitTests.java
index 451b133..15546e1 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/RenameInnerTypeUnitTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/RenameInnerTypeUnitTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -60,7 +60,7 @@
removeAllBreakpoints();
}
}
-
+
/**
* @param src
* @param pack
@@ -90,7 +90,7 @@
removeAllBreakpoints();
}
}
-
+
/**
* @param src
* @param pack
@@ -150,9 +150,9 @@
removeAllBreakpoints();
}
}
-
+
/**
- *
+ *
* @param root
* @param packageName
* @param cuName
@@ -167,7 +167,7 @@
//if this was a non-typed test, get's it's parent type
if(!(target instanceof IType))
target = (IMember)target.getParent();
-
+
IType targetType = (IType)target;
JavaRenameProcessor proc = new RenameTypeProcessor(targetType);
proc.setNewElementName("RenamedType");
@@ -178,58 +178,58 @@
{
System.out.println(refactoringStatus.getMessageMatchingSeverity(refactoringStatus.getSeverity()));
return null;
- }
-
+ }
+
return ref;
}
-
+
//////////////////////////////////////////////////////////////////////////////////////
-
+
public void testInnerClassLoadpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$InnerChildType",
targetLineage = "MoveeChild$RenamedType";
-
+
runClassLoadBreakpointTest(src, pack, cunit, fullTargetName, targetLineage);
- }//end testBreakPoint
-
+ }//end testBreakPoint
+
public void testInnerLineBreakpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$InnerChildType",
targetLineage = "MoveeChild$RenamedType";
int lineNumber = 35;
-
+
runLineBreakpointTest(src, pack, cunit, fullTargetName, targetLineage, lineNumber);
- }//end testBreakPoint
-
+ }//end testBreakPoint
+
public void testInnerMethodBreakpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$InnerChildType$innerChildsMethod()V",
targetLineage = "MoveeChild$RenamedType",
methodName = "innerChildsMethod";
runMethodBreakpointTest(src, pack, cunit, fullTargetName, targetLineage, methodName);
- }//end testBreakPoint
-
+ }//end testBreakPoint
+
public void testInnerWatchpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$InnerChildType$innerChildInt",
targetLineage = "MoveeChild$RenamedType",
fieldName = "innerChildInt";
-
+
runWatchPointTest(src, pack, cunit, fullTargetName, targetLineage, fieldName);
- }//end testBreakPoint
+ }//end testBreakPoint
/**
- * Creates an exception breakpoint and adds a filter. Refactors & checks
+ * Creates an exception breakpoint and adds a filter. Refactors & checks
* if the filter changed appropriately w/ the refactor.
* @param src
* @param pack
@@ -259,11 +259,11 @@
public void testPublicExceptionBreakpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
refactoringTargetName = "MoveeChild$InnerChildType",
exceptionName = "java.lang.NullPointerException";
runExceptionBreakpointTest(src, pack, cunit, refactoringTargetName,exceptionName);
- }//end testBreakPoint
+ }//end testBreakPoint
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/RenameMethodUnitTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/RenameMethodUnitTests.java
index d31210a..4d79a00 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/RenameMethodUnitTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/RenameMethodUnitTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -28,7 +28,7 @@
public RenameMethodUnitTests(String name) {
super(name);
}
-
+
/**
* @param src
* @param pack
@@ -60,7 +60,7 @@
}
/**
- * Will setup the refactoring for Methods and members declared within
+ * Will setup the refactoring for Methods and members declared within
* members (i.e. members of anonymous classes)
* @param root
* @param packageName
@@ -70,30 +70,30 @@
* @throws Exception
*/
protected Refactoring setupRefactor(String root, String packageName, String cuName, String fullName) throws Exception {
-
+
IJavaProject javaProject = get14Project();
ICompilationUnit cunit = getCompilationUnit(javaProject, root, packageName, cuName);
IMember member = getMember(cunit, fullName);
IMethod method = (IMethod)member;
-
+
JavaRenameProcessor proc = new RenameNonVirtualMethodProcessor(method);
proc.setNewElementName("renamedMethod");
-
+
RenameRefactoring ref= new RenameRefactoring(proc);
-
+
//setup final refactoring conditions
RefactoringStatus refactoringStatus= ref.checkAllConditions(new NullProgressMonitor());
if(!refactoringStatus.isOK())
{
System.out.println(refactoringStatus.getMessageMatchingSeverity(refactoringStatus.getSeverity()));
return null;
- }
-
+ }
+
return ref;
}
public void testInnerAnonymousTypeMethodBreakpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$InnerChildType$innerChildsMethod()V$1$anonTypeMethod()V",
@@ -102,49 +102,49 @@
}//end testBreakPoint
public void testInnerMethodBreakpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$InnerChildType$innerChildsMethod()V",
targetLineage = pack+"."+"MoveeChild$InnerChildType";
runMethodBreakpointTest(src, pack, cunit, fullTargetName, targetLineage);
- }//end testBreakPoint
+ }//end testBreakPoint
public void testNonPublicAnonymousTypeMethodBreakpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "NonPublicChildType$nonPublicChildsMethod()V$1$anonTypeMethod()V",
targetLineage = pack+"."+"NonPublicChildType$1";
runMethodBreakpointTest(src, pack, cunit, fullTargetName, targetLineage);
- }//end testBreakPoint
+ }//end testBreakPoint
public void testNonPublicMethodBreakpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "NonPublicChildType$nonPublicChildsMethod()V$",
targetLineage = pack+"."+"NonPublicChildType";
runMethodBreakpointTest(src, pack, cunit, fullTargetName, targetLineage);
}//end testBreakPoint
-
+
public void testPublicAnonymousTypeMethodBreakpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$childsMethod()V$1$anonTypeMethod()V",
targetLineage = pack+"."+"MoveeChild$1";
-
+
runMethodBreakpointTest(src, pack, cunit, fullTargetName, targetLineage);
}//end testBreakPoint
public void testPublicMethodBreakpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$childsMethod()V",
targetLineage = pack+"."+"MoveeChild";
runMethodBreakpointTest(src, pack, cunit, fullTargetName, targetLineage);
- }//end testBreakPoint
-
+ }//end testBreakPoint
+
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/RenameNonPublicTypeUnitTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/RenameNonPublicTypeUnitTests.java
index 527d5ae..86e8c7b 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/RenameNonPublicTypeUnitTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/RenameNonPublicTypeUnitTests.java
@@ -32,7 +32,7 @@
public RenameNonPublicTypeUnitTests(String name) {
super(name);
}
-
+
/**
* @param src
* @param pack
@@ -61,7 +61,7 @@
removeAllBreakpoints();
}
}
-
+
/**
* @param src
* @param pack
@@ -92,7 +92,7 @@
removeAllBreakpoints();
}
}
-
+
/**
* @param src
* @param pack
@@ -154,9 +154,9 @@
removeAllBreakpoints();
}
}
-
+
/**
- *
+ *
* @param root
* @param packageName
* @param cuName
@@ -166,75 +166,75 @@
*/
protected Refactoring setupRefactor(String root, String packageName, String cuName,
String type) throws Exception {
-
+
IJavaProject javaProject = get14Project();
ICompilationUnit cunit = getCompilationUnit(javaProject, root, packageName, cuName);
IMember target = getMember(cunit, type);
//if this was a non-typed test, get's it's parent type
if(!(target instanceof IType))
target = (IMember)target.getParent();
-
+
IType targetType = (IType)target;
-
+
JavaRenameProcessor proc = new RenameTypeProcessor(targetType);
proc.setNewElementName("RenamedType");
-
+
RenameRefactoring ref= new RenameRefactoring(proc);
-
+
//setup final refactoring conditions
RefactoringStatus refactoringStatus= ref.checkAllConditions(new NullProgressMonitor());
if(!refactoringStatus.isOK())
{
System.out.println(refactoringStatus.getMessageMatchingSeverity(refactoringStatus.getSeverity()));
return null;
- }
-
+ }
+
return ref;
}
-
+
//////////////////////////////////////////////////////////////////////////////////////
-
+
public void testNonPublicClassLoadpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "NonPublicChildType";
runClassLoadBreakpointTest(src, pack, cunit, fullTargetName);
- }//end testBreakPoint
-
+ }//end testBreakPoint
+
public void testNonPublicLineBreakpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "NonPublicChildType";
int lineNumber = 51;
-
+
runLineBreakpointTest(src, pack, cunit, fullTargetName, lineNumber);
- }//end testBreakPoint
-
+ }//end testBreakPoint
+
public void testNonPublicMethodBreakpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "NonPublicChildType$nonPublicChildsMethod()V",
methodName = "nonPublicChildsMethod";
runMethodBreakpointTest(src, pack, cunit, fullTargetName, methodName);
}//end testBreakPoint
-
+
public void testNonPublicWatchpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "NonPublicChildType$nonPublicChildInt",
fieldName = "nonPublicChildInt";
-
+
runWatchPointTest(src, pack, cunit, fullTargetName, fieldName);
- }//end testBreakPoint
+ }//end testBreakPoint
/**
- * Creates an exception breakpoint and adds a filter. Refactors & checks
+ * Creates an exception breakpoint and adds a filter. Refactors & checks
* if the filter changed appropriately w/ the refactor.
* @param src
* @param pack
@@ -266,11 +266,11 @@
public void testPublicExceptionBreakpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
targetName = "MoveeChild";
runExceptionBreakpointTest(src, pack, cunit, targetName);
- }//end testBreakPoint
-
+ }//end testBreakPoint
+
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/RenamePackageUnitTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/RenamePackageUnitTests.java
index 9cc9b31..4b30f62 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/RenamePackageUnitTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/RenamePackageUnitTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -32,7 +32,7 @@
public RenamePackageUnitTests(String name) {
super(name);
}
-
+
/**
* @param src
* @param pack
@@ -60,7 +60,7 @@
removeAllBreakpoints();
}
}
-
+
/**
* @param src
* @param pack
@@ -90,7 +90,7 @@
removeAllBreakpoints();
}
}
-
+
/**
* @param src
* @param pack
@@ -150,7 +150,7 @@
removeAllBreakpoints();
}
}
-
+
protected Refactoring setupRefactor(String root, String packageName, String cuName) throws Exception {
IJavaProject javaProject = get14Project();
ICompilationUnit cunit = getCompilationUnit(javaProject, root, packageName, cuName);
@@ -158,42 +158,42 @@
JavaRenameProcessor proc = new RenamePackageProcessor(packageFragment);
proc.setNewElementName("renamedPackage");
RenameRefactoring ref= new RenameRefactoring(proc);
-
+
//setup final refactoring conditions
RefactoringStatus refactoringStatus= ref.checkAllConditions(new NullProgressMonitor());
if(!refactoringStatus.isOK())
{
System.out.println(refactoringStatus.getMessageMatchingSeverity(refactoringStatus.getSeverity()));
return null;
- }
-
+ }
+
return ref;
}
-
- //////////////////////////////////////////////////////////////////////////////////////
-
+
+ //////////////////////////////////////////////////////////////////////////////////////
+
public void testInnerAnonmyousTypeClassLoadpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$InnerChildType$innerChildsMethod()V$1",
targetLineage = "renamedPackage"+"."+"MoveeChild$InnerChildType$1";
runClassLoadBreakpointTest(src, pack, cunit, fullTargetName, targetLineage);
- }
+ }
public void testInnerAnonymousTypeLineBreakpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$InnerChildType$innerChildsMethod()V$1",
targetLineage = "renamedPackage"+"."+"MoveeChild$InnerChildType$1";
int lineNumber = 40;
-
+
runLineBreakpointTest(src, pack, cunit, fullTargetName, targetLineage, lineNumber);
- }
-
+ }
+
public void testInnerAnonymousTypeMethodBreakpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$InnerChildType$innerChildsMethod()V$1$anonTypeMethod()V",
@@ -201,126 +201,126 @@
methodName = "anonTypeMethod";
runMethodBreakpointTest(src, pack, cunit, fullTargetName, targetLineage, methodName);
}
-
+
public void testInnerAnonymousTypeWatchpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$InnerChildType$innerChildsMethod()V$1$anAnonInt",
targetLineage = "renamedPackage"+"."+"MoveeChild$InnerChildType$1",
fieldName = "anAnonInt";
-
+
runWatchPointTest(src, pack, cunit, fullTargetName, targetLineage, fieldName);
- }
-
+ }
+
public void testInnerClassLoadpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$InnerChildType",
targetLineage = "renamedPackage"+"."+"MoveeChild$InnerChildType";
-
+
runClassLoadBreakpointTest(src, pack, cunit, fullTargetName, targetLineage);
- }
-
+ }
+
public void testInnerLineBreakpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$InnerChildType",
targetLineage = "renamedPackage"+"."+"MoveeChild$InnerChildType";
int lineNumber = 35;
-
+
runLineBreakpointTest(src, pack, cunit, fullTargetName, targetLineage, lineNumber);
- }
-
+ }
+
public void testInnerMethodBreakpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$InnerChildType$innerChildsMethod()V",
targetLineage = "renamedPackage"+"."+"MoveeChild$InnerChildType",
methodName = "innerChildsMethod";
runMethodBreakpointTest(src, pack, cunit, fullTargetName, targetLineage, methodName);
- }
-
+ }
+
public void testInnerWatchpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$InnerChildType$innerChildInt",
targetLineage = "renamedPackage"+"."+"MoveeChild$InnerChildType",
fieldName = "innerChildInt";
-
+
runWatchPointTest(src, pack, cunit, fullTargetName, targetLineage, fieldName);
- }
+ }
public void testNonPublicAnonymousTypeClassLoadpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "NonPublicChildType$nonPublicChildsMethod()V$1",
targetLineage = "renamedPackage"+"."+"NonPublicChildType$1";
-
+
runClassLoadBreakpointTest(src, pack, cunit, fullTargetName, targetLineage);
- }
-
+ }
+
public void testNonPublicAnonymousTypeLineBreakpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "NonPublicChildType$nonPublicChildsMethod()V$1",
targetLineage = "renamedPackage"+"."+"NonPublicChildType$1";
int lineNumber = 56;
-
+
runLineBreakpointTest(src, pack, cunit, fullTargetName, targetLineage, lineNumber);
- }
-
+ }
+
public void testNonPublicAnonymousTypeMethodBreakpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "NonPublicChildType$nonPublicChildsMethod()V$1$anonTypeMethod()V",
targetLineage = "renamedPackage"+"."+"NonPublicChildType$1",
methodName = "anonTypeMethod";
runMethodBreakpointTest(src, pack, cunit, fullTargetName, targetLineage, methodName);
- }
-
+ }
+
public void testNonPublicAnonymousTypeWatchpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "NonPublicChildType$nonPublicChildsMethod()V$1$anAnonInt",
targetLineage = "renamedPackage"+"."+"NonPublicChildType$1",
fieldName = "anAnonInt";
-
+
runWatchPointTest(src, pack, cunit, fullTargetName, targetLineage, fieldName);
- }
-
+ }
+
public void testNonPublicClassLoadpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "NonPublicChildType",
targetLineage = "renamedPackage"+"."+"NonPublicChildType";
-
-
+
+
runClassLoadBreakpointTest(src, pack, cunit, fullTargetName, targetLineage);
- }
-
+ }
+
public void testNonPublicLineBreakpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "NonPublicChildType",
targetLineage = "renamedPackage"+"."+"NonPublicChildType";
int lineNumber = 51;
-
+
runLineBreakpointTest(src, pack, cunit, fullTargetName, targetLineage, lineNumber);
- }
-
+ }
+
public void testNonPublicMethodBreakpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "NonPublicChildType$nonPublicChildsMethod()V$",
@@ -330,100 +330,100 @@
}
public void testNonPublicWatchpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "NonPublicChildType$nonPublicChildInt",
targetLineage = "renamedPackage"+"."+"NonPublicChildType",
fieldName = "nonPublicChildInt";
-
+
runWatchPointTest(src, pack, cunit, fullTargetName, targetLineage, fieldName);
- }
-
+ }
+
public void testPublicAnonymousTypeClassLoadpoint() throws Exception {
-
- String src = "src",
+
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$childsMethod()V$1",
targetLineage = "renamedPackage"+"."+"MoveeChild$1";
runClassLoadBreakpointTest(src, pack, cunit, fullTargetName, targetLineage);
- }
-
+ }
+
public void testPublicAnonymousTypeLineBreakpoint() throws Exception {
-
- String src = "src",
+
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$childsMethod()V$1",
targetLineage = "renamedPackage"+"."+"MoveeChild$1";
int lineNumber = 26;
-
+
runLineBreakpointTest(src, pack, cunit, fullTargetName, targetLineage, lineNumber);
- }
-
+ }
+
public void testPublicAnonymousTypeMethodBreakpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$childsMethod()V$1$anonTypeMethod()V",
targetLineage = "renamedPackage"+"."+"MoveeChild$1",
methodName = "anonTypeMethod";
-
+
runMethodBreakpointTest(src, pack, cunit, fullTargetName, targetLineage, methodName);
}
-
+
public void testPublicAnonymousTypeWatchpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$childsMethod()V$1$anAnonInt",
targetLineage = "renamedPackage"+"."+"MoveeChild$1",
fieldName = "anAnonInt";
-
+
runWatchPointTest(src, pack, cunit, fullTargetName, targetLineage, fieldName);
- }
-
+ }
+
public void testPublicClassLoadpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild",
targetLineage = "renamedPackage"+"."+"MoveeChild";
runClassLoadBreakpointTest(src, pack, cunit, fullTargetName, targetLineage);
- }
-
+ }
+
public void testPublicLineBreakpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild",
targetLineage = "renamedPackage"+"."+"MoveeChild";
int lineNumber = 21;
-
+
runLineBreakpointTest(src, pack, cunit, fullTargetName, targetLineage, lineNumber);
- }
-
+ }
+
public void testPublicMethodBreakpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$childsMethod()V",
targetLineage = "renamedPackage"+"."+"MoveeChild",
methodName = "childsMethod";
runMethodBreakpointTest(src, pack, cunit, fullTargetName, targetLineage, methodName);
- }
-
+ }
+
public void testPublicWatchpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$aChildInt",
targetLineage = "renamedPackage"+"."+"MoveeChild",
fieldName = "aChildInt";
runWatchPointTest(src, pack, cunit, fullTargetName, targetLineage, fieldName);
- }
-
+ }
+
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/RenamePublicTypeUnitTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/RenamePublicTypeUnitTests.java
index 965b684..602c0e9 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/RenamePublicTypeUnitTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/refactoring/RenamePublicTypeUnitTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -60,12 +60,12 @@
removeAllBreakpoints();
}
}
-
+
/**
- * Creates an exception breakpoint and adds a filter. Refactors & checks
+ * Creates an exception breakpoint and adds a filter. Refactors & checks
* if the filter changed appropriately w/ the refactor.
* @param src name of src file
- * @param pack
+ * @param pack
* @param cunit
* @param targetName
* @param exceptionName TODO
@@ -75,7 +75,7 @@
try {
//create breakpoint to test
IJavaExceptionBreakpoint breakpoint = createExceptionBreakpoint(exceptionName, true, true);
-
+
//refactor
Refactoring ref = setupRefactor(src, pack, cunit, targetName);
performRefactor(ref);
@@ -91,7 +91,7 @@
removeAllBreakpoints();
}
}
-
+
/**
* @param src
* @param pack
@@ -151,7 +151,7 @@
removeAllBreakpoints();
}
}
-
+
/**
* @param src
* @param pack
@@ -181,9 +181,9 @@
removeAllBreakpoints();
}
}
-
+
/**
- *
+ *
* @param root
* @param packageName
* @param cuName
@@ -198,12 +198,12 @@
//if this was a non-typed test, get's it's parent type
if(!(target instanceof IType))
target = (IMember)target.getParent();
-
+
IType targetType = (IType)target;
-
+
JavaRenameProcessor proc = new RenameTypeProcessor(targetType);
proc.setNewElementName("RenamedType");
-
+
RenameRefactoring ref= new RenameRefactoring(proc);
//setup final refactoring conditions
RefactoringStatus refactoringStatus= ref.checkAllConditions(new NullProgressMonitor());
@@ -211,60 +211,60 @@
{
System.out.println(refactoringStatus.getMessageMatchingSeverity(refactoringStatus.getSeverity()));
return null;
- }
-
+ }
+
return ref;
}
-
+
public void testPublicClassLoadpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild",
targetLineage = pack+"."+"RenamedType";
runClassLoadBreakpointTest(src, pack, cunit, fullTargetName, targetLineage);
- }//end testBreakPoint
-
+ }//end testBreakPoint
+
public void testPublicLineBreakpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild",
targetLineage = "RenamedType";
int lineNumber = 21;
-
+
runLineBreakpointTest(src, pack, cunit, fullTargetName, targetLineage, lineNumber);
- }//end testBreakPoint
-
+ }//end testBreakPoint
+
public void testPublicMethodBreakpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$childsMethod()V",
targetLineage = pack+"."+"RenamedType",
methodName = "childsMethod";
runMethodBreakpointTest(src, pack, cunit, fullTargetName, targetLineage, methodName);
- }//end testBreakPoint
-
+ }//end testBreakPoint
+
public void testPublicExceptionBreakpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
typeName = "MoveeChild",
exceptionName = "java.lang.NullPointerException";
runExceptionBreakpointTest(src, pack, cunit, typeName, exceptionName);
-}//end testBreakPoint
+}//end testBreakPoint
public void testPublicWatchpoint() throws Exception {
- String src = "src",
+ String src = "src",
pack = "a.b.c",
cunit = "MoveeChild.java",
fullTargetName = "MoveeChild$aChildInt",
targetLineage = pack+"."+"RenamedType",
fieldName = "aChildInt";
runWatchPointTest(src, pack, cunit, fullTargetName, targetLineage, fieldName);
- }//end testBreakPoint
+ }//end testBreakPoint
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/ArchiveSourceLookupTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/ArchiveSourceLookupTests.java
index 2dc7cdf..6943bfc 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/ArchiveSourceLookupTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/ArchiveSourceLookupTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -23,97 +23,97 @@
*/
@SuppressWarnings("deprecation")
public class ArchiveSourceLookupTests extends AbstractDebugTest {
-
+
public ArchiveSourceLookupTests(String name) {
super(name);
}
-
+
/**
* Tests source lookup in a top level type, in the default package.
*/
public void testDefTopLevelType() throws Exception {
File file = JavaTestPlugin.getDefault().getFileInPlugin(new Path("testresources/testJarWithOutRoot.jar"));
ArchiveSourceLocation location = new ArchiveSourceLocation(file.getAbsolutePath(), null);
-
+
ZipEntryStorage storage = (ZipEntryStorage) location.findSourceElement("Breakpoints");
assertEquals("Did not find source", "Breakpoints.java", storage.getName());
}
-
+
/**
* Tests source lookup in an inner type, the default package.
*/
public void testDefInnerType() throws Exception {
File file = JavaTestPlugin.getDefault().getFileInPlugin(new Path("testresources/testJarWithOutRoot.jar"));
ArchiveSourceLocation location = new ArchiveSourceLocation(file.getAbsolutePath(), null);
-
+
ZipEntryStorage storage = (ZipEntryStorage) location.findSourceElement("Breakpoints$InnerRunnable");
assertEquals("Did not find source", "Breakpoints.java", storage.getName());
}
-
-
+
+
/**
* Tests source lookup in a top level type.
*/
public void testTopLevelType() throws Exception {
File file = JavaTestPlugin.getDefault().getFileInPlugin(new Path("testresources/testJarWithOutRoot.jar"));
ArchiveSourceLocation location = new ArchiveSourceLocation(file.getAbsolutePath(), null);
-
+
ZipEntryStorage storage = (ZipEntryStorage) location.findSourceElement("org.eclipse.debug.tests.targets.SourceLookup");
- assertEquals("Did not find source", "SourceLookup.java", storage.getName());
+ assertEquals("Did not find source", "SourceLookup.java", storage.getName());
}
-
+
/**
* Tests source lookup in an inner type.
*/
public void testInnerType() throws Exception {
File file = JavaTestPlugin.getDefault().getFileInPlugin(new Path("testresources/testJarWithOutRoot.jar"));
ArchiveSourceLocation location = new ArchiveSourceLocation(file.getAbsolutePath(), null);
-
+
ZipEntryStorage storage = (ZipEntryStorage) location.findSourceElement("org.eclipse.debug.tests.targets.SourceLookup$Inner");
assertEquals("Did not find source", "SourceLookup.java", storage.getName());
}
-
+
/**
* Tests source lookup in an inner, inner type.
*/
public void testNestedType() throws Exception {
File file = JavaTestPlugin.getDefault().getFileInPlugin(new Path("testresources/testJarWithOutRoot.jar"));
ArchiveSourceLocation location = new ArchiveSourceLocation(file.getAbsolutePath(), null);
-
+
ZipEntryStorage storage = (ZipEntryStorage) location.findSourceElement("org.eclipse.debug.tests.targets.SourceLookup$Inner$Nested");
assertEquals("Did not find source", "SourceLookup.java", storage.getName());
}
-
+
/**
* Tests source lookup in a top level type, with a $ named class
*/
public void testTopLevel$Type() throws Exception {
File file = JavaTestPlugin.getDefault().getFileInPlugin(new Path("testresources/testJarWithOutRoot.jar"));
ArchiveSourceLocation location = new ArchiveSourceLocation(file.getAbsolutePath(), null);
-
+
ZipEntryStorage storage = (ZipEntryStorage) location.findSourceElement("org.eclipse.debug.tests.targets.Source_$_Lookup");
assertEquals("Did not find source", "Source_$_Lookup.java", storage.getName());
}
-
+
/**
* Tests source lookup in an inner type in a $ named class.
*/
public void testInner$Type() throws Exception {
File file = JavaTestPlugin.getDefault().getFileInPlugin(new Path("testresources/testJarWithOutRoot.jar"));
ArchiveSourceLocation location = new ArchiveSourceLocation(file.getAbsolutePath(), null);
-
+
ZipEntryStorage storage = (ZipEntryStorage) location.findSourceElement("org.eclipse.debug.tests.targets.Source_$_Lookup$Inner");
assertEquals("Did not find source", "Source_$_Lookup.java", storage.getName());
- }
-
+ }
+
/**
* Tests source lookup in an inner type in a $ named class.
*/
public void testInnerNested$Type() throws Exception {
File file = JavaTestPlugin.getDefault().getFileInPlugin(new Path("testresources/testJarWithOutRoot.jar"));
ArchiveSourceLocation location = new ArchiveSourceLocation(file.getAbsolutePath(), null);
-
+
ZipEntryStorage storage = (ZipEntryStorage) location.findSourceElement("org.eclipse.debug.tests.targets.Source_$_Lookup$Inner$Nested");
assertEquals("Did not find source", "Source_$_Lookup.java", storage.getName());
- }
+ }
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/DefaultSourceContainerTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/DefaultSourceContainerTests.java
index dfcea15..f97ed89 100755
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/DefaultSourceContainerTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/DefaultSourceContainerTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -20,20 +20,20 @@
* Tests default source containers
*/
public class DefaultSourceContainerTests extends AbstractDebugTest {
-
+
public DefaultSourceContainerTests(String name) {
super(name);
}
-
+
/**
* Tests creation and restoring from a memento.
- *
+ *
* @throws Exception
*/
public void testDefaultSourceContainerMemento() throws Exception {
JavaSourceLookupDirector director = new JavaSourceLookupDirector();
ILaunchConfiguration configuration = getLaunchConfiguration("Breakpoints");
- director.initializeDefaults(configuration);
+ director.initializeDefaults(configuration);
ISourceContainer[] containers = director.getSourceContainers();
assertEquals("expected one default container", 1, containers.length);
assertTrue("Wrond default container", containers[0] instanceof DefaultSourceContainer);
@@ -43,5 +43,5 @@
director2.initializeFromMemento(memento, configuration);
DefaultSourceContainer restore = (DefaultSourceContainer) director2.getSourceContainers()[0];
assertEquals("Default source container memento failed", container, restore);
- }
+ }
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/DirectorySourceContainerTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/DirectorySourceContainerTests.java
index 54c27de..5d067f4 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/DirectorySourceContainerTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/DirectorySourceContainerTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -24,11 +24,11 @@
* Tests directory source containers
*/
public class DirectorySourceContainerTests extends AbstractDebugTest {
-
+
public DirectorySourceContainerTests(String name) {
super(name);
}
-
+
/**
* Returns a directory source container.
*/
@@ -41,10 +41,10 @@
director.setSourceContainers(new ISourceContainer[]{container});
return container;
}
-
+
/**
* Tests creation and restoring from a memento.
- *
+ *
* @throws Exception
*/
public void testDirectorySourceContainerMemento() throws Exception {
@@ -54,7 +54,7 @@
ISourceContainer restore = container.getType().createSourceContainer(memento);
assertEquals("Directory source container memento failed", container, restore);
assertTrue(restore.isComposite());
- }
+ }
public void testSimpleSourceLookupPositive() throws Exception {
DirectorySourceContainer container = getContainer(false, false);
@@ -62,46 +62,46 @@
assertEquals("Expected 1 result", 1, objects.length);
assertEquals("Wrong file", new File(container.getDirectory(), "Breakpoints.java"), ((LocalFileStorage)objects[0]).getFile());
}
-
+
public void testSimpleSourceLookupNegative() throws Exception {
DirectorySourceContainer container = getContainer(false, false);
Object[] objects = container.findSourceElements("FileNotFound.java");
assertEquals("Expected 0 files", 0, objects.length);
- }
-
+ }
+
public void testSimpleNestedSourceLookupPositive() throws Exception {
DirectorySourceContainer container = getContainer(true, false);
Object[] objects = container.findSourceElements("InfiniteLoop.java");
assertEquals("Expected 1 result", 1, objects.length);
- assertEquals("Wrong file", new File(container.getDirectory(), "org/eclipse/debug/tests/targets/InfiniteLoop.java"), ((LocalFileStorage)objects[0]).getFile());
+ assertEquals("Wrong file", new File(container.getDirectory(), "org/eclipse/debug/tests/targets/InfiniteLoop.java"), ((LocalFileStorage)objects[0]).getFile());
}
-
+
public void testSimpleNestedSourceLookupNegative() throws Exception {
DirectorySourceContainer container = getContainer(true, false);
Object[] objects = container.findSourceElements("FileNotFound.java");
- assertEquals("Expected 0 files", 0, objects.length);
+ assertEquals("Expected 0 files", 0, objects.length);
}
-
+
public void testQualifiedSourceLookupPositive() throws Exception {
DirectorySourceContainer container = getContainer(false, false);
Object[] objects = container.findSourceElements("org/eclipse/debug/tests/targets/InfiniteLoop.java");
assertEquals("Expected 1 result", 1, objects.length);
assertEquals("Wrong file", new File(container.getDirectory(), "org/eclipse/debug/tests/targets/InfiniteLoop.java"), ((LocalFileStorage)objects[0]).getFile());
}
-
+
public void testQualifiedSourceLookupNegative() throws Exception {
DirectorySourceContainer container = getContainer(false, false);
Object[] objects = container.findSourceElements("a/b/c/FileNotFound.java");
assertEquals("Expected 0 files", 0, objects.length);
}
-
+
public void testPartiallyQualifiedNestedSourceLookupPositive() throws Exception {
DirectorySourceContainer container = getContainer(true, false);
Object[] objects = container.findSourceElements("debug/tests/targets/InfiniteLoop.java");
assertEquals("Expected 1 result", 1, objects.length);
assertEquals("Wrong file", new File(container.getDirectory(), "org/eclipse/debug/tests/targets/InfiniteLoop.java"), ((LocalFileStorage)objects[0]).getFile());
- }
-
+ }
+
public void testCaseSensitiveQualifiedSourceLookup() throws Exception {
DirectorySourceContainer container = getContainer(false, false);
Object[] objects = container.findSourceElements("oRg/eClIpSe/dEbUg/tEsTs/tArGeTs/INfInItELOop.jaVa");
@@ -117,5 +117,5 @@
assertEquals("Wrong file", new File(container.getDirectory(), "org/eclipse/debug/tests/targets/InfiniteLoop.java"), ((LocalFileStorage)objects[0]).getFile());
}
}
- }
+ }
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/DirectorySourceLookupTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/DirectorySourceLookupTests.java
index ed8ca4a..9aa1c75 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/DirectorySourceLookupTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/DirectorySourceLookupTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -25,11 +25,11 @@
*/
@SuppressWarnings("deprecation")
public class DirectorySourceLookupTests extends AbstractDebugTest {
-
+
public DirectorySourceLookupTests(String name) {
super(name);
}
-
+
/**
* Tests source lookup in a top level type, in the default package.
*/
@@ -37,14 +37,14 @@
IPackageFragmentRoot root = getPackageFragmentRoot(get14Project(), "src");
File rootFile = root.getResource().getLocation().toFile();
IJavaSourceLocation location = new DirectorySourceLocation(rootFile);
-
+
ICompilationUnit cu = getCompilationUnit(get14Project(), "src", IInternalDebugCoreConstants.EMPTY_STRING, "Breakpoints.java");
assertTrue("did not find compilation unit for Breakpoints.java", cu.exists());
LocalFileStorage expectedSource = new LocalFileStorage(cu.getResource().getLocation().toFile());
-
+
assertEquals("Source lookup failed", expectedSource, location.findSourceElement("Breakpoints"));
}
-
+
/**
* Tests source lookup in an inner type, the default package.
*/
@@ -52,15 +52,15 @@
IPackageFragmentRoot root = getPackageFragmentRoot(get14Project(), "src");
File rootFile = root.getResource().getLocation().toFile();
IJavaSourceLocation location = new DirectorySourceLocation(rootFile);
-
+
ICompilationUnit cu = getCompilationUnit(get14Project(), "src", IInternalDebugCoreConstants.EMPTY_STRING, "Breakpoints.java");
assertTrue("did not find compilation unit for Breakpoints.java", cu.exists());
LocalFileStorage expectedSource = new LocalFileStorage(cu.getResource().getLocation().toFile());
-
+
assertEquals("Source lookup failed", expectedSource, location.findSourceElement("Breakpoints$InnerRunnable"));
}
-
-
+
+
/**
* Tests source lookup in a top level type.
*/
@@ -68,14 +68,14 @@
IPackageFragmentRoot root = getPackageFragmentRoot(get14Project(), "src");
File rootFile = root.getResource().getLocation().toFile();
IJavaSourceLocation location = new DirectorySourceLocation(rootFile);
-
+
ICompilationUnit cu = getCompilationUnit(get14Project(), "src", "org.eclipse.debug.tests.targets", "SourceLookup.java");
assertTrue("did not find compilation unit for SourceLookup.java", cu.exists());
LocalFileStorage expectedSource = new LocalFileStorage(cu.getResource().getLocation().toFile());
-
+
assertEquals("Source lookup failed", expectedSource, location.findSourceElement("org.eclipse.debug.tests.targets.SourceLookup"));
}
-
+
/**
* Tests source lookup in an inner type.
*/
@@ -83,14 +83,14 @@
IPackageFragmentRoot root = getPackageFragmentRoot(get14Project(), "src");
File rootFile = root.getResource().getLocation().toFile();
IJavaSourceLocation location = new DirectorySourceLocation(rootFile);
-
+
ICompilationUnit cu = getCompilationUnit(get14Project(), "src", "org.eclipse.debug.tests.targets", "SourceLookup.java");
assertTrue("did not find compilation unit for SourceLookup.java", cu.exists());
LocalFileStorage expectedSource = new LocalFileStorage(cu.getResource().getLocation().toFile());
-
+
assertEquals("Source lookup failed", expectedSource, location.findSourceElement("org.eclipse.debug.tests.targets.SourceLookup$Inner"));
}
-
+
/**
* Tests source lookup in an inner, inner type.
*/
@@ -98,14 +98,14 @@
IPackageFragmentRoot root = getPackageFragmentRoot(get14Project(), "src");
File rootFile = root.getResource().getLocation().toFile();
IJavaSourceLocation location = new DirectorySourceLocation(rootFile);
-
+
ICompilationUnit cu = getCompilationUnit(get14Project(), "src", "org.eclipse.debug.tests.targets", "SourceLookup.java");
assertTrue("did not find compilation unit for SourceLookup.java", cu.exists());
LocalFileStorage expectedSource = new LocalFileStorage(cu.getResource().getLocation().toFile());
-
+
assertEquals("Source lookup failed", expectedSource, location.findSourceElement("org.eclipse.debug.tests.targets.SourceLookup$Inner$Nested"));
}
-
+
/**
* Tests source lookup in a top level type, with a $ named class
*/
@@ -113,14 +113,14 @@
IPackageFragmentRoot root = getPackageFragmentRoot(get14Project(), "src");
File rootFile = root.getResource().getLocation().toFile();
IJavaSourceLocation location = new DirectorySourceLocation(rootFile);
-
+
ICompilationUnit cu = getCompilationUnit(get14Project(), "src", "org.eclipse.debug.tests.targets", "Source_$_Lookup.java");
assertTrue("did not find compilation unit for Source_$_Lookup.java", cu.exists());
LocalFileStorage expectedSource = new LocalFileStorage(cu.getResource().getLocation().toFile());
-
+
assertEquals("Source lookup failed", expectedSource, location.findSourceElement("org.eclipse.debug.tests.targets.Source_$_Lookup"));
}
-
+
/**
* Tests source lookup in an inner type in a $ named class.
*/
@@ -128,14 +128,14 @@
IPackageFragmentRoot root = getPackageFragmentRoot(get14Project(), "src");
File rootFile = root.getResource().getLocation().toFile();
IJavaSourceLocation location = new DirectorySourceLocation(rootFile);
-
+
ICompilationUnit cu = getCompilationUnit(get14Project(), "src", "org.eclipse.debug.tests.targets", "Source_$_Lookup.java");
assertTrue("did not find compilation unit for Source_$_Lookup.java", cu.exists());
LocalFileStorage expectedSource = new LocalFileStorage(cu.getResource().getLocation().toFile());
-
+
assertEquals("Source lookup failed", expectedSource, location.findSourceElement("org.eclipse.debug.tests.targets.Source_$_Lookup$Inner"));
- }
-
+ }
+
/**
* Tests source lookup in an inner type in a $ named class.
*/
@@ -143,11 +143,11 @@
IPackageFragmentRoot root = getPackageFragmentRoot(get14Project(), "src");
File rootFile = root.getResource().getLocation().toFile();
IJavaSourceLocation location = new DirectorySourceLocation(rootFile);
-
+
ICompilationUnit cu = getCompilationUnit(get14Project(), "src", "org.eclipse.debug.tests.targets", "Source_$_Lookup.java");
assertTrue("did not find compilation unit for Source_$_Lookup.java", cu.exists());
LocalFileStorage expectedSource = new LocalFileStorage(cu.getResource().getLocation().toFile());
-
+
assertEquals("Source lookup failed", expectedSource, location.findSourceElement("org.eclipse.debug.tests.targets.Source_$_Lookup$Inner$Nested"));
- }
+ }
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/ExternalArchiveSourceContainerTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/ExternalArchiveSourceContainerTests.java
index f00d58b..682c75f 100755
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/ExternalArchiveSourceContainerTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/ExternalArchiveSourceContainerTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -28,14 +28,14 @@
* Tests external archive source containers
*/
public class ExternalArchiveSourceContainerTests extends AbstractDebugTest {
-
+
public ExternalArchiveSourceContainerTests(String name) {
super(name);
}
-
+
/**
* Returns the JREs source archive.
- *
+ *
* @return
* @throws Exception
*/
@@ -56,7 +56,7 @@
assertTrue("Did not find JRE source archive. This failure is expected if you are running the tests with a JRE that does not contain source.", false);
return null;
}
-
+
/**
* Returns the source archive at the specified path within this plug-in.
*/
@@ -70,11 +70,11 @@
ExternalArchiveSourceContainer container = new ExternalArchiveSourceContainer(file.getAbsolutePath(), detect);
director.setSourceContainers(new ISourceContainer[]{container});
return container;
- }
-
+ }
+
/**
* Tests creation and restoring from a memento.
- *
+ *
* @throws Exception
*/
public void testArchiveSourceContainerMemento() throws Exception {
@@ -86,7 +86,7 @@
assertEquals("Directory source container memento failed", container, restore);
assertFalse(restore.isComposite());
assertTrue(restore.isDetectRoot());
- }
+ }
public void testAutoDetectRootSourceLookupPositive() throws Exception {
ExternalArchiveSourceContainer container = getContainer(true, false);
@@ -95,13 +95,13 @@
ZipEntryStorage storage = (ZipEntryStorage) objects[0];
assertEquals("Wrong file", "Object.java", storage.getName());
}
-
+
public void testAutoDetectRootSourceLookupNegative() throws Exception {
ExternalArchiveSourceContainer container = getContainer(true, false);
Object[] objects = container.findSourceElements("java/lang/FileNotFound.java");
assertEquals("Expected 0 files", 0, objects.length);
- }
-
+ }
+
public void testSourceLookupPositive() throws Exception {
ExternalArchiveSourceContainer container = getContainer(false, false);
Object[] objects = container.findSourceElements("java/lang/Object.java");
@@ -109,21 +109,21 @@
ZipEntryStorage storage = (ZipEntryStorage) objects[0];
assertEquals("Wrong file", "Object.java", storage.getName());
}
-
+
public void testSourceLookupNegative() throws Exception {
ExternalArchiveSourceContainer container = getContainer(false, false);
Object[] objects = container.findSourceElements("java/lang/FileNotFound.java");
assertEquals("Expected 0 files", 0, objects.length);
}
-
+
public void testPartiallyQualifiedSourceLookupPositive() throws Exception {
ExternalArchiveSourceContainer container = getContainer(false, false);
Object[] objects = container.findSourceElements("lang/Object.java");
assertEquals("Expected 1 result", 1, objects.length);
ZipEntryStorage storage = (ZipEntryStorage) objects[0];
assertEquals("Wrong file", "Object.java", storage.getName());
- }
-
+ }
+
public void testAutoDetectUnqualifiedSourceLookupPositive() throws Exception {
ExternalArchiveSourceContainer container = getContainer(true, false);
// force detection
@@ -134,7 +134,7 @@
ZipEntryStorage storage = (ZipEntryStorage) objects[0];
assertEquals("Wrong file", "Object.java", storage.getName());
}
-
+
public void testAutoDetectMultipleRoots() throws Exception {
ExternalArchiveSourceContainer container = getContainer("testresources/source-test.zip", true, false);
// find .java file
@@ -149,6 +149,6 @@
// find another .txt file
objects = container.findSourceElements("folder/file-c.txt");
storage = (ZipEntryStorage) objects[0];
- assertEquals("Wrong file", "file-c.txt", storage.getName());
- }
+ assertEquals("Wrong file", "file-c.txt", storage.getName());
+ }
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/FolderSourceContainerTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/FolderSourceContainerTests.java
index fd75698..d4dccf9 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/FolderSourceContainerTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/FolderSourceContainerTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -24,7 +24,7 @@
* Tests folder source containers
*/
public class FolderSourceContainerTests extends AbstractDebugTest {
-
+
public FolderSourceContainerTests(String name) {
super(name);
}
@@ -46,7 +46,7 @@
}
/**
* Tests creation and restoring from a memento.
- *
+ *
* @throws Exception
*/
public void testFolderSourceContainerMemento() throws Exception {
@@ -57,53 +57,53 @@
assertEquals("Folder source container memento failed", container, restore);
assertTrue(restore.isComposite());
}
-
+
public void testSimpleSourceLookupPositive() throws Exception {
FolderSourceContainer container = getContainer(false, false);
Object[] objects = container.findSourceElements("Breakpoints.java");
assertEquals("Expected 1 result", 1, objects.length);
assertEquals("Wrong file", getFolder(container).getFile("Breakpoints.java"), objects[0]);
}
-
+
public void testSimpleSourceLookupNegative() throws Exception {
FolderSourceContainer container = getContainer(false, false);
Object[] objects = container.findSourceElements("FileNotFound.java");
assertEquals("Expected 0 files", 0, objects.length);
- }
-
+ }
+
public void testSimpleNestedSourceLookupPositive() throws Exception {
FolderSourceContainer container = getContainer(true, false);
Object[] objects = container.findSourceElements("InfiniteLoop.java");
assertEquals("Expected 1 result", 1, objects.length);
- assertEquals("Wrong file", getFolder(container).getFile(new Path("org/eclipse/debug/tests/targets/InfiniteLoop.java")), objects[0]);
+ assertEquals("Wrong file", getFolder(container).getFile(new Path("org/eclipse/debug/tests/targets/InfiniteLoop.java")), objects[0]);
}
-
+
public void testSimpleNestedSourceLookupNegative() throws Exception {
FolderSourceContainer container = getContainer(true, false);
Object[] objects = container.findSourceElements("FileNotFound.java");
- assertEquals("Expected 0 files", 0, objects.length);
+ assertEquals("Expected 0 files", 0, objects.length);
}
-
+
public void testQualifiedSourceLookupPositive() throws Exception {
FolderSourceContainer container = getContainer(false, false);
Object[] objects = container.findSourceElements("org/eclipse/debug/tests/targets/InfiniteLoop.java");
assertEquals("Expected 1 result", 1, objects.length);
assertEquals("Wrong file", getFolder(container).getFile(new Path("org/eclipse/debug/tests/targets/InfiniteLoop.java")), objects[0]);
}
-
+
public void testQualifiedSourceLookupNegative() throws Exception {
FolderSourceContainer container = getContainer(false, false);
Object[] objects = container.findSourceElements("a/b/c/FileNotFound.java");
assertEquals("Expected 0 files", 0, objects.length);
}
-
+
public void testPartiallyQualifiedNestedSourceLookupPositive() throws Exception {
FolderSourceContainer container = getContainer(true, false);
Object[] objects = container.findSourceElements("debug/tests/targets/InfiniteLoop.java");
assertEquals("Expected 1 result", 1, objects.length);
assertEquals("Wrong file", getFolder(container).getFile(new Path("org/eclipse/debug/tests/targets/InfiniteLoop.java")), objects[0]);
- }
-
+ }
+
public void testCaseSensitiveQualifiedSourceLookup() throws Exception {
FolderSourceContainer container = getContainer(false, false);
Object[] objects = container.findSourceElements("oRg/eClIpSe/dEbUg/tEsTs/tArGeTs/INfInItELOop.jaVa");
@@ -115,8 +115,8 @@
assertEquals("Expected 1 result", 1, objects.length);
assertEquals("Wrong file", getFolder(container).getFile(new Path("org/eclipse/debug/tests/targets/InfiniteLoop.java")), objects[0]);
}
- }
-
+ }
+
public void testRelativePathName() throws Exception {
FolderSourceContainer container = getContainer(false, false);
Object[] objects = container.findSourceElements(".."+File.separatorChar+".classpath");
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/JavaProjectSourceContainerTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/JavaProjectSourceContainerTests.java
index aa63119..8a8354c 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/JavaProjectSourceContainerTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/JavaProjectSourceContainerTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -22,14 +22,14 @@
* Tests Java project source containers
*/
public class JavaProjectSourceContainerTests extends AbstractDebugTest {
-
+
public JavaProjectSourceContainerTests(String name) {
super(name);
}
-
+
/**
* Returns a Java project source container
- *
+ *
* @return
* @throws Exception
*/
@@ -41,10 +41,10 @@
director.setSourceContainers(new ISourceContainer[]{container});
return container;
}
-
+
/**
* Tests creation and restoring from a memento.
- *
+ *
* @throws Exception
*/
public void testSourceContainerMemento() throws Exception {
@@ -52,7 +52,7 @@
String memento = container.getType().getMemento(container);
ISourceContainer restore = container.getType().createSourceContainer(memento);
assertEquals("Directory source container memento failed", container, restore);
- }
+ }
public void testDefaultPackageLookup() throws Exception {
ISourceContainer container = getContainer(get14Project(), false);
@@ -61,20 +61,20 @@
IFile file = (IFile) objects[0];
assertEquals("Wrong file", "Breakpoints.java", file.getName());
}
-
+
public void testQualifiedLookup() throws Exception {
ISourceContainer container = getContainer(get14Project(), false);
Object[] objects = container.findSourceElements("org/eclipse/debug/tests/targets/CallLoop.java");
assertEquals("Expected 1 result", 1, objects.length);
IFile file = (IFile) objects[0];
- assertEquals("Wrong file", "CallLoop.java", file.getName());
+ assertEquals("Wrong file", "CallLoop.java", file.getName());
}
-
+
public void testNonJavaLookup() throws Exception {
ISourceContainer container = getContainer(get14Project(), false);
Object[] objects = container.findSourceElements("debug/non-java.txt");
assertEquals("Expected 1 result", 1, objects.length);
IFile file = (IFile) objects[0];
- assertEquals("Wrong file", "non-java.txt", file.getName());
- }
+ assertEquals("Wrong file", "non-java.txt", file.getName());
+ }
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/ProjectSourceContainerTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/ProjectSourceContainerTests.java
index 557580a..7aa6307 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/ProjectSourceContainerTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/ProjectSourceContainerTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -21,11 +21,11 @@
* Tests project source containers
*/
public class ProjectSourceContainerTests extends AbstractDebugTest {
-
+
public ProjectSourceContainerTests(String name) {
super(name);
}
-
+
/**
* Returns a project source container.
*/
@@ -34,14 +34,14 @@
director.initializeParticipants();
director.setFindDuplicates(duplicates);
IProject project = get14Project().getProject();
- ProjectSourceContainer container = new ProjectSourceContainer(project, referenced);
+ ProjectSourceContainer container = new ProjectSourceContainer(project, referenced);
director.setSourceContainers(new ISourceContainer[]{container});
return container;
}
-
+
/**
* Tests creation and restoring from a memento.
- *
+ *
* @throws Exception
*/
public void testProjectSourceContainerMemento() throws Exception {
@@ -52,26 +52,26 @@
assertEquals("Project source container memento failed", container, restore);
assertTrue(restore.isSearchReferencedProjects());
}
-
+
public void testSimpleSourceLookupPositive() throws Exception {
ProjectSourceContainer container = getContainer(false, false);
Object[] objects = container.findSourceElements("Breakpoints.java");
assertEquals("Expected 1 result", 1, objects.length);
assertEquals("Wrong file", container.getProject().getFile("src/Breakpoints.java"), objects[0]);
}
-
+
public void testSimpleRootSourceLookupPositive() throws Exception {
ProjectSourceContainer container = getContainer(false, false);
Object[] objects = container.findSourceElements(".classpath");
assertEquals("Expected 1 result", 1, objects.length);
assertEquals("Wrong file", container.getProject().getFile(".classpath"), objects[0]);
- }
-
+ }
+
public void testSimpleSourceLookupNegative() throws Exception {
ProjectSourceContainer container = getContainer(false, false);
Object[] objects = container.findSourceElements("FileNotFound.java");
assertEquals("Expected 0 files", 0, objects.length);
- }
+ }
public void testQualifiedSourceLookupPositive() throws Exception {
ProjectSourceContainer container = getContainer(false, false);
@@ -79,13 +79,13 @@
assertEquals("Expected 1 result", 1, objects.length);
assertEquals("Wrong file", container.getProject().getFile("src/org/eclipse/debug/tests/targets/InfiniteLoop.java"), objects[0]);
}
-
+
public void testQualifiedSourceLookupNegative() throws Exception {
ProjectSourceContainer container = getContainer(false, false);
Object[] objects = container.findSourceElements("a/b/c/InfiniteLoop.java");
assertEquals("Expected 0 files", 0, objects.length);
- }
-
+ }
+
public void testCaseSensitiveQualifiedSourceLookup() throws Exception {
ProjectSourceContainer container = getContainer(false, false);
Object[] objects = container.findSourceElements("oRg/eClIpSe/dEbUg/tEsTs/tArGeTs/INfInItELOop.jaVa");
@@ -97,5 +97,5 @@
assertEquals("Expected 1 result", 1, objects.length);
assertEquals("Wrong file", container.getProject().getFile("src/org/eclipse/debug/tests/targets/InfiniteLoop.java"), objects[0]);
}
- }
+ }
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/SourceLocationTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/SourceLocationTests.java
index 25dc4bb..07c1c1b 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/SourceLocationTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/SourceLocationTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -35,7 +35,7 @@
*/
@SuppressWarnings("deprecation")
public class SourceLocationTests extends AbstractDebugTest {
-
+
public static final String JRE_CONTAINER_1_4_CPE_NAME = "org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4";
public SourceLocationTests(String name) {
@@ -49,7 +49,7 @@
restored.initializeFrom(memento);
assertEquals("project locations should be equal", location, restored);
}
-
+
public void testDirectoryLocationMemento() throws Exception {
File dir = ResourcesPlugin.getWorkspace().getRoot().getLocation().toFile();
IJavaSourceLocation location = new DirectorySourceLocation(dir);
@@ -57,8 +57,8 @@
IJavaSourceLocation restored = new DirectorySourceLocation();
restored.initializeFrom(memento);
assertEquals("directory locations should be equal", location, restored);
- }
-
+ }
+
public void testArchiveLocationMemento() throws Exception {
IVMInstall vm = JavaRuntime.getDefaultVMInstall();
IJavaSourceLocation location = new ArchiveSourceLocation(JavaRuntime.getLibraryLocations(vm)[0].getSystemLibraryPath().toOSString(), null);
@@ -66,50 +66,50 @@
IJavaSourceLocation restored = new ArchiveSourceLocation();
restored.initializeFrom(memento);
assertEquals("archive locations should be equal", location, restored);
- }
-
+ }
+
public void testJavaSourceLocatorMemento() throws Exception {
IJavaSourceLocation location1 = new JavaProjectSourceLocation(get14Project());
File dir = ResourcesPlugin.getWorkspace().getRoot().getLocation().toFile();
IJavaSourceLocation location2 = new DirectorySourceLocation(dir);
IVMInstall vm = JavaRuntime.getDefaultVMInstall();
IJavaSourceLocation location3 = new ArchiveSourceLocation(JavaRuntime.getLibraryLocations(vm)[0].getSystemLibraryPath().toOSString(), null);
-
+
JavaSourceLocator locator = new JavaSourceLocator(new IJavaSourceLocation[] {location1, location2, location3});
String memento = locator.getMemento();
JavaSourceLocator restored = new JavaSourceLocator();
restored.initializeFromMemento(memento);
IJavaSourceLocation[] locations = restored.getSourceLocations();
-
+
assertEquals("wrong number of source locations", 3, locations.length);
assertEquals("1st locations not equal", location1, locations[0]);
assertEquals("2nd locations not equal", location2, locations[1]);
assertEquals("3rd locations not equal", location3, locations[2]);
}
-
+
public void testJavaUISourceLocatorMemento() throws Exception {
IJavaSourceLocation location1 = new JavaProjectSourceLocation(get14Project());
File dir = ResourcesPlugin.getWorkspace().getRoot().getLocation().toFile();
IJavaSourceLocation location2 = new DirectorySourceLocation(dir);
IVMInstall vm = JavaRuntime.getDefaultVMInstall();
IJavaSourceLocation location3 = new ArchiveSourceLocation(JavaRuntime.getLibraryLocations(vm)[0].getSystemLibraryPath().toOSString(), null);
-
+
JavaUISourceLocator locator = new JavaUISourceLocator(get14Project());
locator.setSourceLocations(new IJavaSourceLocation[] {location1, location2, location3});
locator.setFindAllSourceElement(true);
-
+
String memento = locator.getMemento();
JavaUISourceLocator restored = new JavaUISourceLocator();
restored.initializeFromMemento(memento);
IJavaSourceLocation[] locations = restored.getSourceLocations();
-
+
assertEquals("wrong number of source locations", 3, locations.length);
assertEquals("1st locations not equal", location1, locations[0]);
assertEquals("2nd locations not equal", location2, locations[1]);
assertEquals("3rd locations not equal", location3, locations[2]);
- assertTrue("Should find all source locations", locator.isFindAllSourceElements());
+ assertTrue("Should find all source locations", locator.isFindAllSourceElements());
}
-
+
public void testPackageFragmentRootLocationMemento() throws Exception {
IResource res = get14Project().getProject().getFolder("src");
IPackageFragmentRoot root = get14Project().getPackageFragmentRoot(res);
@@ -119,43 +119,43 @@
restored.initializeFrom(memento);
assertEquals("root locations should be equal", location, restored);
}
-
+
public void testEmptyPackageFragmentRootLocationMemento() throws Exception {
IJavaSourceLocation location = new PackageFragmentRootSourceLocation();
String memento = location.getMemento();
IJavaSourceLocation restored = new PackageFragmentRootSourceLocation();
restored.initializeFrom(memento);
assertEquals("root locations should be equal", location, restored);
- }
-
+ }
+
public void testPositiveSourceFolderSourceLocation() throws Exception {
IResource res = get14Project().getProject().getFolder("src");
IPackageFragmentRoot root = get14Project().getPackageFragmentRoot(res);
IJavaSourceLocation location = new PackageFragmentRootSourceLocation(root);
-
+
Object source = location.findSourceElement("Breakpoints");
assertTrue("Did not find source for 'Breakpoints'", source instanceof ICompilationUnit);
ICompilationUnit cu = (ICompilationUnit)source;
assertEquals("Did not find source for 'Breakpoints'", cu.getElementName(), "Breakpoints.java");
-
+
source = location.findSourceElement("org.eclipse.debug.tests.targets.InfiniteLoop");
assertTrue("Did not find source for 'InfiniteLoop'", source instanceof ICompilationUnit);
cu = (ICompilationUnit)source;
assertEquals("Did not find source for 'Breakpoints'", cu.getElementName(), "InfiniteLoop.java");
}
-
+
public void testNegativeSourceFolderSourceLocation() throws Exception {
IResource res = get14Project().getProject().getFolder("src");
IPackageFragmentRoot root = get14Project().getPackageFragmentRoot(res);
IJavaSourceLocation location = new PackageFragmentRootSourceLocation(root);
-
+
Object source = location.findSourceElement("DoesNotExist");
assertNull("Should not have found source", source);
-
+
source = location.findSourceElement("org.eclipse.DoesNotExist");
assertNull("Should not have found source", source);
- }
-
+ }
+
public void testPositiveSystemLibrarySourceLocation() throws Exception {
IClasspathEntry[] cpes = get14Project().getRawClasspath();
IClasspathEntry lib = null;
@@ -168,7 +168,7 @@
}
}
assertNotNull("Could not find JRE_CONTAINER entry", lib);
-
+
IPackageFragmentRoot[] roots = get14Project().findPackageFragmentRoots(lib);
Object source = null;
for (int i = 0; i < roots.length; i++) {
@@ -179,11 +179,11 @@
break;
}
}
-
+
assertTrue("Did not find source for 'Object'", source instanceof IClassFile);
IClassFile cf = (IClassFile)source;
assertEquals("Did not find source for 'Object'", "Object.class", cf.getElementName());
-
+
for (int i = 0; i < roots.length; i++) {
IPackageFragmentRoot root = roots[i];
IJavaSourceLocation location = new PackageFragmentRootSourceLocation(root);
@@ -191,12 +191,12 @@
if (source != null) {
break;
}
- }
+ }
assertTrue("Did not find source for 'Vector$1'", source instanceof IClassFile);
cf = (IClassFile)source;
assertEquals("Did not find source for 'Vector$1'", "Vector$1.class", cf.getElementName());
}
-
+
public void testNegativeSystemLibrarySourceLocation() throws Exception {
IClasspathEntry[] cpes = get14Project().getRawClasspath();
IClasspathEntry lib = null;
@@ -209,7 +209,7 @@
}
}
assertNotNull("Could not find JRE_CONTAINER entry", lib);
-
+
IPackageFragmentRoot[] roots = get14Project().findPackageFragmentRoots(lib);
Object source = null;
for (int i = 0; i < roots.length; i++) {
@@ -220,8 +220,8 @@
break;
}
}
-
+
assertNull("Should not find source", source);
- }
+ }
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/SourceLookupTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/SourceLookupTests.java
index 0bc25f8..d372e9f 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/SourceLookupTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/SourceLookupTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -30,11 +30,11 @@
*/
@SuppressWarnings("deprecation")
public class SourceLookupTests extends AbstractDebugTest {
-
+
public SourceLookupTests(String name) {
super(name);
}
-
+
/**
* See Bug 53646
*/
@@ -60,19 +60,19 @@
String typeName = "org.eclipse.debug.tests.targets.CallStack";
createLineBreakpoint(28, "org.eclipse.debug.tests.targets.ClassOne");
createLineBreakpoint(28, "org.eclipse.debug.tests.targets.ClassTwo");
-
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
// get source element for first breakpoint
IStackFrame[] frames = thread.getStackFrames();
- IStackFrame frame = frames[2];
+ IStackFrame frame = frames[2];
ISourceLocator sourceLocator = thread.getLaunch().getSourceLocator();
Object source1 = sourceLocator.getSourceElement(frame);
source1 = ((IAdaptable)source1).getAdapter(IJavaElement.class);
-
+
IPackageFragment[] fragments = get14Project().getPackageFragments();
IPackageFragment fragment = null;
for (int i = 0; i < fragments.length; i++) {
@@ -84,7 +84,7 @@
assertNotNull("Did not locate package framgment 'org.eclipse.debug.tests.targets'", fragment);
ICompilationUnit unit1 = fragment.getCompilationUnit("ClassOne.java");
assertEquals("Source lookup failed for frame1", unit1, source1);
-
+
// resume to second breakpoint
thread = resume(thread);
assertNotNull("Breakpoint not hit within timeout period", thread);
@@ -93,40 +93,40 @@
source2 = ((IAdaptable)source2).getAdapter(IJavaElement.class);
ICompilationUnit unit2 = fragment.getCompilationUnit("ClassTwo.java");
assertEquals("Source lookup failed for frame2", unit2, source2);
-
+
// the source elements should not be equal
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Tests source lookup in a top level type, in the default package.
*/
public void testDefTopLevelType() throws Exception {
IPackageFragmentRoot root = getPackageFragmentRoot(get14Project(), "src");
IJavaSourceLocation location = new PackageFragmentRootSourceLocation(root);
-
+
ICompilationUnit expectedSource = getCompilationUnit(get14Project(), "src", IInternalDebugCoreConstants.EMPTY_STRING, "Breakpoints.java");
assertTrue("did not find compilation unit for Breakpoints.java", expectedSource.exists());
-
+
assertEquals("Source lookup failed", expectedSource, location.findSourceElement("Breakpoints"));
}
-
+
/**
* Tests source lookup in an inner type, the default package.
*/
public void testDefInnerType() throws Exception {
IPackageFragmentRoot root = getPackageFragmentRoot(get14Project(), "src");
IJavaSourceLocation location = new PackageFragmentRootSourceLocation(root);
-
+
ICompilationUnit expectedSource = getCompilationUnit(get14Project(), "src", IInternalDebugCoreConstants.EMPTY_STRING, "Breakpoints.java");
assertTrue("did not find compilation unit for Breakpoints.java", expectedSource.exists());
-
+
assertEquals("Source lookup failed", expectedSource, location.findSourceElement("Breakpoints$InnerRunnable"));
}
-
+
/**
* Tests source lookup in an anonymous inner type, in the default package.
* Must debug since we do not know name of type.
@@ -136,12 +136,12 @@
createLineBreakpoint(43, typeName);
ICompilationUnit expectedSource = getCompilationUnit(get14Project(), "src", IInternalDebugCoreConstants.EMPTY_STRING, "Breakpoints.java");
assertTrue("did not find compilation unit for Breakpoints.java", expectedSource.exists());
-
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
// get source element for top frame
IStackFrame frame = thread.getTopStackFrame();
ISourceLocator sourceLocator = thread.getLaunch().getSourceLocator();
@@ -149,10 +149,10 @@
assertEquals("Source lookup failed", expectedSource.getResource(), source);
} finally {
terminateAndRemove(thread);
- removeAllBreakpoints();
+ removeAllBreakpoints();
}
- }
-
+ }
+
/**
* Tests source lookup in a named local type, in the default package.
* Must debug to test this, since we do no know name of local type.
@@ -162,12 +162,12 @@
createLineBreakpoint(30, typeName);
ICompilationUnit expectedSource = getCompilationUnit(get14Project(), "src", IInternalDebugCoreConstants.EMPTY_STRING, "Breakpoints.java");
assertTrue("did not find compilation unit for Breakpoints.java", expectedSource.exists());
-
+
IJavaThread thread= null;
try {
thread= launchToBreakpoint(typeName);
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
// get source element for top frame
IStackFrame frame = thread.getTopStackFrame();
ISourceLocator sourceLocator = thread.getLaunch().getSourceLocator();
@@ -175,85 +175,85 @@
assertEquals("Source lookup failed", expectedSource.getResource(), source);
} finally {
terminateAndRemove(thread);
- removeAllBreakpoints();
+ removeAllBreakpoints();
}
- }
-
+ }
+
/**
* Tests source lookup in a top level type.
*/
public void testTopLevelType() throws Exception {
IPackageFragmentRoot root = getPackageFragmentRoot(get14Project(), "src");
IJavaSourceLocation location = new PackageFragmentRootSourceLocation(root);
-
+
ICompilationUnit expectedSource = getCompilationUnit(get14Project(), "src", "org.eclipse.debug.tests.targets", "SourceLookup.java");
assertTrue("did not find compilation unit for SourceLookup.java", expectedSource.exists());
-
+
assertEquals("Source lookup failed", expectedSource, location.findSourceElement("org.eclipse.debug.tests.targets.SourceLookup"));
}
-
+
/**
* Tests source lookup in an inner type.
*/
public void testInnerType() throws Exception {
IPackageFragmentRoot root = getPackageFragmentRoot(get14Project(), "src");
IJavaSourceLocation location = new PackageFragmentRootSourceLocation(root);
-
+
ICompilationUnit expectedSource = getCompilationUnit(get14Project(), "src", "org.eclipse.debug.tests.targets", "SourceLookup.java");
assertTrue("did not find compilation unit for SourceLookup.java", expectedSource.exists());
-
+
assertEquals("Source lookup failed", expectedSource, location.findSourceElement("org.eclipse.debug.tests.targets.SourceLookup$Inner"));
}
-
+
/**
* Tests source lookup in an inner inner type.
*/
public void testInnerNestedType() throws Exception {
IPackageFragmentRoot root = getPackageFragmentRoot(get14Project(), "src");
IJavaSourceLocation location = new PackageFragmentRootSourceLocation(root);
-
+
ICompilationUnit expectedSource = getCompilationUnit(get14Project(), "src", "org.eclipse.debug.tests.targets", "SourceLookup.java");
assertTrue("did not find compilation unit for SourceLookup.java", expectedSource.exists());
-
+
assertEquals("Source lookup failed", expectedSource, location.findSourceElement("org.eclipse.debug.tests.targets.SourceLookup$Inner$Nested"));
- }
-
+ }
+
/**
* Tests source lookup in a top level type, with a $ named class
*/
public void testTopLevel$Type() throws Exception {
IPackageFragmentRoot root = getPackageFragmentRoot(get14Project(), "src");
IJavaSourceLocation location = new PackageFragmentRootSourceLocation(root);
-
+
ICompilationUnit expectedSource = getCompilationUnit(get14Project(), "src", "org.eclipse.debug.tests.targets", "Source_$_Lookup.java");
assertTrue("did not find compilation unit for Source_$_Lookup.java", expectedSource.exists());
-
+
assertEquals("Source lookup failed", expectedSource, location.findSourceElement("org.eclipse.debug.tests.targets.Source_$_Lookup"));
}
-
+
/**
* Tests source lookup in an inner type in a $ named class.
*/
public void testInner$Type() throws Exception {
IPackageFragmentRoot root = getPackageFragmentRoot(get14Project(), "src");
IJavaSourceLocation location = new PackageFragmentRootSourceLocation(root);
-
+
ICompilationUnit expectedSource = getCompilationUnit(get14Project(), "src", "org.eclipse.debug.tests.targets", "Source_$_Lookup.java");
assertTrue("did not find compilation unit for Source_$_Lookup.java", expectedSource.exists());
-
+
assertEquals("Source lookup failed", expectedSource, location.findSourceElement("org.eclipse.debug.tests.targets.Source_$_Lookup$Inner"));
}
-
+
/**
* Tests source lookup in an inner inner type in a $ named class.
*/
public void testInnerNested$Type() throws Exception {
IPackageFragmentRoot root = getPackageFragmentRoot(get14Project(), "src");
IJavaSourceLocation location = new PackageFragmentRootSourceLocation(root);
-
+
ICompilationUnit expectedSource = getCompilationUnit(get14Project(), "src", "org.eclipse.debug.tests.targets", "Source_$_Lookup.java");
assertTrue("did not find compilation unit for Source_$_Lookup.java", expectedSource.exists());
-
+
assertEquals("Source lookup failed", expectedSource, location.findSourceElement("org.eclipse.debug.tests.targets.Source_$_Lookup$Inner$Nested"));
- }
+ }
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/TypeResolutionTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/TypeResolutionTests.java
index eccabb5..a445faf 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/TypeResolutionTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/TypeResolutionTests.java
@@ -27,103 +27,103 @@
public TypeResolutionTests(String name) {
super(name);
}
-
+
public void testTypeAA() throws Exception {
resolve(65, "EvalNestedTypeTests$A$AA");
- }
-
+ }
+
public void testTypeAB() throws Exception {
resolve(94, "EvalNestedTypeTests$A$AB");
- }
-
+ }
+
public void testTypeAC() throws Exception {
resolve(120, "EvalNestedTypeTests$A$AC");
- }
-
+ }
+
public void testAnonTypeA1() throws Exception {
resolve(145, "EvalNestedTypeTests$A$1");
}
-
+
public void testTypeAE() throws Exception {
resolve(179, "EvalNestedTypeTests$A$AE");
}
-
+
public void testAnonTypeA2() throws Exception {
resolve(203, "EvalNestedTypeTests$A$2");
- }
-
+ }
+
public void testTypeBB() throws Exception {
resolve(252, "EvalNestedTypeTests$B$BB");
}
-
+
public void testTypeBC() throws Exception {
resolve(279, "EvalNestedTypeTests$B$BC");
}
-
+
public void testAnonTypeB() throws Exception {
resolve(304, "EvalNestedTypeTests$B$1");
}
-
+
public void testTypeB() throws Exception {
resolve(312, "EvalNestedTypeTests$B");
}
-
+
public void testTypeCB() throws Exception {
resolve(354, "EvalNestedTypeTests$C$CB");
}
-
+
public void testTypeCC() throws Exception {
resolve(381, "EvalNestedTypeTests$C$CC");
- }
-
+ }
+
public void testAnonTypeC1() throws Exception {
resolve(406, "EvalNestedTypeTests$C$1");
}
-
+
public void testAnonTypeDB() throws Exception {
resolve(455, "EvalNestedTypeTests$1$DB");
}
-
+
public void testAnonTypeDC() throws Exception {
resolve(481, "EvalNestedTypeTests$1$DC");
}
-
+
public void testAnonType11() throws Exception {
resolve(506, "EvalNestedTypeTests$1$1");
- }
+ }
public void testTopLevelType() throws Exception {
resolve(523, "EvalNestedTypeTests");
}
-
+
public void testTypeEB() throws Exception {
resolve(566, "EvalNestedTypeTests$E$EB");
}
-
+
public void testTypeEC() throws Exception {
resolve(592, "EvalNestedTypeTests$E$EC");
}
-
+
public void testAnonTypeE1() throws Exception {
resolve(616, "EvalNestedTypeTests$E$1");
- }
-
+ }
+
public void testAnonTypeFB() throws Exception {
resolve(664, "EvalNestedTypeTests$2$FB");
}
-
+
public void testAnonTypeFC() throws Exception {
resolve(690, "EvalNestedTypeTests$2$FC");
}
-
+
public void testAnonType21() throws Exception {
resolve(714, "EvalNestedTypeTests$2$1");
}
-
+
/**
* Performs a resolution test. Debugs to a breakpoint and resolves the
* declaring type of the stack frame.
- *
+ *
* @param line breakpoint line number
* @param expectedName expected fully qualified name of resolved type
* @throws Exception on failure
@@ -145,7 +145,7 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
+ }
+ }
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/state/RefreshStateTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/state/RefreshStateTests.java
index 5be4b7f..13ad235 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/state/RefreshStateTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/state/RefreshStateTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -29,7 +29,7 @@
/**
* Tests that state refresh works after modifying the target state
* with a custom JDWP command.
- *
+ *
* @since 3.6
*/
public class RefreshStateTests extends AbstractDebugTest {
@@ -37,16 +37,16 @@
public RefreshStateTests(String name) {
super(name);
}
-
+
/**
* Resume a thread behind the scenes and ensure model state updates appropriately.
- *
+ *
* @throws CoreException
*/
public void testThreadHasResumed() throws Exception {
String typeName = "org.eclipse.debug.tests.targets.CallLoop";
ILineBreakpoint bp = createLineBreakpoint(16, "org.eclipse.debug.tests.targets.Looper");
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -58,12 +58,12 @@
outData.writeLong(reference.getUniqueId());
byte[] reply = jdiTarget.sendCommand((byte)11, (byte)3, outBytes.toByteArray());
JdwpReplyPacket packet = (JdwpReplyPacket) JdwpPacket.build(reply);
-
+
assertEquals("Unexpected error code in reply packet", 0, packet.errorCode());
-
+
// model should still be suspended
assertTrue("Model should be in suspended state", thread.isSuspended());
-
+
// refresh the model, expect a resume event
DebugElementEventWaiter waiter = new DebugElementEventWaiter(DebugEvent.RESUME, thread);
jdiTarget.refreshState();
@@ -75,19 +75,19 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Resume all threads behind the scenes and ensure model state updates appropriately.
- *
+ *
* @throws CoreException
*/
public void testAllThreadsResumed() throws Exception {
String typeName = "org.eclipse.debug.tests.targets.CallLoop";
IJavaLineBreakpoint bp = createLineBreakpoint(16, "org.eclipse.debug.tests.targets.Looper");
bp.setSuspendPolicy(IJavaBreakpoint.SUSPEND_VM);
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -104,10 +104,10 @@
JdwpReplyPacket packet = (JdwpReplyPacket) JdwpPacket.build(reply);
assertEquals("Unexpected error code in reply packet", 0, packet.errorCode());
}
-
+
// model should still be suspended
assertTrue("Model should be in suspended state", jdiTarget.isSuspended());
-
+
// refresh the model, expect a resume event
DebugElementEventWaiter waiter = new DebugElementEventWaiter(DebugEvent.RESUME, jdiTarget);
jdiTarget.refreshState();
@@ -118,18 +118,18 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
-
+
/**
* Suspend a thread behind the scenes and ensure model state updates appropriately.
- *
+ *
* @throws CoreException
*/
public void testThreadHasSuspended() throws Exception {
String typeName = "org.eclipse.debug.tests.targets.CallLoop";
ILineBreakpoint bp = createLineBreakpoint(16, "org.eclipse.debug.tests.targets.Looper");
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -140,7 +140,7 @@
waiter.waitForEvent();
// model should now be in running state
assertFalse("Model should now be running", thread.isSuspended());
-
+
// suspend the thread with a JDWP command (set 11, command 2)
IJavaObject reference = thread.getThreadObject();
ByteArrayOutputStream outBytes = new ByteArrayOutputStream();
@@ -148,37 +148,37 @@
outData.writeLong(reference.getUniqueId());
byte[] reply = jdiTarget.sendCommand((byte)11, (byte)2, outBytes.toByteArray());
JdwpReplyPacket packet = (JdwpReplyPacket) JdwpPacket.build(reply);
-
+
assertEquals("Unexpected error code in reply packet", 0, packet.errorCode());
-
+
// model should still be running
assertFalse("Model should be in running state", thread.isSuspended());
-
+
// refresh the model, expect a suspend event
waiter = new DebugElementEventWaiter(DebugEvent.SUSPEND, thread);
jdiTarget.refreshState();
Object source = waiter.waitForEvent();
assertNotNull("Thread never sent suspend event", source);
assertEquals("Wrong thread suspended", thread, source);
-
+
// model should be suspended now
assertTrue("Model should be in suspended state", thread.isSuspended());
-
+
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
/**
* Suspend all threads behind the scenes and ensure model state updates appropriately.
- *
+ *
* @throws CoreException
*/
public void testAllThreadsSuspended() throws Exception {
String typeName = "org.eclipse.debug.tests.targets.CallLoop";
ILineBreakpoint bp = createLineBreakpoint(16, "org.eclipse.debug.tests.targets.Looper");
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -189,7 +189,7 @@
waiter.waitForEvent();
// model should now be in running state
assertFalse("Model should now be running", thread.isSuspended());
-
+
IThread[] threads = jdiTarget.getThreads();
for (int i = 0; i < threads.length; i++) {
IJavaThread jThread = (IJavaThread) threads[i];
@@ -202,35 +202,35 @@
JdwpReplyPacket packet = (JdwpReplyPacket) JdwpPacket.build(reply);
assertEquals("Unexpected error code in reply packet", 0, packet.errorCode());
}
-
-
+
+
// model should still be running
assertFalse("Model should be in running state", jdiTarget.isSuspended());
-
+
// refresh the model, expect a suspend event
waiter = new DebugElementEventWaiter(DebugEvent.SUSPEND, jdiTarget);
jdiTarget.refreshState();
Object source = waiter.waitForEvent();
assertNotNull("Target never sent suspend event", source);
-
+
// model should be suspended now
assertTrue("Model should be in suspended state", jdiTarget.isSuspended());
-
+
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
+ }
+ }
/**
* Suspend the entire target behind the scenes and ensure model state updates appropriately.
- *
+ *
* @throws CoreException
*/
public void testTargetHasSuspended() throws Exception {
String typeName = "org.eclipse.debug.tests.targets.CallLoop";
ILineBreakpoint bp = createLineBreakpoint(16, "org.eclipse.debug.tests.targets.Looper");
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -241,7 +241,7 @@
waiter.waitForEvent();
// model should now be in running state
assertFalse("Model should now be running", thread.isSuspended());
-
+
// suspend the target with a JDWP command (set 1, command 8)
IJavaObject reference = thread.getThreadObject();
ByteArrayOutputStream outBytes = new ByteArrayOutputStream();
@@ -249,37 +249,37 @@
outData.writeLong(reference.getUniqueId());
byte[] reply = jdiTarget.sendCommand((byte)1, (byte)8, outBytes.toByteArray());
JdwpReplyPacket packet = (JdwpReplyPacket) JdwpPacket.build(reply);
-
+
assertEquals("Unexpected error code in reply packet", 0, packet.errorCode());
-
+
// model should still be running
assertFalse("Model should be in running state", jdiTarget.isSuspended());
-
+
// refresh the model, expect a suspend event
waiter = new DebugElementEventWaiter(DebugEvent.SUSPEND, jdiTarget);
jdiTarget.refreshState();
Object source = waiter.waitForEvent();
assertNotNull("Target never sent suspend event", source);
-
+
// model should be suspended now
assertTrue("Model should be in suspended state", jdiTarget.isSuspended());
-
+
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
/**
* Resume a target behind the scenes and ensure model state updates appropriately.
- *
+ *
* @throws CoreException
*/
public void testTargetHasResumed() throws Exception {
String typeName = "org.eclipse.debug.tests.targets.CallLoop";
IJavaLineBreakpoint bp = createLineBreakpoint(16, "org.eclipse.debug.tests.targets.Looper");
bp.setSuspendPolicy(IJavaBreakpoint.SUSPEND_VM);
-
+
IJavaThread thread = null;
try {
thread= launchToLineBreakpoint(typeName, bp);
@@ -291,12 +291,12 @@
outData.writeLong(reference.getUniqueId());
byte[] reply = jdiTarget.sendCommand((byte)1, (byte)9, outBytes.toByteArray());
JdwpReplyPacket packet = (JdwpReplyPacket) JdwpPacket.build(reply);
-
+
assertEquals("Unexpected error code in reply packet", 0, packet.errorCode());
-
+
// model should still be suspended
assertTrue("Model should be in suspended state", jdiTarget.isSuspended());
-
+
// refresh the model, expect a resume event
DebugElementEventWaiter waiter = new DebugElementEventWaiter(DebugEvent.RESUME, jdiTarget);
jdiTarget.refreshState();
@@ -307,6 +307,6 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
+ }
+ }
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/Accessor.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/Accessor.java
index 22b977f..6dfd7ed 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/Accessor.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/Accessor.java
@@ -20,7 +20,7 @@
/**
* Helper class for accessing classes and members which cannot be accessed using standard Java
* access control like private or package visible elements.
- *
+ *
* @since 3.7
*/
public class Accessor {
@@ -33,7 +33,7 @@
/**
* Creates an accessor for the given <code>instance</code> and <code>class</code>. Only
* non-inherited members that particular <code>class</code> can be accessed.
- *
+ *
* @param instance
* the instance
* @param clazz
@@ -49,7 +49,7 @@
/**
* Creates an accessor for the given <code>instance</code> and <code>class</code>. Only
* non-inherited members that particular <code>class</code> can be accessed.
- *
+ *
* @param instance
* the instance
* @param className
@@ -78,7 +78,7 @@
* Object. Use {@link #Accessor(String, ClassLoader, Class[], Object[])} if this is not the
* case.
* </p>
- *
+ *
* @param className
* the name of the class
* @param classLoader
@@ -92,7 +92,7 @@
/**
* Creates an accessor for the given class.
- *
+ *
* @param className
* the name of the class
* @param classLoader
@@ -138,7 +138,7 @@
* <p>
* This constructor is used to access static stuff.
* </p>
- *
+ *
* @param className
* the name of the class
* @param classLoader
@@ -159,7 +159,7 @@
* <p>
* This constructor is used to access static stuff.
* </p>
- *
+ *
* @param clazz
* the class
*/
@@ -174,7 +174,7 @@
* In order to get the type information from the given arguments all those arguments must be
* instance of Object. Use {@link #invoke(String, Class[], Object[])} if this is not the case.
* </p>
- *
+ *
* @param methodName
* the method name
* @param arguments
@@ -187,7 +187,7 @@
/**
* Invokes the method with the given method name and arguments.
- *
+ *
* @param methodName
* the method name
* @param types
@@ -221,7 +221,7 @@
/**
* Assigns the given value to the field with the given name.
- *
+ *
* @param fieldName
* the field name
* @param value
@@ -240,7 +240,7 @@
/**
* Assigns the given value to the field with the given name.
- *
+ *
* @param fieldName
* the field name
* @param value
@@ -259,7 +259,7 @@
/**
* Assigns the given value to the field with the given name.
- *
+ *
* @param fieldName
* the field name
* @param value
@@ -278,7 +278,7 @@
/**
* Returns the value of the field with the given name.
- *
+ *
* @param fieldName
* the field name
* @return the value of the field
@@ -298,7 +298,7 @@
/**
* Returns the value of the field with the given name.
- *
+ *
* @param fieldName
* the field name
* @return the value of the field
@@ -318,7 +318,7 @@
/**
* Returns the value of the field with the given name.
- *
+ *
* @param fieldName
* the field name
* @return the value of the field
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/DetailPaneManagerTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/DetailPaneManagerTests.java
index 4055e3d..62bec77 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/DetailPaneManagerTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/DetailPaneManagerTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -37,12 +37,12 @@
* The manager is responsible for the default detail pane contributed by the
* platform and detail panes contributed at the org.eclipse.debug.ui.detailPaneFactories.
* The manager must keep track of which is the preferred detail pane to display and
- * know what detail panes can be displayed for certain types of selections.
+ * know what detail panes can be displayed for certain types of selections.
*/
public class DetailPaneManagerTests extends AbstractDebugTest {
DetailPaneManager fManager;
-
+
/**
* Initializes the test class and gets the singleton detail pane manager.
* @param name
@@ -68,20 +68,20 @@
public void testGetUserPreferredDetailPane() {
String id = fManager.getUserPreferredDetailPane(new HashSet<String>());
assertEquals("Incorrect pane ID", null, id);
-
+
Set<String> detailPanes = new HashSet<String>();
detailPanes.add("NewPane1");
id = fManager.getUserPreferredDetailPane(detailPanes);
assertEquals("Incorrect pane ID", null, id);
-
+
detailPanes.add("NewPane2");
id = fManager.getUserPreferredDetailPane(detailPanes);
assertEquals("Incorrect pane ID", null, id);
-
+
detailPanes.add(DefaultDetailPane.ID);
id = fManager.getUserPreferredDetailPane(detailPanes);
assertEquals("Incorrect pane ID", null, id);
-
+
detailPanes.clear();
detailPanes.add(DefaultDetailPane.ID);
id = fManager.getUserPreferredDetailPane(detailPanes);
@@ -96,22 +96,22 @@
fManager.setPreferredDetailPane(null, null);
String id = fManager.getUserPreferredDetailPane(null);
assertEquals("Incorrect pane ID", null, id);
-
+
fManager.setPreferredDetailPane(null, "Example");
id = fManager.getUserPreferredDetailPane(null);
assertEquals("Incorrect pane ID", null, id);
-
+
Set<String> detailPanes = new HashSet<String>();
detailPanes.add("Example1");
fManager.setPreferredDetailPane(detailPanes, "Example1");
id = fManager.getUserPreferredDetailPane(detailPanes);
assertEquals("Incorrect pane ID", "Example1", id);
-
+
detailPanes.add("Example2");
fManager.setPreferredDetailPane(detailPanes, "Example2");
id = fManager.getUserPreferredDetailPane(detailPanes);
assertEquals("Incorrect pane ID", "Example2", id);
-
+
detailPanes.add(DefaultDetailPane.ID);
id = fManager.getUserPreferredDetailPane(detailPanes);
assertEquals("Incorrect pane ID", null, id);
@@ -119,20 +119,20 @@
id = fManager.getUserPreferredDetailPane(detailPanes);
assertEquals("Incorrect pane ID", "Example2", id);
}
-
+
/**
- * Tests that the manager can determine the preferred pane
+ * Tests that the manager can determine the preferred pane
* given a selection.
*/
public void testGetPreferredPaneFromSelection() {
IStructuredSelection selection = null;
String id = fManager.getPreferredPaneFromSelection(selection);
assertEquals("Incorrect pane ID", DefaultDetailPane.ID, id);
-
+
selection = new StructuredSelection();
id = fManager.getPreferredPaneFromSelection(selection);
assertEquals("Incorrect pane ID", DefaultDetailPane.ID, id);
-
+
selection = new StructuredSelection(new String[]{"example selection"});
id = fManager.getPreferredPaneFromSelection(selection);
assertEquals("Incorrect pane ID", DefaultDetailPane.ID, id);
@@ -140,21 +140,21 @@
selection = new StructuredSelection(new IJavaVariable[]{new JDIPlaceholderVariable("test var",null)});
id = fManager.getPreferredPaneFromSelection(selection);
assertEquals("Incorrect pane ID", DefaultDetailPane.ID, id);
-
+
// The factory sets the Table detail pane as the default if the first string is "test pane is default".
selection = new StructuredSelection(new String[]{"test pane is default","example selection"});
id = fManager.getPreferredPaneFromSelection(selection);
assertEquals("Incorrect pane ID", TableDetailPane.ID, id);
-
+
selection = new StructuredSelection(new String[]{"test pane is default","example selection"});
fManager.setPreferredDetailPane(fManager.getAvailablePaneIDs(selection), DefaultDetailPane.ID);
id = fManager.getPreferredPaneFromSelection(selection);
assertEquals("Incorrect pane ID", DefaultDetailPane.ID, id);
-
+
selection = new StructuredSelection(new String[]{"String1","String2","String3"});
id = fManager.getPreferredPaneFromSelection(selection);
assertEquals("Incorrect pane ID", DefaultDetailPane.ID, id);
-
+
selection = new StructuredSelection(new JDIDebugElement[]{});
id = fManager.getPreferredPaneFromSelection(selection);
assertEquals("Incorrect pane ID", DefaultDetailPane.ID, id);
@@ -168,25 +168,25 @@
IStructuredSelection selection = null;
Set<String> result = fManager.getAvailablePaneIDs(selection);
assertTrue("Set was incorrect",result.size()==1 && result.contains(DefaultDetailPane.ID));
-
+
selection = new StructuredSelection(new String[]{"example selection"});
result = fManager.getAvailablePaneIDs(selection);
assertTrue("Set was incorrect",result.size()==1 && result.contains(DefaultDetailPane.ID));
-
+
selection = new StructuredSelection(new String[]{"test pane is default","example selection"});
result = fManager.getAvailablePaneIDs(selection);
assertTrue("Set was incorrect",result.size()==2 && result.contains(DefaultDetailPane.ID) && result.contains(TableDetailPane.ID));
-
+
selection = new StructuredSelection(new Object[]{new JDIPlaceholderVariable("test var",null)});
result = fManager.getAvailablePaneIDs(selection);
assertTrue("Set was incorrect",result.size()==2 && result.contains(DefaultDetailPane.ID) && result.contains(SimpleDetailPane.ID));
-
+
// Simple detail pane only available if selection has length of 1, containing a java variable
selection = new StructuredSelection(new Object[]{"String1",new JDIPlaceholderVariable("test var",null),"String3"});
result = fManager.getAvailablePaneIDs(selection);
assertTrue("Set was incorrect",result.size()==2 && result.contains(DefaultDetailPane.ID) && result.contains(TableDetailPane.ID));
}
-
+
/**
* Checks that the manager can query the correct factory to produce
* a detail pane with the given ID.
@@ -194,13 +194,13 @@
public void testGetDetailPaneFromID() {
IDetailPane pane = fManager.getDetailPaneFromID(null);
assertNull("Incorrect pane returned",pane);
-
+
pane = fManager.getDetailPaneFromID("ThisPaneDoesNotExist");
assertNull("Incorrect pane returned",pane);
-
+
pane = fManager.getDetailPaneFromID(DefaultDetailPane.ID);
assertNotNull("Incorrect pane returned",pane);
-
+
pane = fManager.getDetailPaneFromID(SimpleDetailPane.ID);
assertNotNull("Incorrect pane returned",pane);
}
@@ -212,16 +212,16 @@
public void testGetNameFromID() {
String name = fManager.getNameFromID(null);
assertEquals("Incorrect name returned",null,name);
-
+
name = fManager.getNameFromID("ThisPaneDoesNotExist");
assertEquals("Incorrect name returned",null,name);
-
+
name = fManager.getNameFromID(DefaultDetailPane.ID);
assertEquals("Incorrect name returned",DefaultDetailPane.NAME,name);
-
+
name = fManager.getNameFromID(SimpleDetailPane.ID);
assertEquals("Incorrect name returned","Example Pane: Colorful Detail Pane",name);
-
+
}
/**
@@ -231,13 +231,13 @@
public void testGetDescriptionFromID() {
String description = fManager.getDescriptionFromID(null);
assertEquals("Incorrect name returned",null,description);
-
+
description = fManager.getDescriptionFromID("ThisPaneDoesNotExist");
assertEquals("Incorrect name returned",null,description);
-
+
description = fManager.getDescriptionFromID(DefaultDetailPane.ID);
assertEquals("Incorrect name returned",DefaultDetailPane.DESCRIPTION,description);
-
+
description = fManager.getDescriptionFromID(SimpleDetailPane.ID);
assertEquals("Incorrect name returned","Example pane that displays a color for variables depending on their access level.",description);
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/InstructionPointerManagerTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/InstructionPointerManagerTests.java
index 761ed71..ec5a30b 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/InstructionPointerManagerTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/InstructionPointerManagerTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -54,7 +54,7 @@
* Tests functionality of the InstructionPointerManager.
* The tests are not currently part of the automated suite because they produce
* transient failures that could not be tracked down.
- *
+ *
* @since 3.3
* @see InstructionPointerManager
*/
@@ -63,31 +63,31 @@
private Object fLock = new Object();
private Annotation fAddedAnnotation = null;
private Annotation fRemovedAnnotation = null;
-
+
private MyPerspectiveListener fPerspectiveListener;
private MyAnnotationListener fAnnotationListener;
private IPartListener2 fPartListener;
private Set<IAnnotationModel> fAnnotationModelsWithListeners = new HashSet<IAnnotationModel>();
-
+
private static final String typeThreadStack = "org.eclipse.debug.tests.targets.ThreadStack";
private static final String typeClassOne = "org.eclipse.debug.tests.targets.ClassOne";
private static final String typeClassTwo = "org.eclipse.debug.tests.targets.ClassTwo";
-
+
private IJavaDebugTarget target1;
private IJavaDebugTarget target2;
private IJavaThread thread1;
private IJavaThread thread2;
private IJavaThread thread3;
private IJavaThread thread4;
-
+
public InstructionPointerManagerTests(String name) {
super(name);
}
-
+
public void testManagerWithEditorReuse() throws Exception{
boolean restore = DebugUIPlugin.getDefault().getPreferenceStore().getBoolean(IDebugUIConstants.PREF_REUSE_EDITOR);
DebugUIPlugin.getDefault().getPreferenceStore().setValue(IDebugUIConstants.PREF_REUSE_EDITOR, true);
-
+
try{
addAndRemoveAnnotations(new int[]{1,2,1,2,1,0,1,1}, new int[]{1,1,1,1,1,0,1,1});
} finally {
@@ -112,14 +112,14 @@
activeWorkbenchWindow.removePerspectiveListener(getPerspectiveListener());
}
};
- DebugUIPlugin.getStandardDisplay().asyncExec(cleanup);
+ DebugUIPlugin.getStandardDisplay().asyncExec(cleanup);
}
}
-
+
public void testManagerWithNoEditorReuse() throws Exception{
boolean restore = DebugUIPlugin.getDefault().getPreferenceStore().getBoolean(IDebugUIConstants.PREF_REUSE_EDITOR);
DebugUIPlugin.getDefault().getPreferenceStore().setValue(IDebugUIConstants.PREF_REUSE_EDITOR, false);
-
+
try{
addAndRemoveAnnotations(new int[]{1,2,3,4,5,3,2,1}, new int[]{1,1,2,2,3,2,2,1});
} finally {
@@ -144,23 +144,23 @@
activeWorkbenchWindow.removePerspectiveListener(getPerspectiveListener());
}
};
- DebugUIPlugin.getStandardDisplay().asyncExec(cleanup);
+ DebugUIPlugin.getStandardDisplay().asyncExec(cleanup);
}
}
-
+
/**
* Tests the ability of the manager to update it's set and mapping as
* annotations are added and removed.
- *
+ *
* First, all editors are closed and the manager is checked to ensure there are 0 IPCs.
- *
+ *
* <p>Next, annotations are created as follows:<br>
* (numbers in brackets correspond to index of expected IPC and Mapping counts checked)
* <pre>
* Target1 - Thread1 - IPC1 - ClassOne - Editor1 (line 20) [0]
* - Thread2 - IPC2 - ClassOne - Editor1 (line 20) [1]
* - IPC3 - ThreadStack - Editor2 (line 28) [2]
- *
+ *
* Target2 - Thread3 - IPC4 - ThreadStack - Editor2 (line 41) [3]
* - Thread4 - IPC5 - ClassTwo - Editor3 (line 24) [4]
* </pre>
@@ -181,7 +181,7 @@
private void addAndRemoveAnnotations(int[] expectedIPCCounts, int[] expectedMappingCounts) throws Exception{
assertEquals("Incorrect number of expected counts", 8, expectedIPCCounts.length);
assertEquals("Incorrect number of expected counts", 8, expectedMappingCounts.length);
-
+
// Close all editors
Runnable closeAll = new Runnable() {
@Override
@@ -194,9 +194,9 @@
DebugUIPlugin.getStandardDisplay().syncExec(closeAll);
assertEquals("Instruction pointer count was incorrect", 0, InstructionPointerManager.getDefault().getInstructionPointerCount());
assertEquals("Editor mapping count was incorrect", 0, InstructionPointerManager.getDefault().getEditorMappingCount());
-
+
// ADD ANNOTATIONS
-
+
// Launch a target creating two threads, both suspend in ClassOne, one will automatically be selected
IJavaLineBreakpoint breakpoint = createLineBreakpoint(20, typeClassOne);
fAddedAnnotation = null;
@@ -208,7 +208,7 @@
waitForAnnotationToBeAdded();
assertEquals("Instruction pointer count was incorrect", expectedIPCCounts[0], InstructionPointerManager.getDefault().getInstructionPointerCount());
assertEquals("Editor mapping count was incorrect", expectedMappingCounts[0], InstructionPointerManager.getDefault().getEditorMappingCount());
-
+
// Find and select the top stack frame of the other thread
Runnable openParent = new Runnable() {
@Override
@@ -239,7 +239,7 @@
assertNotNull("Thread not selected",thread2);
assertEquals("Instruction pointer count was incorrect", expectedIPCCounts[1], InstructionPointerManager.getDefault().getInstructionPointerCount());
assertEquals("Editor mapping count was incorrect", expectedMappingCounts[1], InstructionPointerManager.getDefault().getEditorMappingCount());
-
+
// Select the same stack frame and make sure IPC count doesn't change
Runnable selectSameStackFrame = new Runnable() {
@Override
@@ -249,7 +249,7 @@
newSegments[0] = target1.getLaunch();
newSegments[1] = target1;
newSegments[2] = thread2;
- try {
+ try {
newSegments[3] = thread2.getTopStackFrame();
} catch (DebugException e) {
fail("Exception: " + e.getMessage());
@@ -263,7 +263,7 @@
waitForAnnotationToBeAdded();
assertEquals("Instruction pointer count was incorrect", expectedIPCCounts[1], InstructionPointerManager.getDefault().getInstructionPointerCount());
assertEquals("Editor mapping count was incorrect", expectedMappingCounts[1], InstructionPointerManager.getDefault().getEditorMappingCount());
-
+
// Select the next stack frame in the same thread
Runnable selectSecondStackFrame = new Runnable() {
@Override
@@ -288,7 +288,7 @@
// Failure here, reuse, expected 1 but was 2, also with no reuse, expected 3 but was 2
assertEquals("Instruction pointer count was incorrect", expectedIPCCounts[2], InstructionPointerManager.getDefault().getInstructionPointerCount());
assertEquals("Editor mapping count was incorrect", expectedMappingCounts[2], InstructionPointerManager.getDefault().getEditorMappingCount());
-
+
// Remove the breakpoint from before and create new ones, start a new target
breakpoint.delete();
createLineBreakpoint(41, typeThreadStack);
@@ -297,7 +297,7 @@
assertNotNull("Target was not launched", target2);
assertEquals("Instruction pointer count was incorrect", expectedIPCCounts[2], InstructionPointerManager.getDefault().getInstructionPointerCount());
assertEquals("Editor mapping count was incorrect", expectedMappingCounts[2], InstructionPointerManager.getDefault().getEditorMappingCount());
-
+
// Select the stack frame from the new debug target displaying ThreadStack
Runnable openOtherDebugTarget = new Runnable() {
@Override
@@ -337,7 +337,7 @@
waitForAnnotationToBeAdded();
assertEquals("Instruction pointer count was incorrect", expectedIPCCounts[3], InstructionPointerManager.getDefault().getInstructionPointerCount());
assertEquals("Editor mapping count was incorrect", expectedMappingCounts[3], InstructionPointerManager.getDefault().getEditorMappingCount());
-
+
// Select the other thread from the new target displaying ClassTwo
Runnable openOtherThread = new Runnable() {
@Override
@@ -370,7 +370,7 @@
assertEquals("Editor mapping count was incorrect", expectedMappingCounts[4], InstructionPointerManager.getDefault().getEditorMappingCount());
// REMOVE ANNOTATIONS
-
+
// Remove target2
fRemovedAnnotation = null;
target2.terminate();
@@ -379,7 +379,7 @@
assertEquals("Editor mapping count was incorrect", expectedMappingCounts[5], InstructionPointerManager.getDefault().getEditorMappingCount());
// TODO Selection of the other target does not occur automatically. This functionality may change and will break this test.
-
+
// Resume thread1
fRemovedAnnotation = null;
thread1.resume();
@@ -423,7 +423,7 @@
assertEquals("Instruction pointer count was incorrect", 0, InstructionPointerManager.getDefault().getInstructionPointerCount());
assertEquals("Editor mapping count was incorrect", 0, InstructionPointerManager.getDefault().getEditorMappingCount());
}
-
+
protected MyPerspectiveListener getPerspectiveListener(){
if (fPerspectiveListener == null){
fPerspectiveListener = new MyPerspectiveListener();
@@ -431,7 +431,7 @@
}
return fPerspectiveListener;
}
-
+
protected MyAnnotationListener getAnnotationListener(){
if (fAnnotationListener == null){
fAnnotationListener = new MyAnnotationListener();
@@ -439,7 +439,7 @@
}
return fAnnotationListener;
}
-
+
private IPartListener2 getPartListener(){
if (fPartListener == null){
fPartListener = new MyPartListener();
@@ -447,15 +447,15 @@
}
return fPartListener;
}
-
+
private void waitForAnnotationToBeAdded() throws Exception{
synchronized (fLock) {
if (fAddedAnnotation == null) {
fLock.wait(5000);
}
- }
+ }
assertNotNull("Annotation was not added properly");
-
+
// Synchronize with the UI thread so we know that the annotations have finished
Runnable runner = new Runnable(){
@Override
@@ -465,15 +465,15 @@
};
DebugUIPlugin.getStandardDisplay().syncExec(runner);
}
-
+
private void waitForAnnotationToBeRemoved() throws Exception{
synchronized (fLock) {
if (fRemovedAnnotation == null) {
fLock.wait(5000);
}
- }
+ }
assertNotNull("Annotation was not removed properly");
-
+
// Synchronize with the UI thread so we know that the annotations have finished
Runnable runner = new Runnable(){
@Override
@@ -483,17 +483,17 @@
};
DebugUIPlugin.getStandardDisplay().syncExec(runner);
}
-
+
class MyPerspectiveListener implements IPerspectiveListener2 {
private String fTypeName = IInternalDebugCoreConstants.EMPTY_STRING;
private String fTitle = IInternalDebugCoreConstants.EMPTY_STRING;
-
+
@Override
public void perspectiveActivated(IWorkbenchPage page, IPerspectiveDescriptor perspective) {}
@Override
public void perspectiveChanged(IWorkbenchPage page, IPerspectiveDescriptor perspective, String changeId) {}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.IPerspectiveListener2#perspectiveChanged(org.eclipse.ui.IWorkbenchPage, org.eclipse.ui.IPerspectiveDescriptor, org.eclipse.ui.IWorkbenchPartReference, java.lang.String)
*/
@@ -508,7 +508,7 @@
IAnnotationModel annModel = docProvider.getAnnotationModel(editorInput);
if (annModel == null) {
fail("Could not get the annotation model");
- }
+ }
annModel.addAnnotationModelListener(getAnnotationListener());
fAnnotationModelsWithListeners.add(annModel);
} else {
@@ -532,12 +532,12 @@
fTitle = typeName + ".java";
}
}
-
+
public String getTypeName(){
return fTypeName;
}
}
-
+
class MyPartListener implements IPartListener2{
@Override
public void partActivated(IWorkbenchPartReference partRef) {}
@@ -553,7 +553,7 @@
public void partBroughtToTop(IWorkbenchPartReference partRef) {}
@Override
public void partClosed(IWorkbenchPartReference partRef) {}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.IPartListener2#partInputChanged(org.eclipse.ui.IWorkbenchPartReference)
*/
@@ -567,7 +567,7 @@
IAnnotationModel annModel = docProvider.getAnnotationModel(editorInput);
if (annModel == null) {
fail("Could not get the annotation model");
- }
+ }
annModel.addAnnotationModelListener(getAnnotationListener());
fAnnotationModelsWithListeners.add(annModel);
} else {
@@ -575,7 +575,7 @@
}
}
}
-
+
class MyAnnotationListener implements IAnnotationModelListener, IAnnotationModelListenerExtension{
@Override
@@ -587,10 +587,10 @@
fAddedAnnotation = annotations[i];
fLock.notifyAll();
System.out.println("Annotation added to editor: " + fAddedAnnotation + " (" + this + ")" + event.getAnnotationModel());
-
+
}
}
- }
+ }
annotations = event.getRemovedAnnotations();
for (int i = 0; i < annotations.length; i++) {
if (annotations[i] instanceof InstructionPointerAnnotation){
@@ -599,7 +599,7 @@
fLock.notifyAll();
}
}
- }
+ }
}
@Override
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/OpenFromClipboardTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/OpenFromClipboardTests.java
index 6fffdcc..4a3d594 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/OpenFromClipboardTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/OpenFromClipboardTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -587,8 +587,8 @@
public void testInvalidPattern_3() throws Exception {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=426392#c6
- String s = "java.lang.IllegalArgumentException\n" +
- " at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63)\n" +
+ String s = "java.lang.IllegalArgumentException\n" +
+ " at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63)\n" +
" at something.completely.Different(Different.java:47)";
assertEquals(INVALID, getMatachingPattern(s));
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/ViewManagementTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/ViewManagementTests.java
index 4f4e60b..0c8d4fb 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/ViewManagementTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/ViewManagementTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -57,24 +57,24 @@
public static final String VIEW_ONE = "org.eclipse.jdt.debug.tests.context.view.one";
private Object fEventLock = new Object();
-
+
/**
* List of view ids expecting to open.
*/
private List<String> fExpectingOpenEvents = new ArrayList<String>();
-
+
/**
* List of view ids expecting to close.
*/
- private List<String> fExpectingCloseEvents = new ArrayList<String>();
-
+ private List<String> fExpectingCloseEvents = new ArrayList<String>();
+
// prefs to restore
private String switch_on_launch;
private String switch_on_suspend;
private String debug_perspectives;
private String user_view_bindings;
private boolean activate_debug_view;
-
+
/**
* Constructor
* @param name
@@ -82,10 +82,10 @@
public ViewManagementTests(String name) {
super(name);
}
-
+
/**
* Switches to the specified perspective in the given window, and resets the perspective.
- *
+ *
* @param window
* @param perspectiveId
*/
@@ -96,10 +96,10 @@
page.setPerspective(descriptor);
page.resetPerspective();
}
-
+
/**
* Switches to and resets the specified perspective in the active workbench window.
- *
+ *
* @return the window in which the perspective is ready
*/
private IWorkbenchWindow resetPerspective(final String id) {
@@ -115,37 +115,37 @@
sync(r);
return windows[0];
}
-
+
/**
* Siwtches to and resets the debug perspective in the active workbench window.
- *
+ *
* @return the window in which the perspective is ready
*/
protected IWorkbenchWindow resetDebugPerspective() {
return resetPerspective(IDebugUIConstants.ID_DEBUG_PERSPECTIVE);
}
-
+
/**
* Siwtches to and resets the java perspective in the active workbench window.
- *
+ *
* @return the window in which the perspective is ready
*/
protected IWorkbenchWindow resetJavaPerspective() {
- return resetPerspective(JavaUI.ID_PERSPECTIVE);
- }
-
+ return resetPerspective(JavaUI.ID_PERSPECTIVE);
+ }
+
/**
* Sync exec the given runnable
- *
+ *
* @param r
*/
protected void sync(Runnable r) {
DebugUIPlugin.getStandardDisplay().syncExec(r);
}
-
+
/**
* Returns whether the specified view is open
- *
+ *
* @param window
* @param id
* @return
@@ -176,14 +176,14 @@
activate_debug_view = preferenceStore.getBoolean(IInternalDebugUIConstants.PREF_ACTIVATE_DEBUG_VIEW);
preferenceStore.setValue(IInternalDebugUIConstants.PREF_SWITCH_PERSPECTIVE_ON_SUSPEND, MessageDialogWithToggle.NEVER);
preferenceStore.setValue(IInternalDebugUIConstants.PREF_SWITCH_TO_PERSPECTIVE, MessageDialogWithToggle.NEVER);
- preferenceStore.setValue(IDebugUIConstants.PREF_MANAGE_VIEW_PERSPECTIVES, IDebugUIConstants.ID_DEBUG_PERSPECTIVE + "," +
+ preferenceStore.setValue(IDebugUIConstants.PREF_MANAGE_VIEW_PERSPECTIVES, IDebugUIConstants.ID_DEBUG_PERSPECTIVE + "," +
JavaUI.ID_PERSPECTIVE + ",");
preferenceStore.setValue(IInternalDebugUIConstants.PREF_USER_VIEW_BINDINGS, IInternalDebugCoreConstants.EMPTY_STRING);
preferenceStore.setValue(IInternalDebugUIConstants.PREF_ACTIVATE_DEBUG_VIEW, true);
fExpectingOpenEvents.clear();
fExpectingCloseEvents.clear();
}
-
+
/* (non-Javadoc)
* @see junit.framework.TestCase#tearDown()
*/
@@ -193,7 +193,7 @@
preferenceStore.setValue(IInternalDebugUIConstants.PREF_SWITCH_PERSPECTIVE_ON_SUSPEND, switch_on_suspend);
preferenceStore.setValue(IInternalDebugUIConstants.PREF_SWITCH_TO_PERSPECTIVE, switch_on_launch);
preferenceStore.setValue(IDebugUIConstants.PREF_MANAGE_VIEW_PERSPECTIVES, debug_perspectives);
- preferenceStore.setValue(IInternalDebugUIConstants.PREF_USER_VIEW_BINDINGS, user_view_bindings);
+ preferenceStore.setValue(IInternalDebugUIConstants.PREF_USER_VIEW_BINDINGS, user_view_bindings);
preferenceStore.setValue(IInternalDebugUIConstants.PREF_ACTIVATE_DEBUG_VIEW, activate_debug_view);
super.tearDown();
}
@@ -201,7 +201,7 @@
/**
* Tests that context views auto-open in debug perspective.
* Both context views should auto-open.
- *
+ *
* @throws Exception
*/
public void testAutoOpenDebugPerspective() throws Exception {
@@ -212,7 +212,7 @@
String typeName = "Breakpoints";
// first line in main
createLineBreakpoint(52, typeName);
-
+
IJavaThread thread= null;
IWorkbenchWindow window = null;
try {
@@ -228,13 +228,13 @@
terminateAndRemove(thread);
removeAllBreakpoints();
window.removePerspectiveListener(this);
- }
+ }
}
-
+
/**
* Tests that context views auto-open in debug perspective, and auto close on termination.
* View "two" should auto-close.
- *
+ *
* @throws Exception
*/
public void testAutoCloseDebugPerspective() throws Exception {
@@ -245,7 +245,7 @@
String typeName = "Breakpoints";
// first line in main
createLineBreakpoint(52, typeName);
-
+
IJavaThread thread= null;
IWorkbenchWindow window = null;
try {
@@ -269,13 +269,13 @@
terminateAndRemove(thread);
removeAllBreakpoints();
window.removePerspectiveListener(this);
- }
+ }
}
-
+
/**
* Tests that context views auto-open in java perspective.
* Both context views should auto-open as well as standard debug views.
- *
+ *
* @throws Exception
*/
public void testAutoOpenJavaPerspective() throws Exception {
@@ -286,7 +286,7 @@
String typeName = "Breakpoints";
// first line in main
createLineBreakpoint(52, typeName);
-
+
IJavaThread thread= null;
IWorkbenchWindow window = null;
try {
@@ -307,13 +307,13 @@
terminateAndRemove(thread);
removeAllBreakpoints();
window.removePerspectiveListener(this);
- }
+ }
}
-
+
/**
* Tests that context views auto-open and close in java perspective.
* All views should auto-close in non-standard debug perspective.
- *
+ *
* @throws Exception
*/
public void testAutoCloseJavaPerspective() throws Exception {
@@ -324,7 +324,7 @@
String typeName = "Breakpoints";
// first line in main
createLineBreakpoint(52, typeName);
-
+
IJavaThread thread= null;
IWorkbenchWindow window = null;
try {
@@ -355,16 +355,16 @@
terminateAndRemove(thread);
removeAllBreakpoints();
window.removePerspectiveListener(this);
- }
+ }
}
-
+
protected String buildRemainingEventsMessage() {
StringBuffer buffer = new StringBuffer();
partsMessage("Parts did not open: ", fExpectingOpenEvents, buffer);
partsMessage("Parts did not close: ", fExpectingCloseEvents, buffer);
return buffer.toString();
}
-
+
private void partsMessage(String header, List<String> partIds, StringBuffer buffer) {
String[] ids = partIds.toArray(new String[partIds.size()]);
if (ids.length > 0) {
@@ -375,12 +375,12 @@
buffer.append(", ");
}
}
- }
+ }
}
-
+
/**
* Adds ids of views to 'expecting open' queue.
- *
+ *
* @param window
* @param viewIds
*/
@@ -390,10 +390,10 @@
}
window.addPerspectiveListener(this);
}
-
+
/**
* Adds ids of views to 'expecting open' queue.
- *
+ *
* @param window
* @param viewIds
*/
@@ -402,7 +402,7 @@
fExpectingCloseEvents.add(viewIds[i]);
}
window.addPerspectiveListener(this);
- }
+ }
/**
* @see org.eclipse.ui.IPerspectiveListener3#perspectiveOpened(org.eclipse.ui.IWorkbenchPage, org.eclipse.ui.IPerspectiveDescriptor)
@@ -459,7 +459,7 @@
@Override
public void perspectiveChanged(IWorkbenchPage page, IPerspectiveDescriptor perspective, String changeId) {
}
-
+
/**
* Check if all expected events have occurred.
*/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/performance/JavaApplicationStatusHandler.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/performance/JavaApplicationStatusHandler.java
index ec767e6..fea1c5b 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/performance/JavaApplicationStatusHandler.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/performance/JavaApplicationStatusHandler.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/performance/OpenLaunchConfigurationDialogTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/performance/OpenLaunchConfigurationDialogTests.java
index acaaba4..11e0e16 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/performance/OpenLaunchConfigurationDialogTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/performance/OpenLaunchConfigurationDialogTests.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -36,10 +36,10 @@
}
/**
- * The local java application id
+ * The local java application id
*/
public static String fgIdentifier= "org.eclipse.jdt.launching.localJavaApplication";
-
+
/**
* Tests opening the LCD on a given launch configuration on the java tab group 100 times
*/
@@ -48,13 +48,13 @@
ILaunchConfiguration config = getLaunchConfiguration("Breakpoints");
IStructuredSelection selection= new StructuredSelection(config);
for (int i = 0; i < 100; i++) {
- openLCD(selection, fgIdentifier);
+ openLCD(selection, fgIdentifier);
}
-
+
commitMeasurements();
assertPerformance();
}
-
+
/**
* Tests opening the LCD on a specific launch configuration on the java tab group 1 time
*/
@@ -72,7 +72,7 @@
*/
private void openLCD(final IStructuredSelection selection, final String groupIdentifier) {
//set a status to go to the classpath tab
- IStatus status = new Status(IStatus.INFO, IJavaDebugUIConstants.PLUGIN_ID, 1000, IInternalDebugCoreConstants.EMPTY_STRING, null);
+ IStatus status = new Status(IStatus.INFO, IJavaDebugUIConstants.PLUGIN_ID, 1000, IInternalDebugCoreConstants.EMPTY_STRING, null);
LaunchConfigurationsDialog dialog= new LaunchConfigurationsDialog(DebugUIPlugin.getShell(), DebugUIPlugin.getDefault().getLaunchConfigurationManager().getLaunchGroup(groupIdentifier));
dialog.setBlockOnOpen(false);
dialog.setOpenMode(LaunchConfigurationsDialog.LAUNCH_CONFIGURATION_DIALOG_OPEN_ON_SELECTION);
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/presentation/ModelPresentationTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/presentation/ModelPresentationTests.java
index 66bbc01..375d9df 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/presentation/ModelPresentationTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/presentation/ModelPresentationTests.java
@@ -17,7 +17,7 @@
/**
* Tests for some of the methods of the model presentation
- *
+ *
* @see JDIModelPresentation
*/
public class ModelPresentationTests extends AbstractDebugTest {
@@ -32,7 +32,7 @@
/**
* Tests that the type signature + value signatures do not cause problems when the values are "<unknown>" - this
* case arises when you manually suspend a VM and try to inspect / view object values
- *
+ *
* @throws Exception
*/
public void testUnknownValueText() throws Exception {
@@ -48,11 +48,11 @@
pres.dispose();
}
}
-
+
/**
- * Tests passing all <code>null</code>s in for type information - should get an NPE
+ * Tests passing all <code>null</code>s in for type information - should get an NPE
* from {@link JDIModelPresentation#getValueText(org.eclipse.jdt.debug.core.IJavaValue)}
- *
+ *
* @throws Exception
*/
public void testAllNullValueText() throws Exception {
@@ -70,10 +70,10 @@
pres.dispose();
}
}
-
+
/**
* Tests getting the value text for a simple String type
- *
+ *
* @throws Exception
*/
public void testSimpleStringValueText() throws Exception {
@@ -90,10 +90,10 @@
pres.dispose();
}
}
-
+
/**
* Tests getting the value text for a simple String type
- *
+ *
* @throws Exception
*/
public void testResolvedStringValueText() throws Exception {
@@ -110,10 +110,10 @@
pres.dispose();
}
}
-
+
/**
* Tests a simple array value text
- *
+ *
* @throws Exception
*/
public void testSimpleArrayValueText() throws Exception {
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/presentation/TestIJavaArrayValue.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/presentation/TestIJavaArrayValue.java
index 1642a20..376d0d2 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/presentation/TestIJavaArrayValue.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/presentation/TestIJavaArrayValue.java
@@ -17,13 +17,13 @@
import org.eclipse.jdt.debug.core.IJavaValue;
/**
- *
+ *
*/
public class TestIJavaArrayValue extends TestIJavaObjectValue implements IJavaArray {
int size = 0;
IJavaValue[] values;
-
+
/**
* Constructor
* @param type
@@ -31,7 +31,7 @@
* @param gsig
* @param rtname
* @param vstring
- * @param size
+ * @param size
*/
public TestIJavaArrayValue(IJavaType type, String sig, String gsig, String rtname, String vstring, int size) {
super(type, sig, gsig, rtname, vstring);
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/presentation/TestIJavaObjectValue.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/presentation/TestIJavaObjectValue.java
index 23c39a6..b3d1ad3 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/presentation/TestIJavaObjectValue.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/presentation/TestIJavaObjectValue.java
@@ -18,7 +18,7 @@
import org.eclipse.jdt.debug.core.IJavaValue;
/**
- *
+ *
*/
public class TestIJavaObjectValue extends TestIJavaValue implements IJavaObject {
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/presentation/TestIJavaType.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/presentation/TestIJavaType.java
index ed2548a..ca45917 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/presentation/TestIJavaType.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/presentation/TestIJavaType.java
@@ -23,13 +23,13 @@
String name;
String sig;
-
+
public TestIJavaType(String name, String sig) {
this.name = name;
this.sig = sig;
-
+
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.core.model.IDebugElement#getModelIdentifier()
*/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/presentation/TestIJavaValue.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/presentation/TestIJavaValue.java
index 3ee583f..071b341 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/presentation/TestIJavaValue.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ui/presentation/TestIJavaValue.java
@@ -19,7 +19,7 @@
import org.eclipse.jdt.debug.core.JDIDebugModel;
/**
- *
+ *
*/
public class TestIJavaValue implements IJavaValue {
@@ -28,7 +28,7 @@
String gsig;
String rtname;
String vstring;
-
+
public TestIJavaValue(IJavaType type, String sig, String gsig, String rtname, String vstring) {
this.type = type;
this.sig = sig;
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/variables/DetailFormatterTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/variables/DetailFormatterTests.java
index 0e3f8a8..e31a48a 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/variables/DetailFormatterTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/variables/DetailFormatterTests.java
@@ -23,29 +23,29 @@
/**
* Tests detail formatters
- *
+ *
* @since 3.8.100
*/
public class DetailFormatterTests extends AbstractDebugTest {
-
+
class TestListener implements IValueDetailListener {
IValue value;
String result;
-
+
@Override
public void detailComputed(IValue value, String result) {
this.value = value;
this.result = result;
}
-
+
void reset() {
value = null;
result = null;
}
}
-
+
TestListener fListener = new TestListener();
-
+
/**
* @param name
*/
@@ -57,13 +57,13 @@
protected IJavaProject getProjectContext() {
return get15Project();
}
-
+
@Override
protected void tearDown() throws Exception {
fListener.reset();
super.tearDown();
}
-
+
/**
* Tests a detail formatter made from a large compound expression
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=403028
@@ -104,7 +104,7 @@
Thread.sleep(100);
}
assertNotNull("The IValue of the detailComputed callback cannot be null", fListener.value);
- assertTrue("The map should be an instance of java.util.LinkedHashMap",
+ assertTrue("The map should be an instance of java.util.LinkedHashMap",
Signature.getTypeErasure(fListener.value.getReferenceTypeName()).equals("java.util.LinkedHashMap"));
assertNotNull("The computed value of the detail should not be null", fListener.result);
}
@@ -114,7 +114,7 @@
removeAllBreakpoints();
}
}
-
+
/**
* Tests a detail formatter made from a small compound expression
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=403028
@@ -142,7 +142,7 @@
Thread.sleep(100);
}
assertNotNull("The IValue of the detailComputed callback cannot be null", fListener.value);
- assertTrue("The map should be an instance of java.util.LinkedHashMap",
+ assertTrue("The map should be an instance of java.util.LinkedHashMap",
Signature.getTypeErasure(fListener.value.getReferenceTypeName()).equals("java.util.LinkedHashMap"));
assertNotNull("The computed value of the detail should not be null", fListener.result);
}
@@ -152,7 +152,7 @@
removeAllBreakpoints();
}
}
-
+
/**
* Tests a detail formatter made from a small compound expression
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=403028
@@ -178,7 +178,7 @@
Thread.sleep(100);
}
assertNotNull("The IValue of the detailComputed callback cannot be null", fListener.value);
- assertTrue("The map should be an instance of java.util.LinkedHashMap",
+ assertTrue("The map should be an instance of java.util.LinkedHashMap",
Signature.getTypeErasure(fListener.value.getReferenceTypeName()).equals("java.util.LinkedHashMap"));
assertNotNull("The computed value of the detail should not be null", fListener.result);
}
@@ -188,7 +188,7 @@
removeAllBreakpoints();
}
}
-
+
/**
* Tests a detail formatter made from a small compound expression
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=403028
@@ -214,7 +214,7 @@
Thread.sleep(100);
}
assertNotNull("The IValue of the detailComputed callback cannot be null", fListener.value);
- assertTrue("The map should be an instance of java.util.LinkedHashMap",
+ assertTrue("The map should be an instance of java.util.LinkedHashMap",
Signature.getTypeErasure(fListener.value.getReferenceTypeName()).equals("java.util.LinkedHashMap"));
assertNotNull("The computed value of the detail should not be null", fListener.result);
}
@@ -224,7 +224,7 @@
removeAllBreakpoints();
}
}
-
+
/**
* Tests a detail formatter made from an infix expression
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=403028
@@ -250,10 +250,10 @@
Thread.sleep(100);
}
assertNotNull("The IValue of the detailComputed callback cannot be null", fListener.value);
- assertTrue("The map should be an instance of java.util.LinkedHashMap",
+ assertTrue("The map should be an instance of java.util.LinkedHashMap",
Signature.getTypeErasure(fListener.value.getReferenceTypeName()).equals("java.util.LinkedHashMap"));
assertNotNull("The computed value of the detail should not be null", fListener.result);
- assertTrue("The returned value from (true && true || !(false&&true) || !(true==true||true!=true&&true)) should be true",
+ assertTrue("The returned value from (true && true || !(false&&true) || !(true==true||true!=true&&true)) should be true",
Boolean.parseBoolean(fListener.result));
}
finally {
@@ -262,7 +262,7 @@
removeAllBreakpoints();
}
}
-
+
/**
* Tests a detail formatter made from an infix expression
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=403028
@@ -288,7 +288,7 @@
Thread.sleep(100);
}
assertNotNull("The IValue of the detailComputed callback cannot be null", fListener.value);
- assertTrue("The map should be an instance of java.util.LinkedHashMap",
+ assertTrue("The map should be an instance of java.util.LinkedHashMap",
Signature.getTypeErasure(fListener.value.getReferenceTypeName()).equals("java.util.LinkedHashMap"));
assertNotNull("The computed value of the detail should not be null", fListener.result);
assertFalse("The returned value from !true should be false", Boolean.parseBoolean(fListener.result));
@@ -299,7 +299,7 @@
removeAllBreakpoints();
}
}
-
+
/**
* Tests a detail formatter made from an infix expression
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=403028
@@ -325,7 +325,7 @@
Thread.sleep(100);
}
assertNotNull("The IValue of the detailComputed callback cannot be null", fListener.value);
- assertTrue("The map should be an instance of java.util.LinkedHashMap",
+ assertTrue("The map should be an instance of java.util.LinkedHashMap",
Signature.getTypeErasure(fListener.value.getReferenceTypeName()).equals("java.util.LinkedHashMap"));
assertNotNull("The computed value of the detail should not be null", fListener.result);
assertFalse("The returned value from !(true==true||true!=true&&true) should be false", Boolean.parseBoolean(fListener.result));
@@ -339,7 +339,7 @@
/**
* Tests a detail formatter made from an collection with no type arguments
- *
+ *
* @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=484686
* @throws Exception
*/
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/variables/TestAnonymousInspect.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/variables/TestAnonymousInspect.java
index 2bf718c..128f993 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/variables/TestAnonymousInspect.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/variables/TestAnonymousInspect.java
@@ -21,28 +21,28 @@
import org.eclipse.jdt.internal.debug.eval.ast.engine.ASTEvaluationEngine;
/**
- * Tests launching / suspending and evaluating within anonymous
+ * Tests launching / suspending and evaluating within anonymous
* types
*/
public class TestAnonymousInspect extends AbstractDebugTest {
- static final String TYPE_NAME = "InspectTests";
+ static final String TYPE_NAME = "InspectTests";
static final String SNIPPET = "getchar()";
-
+
class Listener implements IEvaluationListener {
IEvaluationResult fResult;
-
+
@Override
public void evaluationComplete(IEvaluationResult result) {
fResult= result;
}
-
+
public IEvaluationResult getResult() {
return fResult;
}
}
Listener listener= new Listener();
-
+
/**
* Constructor
*/
@@ -58,7 +58,7 @@
super.setUp();
createLaunchConfiguration(get14Project(), TYPE_NAME);
}
-
+
/**
* Perform the actual evaluation (inspect)
* @param thread
@@ -82,11 +82,11 @@
engine.dispose();
}
}
-
+
/**
* Tests that we can successfully inspect a method call from an anonymous type declaration that is assigned
* to a field
- *
+ *
* @throws Exception
*/
public void testInspectInAnonField() throws Exception {
@@ -106,11 +106,11 @@
listener.fResult = null;
}
}
-
+
/**
* Tests that we can successfully inspect a method call from an anonymous type declaration within a method
* declaration
- *
+ *
* @throws Exception
*/
public void testInspectInAnonMethod() throws Exception {
@@ -130,11 +130,11 @@
listener.fResult = null;
}
}
-
+
/**
* Tests that we can successfully inspect a method call from an anonymous type declaration within a static
- * initializer
- *
+ * initializer
+ *
* @throws Exception
*/
public void testInspectInAnonInitializer() throws Exception {
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/variables/TestInstanceRetrieval.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/variables/TestInstanceRetrieval.java
index d494d61..13c76aa 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/variables/TestInstanceRetrieval.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/variables/TestInstanceRetrieval.java
@@ -27,16 +27,16 @@
/**
* Constructs test.
- *
+ *
* @param name test name
*/
public TestInstanceRetrieval(String name) {
super(name);
}
-
+
/**
* Test the logical structure for a list.
- *
+ *
* @throws Exception
*/
public void testGetInstances() throws Exception {
@@ -49,39 +49,39 @@
IJavaDebugTarget target = (IJavaDebugTarget) thread.getDebugTarget();
if (target.supportsInstanceRetrieval()) {
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
IBreakpoint hit = getBreakpoint(thread);
assertNotNull("suspended, but not by breakpoint", hit);
-
+
IJavaStackFrame frame = (IJavaStackFrame) thread.getTopStackFrame();
assertNotNull("missing top frame", frame);
-
+
IJavaVariable variable = frame.findVariable("ro");
assertNotNull("Missing variable 'ro'", variable);
-
+
IJavaObject object = (IJavaObject) variable.getValue();
IJavaReferenceType refType = (IJavaReferenceType) object.getJavaType();
long instanceCount = refType.getInstanceCount();
IJavaObject[] instances = refType.getInstances(100);
-
+
assertEquals("Wrong instance count", 13, instanceCount);
assertEquals("Wrong number of instances", 13, instances.length);
for (int i = 0; i < instances.length; i++) {
assertEquals("Instance is of unexpected type", refType, instances[i].getJavaType());
}
-
+
thread = resumeToLineBreakpoint(thread, bp2);
frame = (IJavaStackFrame) thread.getTopStackFrame();
assertNotNull("missing top frame", frame);
-
+
variable = frame.findVariable("rc");
assertNotNull("Missing variable 'rc'", variable);
-
+
object = (IJavaObject) variable.getValue();
refType = (IJavaReferenceType) object.getJavaType();
instanceCount = refType.getInstanceCount();
instances = refType.getInstances(100);
-
+
assertEquals("Wrong instance count", 1002, instanceCount);
assertEquals("Wrong number of instances", 100, instances.length);
for (int i = 0; i < instances.length; i++) {
@@ -91,7 +91,7 @@
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
+ }
+ }
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/variables/TestIntegerAccessUnboxing15.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/variables/TestIntegerAccessUnboxing15.java
index dd82c34..f0180dc 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/variables/TestIntegerAccessUnboxing15.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/variables/TestIntegerAccessUnboxing15.java
@@ -31,9 +31,9 @@
public TestIntegerAccessUnboxing15(String name) {
super(name);
}
-
+
class Listener implements IEvaluationListener {
-
+
private Object lock = new Object();
private IEvaluationResult endresult;
@@ -47,7 +47,7 @@
lock.notifyAll();
}
}
-
+
IEvaluationResult getResult() throws Exception {
synchronized (lock) {
if (endresult == null) {
@@ -59,9 +59,9 @@
}
return endresult;
}
-
+
}
-
+
public void doAccessTest(String snippet, int expected) throws Exception {
IJavaThread thread= null;
IAstEvaluationEngine engine = null;
@@ -70,11 +70,11 @@
try {
thread= launchToBreakpoint(get15Project(), typeName);
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
IBreakpoint hit = getBreakpoint(thread);
assertNotNull("suspended, but not by breakpoint", hit);
IJavaDebugTarget target = (IJavaDebugTarget) thread.getDebugTarget();
-
+
IJavaStackFrame frame = (IJavaStackFrame) thread.getTopStackFrame();
engine = EvaluationManager.newAstEvaluationEngine(get15Project(), target);
Listener listener = new Listener();
@@ -89,8 +89,8 @@
terminateAndRemove(thread);
removeAllBreakpoints();
}
- }
-
+ }
+
/* (non-Javadoc)
* @see org.eclipse.jdt.debug.tests.AbstractDebugTest#getProjectContext()
*/
@@ -98,19 +98,19 @@
protected IJavaProject getProjectContext() {
return get15Project();
}
-
+
/**
* Test a row can be accessed
- *
+ *
* @throws Exception
*/
public void testRowAccess() throws Exception {
doAccessTest("matrix[new Integer(0)][0]", 1);
}
-
+
/**
* Test a column can be accessed.
- *
+ *
* @throws Exception
*/
public void testColumnAccess() throws Exception {
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/variables/TestLogicalStructures.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/variables/TestLogicalStructures.java
index 8a212b7..d5cfbfc 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/variables/TestLogicalStructures.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/variables/TestLogicalStructures.java
@@ -29,16 +29,16 @@
/**
* Constructs test.
- *
+ *
* @param name test name
*/
public TestLogicalStructures(String name) {
super(name);
}
-
+
/**
* Test the logical structure for a list.
- *
+ *
* @throws Exception
*/
public void testListLogicalStructure() throws Exception {
@@ -48,35 +48,35 @@
try {
thread= launchToBreakpoint(typeName);
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
IBreakpoint hit = getBreakpoint(thread);
assertNotNull("suspended, but not by breakpoint", hit);
IJavaStackFrame frame = (IJavaStackFrame) thread.getTopStackFrame();
assertNotNull("missing top frame", frame);
-
+
IJavaVariable variable = frame.findVariable("list");
assertNotNull("Missing variable 'list'", variable);
-
+
IValue value = variable.getValue();
ILogicalStructureType[] types = DebugPlugin.getLogicalStructureTypes(value);
assertEquals("Should be one logical structure type", 1, types.length);
-
+
IJavaObject logicalValue = (IJavaObject) types[0].getLogicalStructure(value);
assertEquals("Logical value should be an array", "java.lang.Object[]", logicalValue.getJavaType().getName());
-
+
IJavaArray array = (IJavaArray) logicalValue;
assertEquals("Should be two elements in the structure", 2, array.getLength());
-
+
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
+ }
}
/**
* Test the logical structure for a map.
- *
+ *
* @throws Exception
*/
public void testMapLogicalStructure() throws Exception {
@@ -86,35 +86,35 @@
try {
thread= launchToBreakpoint(typeName);
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
IBreakpoint hit = getBreakpoint(thread);
assertNotNull("suspended, but not by breakpoint", hit);
IJavaStackFrame frame = (IJavaStackFrame) thread.getTopStackFrame();
assertNotNull("missing top frame", frame);
-
+
IJavaVariable variable = frame.findVariable("map");
assertNotNull("Missing variable 'map'", variable);
-
+
IValue value = variable.getValue();
ILogicalStructureType[] types = DebugPlugin.getLogicalStructureTypes(value);
assertEquals("Should be one logical structure type", 1, types.length);
-
+
IJavaObject logicalValue = (IJavaObject) types[0].getLogicalStructure(value);
assertEquals("Logical value should be an array", "java.lang.Object[]", logicalValue.getJavaType().getName());
-
+
IJavaArray array = (IJavaArray) logicalValue;
assertEquals("Should be two elements in the structure", 2, array.getLength());
-
+
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
-
+ }
+ }
+
/**
* Test the logical structure for a map entry.
- *
+ *
* @throws Exception
*/
public void testEntryLogicalStructure() throws Exception {
@@ -124,29 +124,29 @@
try {
thread= launchToBreakpoint(typeName);
assertNotNull("Breakpoint not hit within timeout period", thread);
-
+
IBreakpoint hit = getBreakpoint(thread);
assertNotNull("suspended, but not by breakpoint", hit);
IJavaStackFrame frame = (IJavaStackFrame) thread.getTopStackFrame();
assertNotNull("missing top frame", frame);
-
+
IJavaVariable variable = frame.findVariable("entry");
assertNotNull("Missing variable 'entry'", variable);
-
+
IValue value = variable.getValue();
ILogicalStructureType[] types = DebugPlugin.getLogicalStructureTypes(value);
assertEquals("Should be one logical structure type", 1, types.length);
-
+
IJavaObject logicalValue = (IJavaObject) types[0].getLogicalStructure(value);
IVariable[] children = logicalValue.getVariables();
assertEquals("Should be two elements in the structure", 2, children.length);
assertEquals("First entry should be key", "key", children[0].getName());
assertEquals("Second entry should be value", "value", children[1].getName());
-
+
} finally {
terminateAndRemove(thread);
removeAllBreakpoints();
- }
- }
+ }
+ }
}