diff options
author | Markus Keller | 2016-12-22 13:58:00 +0000 |
---|---|---|
committer | Markus Keller | 2016-12-22 13:58:00 +0000 |
commit | 21ed59be85d950a8844c3ab14127f1216e0ceaff (patch) | |
tree | f94b22381cf13b3716d90d8510e008870bac46f2 /org.eclipse.jdt.core.tests.builder | |
parent | af85a90374c262057daf6363bb015406bf214326 (diff) | |
parent | f9cdd656232755ca6c0daa6b0c16dc9fc4a4e9a8 (diff) | |
download | eclipse.jdt.core-21ed59be85d950a8844c3ab14127f1216e0ceaff.tar.gz eclipse.jdt.core-21ed59be85d950a8844c3ab14127f1216e0ceaff.tar.xz eclipse.jdt.core-21ed59be85d950a8844c3ab14127f1216e0ceaff.zip |
Merge remote-tracking branch 'origin/master' into BETA_JAVA9Y20161222-1000
Added comment in IProblem and filed Bug 509643: [api] Ensure that raw IProblem ID integer literals are unique
Conflicts:
org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest_1_8.java
org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java
org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties
Diffstat (limited to 'org.eclipse.jdt.core.tests.builder')
3 files changed, 45 insertions, 1 deletions
diff --git a/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/ErrorsTests.java b/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/ErrorsTests.java index 3c09e374ac..81378702aa 100644 --- a/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/ErrorsTests.java +++ b/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/ErrorsTests.java @@ -239,7 +239,7 @@ public void test0104() throws JavaModelException { // Improving the error message in case of a read-only file in output // directory. Beware: this test only works under Linux - execution on other // platforms always succeeds, but the result is not significant. -public void test0105() throws JavaModelException, CoreException, IOException { +public void _test0105() throws JavaModelException, CoreException, IOException { // FIXME: re-enable! if ("Linux".equals(System.getProperty("os.name"))) { IPath projectPath = env.addProject("P"); env.addExternalJars(projectPath, Util.getJavaClassLibs()); diff --git a/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/MultiProjectTests.java b/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/MultiProjectTests.java index e36849fa98..8e56fc7d37 100644 --- a/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/MultiProjectTests.java +++ b/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/MultiProjectTests.java @@ -299,6 +299,46 @@ public class MultiProjectTests extends BuilderTests { env.removeProject(p3); } + public void testCyclesCleared() throws JavaModelException { + IPath p1 = env.addProject("P1"); //$NON-NLS-1$ + IPath p2 = env.addProject("P2"); //$NON-NLS-1$ + try { + env.addRequiredProject(p1, p2); + env.addRequiredProject(p2, p1); + + fullBuild(); + env.waitForAutoBuild(); + + printProblems(); + expectingOnlySpecificProblemsFor(p1, new Problem[] { + new Problem("p1", + "A cycle was detected in the build path of project 'P1'. The cycle consists of projects {P1, P2}", + p1, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_ERROR), + new Problem("p1", + "The project cannot be built until build path errors are resolved", + p1, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_ERROR) + });//$NON-NLS-1$ //$NON-NLS-2$ + expectingOnlySpecificProblemsFor(p2, new Problem[] { + new Problem("p2", + "A cycle was detected in the build path of project 'P2'. The cycle consists of projects {P1, P2}", + p2, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_ERROR), + new Problem("p2", + "The project cannot be built until build path errors are resolved", + p2, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_ERROR) + });//$NON-NLS-1$ //$NON-NLS-2$ + + env.removeRequiredProject(p1, p2); + + fullBuild(); + env.waitForAutoBuild(); + + expectingNoProblems(); + } finally { + env.removeProject(p1); + env.removeProject(p2); + } + } + public void testCycle1() throws JavaModelException { Hashtable options = JavaCore.getOptions(); Hashtable newOptions = JavaCore.getOptions(); diff --git a/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/TestingEnvironment.java b/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/TestingEnvironment.java index 40e1531d33..e6d2a97da9 100644 --- a/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/TestingEnvironment.java +++ b/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/TestingEnvironment.java @@ -21,6 +21,8 @@ import org.eclipse.jdt.core.tests.util.Util; import org.eclipse.jdt.internal.compiler.impl.CompilerOptions; import org.eclipse.jdt.internal.core.ClasspathEntry; import org.eclipse.jdt.internal.core.JavaProject; +import org.eclipse.jdt.internal.core.nd.indexer.Indexer; + import java.io.*; import java.util.*; @@ -1093,6 +1095,7 @@ public void cleanBuild(String projectName) { do { try { Job.getJobManager().join(ResourcesPlugin.FAMILY_AUTO_BUILD, null); + Indexer.getInstance().waitForIndex(null); wasInterrupted = false; } catch (OperationCanceledException e) { handle(e); @@ -1108,6 +1111,7 @@ public void cleanBuild(String projectName) { do { try { Job.getJobManager().join(ResourcesPlugin.FAMILY_MANUAL_REFRESH, null); + Indexer.getInstance().waitForIndex(null); wasInterrupted = false; } catch (OperationCanceledException e) { handle(e); |