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

Collapse All | Expand All

(-)Eclipse UI/org/eclipse/ui/internal/WorkbenchPartReference.java (-1 / +1 lines)
Lines 574-580 Link Here
574
        fireInternalPropertyChange(id);
574
        fireInternalPropertyChange(id);
575
    }
575
    }
576
576
577
    public IWorkbenchPart getPart(boolean restore) {
577
    public final IWorkbenchPart getPart(boolean restore) {
578
        if (isDisposed()) {
578
        if (isDisposed()) {
579
            return null;
579
            return null;
580
        }
580
        }
(-)Eclipse UI/org/eclipse/ui/internal/EditorReference.java (-30 lines)
Lines 8-14 Link Here
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 *     IBM Corporation - initial API and implementation
10
 *     Nikolay Botev - bug 240651
10
 *     Nikolay Botev - bug 240651
11
 *     Biorn Biornstad - bug 267454
12
 *******************************************************************************/
11
 *******************************************************************************/
13
package org.eclipse.ui.internal;
12
package org.eclipse.ui.internal;
14
13
Lines 818-850 Link Here
818
        
817
        
819
        return part;
818
        return part;
820
	}
819
	}
821
	
822
	public final IWorkbenchPart getPart(boolean restore) {
823
		IWorkbenchPart oldPart = part;
824
		
825
		if (super.getPart(restore) == null) {
826
			return null;
827
		}
828
		
829
		if (part != oldPart) {
830
			// The editor was restored by this invocation
831
			// Also restore other editors with same ID and input, bug #267454
832
833
			IEditorReference[] editors = null;
834
			try {
835
				editors = manager.findEditors(getEditorInput(), getId(),
836
						IWorkbenchPage.MATCH_INPUT | IWorkbenchPage.MATCH_ID);
837
			} catch (PartInitException e1) {
838
				WorkbenchPlugin.log(e1);
839
				return part;
840
			}
841
			for (int i = 0; i < editors.length; i++) {
842
				if (editors[i] != this) {
843
					editors[i].getPart(true);
844
				}
845
			}
846
		}
847
		
848
		return part;
849
	}
850
}
820
}

Return to bug 267454