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

Collapse All | Expand All

(-)model/org/eclipse/jdt/internal/core/ChangeClasspathOperation.java (-2 / +2 lines)
Lines 39-45 Link Here
39
	 * - update project references
39
	 * - update project references
40
	 * - create resolved classpath markers
40
	 * - create resolved classpath markers
41
	 */
41
	 */
42
	protected void classpathChanged(ClasspathChange change) throws JavaModelException {
42
	protected void classpathChanged(ClasspathChange change, boolean refreshExternalFolder) throws JavaModelException {
43
		// reset the project's caches early since some clients rely on the project's caches being up-to-date when run inside an IWorkspaceRunnable
43
		// reset the project's caches early since some clients rely on the project's caches being up-to-date when run inside an IWorkspaceRunnable
44
		// (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=212769#c5 )
44
		// (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=212769#c5 )
45
		JavaProject project = change.project;
45
		JavaProject project = change.project;
Lines 59-65 Link Here
59
			new ProjectReferenceChange(project, change.oldResolvedClasspath).updateProjectReferencesIfNecessary();
59
			new ProjectReferenceChange(project, change.oldResolvedClasspath).updateProjectReferencesIfNecessary();
60
60
61
			// and ensure that external folders are updated as well
61
			// and ensure that external folders are updated as well
62
			new ExternalFolderChange(project, change.oldResolvedClasspath).updateExternalFoldersIfNecessary(true/*refresh if external linked folder already exists*/, null);
62
			new ExternalFolderChange(project, change.oldResolvedClasspath).updateExternalFoldersIfNecessary(refreshExternalFolder, null);
63
63
64
		} else {
64
		} else {
65
			DeltaProcessingState state = JavaModelManager.getDeltaState();
65
			DeltaProcessingState state = JavaModelManager.getDeltaState();
(-)model/org/eclipse/jdt/internal/core/SetClasspathOperation.java (-1 / +1 lines)
Lines 71-77 Link Here
71
			ClasspathChange classpathChange = perProjectInfo.setRawClasspath(this.newRawClasspath, this.referencedEntries, this.newOutputLocation, JavaModelStatus.VERIFIED_OK/*format is ok*/);
71
			ClasspathChange classpathChange = perProjectInfo.setRawClasspath(this.newRawClasspath, this.referencedEntries, this.newOutputLocation, JavaModelStatus.VERIFIED_OK/*format is ok*/);
72
72
73
			// if needed, generate delta, update project ref, create markers, ...
73
			// if needed, generate delta, update project ref, create markers, ...
74
			classpathChanged(classpathChange);
74
			classpathChanged(classpathChange, true/*refresh if external linked folder already exists*/);
75
75
76
			// write .classpath file
76
			// write .classpath file
77
			if (this.canChangeResources && perProjectInfo.writeAndCacheClasspath(this.project, this.newRawClasspath, this.newOutputLocation))
77
			if (this.canChangeResources && perProjectInfo.writeAndCacheClasspath(this.project, this.newRawClasspath, this.newOutputLocation))
(-)model/org/eclipse/jdt/internal/core/SetContainerOperation.java (-1 / +1 lines)
Lines 107-113 Link Here
107
					ClasspathChange classpathChange = affectedProject.getPerProjectInfo().resetResolvedClasspath();
107
					ClasspathChange classpathChange = affectedProject.getPerProjectInfo().resetResolvedClasspath();
108
108
109
					// if needed, generate delta, update project ref, create markers, ...
109
					// if needed, generate delta, update project ref, create markers, ...
110
					classpathChanged(classpathChange);
110
					classpathChanged(classpathChange, i==0/*refresh external linked folder only once*/);
111
111
112
					if (this.canChangeResources) {
112
					if (this.canChangeResources) {
113
						// touch project to force a build if needed
113
						// touch project to force a build if needed
(-)model/org/eclipse/jdt/internal/core/SetVariablesOperation.java (-1 / +1 lines)
Lines 144-150 Link Here
144
						ClasspathChange classpathChange = affectedProject.getPerProjectInfo().resetResolvedClasspath();
144
						ClasspathChange classpathChange = affectedProject.getPerProjectInfo().resetResolvedClasspath();
145
145
146
						// if needed, generate delta, update project ref, create markers, ...
146
						// if needed, generate delta, update project ref, create markers, ...
147
						classpathChanged(classpathChange);
147
						classpathChanged(classpathChange, true/*refresh if external linked folder already exists*/);
148
148
149
						if (this.canChangeResources) {
149
						if (this.canChangeResources) {
150
							// touch project to force a build if needed
150
							// touch project to force a build if needed

Return to bug 302295