Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 317102 | Differences between
and this patch

Collapse All | Expand All

(-)Eclipse UI/org/eclipse/ui/internal/EditorManager.java (-1 / +13 lines)
Lines 1437-1443 Link Here
1437
		return (IPathEditorInput) Util.getAdapter(input, IPathEditorInput.class);
1437
		return (IPathEditorInput) Util.getAdapter(input, IPathEditorInput.class);
1438
	}
1438
	}
1439
1439
1440
	private class InnerEditor extends EditorReference {
1440
	/**
1441
	 * An editor reference that is actually contained within another editor
1442
	 * reference.
1443
	 */
1444
	class InnerEditor extends EditorReference {
1441
1445
1442
		private IEditorReference outerEditor;
1446
		private IEditorReference outerEditor;
1443
1447
Lines 1451-1456 Link Here
1451
			this.outerEditorPart = outerEditorPart;
1455
			this.outerEditorPart = outerEditorPart;
1452
		}
1456
		}
1453
1457
1458
		/**
1459
		 * @return Returns the parent editor reference that this reference is a
1460
		 *         child of.
1461
		 */
1462
		public IEditorReference getOuterEditor() {
1463
			return outerEditor;
1464
		}
1465
1454
		protected void doDisposePart() {
1466
		protected void doDisposePart() {
1455
			this.outerEditorPart = null;
1467
			this.outerEditorPart = null;
1456
			super.doDisposePart();
1468
			super.doDisposePart();
(-)Eclipse UI/org/eclipse/ui/internal/EditorReference.java (+10 lines)
Lines 746-756 Link Here
746
     * 
746
     * 
747
     * @return true if it has inner editor reference or the input is
747
     * @return true if it has inner editor reference or the input is
748
     * MultiEditorInput.
748
     * MultiEditorInput.
749
     * @see #getChildren()
749
     */
750
     */
750
    public boolean isMultiReference() {
751
    public boolean isMultiReference() {
751
    	return multiEditorChildren!=null || restoredInput instanceof MultiEditorInput;
752
    	return multiEditorChildren!=null || restoredInput instanceof MultiEditorInput;
752
    }
753
    }
753
754
755
    /**
756
	 * @return Returns the child editor references. May be <code>null</code> if
757
	 *         this is not a multi reference.
758
	 * @see #isMultiReference()
759
     */
760
	public IEditorReference[] getChildren() {
761
		return multiEditorChildren;
762
	}
763
754
	/**
764
	/**
755
	 * Creates and returns an empty editor (<code>ErrorEditorPart</code>).
765
	 * Creates and returns an empty editor (<code>ErrorEditorPart</code>).
756
	 * 
766
	 * 
(-)Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java (-1 / +18 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2009 IBM Corporation and others.
2
 * Copyright (c) 2000, 2010 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 3484-3489 Link Here
3484
        
3484
        
3485
        if (partBeingActivated != null) {
3485
        if (partBeingActivated != null) {
3486
            if (partBeingActivated.getPart(false) != newPart) {
3486
            if (partBeingActivated.getPart(false) != newPart) {
3487
            	// check if we're a nested editor reference
3488
				if (partBeingActivated instanceof EditorManager.InnerEditor) {
3489
					EditorReference outerEditor = (EditorReference) ((EditorManager.InnerEditor) partBeingActivated)
3490
							.getOuterEditor();
3491
					// get all the sibling references
3492
					IEditorReference[] children = outerEditor.getChildren();
3493
					if (children != null) {
3494
						for (int i = 0; i < children.length; i++) {
3495
							// there's a recursive activation request for a
3496
							// sibling reference, ignore it
3497
							if (children[i].getPart(false) == newPart) {
3498
								return;
3499
							}
3500
						}
3501
					}
3502
				}
3503
3487
                WorkbenchPlugin.log(new RuntimeException(NLS.bind(
3504
                WorkbenchPlugin.log(new RuntimeException(NLS.bind(
3488
                        "WARNING: Prevented recursive attempt to activate part {0} while still in the middle of activating part {1}", //$NON-NLS-1$
3505
                        "WARNING: Prevented recursive attempt to activate part {0} while still in the middle of activating part {1}", //$NON-NLS-1$
3489
                        getId(newPart), getId(partBeingActivated))));
3506
                        getId(newPart), getId(partBeingActivated))));

Return to bug 317102