View | Details | Raw Unified | Return to bug 90486 | Differences between
and this patch

Collapse All | Expand All

(-)model/org/eclipse/jdt/internal/core/JavaModelStatus.java (-1 / +1 lines)
Lines 344-350 Link Here
344
344
345
				case CLASSPATH_CYCLE:
345
				case CLASSPATH_CYCLE:
346
					javaProject = (IJavaProject)this.elements[0];
346
					javaProject = (IJavaProject)this.elements[0];
347
					return Messages.bind(Messages.classpath_cycle, javaProject.getElementName());
347
					return Messages.bind(Messages.classpath_cycle, new String[] {javaProject.getElementName(), this.string});
348
348
349
				case DISABLED_CP_EXCLUSION_PATTERNS:
349
				case DISABLED_CP_EXCLUSION_PATTERNS:
350
					javaProject = (IJavaProject)this.elements[0];
350
					javaProject = (IJavaProject)this.elements[0];
(-)model/org/eclipse/jdt/internal/core/JavaProject.java (-4 / +24 lines)
Lines 372-378 Link Here
372
		int length = rscProjects.length;
372
		int length = rscProjects.length;
373
		JavaProject[] projects = new JavaProject[length];
373
		JavaProject[] projects = new JavaProject[length];
374
374
375
		HashSet cycleParticipants = new HashSet();
375
		LinkedHashSet cycleParticipants = new LinkedHashSet();
376
		HashSet traversed = new HashSet();
376
		HashSet traversed = new HashSet();
377
377
378
		// compute cycle participants
378
		// compute cycle participants
Lines 406-414 Link Here
406
							throw new JavaModelException(e);
406
							throw new JavaModelException(e);
407
						}
407
						}
408
					} else {
408
					} else {
409
						IJavaProject[] projectsInCycle;
410
						String cycleString = "";	 //$NON-NLS-1$
411
						if (cycleParticipants.isEmpty()) {
412
							projectsInCycle = null;
413
						} else {
414
							projectsInCycle = new IJavaProject[cycleParticipants.size()];
415
							Iterator it = cycleParticipants.iterator();
416
							int k = 0;
417
							while (it.hasNext()) {
418
								//projectsInCycle[i++] = (IPath) it.next();
419
								IResource member = workspaceRoot.findMember((IPath) it.next());
420
								if (member != null && member.getType() == IResource.PROJECT){
421
									projectsInCycle[k] = JavaCore.create((IProject)member);
422
									if (projectsInCycle[k] != null) {
423
										if (k != 0) cycleString += ", "; //$NON-NLS-1$
424
										cycleString += projectsInCycle[k++].getElementName();
425
									}
426
								}
427
							}
428
						}
409
						// create new marker
429
						// create new marker
410
						project.createClasspathProblemMarker(
430
						project.createClasspathProblemMarker(
411
							new JavaModelStatus(IJavaModelStatusConstants.CLASSPATH_CYCLE, project));
431
							new JavaModelStatus(IJavaModelStatusConstants.CLASSPATH_CYCLE, project, cycleString));
412
					}
432
					}
