Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratikhomirov2010-04-28 11:35:17 -0400
committeratikhomirov2010-04-28 11:35:17 -0400
commit6363c69e695600026efb94bf3a5853838d2cf0e7 (patch)
tree09bc63d02b930df96f197cc45f8e6092a3eecff0
parent146088824765971ba2850f3a9c8465fc8059f9f9 (diff)
downloadorg.eclipse.gmf-tooling-6363c69e695600026efb94bf3a5853838d2cf0e7.tar.gz
org.eclipse.gmf-tooling-6363c69e695600026efb94bf3a5853838d2cf0e7.tar.xz
org.eclipse.gmf-tooling-6363c69e695600026efb94bf3a5853838d2cf0e7.zip
testGenPolylineConnection (first test in FigureCodegenTests) fails to compile. Looking for cause...
-rw-r--r--tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/CompileUtil.java9
-rw-r--r--tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/JobTracker.java8
2 files changed, 16 insertions, 1 deletions
diff --git a/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/CompileUtil.java b/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/CompileUtil.java
index 1531cf5c6..53fea72b0 100644
--- a/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/CompileUtil.java
+++ b/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/CompileUtil.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005 Borland Software Corporation
+ * Copyright (c) 2005, 2010 Borland Software Corporation and others
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -31,7 +31,13 @@ public class CompileUtil {
public IStatus build(IProject project) {
try {
+ JobTracker jt = new JobTracker();
+ jt.start();
project.build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());
+ System.err.println("Build of " + project.getName() + " triggered " + jt.getJobsCount() + " jobs");
+ jt.dump();
+ jt.freeze();
+ Utils.dispatchDisplayMessages(jt.getNonEmptyCondition(), 2);
IMarker[] compileErrors = getJavaErrors(project);
if (compileErrors.length > 0) {
StringBuffer sb = new StringBuffer();
@@ -45,6 +51,7 @@ public class CompileUtil {
ex.printStackTrace(System.err);
return ex.getStatus();
} catch (Exception ex) {
+ ex.printStackTrace(); // record e.g. NPE
return Status.CANCEL_STATUS;
}
}
diff --git a/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/JobTracker.java b/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/JobTracker.java
index 10596a2d1..e60c0f8f0 100644
--- a/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/JobTracker.java
+++ b/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/JobTracker.java
@@ -75,4 +75,12 @@ public class JobTracker extends JobChangeAdapter {
Job.getJobManager().removeJobChangeListener(this);
knownJobs.clear();
}
+
+ public void dump() {
+ Job[] copy = knownJobs.toArray(new Job[0]);
+ for (Job j : copy) {
+ Thread t = j.getThread();
+ System.err.println(j.getClass().getName() + ":" + j.getName() + "; " + (t == null ? "unknown" : t.getName()));
+ }
+ }
}

Back to the top