Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 184885 Details for
Bug 317102
[EditorMgmt] Recursive editor activation when using AbstractMultiEditor
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
AbstractMultiEditor recursive activation patch v1
bug317102-patch-v1.txt (text/plain), 4.32 KB, created by
Remy Suen
on 2010-12-09 13:49:27 EST
(
hide
)
Description:
AbstractMultiEditor recursive activation patch v1
Filename:
MIME Type:
Creator:
Remy Suen
Created:
2010-12-09 13:49:27 EST
Size:
4.32 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.workbench >Index: Eclipse UI/org/eclipse/ui/internal/EditorManager.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorManager.java,v >retrieving revision 1.148 >diff -u -r1.148 EditorManager.java >--- Eclipse UI/org/eclipse/ui/internal/EditorManager.java 19 Jan 2010 14:03:56 -0000 1.148 >+++ Eclipse UI/org/eclipse/ui/internal/EditorManager.java 9 Dec 2010 18:46:21 -0000 >@@ -1437,7 +1437,11 @@ > return (IPathEditorInput) Util.getAdapter(input, IPathEditorInput.class); > } > >- private class InnerEditor extends EditorReference { >+ /** >+ * An editor reference that is actually contained within another editor >+ * reference. >+ */ >+ class InnerEditor extends EditorReference { > > private IEditorReference outerEditor; > >@@ -1451,6 +1455,14 @@ > this.outerEditorPart = outerEditorPart; > } > >+ /** >+ * @return Returns the parent editor reference that this reference is a >+ * child of. >+ */ >+ public IEditorReference getOuterEditor() { >+ return outerEditor; >+ } >+ > protected void doDisposePart() { > this.outerEditorPart = null; > super.doDisposePart(); >Index: Eclipse UI/org/eclipse/ui/internal/EditorReference.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorReference.java,v >retrieving revision 1.42 >diff -u -r1.42 EditorReference.java >--- Eclipse UI/org/eclipse/ui/internal/EditorReference.java 1 Jun 2010 19:22:36 -0000 1.42 >+++ Eclipse UI/org/eclipse/ui/internal/EditorReference.java 9 Dec 2010 18:46:21 -0000 >@@ -746,11 +746,21 @@ > * > * @return true if it has inner editor reference or the input is > * MultiEditorInput. >+ * @see #getChildren() > */ > public boolean isMultiReference() { > return multiEditorChildren!=null || restoredInput instanceof MultiEditorInput; > } > >+ /** >+ * @return Returns the child editor references. May be <code>null</code> if >+ * this is not a multi reference. >+ * @see #isMultiReference() >+ */ >+ public IEditorReference[] getChildren() { >+ return multiEditorChildren; >+ } >+ > /** > * Creates and returns an empty editor (<code>ErrorEditorPart</code>). > * >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.331 >diff -u -r1.331 WorkbenchPage.java >--- Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java 3 Dec 2009 20:05:15 -0000 1.331 >+++ Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java 9 Dec 2010 18:46:21 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2009 IBM Corporation and others. >+ * Copyright (c) 2000, 2010 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -3484,6 +3484,23 @@ > > if (partBeingActivated != null) { > if (partBeingActivated.getPart(false) != newPart) { >+ // check if we're a nested editor reference >+ if (partBeingActivated instanceof EditorManager.InnerEditor) { >+ EditorReference outerEditor = (EditorReference) ((EditorManager.InnerEditor) partBeingActivated) >+ .getOuterEditor(); >+ // get all the sibling references >+ IEditorReference[] children = outerEditor.getChildren(); >+ if (children != null) { >+ for (int i = 0; i < children.length; i++) { >+ // there's a recursive activation request for a >+ // sibling reference, ignore it >+ if (children[i].getPart(false) == newPart) { >+ return; >+ } >+ } >+ } >+ } >+ > WorkbenchPlugin.log(new RuntimeException(NLS.bind( > "WARNING: Prevented recursive attempt to activate part {0} while still in the middle of activating part {1}", //$NON-NLS-1$ > getId(newPart), getId(partBeingActivated))));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 317102
:
184885
|
188052