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 189869 Details for
Bug 128066
[view management] Don't auto-close views that exist in a perspective by default
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]
Proposed fix based on Martin's suggestion.
20110225_128066.patch (text/plain), 4.51 KB, created by
Pawel Piech
on 2011-02-25 19:17:34 EST
(
hide
)
Description:
Proposed fix based on Martin's suggestion.
Filename:
MIME Type:
Creator:
Pawel Piech
Created:
2011-02-25 19:17:34 EST
Size:
4.51 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.debug.ui >Index: ui/org/eclipse/debug/internal/ui/views/ViewContextService.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/ViewContextService.java,v >retrieving revision 1.19 >diff -u -r1.19 ViewContextService.java >--- ui/org/eclipse/debug/internal/ui/views/ViewContextService.java 24 Sep 2010 20:49:02 -0000 1.19 >+++ ui/org/eclipse/debug/internal/ui/views/ViewContextService.java 26 Feb 2011 00:13:04 -0000 >@@ -369,6 +369,10 @@ > * Set of perspectives this view was closed in by the user > */ > private Set fUserClosed = new HashSet(); >+ /** >+ * Set of perspectives this view was auto-opened by view management. >+ */ >+ private Set fAutoOpened = new HashSet(); > > public ViewBinding(IConfigurationElement element) { > fElement = element; >@@ -438,6 +442,7 @@ > protected void userOpened() { > if (isTrackingViews()) { > String id = getActivePerspective().getId(); >+ fAutoOpened.remove(id); > fUserOpened.add(id); > fUserClosed.remove(id); > saveViewBindings(); >@@ -447,6 +452,7 @@ > protected void userClosed() { > if (isTrackingViews()) { > String id = getActivePerspective().getId(); >+ fAutoOpened.remove(id); > fUserClosed.add(id); > fUserOpened.remove(id); > saveViewBindings(); >@@ -472,6 +478,9 @@ > if (isAutoOpen()) { > try { > fIgnoreChanges = true; >+ if (page.findViewReference(getViewId()) == null) { >+ fAutoOpened.add(perspective.getId()); >+ } > page.showView(getViewId(), null, IWorkbenchPage.VIEW_CREATE); > } catch (PartInitException e) { > DebugUIPlugin.log(e); >@@ -519,14 +528,16 @@ > */ > public void deactivated(IWorkbenchPage page, IPerspectiveDescriptor perspective) { > if (!isUserOpened(perspective)) { >- if (isAutoClose() && !isDefault(perspective)) { >- IViewReference reference = page.findViewReference(getViewId()); >- if (reference != null) { >- try { >- fIgnoreChanges = true; >- page.hideView(reference); >- } finally { >- fIgnoreChanges = false; >+ if (fAutoOpened.remove(perspective.getId())) { >+ if (isAutoClose() && !isDefault(perspective)) { >+ IViewReference reference = page.findViewReference(getViewId()); >+ if (reference != null) { >+ try { >+ fIgnoreChanges = true; >+ page.hideView(reference); >+ } finally { >+ fIgnoreChanges = false; >+ } > } > } > } >@@ -933,11 +944,17 @@ > if (!fIgnoreChanges && page.getWorkbenchWindow().equals(fWindow)) { > if(partRef != null) { > if (IWorkbenchPage.CHANGE_VIEW_SHOW == changeId || IWorkbenchPage.CHANGE_VIEW_HIDE == changeId) { >- Iterator iterator = fContextIdsToBindings.values().iterator(); >- while (iterator.hasNext()) { >- DebugContextViewBindings bindings = (DebugContextViewBindings) iterator.next(); >- bindings.setViewOpened(IWorkbenchPage.CHANGE_VIEW_SHOW == changeId, partRef.getId()); >- } >+ Set activatedContexts = (Set)fPerspectiveToActivatedContexts.get(perspective); >+ if (activatedContexts != null) { >+ Iterator iterator = activatedContexts.iterator(); >+ while (iterator.hasNext()) { >+ DebugContextViewBindings bindings = >+ (DebugContextViewBindings)fContextIdsToBindings.get(iterator.next()); >+ if (bindings != null) { >+ bindings.setViewOpened(IWorkbenchPage.CHANGE_VIEW_SHOW == changeId, partRef.getId()); >+ } >+ } >+ } > } > } > }
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 128066
: 189869