Skip to content
Draft
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
Expand Up @@ -42,6 +42,7 @@
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.QualifiedName;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.SubMonitor;
import org.eclipse.jdt.core.IAccessRule;
import org.eclipse.jdt.core.IClasspathAttribute;
Expand Down Expand Up @@ -1030,11 +1031,14 @@ private void createLinkWithRetry(IFolder folder, java.net.URI target) throws Cor
try {
// Ensure the parent project is accessible before attempting to create the link
IProject project = folder.getProject();
if(project != null && !project.isAccessible()) {
if(attempt < maxAttempts) {
log.debug("Project {} is not accessible, waiting before retry...", project.getName());
sleepWithExponentialBackoff(initialDelay, attempt, folder.getFullPath().toString());
continue;
if(project != null) {
if(!project.isOpen()) {
throw new CoreException(Status
.error("The project " + project + " of folder " + folder + " to link with " + target + " is not open"));
}
if(!project.isAccessible()) {
throw new CoreException(Status.error(
"The project " + project + " of folder " + folder + " to link with " + target + " is not accessible"));
}
}

Expand Down
Loading