413
				} else {
433
				} else {
414
					project.flushClasspathProblemMarkers(true, false);
434
					project.flushClasspathProblemMarkers(true, false);
Lines 2063-2069 Link Here
2063
	 * @see IJavaProject
2083
	 * @see IJavaProject
2064
	 */
2084
	 */
2065
	public boolean hasClasspathCycle(IClasspathEntry[] preferredClasspath) {
2085
	public boolean hasClasspathCycle(IClasspathEntry[] preferredClasspath) {
2066
		HashSet cycleParticipants = new HashSet();
2086
		LinkedHashSet cycleParticipants = new LinkedHashSet();
2067
		HashMap preferredClasspaths = new HashMap(1);
2087
		HashMap preferredClasspaths = new HashMap(1);
2068
		preferredClasspaths.put(this, preferredClasspath);
2088
		preferredClasspaths.put(this, preferredClasspath);
2069
		updateCycleParticipants(new ArrayList(2), cycleParticipants, ResourcesPlugin.getWorkspace().getRoot(), new HashSet(2), preferredClasspaths);
2089
		updateCycleParticipants(new ArrayList(2), cycleParticipants, ResourcesPlugin.getWorkspace().getRoot(), new HashSet(2), preferredClasspaths);
Lines 3127-3133 Link Here
3127
	 */
3147
	 */
3128
	public void updateCycleParticipants(
3148
	public void updateCycleParticipants(
3129
			ArrayList prereqChain,
3149
			ArrayList prereqChain,
3130
			HashSet cycleParticipants,
3150
			LinkedHashSet cycleParticipants,
3131
			IWorkspaceRoot workspaceRoot,
3151
			IWorkspaceRoot workspaceRoot,
3132
			HashSet traversed,
3152
			HashSet traversed,
3133
			Map preferredClasspaths){
3153
			Map preferredClasspaths){
(-)model/org/eclipse/jdt/internal/core/builder/JavaBuilder.java (-2 / +2 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2009 IBM Corporation and others.
2
 * Copyright (c) 2000, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 716-722 Link Here
716
 * needs to propagate structural changes to the other projects in the cycle.
716
 * needs to propagate structural changes to the other projects in the cycle.
717
 */
717
 */
718
void mustPropagateStructuralChanges() {
718
void mustPropagateStructuralChanges() {
719
	HashSet cycleParticipants = new HashSet(3);
719
	LinkedHashSet cycleParticipants = new LinkedHashSet(3);
720
	this.javaProject.updateCycleParticipants(new ArrayList(), cycleParticipants, this.workspaceRoot, new HashSet(3), null);
720
	this.javaProject.updateCycleParticipants(new ArrayList(), cycleParticipants, this.workspaceRoot, new HashSet(3), null);
721
	IPath currentPath = this.javaProject.getPath();
721
	IPath currentPath = this.javaProject.getPath();
722
	Iterator i= cycleParticipants.iterator();
722
	Iterator i= cycleParticipants.iterator();
(-)model/org/eclipse/jdt/internal/core/util/messages.properties (-1 / +1 lines)
Lines 141-147 Link Here
141
classpath_cannotUseLibraryAsOutput = Source folder ''{0}'' in project ''{2}'' cannot output to library ''{1}''
141
classpath_cannotUseLibraryAsOutput = Source folder ''{0}'' in project ''{2}'' cannot output to library ''{1}''
142
classpath_closedProject = Required project ''{0}'' needs to be open
142
classpath_closedProject = Required project ''{0}'' needs to be open
143
classpath_couldNotWriteClasspathFile = Could not write ''.classpath'' file of project ''{0}'': {1}
143
classpath_couldNotWriteClasspathFile = Could not write ''.classpath'' file of project ''{0}'': {1}
144
classpath_cycle = A cycle was detected in the build path of project ''{0}''
144
classpath_cycle = A cycle was detected in the build path of project ''{0}''. The cycle consists of projects '{'{1}'}'
145
classpath_duplicateEntryPath = Build path contains duplicate entry: ''{0}'' for project ''{1}''
145
classpath_duplicateEntryPath = Build path contains duplicate entry: ''{0}'' for project ''{1}''
146
classpath_illegalContainerPath = Illegal classpath container path: ''{0}'' in project ''{1}'', must have at least one segment (containerID+hints)
146
classpath_illegalContainerPath = Illegal classpath container path: ''{0}'' in project ''{1}'', must have at least one segment (containerID+hints)
147
classpath_illegalEntryInClasspathFile = Illegal entry in ''.classpath'' of project ''{0}'' file: {1}
147
classpath_illegalEntryInClasspathFile = Illegal entry in ''.classpath'' of project ''{0}'' file: {1}
(-)src/org/eclipse/jdt/core/tests/builder/MultiProjectTests.java (-28 / +28 lines)
Lines 385-393 Link Here
385
			fullBuild();
385
			fullBuild();
386
386
387
			expectingCompilingOrder(new String[]{"p1.X", "p2.Y", "p3.Z", "p1.X", "p2.Y", "p3.Z", "p1.X"});//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$//$NON-NLS-5$//$NON-NLS-6$//$NON-NLS-7$
387
			expectingCompilingOrder(new String[]{"p1.X", "p2.Y", "p3.Z", "p1.X", "p2.Y", "p3.Z", "p1.X"});//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$//$NON-NLS-5$//$NON-NLS-6$//$NON-NLS-7$
388
			expectingOnlySpecificProblemFor(p1,new Problem("p1", "A cycle was detected in the build path of project 'P1'", p1, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING));//$NON-NLS-1$ //$NON-NLS-2$
388
			expectingOnlySpecificProblemFor(p1, new Problem("p1", "A cycle was detected in the build path of project 'P1'. The cycle consists of projects {P1, P2, P3}", p1, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING));//$NON-NLS-1$ //$NON-NLS-2$
389
			expectingOnlySpecificProblemFor(p2,new Problem("p2", "A cycle was detected in the build path of project 'P2'", p2, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING));//$NON-NLS-1$ //$NON-NLS-2$
389
			expectingOnlySpecificProblemFor(p2,new Problem("p2", "A cycle was detected in the build path of project 'P2'. The cycle consists of projects {P1, P2, P3}", p2, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING));//$NON-NLS-1$ //$NON-NLS-2$
390
			expectingOnlySpecificProblemFor(p3,new Problem("p3", "A cycle was detected in the build path of project 'P3'", p3, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING));//$NON-NLS-1$ //$NON-NLS-2$
390
			expectingOnlySpecificProblemFor(p3,new Problem("p3", "A cycle was detected in the build path of project 'P3'. The cycle consists of projects {P1, P2, P3}", p3, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING));//$NON-NLS-1$ //$NON-NLS-2$
391
391
392
			JavaCore.setOptions(options);
392
			JavaCore.setOptions(options);
393
		} finally {
393
		} finally {
Lines 479-490 Link Here
479
			fullBuild();
479
			fullBuild();
480
480
481
			expectingCompilingOrder(new String[]{"p1.X", "p2.Y", "p3.Z", "p1.X", "p2.Y", "p3.Z", "p1.X"});//$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$ //$NON-NLS-4$//$NON-NLS-5$ //$NON-NLS-6$//$NON-NLS-7$
481
			expectingCompilingOrder(new String[]{"p1.X", "p2.Y", "p3.Z", "p1.X", "p2.Y", "p3.Z", "p1.X"});//$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$ //$NON-NLS-4$//$NON-NLS-5$ //$NON-NLS-6$//$NON-NLS-7$
482
			expectingOnlySpecificProblemFor(p1,new Problem("p1", "A cycle was detected in the build path of project 'P1'", p1, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING));//$NON-NLS-1$ //$NON-NLS-2$
482
			expectingOnlySpecificProblemFor(p1,new Problem("p1", "A cycle was detected in the build path of project 'P1'. The cycle consists of projects {P1, P2, P3}", p1, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING));//$NON-NLS-1$ //$NON-NLS-2$
483
			expectingOnlySpecificProblemsFor(p2,new Problem[]{
483
			expectingOnlySpecificProblemsFor(p2,new Problem[]{
484
					new Problem("p2", "The method bar(Y, int) in the type X is not applicable for the arguments (Y)", c2, 106, 109, CategorizedProblem.CAT_MEMBER, IMarker.SEVERITY_ERROR),//$NON-NLS-1$ //$NON-NLS-2$
484
					new Problem("p2", "The method bar(Y, int) in the type X is not applicable for the arguments (Y)", c2, 106, 109, CategorizedProblem.CAT_MEMBER, IMarker.SEVERITY_ERROR),//$NON-NLS-1$ //$NON-NLS-2$
485
					new Problem("p2", "A cycle was detected in the build path of project 'P2'", p2, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING)//$NON-NLS-1$ //$NON-NLS-2$
485
					new Problem("p2", "A cycle was detected in the build path of project 'P2'. The cycle consists of projects {P1, P2, P3}", p2, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING)//$NON-NLS-1$ //$NON-NLS-2$
486
			});
486
			});
487
			expectingOnlySpecificProblemFor(p3,new Problem("p3", "A cycle was detected in the build path of project 'P3'", p3, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING));//$NON-NLS-1$ //$NON-NLS-2$
487
			expectingOnlySpecificProblemFor(p3,new Problem("p3", "A cycle was detected in the build path of project 'P3'. The cycle consists of projects {P1, P2, P3}", p3, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING));//$NON-NLS-1$ //$NON-NLS-2$
488
488
489
			JavaCore.setOptions(options);
489
			JavaCore.setOptions(options);
490
		} finally {
490
		} finally {
Lines 576-584 Link Here
576
			fullBuild();
576
			fullBuild();
577
577
578
			expectingCompilingOrder(new String[]{"p1.X", "p2.Y", "p3.Z", "p1.X", "p2.Y", "p3.Z", "p1.X"});//$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$ //$NON-NLS-4$//$NON-NLS-5$ //$NON-NLS-6$//$NON-NLS-7$
578
			expectingCompilingOrder(new String[]{"p1.X", "p2.Y", "p3.Z", "p1.X", "p2.Y", "p3.Z", "p1.X"});//$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$ //$NON-NLS-4$//$NON-NLS-5$ //$NON-NLS-6$//$NON-NLS-7$
579
			expectingOnlySpecificProblemFor(p1,new Problem("p1", "A cycle was detected in the build path of project 'P1'", p1, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING));//$NON-NLS-1$ //$NON-NLS-2$
579
			expectingOnlySpecificProblemFor(p1,new Problem("p1", "A cycle was detected in the build path of project 'P1'. The cycle consists of projects {P1, P2, P3}", p1, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING));//$NON-NLS-1$ //$NON-NLS-2$
580
			expectingOnlySpecificProblemFor(p2,new Problem("p2", "A cycle was detected in the build path of project 'P2'", p2, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING));//$NON-NLS-1$ //$NON-NLS-2$
580
			expectingOnlySpecificProblemFor(p2,new Problem("p2", "A cycle was detected in the build path of project 'P2'. The cycle consists of projects {P1, P2, P3}", p2, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING));//$NON-NLS-1$ //$NON-NLS-2$
581
			expectingOnlySpecificProblemFor(p3,new Problem("p3", "A cycle was detected in the build path of project 'P3'", p3, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING));//$NON-NLS-1$ //$NON-NLS-2$
581
			expectingOnlySpecificProblemFor(p3,new Problem("p3", "A cycle was detected in the build path of project 'P3'. The cycle consists of projects {P1, P2, P3}", p3, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING));//$NON-NLS-1$ //$NON-NLS-2$
582
582
583
			env.addClass(root1, "p1", "X", //$NON-NLS-1$ //$NON-NLS-2$
583
			env.addClass(root1, "p1", "X", //$NON-NLS-1$ //$NON-NLS-2$
584
				"package p1;\n"+ //$NON-NLS-1$
584
				"package p1;\n"+ //$NON-NLS-1$
Lines 592-603 Link Here
592
			incrementalBuild();
592
			incrementalBuild();
593
593
594
			expectingCompilingOrder(new String[]{"p1.X", "p2.Y", "p3.Z"}); //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
594
			expectingCompilingOrder(new String[]{"p1.X", "p2.Y", "p3.Z"}); //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
595
			expectingOnlySpecificProblemFor(p1,new Problem("p1", "A cycle was detected in the build path of project 'P1'", p1, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING));//$NON-NLS-1$ //$NON-NLS-2$
595
			expectingOnlySpecificProblemFor(p1,new Problem("p1", "A cycle was detected in the build path of project 'P1'. The cycle consists of projects {P1, P2, P3}", p1, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING));//$NON-NLS-1$ //$NON-NLS-2$
596
			expectingOnlySpecificProblemsFor(p2,new Problem[]{
596
			expectingOnlySpecificProblemsFor(p2,new Problem[]{
597
					new Problem("p2", "The method bar(Y, int) in the type X is not applicable for the arguments (Y)", c2, 106, 109, CategorizedProblem.CAT_MEMBER, IMarker.SEVERITY_ERROR),//$NON-NLS-1$ //$NON-NLS-2$
597
					new Problem("p2", "The method bar(Y, int) in the type X is not applicable for the arguments (Y)", c2, 106, 109, CategorizedProblem.CAT_MEMBER, IMarker.SEVERITY_ERROR),//$NON-NLS-1$ //$NON-NLS-2$
598
					new Problem("p2", "A cycle was detected in the build path of project 'P2'", p2, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING)//$NON-NLS-1$ //$NON-NLS-2$
598
					new Problem("p2", "A cycle was detected in the build path of project 'P2'. The cycle consists of projects {P1, P2, P3}", p2, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING)//$NON-NLS-1$ //$NON-NLS-2$
599
			});
599
			});
600
			expectingOnlySpecificProblemFor(p3,new Problem("p3", "A cycle was detected in the build path of project 'P3'", p3, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING));//$NON-NLS-1$ //$NON-NLS-2$
600
			expectingOnlySpecificProblemFor(p3,new Problem("p3", "A cycle was detected in the build path of project 'P3'. The cycle consists of projects {P1, P2, P3}", p3, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING));//$NON-NLS-1$ //$NON-NLS-2$
601
601
602
			JavaCore.setOptions(options);
602
			JavaCore.setOptions(options);
603
		} finally {
603
		} finally {
Lines 678-695 Link Here
678
			fullBuild();
678
			fullBuild();
679
679
680
			expectingCompilingOrder(new String[]{"p2.Y", "p3.Z", "p2.Y"});//$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
680
			expectingCompilingOrder(new String[]{"p2.Y", "p3.Z", "p2.Y"});//$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
681
			expectingOnlySpecificProblemFor(p1,new Problem("p1", "A cycle was detected in the build path of project 'P1'", p1, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING));//$NON-NLS-1$ //$NON-NLS-2$
681
			expectingOnlySpecificProblemFor(p1,new Problem("p1", "A cycle was detected in the build path of project 'P1'. The cycle consists of projects {P1, P2, P3}", p1, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING));//$NON-NLS-1$ //$NON-NLS-2$
682
			expectingOnlySpecificProblemsFor(p2,new Problem[]{
682
			expectingOnlySpecificProblemsFor(p2,new Problem[]{
683
				new Problem("p2", "X cannot be resolved to a type", c2, 87, 88, CategorizedProblem.CAT_TYPE, IMarker.SEVERITY_ERROR),//$NON-NLS-1$ //$NON-NLS-2$
683
				new Problem("p2", "X cannot be resolved to a type", c2, 87, 88, CategorizedProblem.CAT_TYPE, IMarker.SEVERITY_ERROR),//$NON-NLS-1$ //$NON-NLS-2$
684
				new Problem("p2", "The method foo() from the type Z refers to the missing type X", c2, 93, 96, CategorizedProblem.CAT_MEMBER, IMarker.SEVERITY_ERROR),//$NON-NLS-1$ //$NON-NLS-2$
684
				new Problem("p2", "The method foo() from the type Z refers to the missing type X", c2, 93, 96, CategorizedProblem.CAT_MEMBER, IMarker.SEVERITY_ERROR),//$NON-NLS-1$ //$NON-NLS-2$
685
				new Problem("p2", "The import p1 cannot be resolved", c2, 19, 21, CategorizedProblem.CAT_IMPORT, IMarker.SEVERITY_ERROR),//$NON-NLS-1$ //$NON-NLS-2$
685
				new Problem("p2", "The import p1 cannot be resolved", c2, 19, 21, CategorizedProblem.CAT_IMPORT, IMarker.SEVERITY_ERROR),//$NON-NLS-1$ //$NON-NLS-2$
686
				new Problem("p2", "X cannot be resolved to a type", c2, 73, 74, CategorizedProblem.CAT_TYPE, IMarker.SEVERITY_ERROR),//$NON-NLS-1$ //$NON-NLS-2$
686
				new Problem("p2", "X cannot be resolved to a type", c2, 73, 74, CategorizedProblem.CAT_TYPE, IMarker.SEVERITY_ERROR),//$NON-NLS-1$ //$NON-NLS-2$
687
				new Problem("p2", "A cycle was detected in the build path of project 'P2'", p2, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING)//$NON-NLS-1$ //$NON-NLS-2$
687
				new Problem("p2", "A cycle was detected in the build path of project 'P2'. The cycle consists of projects {P1, P2, P3}", p2, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING)//$NON-NLS-1$ //$NON-NLS-2$
688
			});
688
			});
689
			expectingOnlySpecificProblemsFor(p3,new Problem[]{
689
			expectingOnlySpecificProblemsFor(p3,new Problem[]{
690
				new Problem("p3", "X cannot be resolved to a type", c3, 51, 52, CategorizedProblem.CAT_TYPE, IMarker.SEVERITY_ERROR),//$NON-NLS-1$ //$NON-NLS-2$
690
				new Problem("p3", "X cannot be resolved to a type", c3, 51, 52, CategorizedProblem.CAT_TYPE, IMarker.SEVERITY_ERROR),//$NON-NLS-1$ //$NON-NLS-2$
691
				new Problem("p3", "The import p1 cannot be resolved", c3, 19, 21, CategorizedProblem.CAT_IMPORT, IMarker.SEVERITY_ERROR),//$NON-NLS-1$ //$NON-NLS-2$
691
				new Problem("p3", "The import p1 cannot be resolved", c3, 19, 21, CategorizedProblem.CAT_IMPORT, IMarker.SEVERITY_ERROR),//$NON-NLS-1$ //$NON-NLS-2$
692
				new Problem("p3", "A cycle was detected in the build path of project 'P3'", p3, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING)//$NON-NLS-1$ //$NON-NLS-2$
692
				new Problem("p3", "A cycle was detected in the build path of project 'P3'. The cycle consists of projects {P1, P2, P3}", p3, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING)//$NON-NLS-1$ //$NON-NLS-2$
693
			});
693
			});
694
694
695
			env.addClass(root1, "p1", "X", //$NON-NLS-1$ //$NON-NLS-2$
695
			env.addClass(root1, "p1", "X", //$NON-NLS-1$ //$NON-NLS-2$
Lines 703-711 Link Here
703
				);
703
				);
704
			incrementalBuild();
704
			incrementalBuild();
705
			expectingCompilingOrder(new String[]{"p1.X", "p2.Y", "p3.Z", "p1.X", "p2.Y"}); //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$ //$NON-NLS-4$//$NON-NLS-5$
705
			expectingCompilingOrder(new String[]{"p1.X", "p2.Y", "p3.Z", "p1.X", "p2.Y"}); //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$ //$NON-NLS-4$//$NON-NLS-5$
706
			expectingOnlySpecificProblemFor(p1,new Problem("p1", "A cycle was detected in the build path of project 'P1'", p1, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING));//$NON-NLS-1$ //$NON-NLS-2$
706
			expectingOnlySpecificProblemFor(p1,new Problem("p1", "A cycle was detected in the build path of project 'P1'. The cycle consists of projects {P1, P2, P3}", p1, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING));//$NON-NLS-1$ //$NON-NLS-2$
707
			expectingOnlySpecificProblemFor(p2,new Problem("p2", "A cycle was detected in the build path of project 'P2'", p2, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING));//$NON-NLS-1$ //$NON-NLS-2$
707
			expectingOnlySpecificProblemFor(p2,new Problem("p2", "A cycle was detected in the build path of project 'P2'. The cycle consists of projects {P1, P2, P3}", p2, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING));//$NON-NLS-1$ //$NON-NLS-2$
708
			expectingOnlySpecificProblemFor(p3,new Problem("p3", "A cycle was detected in the build path of project 'P3'", p3, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING));//$NON-NLS-1$ //$NON-NLS-2$
708
			expectingOnlySpecificProblemFor(p3,new Problem("p3", "A cycle was detected in the build path of project 'P3'. The cycle consists of projects {P1, P2, P3}", p3, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING));//$NON-NLS-1$ //$NON-NLS-2$
709
709
710
			JavaCore.setOptions(options);
710
			JavaCore.setOptions(options);
711
		} finally {
711
		} finally {
Lines 771-781 Link Here
771
			expectingCompilingOrder(new String[]{"p1.X", "p2.Y", "p1.X", "p2.Y"});//$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$ //$NON-NLS-4$
771
			expectingCompilingOrder(new String[]{"p1.X", "p2.Y", "p1.X", "p2.Y"});//$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$ //$NON-NLS-4$
772
			expectingOnlySpecificProblemsFor(p1,new Problem[]{
772
			expectingOnlySpecificProblemsFor(p1,new Problem[]{
773
				new Problem("p1", "The import p22 cannot be resolved", c1, 32, 35, CategorizedProblem.CAT_IMPORT, IMarker.SEVERITY_ERROR),//$NON-NLS-1$ //$NON-NLS-2$
773
				new Problem("p1", "The import p22 cannot be resolved", c1, 32, 35, CategorizedProblem.CAT_IMPORT, IMarker.SEVERITY_ERROR),//$NON-NLS-1$ //$NON-NLS-2$
774
				new Problem("p1", "A cycle was detected in the build path of project 'P1'", p1, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING)//$NON-NLS-1$ //$NON-NLS-2$
774
				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_WARNING)//$NON-NLS-1$ //$NON-NLS-2$
775
			});
775
			});
776
			expectingOnlySpecificProblemsFor(p2,new Problem[]{
776
			expectingOnlySpecificProblemsFor(p2,new Problem[]{
777
				new Problem("p2", "The import p11 cannot be resolved", c2, 32, 35, CategorizedProblem.CAT_IMPORT, IMarker.SEVERITY_ERROR),//$NON-NLS-1$ //$NON-NLS-2$
777
				new Problem("p2", "The import p11 cannot be resolved", c2, 32, 35, CategorizedProblem.CAT_IMPORT, IMarker.SEVERITY_ERROR),//$NON-NLS-1$ //$NON-NLS-2$
778
				new Problem("p2", "A cycle was detected in the build path of project 'P2'", p2, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING)//$NON-NLS-1$ //$NON-NLS-2$
778
				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_WARNING)//$NON-NLS-1$ //$NON-NLS-2$
779
			});
779
			});
780
780
781
			env.addClass(root1, "p11", "XX", //$NON-NLS-1$ //$NON-NLS-2$
781
			env.addClass(root1, "p11", "XX", //$NON-NLS-1$ //$NON-NLS-2$
Lines 794-804 Link Here
794
			expectingCompilingOrder(new String[]{"p11.XX", "p22.YY", "p2.Y", "p1.X"});//$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$ //$NON-NLS-4$
794
			expectingCompilingOrder(new String[]{"p11.XX", "p22.YY", "p2.Y", "p1.X"});//$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$ //$NON-NLS-4$
795
			expectingOnlySpecificProblemsFor(p1,new Problem[]{
795
			expectingOnlySpecificProblemsFor(p1,new Problem[]{
796
				new Problem("p1", "The import p22 is never used", c1, 32, 35, CategorizedProblem.CAT_UNNECESSARY_CODE, IMarker.SEVERITY_WARNING),//$NON-NLS-1$ //$NON-NLS-2$
796
				new Problem("p1", "The import p22 is never used", c1, 32, 35, CategorizedProblem.CAT_UNNECESSARY_CODE, IMarker.SEVERITY_WARNING),//$NON-NLS-1$ //$NON-NLS-2$
797
				new Problem("p1", "A cycle was detected in the build path of project 'P1'", p1, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING)//$NON-NLS-1$ //$NON-NLS-2$
797
				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_WARNING)//$NON-NLS-1$ //$NON-NLS-2$
798
			});
798
			});
799
			expectingOnlySpecificProblemsFor(p2,new Problem[]{
799
			expectingOnlySpecificProblemsFor(p2,new Problem[]{
800
				new Problem("p2", "The import p11 is never used", c2, 32, 35, CategorizedProblem.CAT_UNNECESSARY_CODE, IMarker.SEVERITY_WARNING),//$NON-NLS-1$ //$NON-NLS-2$
800
				new Problem("p2", "The import p11 is never used", c2, 32, 35, CategorizedProblem.CAT_UNNECESSARY_CODE, IMarker.SEVERITY_WARNING),//$NON-NLS-1$ //$NON-NLS-2$
801
				new Problem("p2", "A cycle was detected in the build path of project 'P2'", p2, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING)//$NON-NLS-1$ //$NON-NLS-2$
801
				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_WARNING)//$NON-NLS-1$ //$NON-NLS-2$
802
			});
802
			});
803
803
804
			JavaCore.setOptions(options);
804
			JavaCore.setOptions(options);
Lines 879-891 Link Here
879
		fullBuild();
879
		fullBuild();
880
880
881
		expectingOnlySpecificProblemsFor(p1,new Problem[]{
881
		expectingOnlySpecificProblemsFor(p1,new Problem[]{
882
			new Problem("p1", "A cycle was detected in the build path of project 'P1'", p1, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING)//$NON-NLS-1$ //$NON-NLS-2$
882
			new Problem("p1", "A cycle was detected in the build path of project 'P1'. The cycle consists of projects {P1, P2, P3}", p1, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING)//$NON-NLS-1$ //$NON-NLS-2$
883
		});
883
		});
884
		expectingOnlySpecificProblemsFor(p2,new Problem[]{
884
		expectingOnlySpecificProblemsFor(p2,new Problem[]{
885
			new Problem("p2", "A cycle was detected in the build path of project 'P2'", p2, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING)//$NON-NLS-1$ //$NON-NLS-2$
885
			new Problem("p2", "A cycle was detected in the build path of project 'P2'. The cycle consists of projects {P1, P2, P3}", p2, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING)//$NON-NLS-1$ //$NON-NLS-2$
886
		});
886
		});
887
		expectingOnlySpecificProblemsFor(p3,new Problem[]{
887
		expectingOnlySpecificProblemsFor(p3,new Problem[]{
888
			new Problem("p3", "A cycle was detected in the build path of project 'P3'", p3, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING)//$NON-NLS-1$ //$NON-NLS-2$
888
			new Problem("p3", "A cycle was detected in the build path of project 'P3'. The cycle consists of projects {P1, P2, P3}", p3, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING)//$NON-NLS-1$ //$NON-NLS-2$
889
		});
889
		});
890
890
891
	} finally {
891
	} finally {
Lines 965-977 Link Here
965
		fullBuild();
965
		fullBuild();
966
966
967
		expectingOnlySpecificProblemsFor(p1,new Problem[]{
967
		expectingOnlySpecificProblemsFor(p1,new Problem[]{
968
			new Problem("p1", "A cycle was detected in the build path of project 'P1'", p1, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING)//$NON-NLS-1$ //$NON-NLS-2$
968
			new Problem("p1", "A cycle was detected in the build path of project 'P1'. The cycle consists of projects {P1, P2, P3}", p1, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING)//$NON-NLS-1$ //$NON-NLS-2$
969
		});
969
		});
970
		expectingOnlySpecificProblemsFor(p2,new Problem[]{
970
		expectingOnlySpecificProblemsFor(p2,new Problem[]{
971
			new Problem("p2", "A cycle was detected in the build path of project 'P2'", p2, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING)//$NON-NLS-1$ //$NON-NLS-2$
971
			new Problem("p2", "A cycle was detected in the build path of project 'P2'. The cycle consists of projects {P1, P2, P3}", p2, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING)//$NON-NLS-1$ //$NON-NLS-2$
972
		});
972
		});
973
		expectingOnlySpecificProblemsFor(p3,new Problem[]{
973
		expectingOnlySpecificProblemsFor(p3,new Problem[]{
974
			new Problem("p3", "A cycle was detected in the build path of project 'P3'", p3, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING)//$NON-NLS-1$ //$NON-NLS-2$
974
			new Problem("p3", "A cycle was detected in the build path of project 'P3'. The cycle consists of projects {P1, P2, P3}", p3, -1, -1, CategorizedProblem.CAT_BUILDPATH, IMarker.SEVERITY_WARNING)//$NON-NLS-1$ //$NON-NLS-2$
975
		});
975
		});
976
976
977
	} finally {
977
	} finally {
(-)src/org/eclipse/jdt/core/tests/model/ClasspathTests.java (-4 / +4 lines)
Lines 4360-4370 Link Here
4360
				"");
4360
				"");
4361
		this.assertMarkers(
4361
		this.assertMarkers(
4362
			"Unexpected markers for project A",
4362
			"Unexpected markers for project A",
4363
			"A cycle was detected in the build path of project 'A'",
4363
			"A cycle was detected in the build path of project 'A'. The cycle consists of projects {A, B}",
4364
			projectA);
4364
			projectA);
4365
		this.assertMarkers(
4365
		this.assertMarkers(
4366
			"Unexpected markers for project B",
4366
			"Unexpected markers for project B",
4367
			"A cycle was detected in the build path of project 'B'",
4367
			"A cycle was detected in the build path of project 'B'. The cycle consists of projects {A, B}",
4368
			projectB);
4368
			projectB);
4369
4369
4370
		// delete project B
4370
		// delete project B
Lines 4384-4394 Link Here
4384
				"");
4384
				"");
4385
		this.assertMarkers(
4385
		this.assertMarkers(
4386
			"Unexpected markers for project A after adding project B back",
4386
			"Unexpected markers for project A after adding project B back",
4387
			"A cycle was detected in the build path of project 'A'",
4387
			"A cycle was detected in the build path of project 'A'. The cycle consists of projects {A, B}",
4388
			projectA);
4388
			projectA);
4389
		this.assertMarkers(
4389
		this.assertMarkers(
4390
			"Unexpected markers for project B after adding project B back",
4390
			"Unexpected markers for project B after adding project B back",
4391
			"A cycle was detected in the build path of project 'B'",
4391
			"A cycle was detected in the build path of project 'B'. The cycle consists of projects {A, B}",
4392
			projectB);
4392
			projectB);
4393
4393
4394
	} finally {
4394
	} finally {

Return to bug 90486