1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-01 06:05:24 +02:00

Prevent error-popup for selection listeners, bug 243114.

This commit is contained in:
Markus Schorn 2008-10-08 13:38:16 +00:00
parent 02dd15386f
commit 7a212506c0

View file

@ -175,7 +175,16 @@ public class SelectionListenerWithASTManager {
listeners= fAstListeners.getListeners();
}
for (int i= 0; i < listeners.length; i++) {
((ISelectionListenerWithAST) listeners[i]).selectionChanged(fPart, selection, astRoot);
final Object l = listeners[i];
try {
((ISelectionListenerWithAST) l).selectionChanged(fPart, selection, astRoot);
} catch (RuntimeException e) {
CUIPlugin.log(e);
fAstListeners.remove(l);
} catch (OutOfMemoryError e) {
CUIPlugin.log(e);
fAstListeners.remove(l);
}
}
return Status.OK_STATUS;
}