View | Details | Raw Unified | Return to bug 272884 | Differences between
and this patch

Collapse All | Expand All

(-)Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java (-13 / +5 lines)
Lines 37-42 Link Here
37
import org.eclipse.core.runtime.dynamichelpers.ExtensionTracker;
37
import org.eclipse.core.runtime.dynamichelpers.ExtensionTracker;
38
import org.eclipse.core.runtime.dynamichelpers.IExtensionChangeHandler;
38
import org.eclipse.core.runtime.dynamichelpers.IExtensionChangeHandler;
39
import org.eclipse.core.runtime.dynamichelpers.IExtensionTracker;
39
import org.eclipse.core.runtime.dynamichelpers.IExtensionTracker;
40
40
import org.eclipse.jface.dialogs.ErrorDialog;
41
import org.eclipse.jface.dialogs.ErrorDialog;
41
import org.eclipse.jface.dialogs.IDialogConstants;
42
import org.eclipse.jface.dialogs.IDialogConstants;
42
import org.eclipse.jface.dialogs.MessageDialog;
43
import org.eclipse.jface.dialogs.MessageDialog;
Lines 5073-5084 Link Here
5073
					Workbench workbench = (Workbench) getWorkbenchWindow().getWorkbench();
5074
					Workbench workbench = (Workbench) getWorkbenchWindow().getWorkbench();
5074
						workbench.largeUpdateStart();
5075
						workbench.largeUpdateStart();
5075
						try {
5076
						try {
5076
							deferUpdates(true);
5077
							for (int i = 0 ; i < inputs.length; i++) {
5077
							for (int i = inputs.length - 1; i >= 0; i--) {
5078
							   if (inputs[i] == null || editorIDs[i] == null)
5078
							   if (inputs[i] == null || editorIDs[i] == null)
5079
							        throw new IllegalArgumentException();
5079
							        throw new IllegalArgumentException();
5080
								// activate the first editor
5080
								boolean activate = (i == inputs.length - 1); // activate the last  editor
5081
								boolean activate = (i == 0);
5082
								try {
5081
								try {
5083
									// check if there is an editor we can reuse
5082
									// check if there is an editor we can reuse
5084
							        IEditorReference ref = batchReuseEditor(inputs[i], editorIDs[i], 
5083
							        IEditorReference ref = batchReuseEditor(inputs[i], editorIDs[i], 
Lines 5088-5104 Link Here
5088
							        results[i] = ref;
5087
							        results[i] = ref;
5089
								} catch (PartInitException e) {
5088
								} catch (PartInitException e) {
5090
									exceptions[i] = e;
5089
									exceptions[i] = e;
5091
									results[i] = null;
5092
								}
5090
								}
5093
							}
5091
							}
5094
							deferUpdates(false);
5095
							// Update activation history. This can't be done
5096
							// "as we go" or editors will be materialized.
5097
							for (int i = inputs.length - 1; i >= 0; i--) {
5098
								if (results[i] == null)
5099
									continue;
5100
								activationList.bringToTop(results[i]);
5101
							}
5102
						} finally {
5092
						} finally {
5103
							workbench.largeUpdateEnd();
5093
							workbench.largeUpdateEnd();
5104
						}
5094
						}
Lines 5159-5164 Link Here
5159
					activate(editor);
5149
					activate(editor);
5160
	        } else
5150
	        } else
5161
	            bringToTop(editor);
5151
	            bringToTop(editor);
5152
		} else {
5153
			internalBringToTop(ref);
5162
		}
5154
		}
5163
		return ref;
5155
		return ref;
5164
    }
5156
    }

Return to bug 272884