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 182769 Details for
Bug 110684
[PresentationAPI] [RCP] [EditorMgmt] Workbench sometimes restores multiple empty editor folders
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]
patch for too many editor areas v02
area-v02.txt (text/plain), 3.34 KB, created by
Paul Webster
on 2010-11-09 15:25:15 EST
(
hide
)
Description:
patch for too many editor areas v02
Filename:
MIME Type:
Creator:
Paul Webster
Created:
2010-11-09 15:25:15 EST
Size:
3.34 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.ide.application >Index: src/org/eclipse/ui/internal/ide/application/IDEWorkbenchWindowAdvisor.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEWorkbenchWindowAdvisor.java,v >retrieving revision 1.19 >diff -u -r1.19 IDEWorkbenchWindowAdvisor.java >--- src/org/eclipse/ui/internal/ide/application/IDEWorkbenchWindowAdvisor.java 14 Oct 2010 09:10:16 -0000 1.19 >+++ src/org/eclipse/ui/internal/ide/application/IDEWorkbenchWindowAdvisor.java 9 Nov 2010 20:23:56 -0000 >@@ -259,7 +259,7 @@ > > hookTitleUpdateListeners(configurer); > } >- >+ > /** > * Hooks the listeners needed on the window > * >@@ -543,6 +543,7 @@ > page.openEditor(new WelcomeEditorInput( > welcomePerspectiveInfos[index]), WELCOME_EDITOR_ID, true); > } >+ cleanUpEditorArea(); > } > > /** >#P org.eclipse.ui.workbench >Index: Eclipse UI/org/eclipse/ui/application/WorkbenchWindowAdvisor.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/application/WorkbenchWindowAdvisor.java,v >retrieving revision 1.16 >diff -u -r1.16 WorkbenchWindowAdvisor.java >--- Eclipse UI/org/eclipse/ui/application/WorkbenchWindowAdvisor.java 25 May 2009 20:52:16 -0000 1.16 >+++ Eclipse UI/org/eclipse/ui/application/WorkbenchWindowAdvisor.java 9 Nov 2010 20:23:56 -0000 >@@ -10,6 +10,7 @@ > *******************************************************************************/ > package org.eclipse.ui.application; > >+import java.util.ArrayList; > import org.eclipse.core.runtime.Assert; > import org.eclipse.core.runtime.IStatus; > import org.eclipse.core.runtime.Status; >@@ -21,6 +22,9 @@ > import org.eclipse.ui.PlatformUI; > import org.eclipse.ui.WorkbenchException; > import org.eclipse.ui.actions.ActionFactory; >+import org.eclipse.ui.internal.EditorAreaHelper; >+import org.eclipse.ui.internal.PartStack; >+import org.eclipse.ui.internal.WorkbenchPage; > import org.eclipse.ui.internal.WorkbenchWindowConfigurer; > import org.eclipse.ui.internal.util.PrefUtil; > import org.eclipse.ui.intro.IIntroManager; >@@ -134,6 +138,34 @@ > // do nothing > } > >+ /** >+ * Close any empty editor stacks that may have been left open when the >+ * Workbench Window shut down. May be called from >+ * {@link #postWindowRestore()} in the subclass but is not called by >+ * default. >+ * >+ * @since 3.7 >+ */ >+ protected void cleanUpEditorArea() { >+ // close any empty Editor stacks that may have been left open >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=110684 >+ if (getWindowConfigurer() != null && getWindowConfigurer().getWindow() != null >+ && getWindowConfigurer().getWindow().getActivePage() != null) { >+ WorkbenchPage activePage = (WorkbenchPage) getWindowConfigurer().getWindow() >+ .getActivePage(); >+ EditorAreaHelper editorAreaHelper = activePage.getEditorPresentation(); >+ if (editorAreaHelper != null) { >+ ArrayList workbooks = editorAreaHelper.getWorkbooks(); >+ for (int i = 0; i < workbooks.size(); i++) { >+ PartStack editorStack = (PartStack) workbooks.get(i); >+ if (editorStack.getChildren().length == 0) { >+ editorStack.getContainer().remove(editorStack); >+ } >+ } >+ } >+ } >+ } >+ > /** > * Opens the introduction componenet. > * <p>
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 110684
:
27530
|
180115
| 182769