Skip to content

Commit e567711

Browse files
committed
Downgrade ReadOnly Exception to warning
Throwing an Exception here currently causes more pain then just continuing. Ideally one would rework the getter JavaProject.getResolvedClasspath() to never modify the javamodel, but it's not clear how todo that in a compatible way. eclipse-jdt/eclipse.jdt.ui#1742
1 parent 9398905 commit e567711

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/DeltaProcessor.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import java.util.Set;
3131
import org.eclipse.core.resources.*;
3232
import org.eclipse.core.runtime.CoreException;
33+
import org.eclipse.core.runtime.ILog;
3334
import org.eclipse.core.runtime.IPath;
3435
import org.eclipse.core.runtime.IProgressMonitor;
3536
import org.eclipse.core.runtime.ISafeRunnable;
@@ -2022,7 +2023,8 @@ public void resetProjectCaches() {
20222023
*/
20232024
public void registerJavaModelDelta(IJavaElementDelta delta) {
20242025
if (JavaModelManager.isReadOnly()) {
2025-
throw new IllegalStateException("Its not allow to modify JavaModel during ReadOnly action. delta=" + delta); //$NON-NLS-1$
2026+
ILog.get().warn("JavaModel change during readOnly Operation", new IllegalStateException( //$NON-NLS-1$
2027+
"Its not allow to modify JavaModel during ReadOnly action. delta=" + delta)); //$NON-NLS-1$
20262028
}
20272029
this.javaModelDeltas.add(delta);
20282030
}

0 commit comments

Comments
 (0)