Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratikhomirov2010-04-20 18:53:05 -0400
committeratikhomirov2010-04-20 18:53:05 -0400
commit5228e1f2807a6cd9e3995f2b84a8d7247565bf25 (patch)
tree655b1e6b19fadc7ad198ebcd15d6833d0ecafa44
parent64cc3e94fbbdb471bf866de8c883bf398e1b64ef (diff)
downloadorg.eclipse.gmf-tooling-5228e1f2807a6cd9e3995f2b84a8d7247565bf25.tar.gz
org.eclipse.gmf-tooling-5228e1f2807a6cd9e3995f2b84a8d7247565bf25.tar.xz
org.eclipse.gmf-tooling-5228e1f2807a6cd9e3995f2b84a8d7247565bf25.zip
debug printout to figure out odd compilation problems resolving org.eclipse.core imports
-rw-r--r--tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/CompileUtil.java21
1 files changed, 21 insertions, 0 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..b6226f2b6 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
@@ -21,7 +21,10 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Status;
+import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.IJavaModelMarker;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
/**
* @author artem
@@ -31,6 +34,24 @@ public class CompileUtil {
public IStatus build(IProject project) {
try {
+ System.err.println("Compiling project " + project.getName());
+ System.err.println("\t" + "Natures:");
+ for (String s : project.getDescription().getNatureIds()) {
+ System.err.println("\t" + s);
+ }
+ IJavaProject jp = JavaCore.create(project);
+ IClasspathEntry[] cpIgoreUnresolved = jp.getResolvedClasspath(true);
+ IClasspathEntry[] cpAllResolved = jp.getResolvedClasspath(false);
+ if (cpIgoreUnresolved.length != cpAllResolved.length) {
+ System.err.println("getResolvedClasspath(boolean ignoreUnresolvedEntry) gives different result: " + cpIgoreUnresolved.length + " vs " + cpAllResolved.length);
+ }
+ for (IClasspathEntry ce : cpAllResolved) {
+ System.err.println(" " + ce.toString());
+ }
+ } catch (Exception ex) {
+ System.err.println("!!! JavaProject games are over with " + ex);
+ }
+ try {
project.build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());
IMarker[] compileErrors = getJavaErrors(project);
if (compileErrors.length > 0) {

Back to the top