Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent initial build-path errors on new external-folders in container #3731

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 IBM Corporation and others.
* Copyright (c) 2000, 2025 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -50,10 +50,6 @@ protected void classpathChanged(ClasspathChange change, boolean refreshExternalF
project.resetCaches();

if (this.canChangeResources) {
// workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=177922
if (isTopLevelOperation() && !ResourcesPlugin.getWorkspace().isTreeLocked()) {
new ClasspathValidation(project).validate();
}

// delta, indexing and classpath markers are going to be created by the delta processor
// while handling the resource change (either .classpath change, or project touched)
Expand All @@ -62,6 +58,11 @@ protected void classpathChanged(ClasspathChange change, boolean refreshExternalF
// and ensure that external folders are updated as well
new ExternalFolderChange(project, change.oldResolvedClasspath).updateExternalFoldersIfNecessary(refreshExternalFolder, null);

// workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=177922
if (isTopLevelOperation() && !ResourcesPlugin.getWorkspace().isTreeLocked()) {
new ClasspathValidation(project).validate();
}

} else {
DeltaProcessingState state = JavaModelManager.getDeltaState();
JavaElementDelta delta = new JavaElementDelta(getJavaModel());
Expand Down
Loading