Description
1) Have half dozen projects open in workspace with editors open for a model from each project
2) Exit and restart Designer
3) Select and close projects
4) Receive following exception
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135) ... 24 more Caused by: java.util.ConcurrentModificationException at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:859) at java.util.ArrayList$Itr.next(ArrayList.java:831) at org.teiid.designer.ui.editors.ModelEditorManager$3.run(ModelEditorManager.java:177) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
apparently due the autoSelect() is called in both DiagramEditor.openContext() and OperationEditorPage.openContext(). Since the call ends up being async() the editor being closed is removed from the iterated list in the runnable
public static void autoSelectEditor( final ModelEditor editor, final ModelEditorPage thePage ) { Display.getDefault().asyncExec(new Runnable() { @Override public void run() { for (Iterator iter = editor.getAllEditors().iterator(); iter.hasNext();) { Object nextPage = iter.next(); <<<<<<<<<=========== if (nextPage == thePage) { editor.selectPage(thePage); } } } }); }