### Eclipse Workspace Patch 1.0 #P org.eclipse.ui.workbench Index: Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java,v retrieving revision 1.322 diff -u -r1.322 WorkbenchPage.java --- Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java 23 Apr 2009 16:12:00 -0000 1.322 +++ Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java 24 Apr 2009 19:44:52 -0000 @@ -5073,10 +5073,12 @@ Workbench workbench = (Workbench) getWorkbenchWindow().getWorkbench(); workbench.largeUpdateStart(); try { - for (int i = 0 ; i < inputs.length; i++) { + deferUpdates(true); + for (int i = inputs.length - 1; i >= 0; i--) { if (inputs[i] == null || editorIDs[i] == null) throw new IllegalArgumentException(); - boolean activate = (i ==0); // activate the first editor + // activate the first editor + boolean activate = (i == 0); try { // check if there is an editor we can reuse IEditorReference ref = batchReuseEditor(inputs[i], editorIDs[i], @@ -5086,8 +5088,17 @@ results[i] = ref; } catch (PartInitException e) { exceptions[i] = e; + results[i] = null; } } + deferUpdates(false); + // Update activation history. This can't be done + // "as we go" or editors will be materialized. + for (int i = inputs.length - 1; i >= 0; i--) { + if (results[i] == null) + continue; + activationList.bringToTop(results[i]); + } } finally { workbench.largeUpdateEnd(); } @@ -5149,6 +5160,12 @@ } else bringToTop(editor); } + + /* + * else if (ref != null) activationList.bringToTop(ref); // takes care + * of the MRU list for // non-materialized editors // + * internalBringToTop(ref); + */ return ref; }