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 39262 Details for
Bug 137527
[PresentationAPI] (regression) Implementors of StackPresentation now must implement save/restore state methods
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]
partstack patch + example patch
partstack-patch.txt (text/plain), 3.80 KB, created by
Paul Webster
on 2006-04-23 17:09:53 EDT
(
hide
)
Description:
partstack patch + example patch
Filename:
MIME Type:
Creator:
Paul Webster
Created:
2006-04-23 17:09:53 EDT
Size:
3.80 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.workbench >Index: Eclipse UI/org/eclipse/ui/internal/PartStack.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartStack.java,v >retrieving revision 1.70 >diff -u -r1.70 PartStack.java >--- Eclipse UI/org/eclipse/ui/internal/PartStack.java 26 Mar 2006 17:06:12 -0000 1.70 >+++ Eclipse UI/org/eclipse/ui/internal/PartStack.java 23 Apr 2006 20:55:49 -0000 >@@ -595,15 +595,13 @@ > // Use a copy of the current set of children to avoid a ConcurrentModificationException > // if a part is added to the same stack while iterating over the children (bug 78470) > LayoutPart[] childParts = (LayoutPart[]) children.toArray(new LayoutPart[children.size()]); >- // if we don't have a saved state, add the parts, otherwise "restore" >- // the parts :-) >- boolean addParts = (savedPresentationState==null); > for (int i = 0; i < childParts.length; i++) { > LayoutPart part = childParts[i]; >- showPart(part, null, addParts); >+ showPart(part, null); > } >- // if we didn't add the parts above, it's because we had a saved >- // presentation state. >+ >+ boolean addParts = (savedPresentationState==null); >+ // we have saved state so restore the parts order > if (!addParts) { > PresentationSerializer serializer = new PresentationSerializer( > getPresentableParts()); >@@ -1282,16 +1280,6 @@ > * @param cookie other information > */ > private void showPart(LayoutPart part, Object cookie) { >- showPart(part, cookie, true); >- } >- >- /** >- * Makes the given part visible in the presentation. >- * @param part the part to add to the stack >- * @param cookie other information >- * @param addParts add this part to the presentation immediately >- */ >- private void showPart(LayoutPart part, Object cookie, boolean addParts) { > > if (isDisposed()) { > return; >@@ -1311,9 +1299,7 @@ > part.setContainer(this); > } > >- if (addParts) { >- presentationSite.getPresentation().addPart(presentablePart, cookie); >- } >+ presentationSite.getPresentation().addPart(presentablePart, cookie); > > if (requestedCurrent == null) { > setSelection(part); >#P org.eclipse.ui.examples.presentation >Index: src/org/eclipse/ui/examples/presentation/sidewinder/SideWinderItemViewPresentation.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.examples.presentation/src/org/eclipse/ui/examples/presentation/sidewinder/SideWinderItemViewPresentation.java,v >retrieving revision 1.1 >diff -u -r1.1 SideWinderItemViewPresentation.java >--- src/org/eclipse/ui/examples/presentation/sidewinder/SideWinderItemViewPresentation.java 25 Feb 2005 22:18:53 -0000 1.1 >+++ src/org/eclipse/ui/examples/presentation/sidewinder/SideWinderItemViewPresentation.java 23 Apr 2006 20:55:50 -0000 >@@ -474,9 +474,10 @@ > public void setVisible(boolean isVisible) { > presentationControl.setVisible(isVisible); > >+ IPresentablePart current = getSite().getSelectedPart(); > // Make the currently visible part visible > if (current != null) { >- current.setVisible(isVisible); >+ current.setVisible(isVisible); > } > > if (isVisible) { >@@ -499,6 +500,10 @@ > > public void addPart(IPresentablePart newPart, Object cookie) { > // Ignore the cookie for now, since we don't support drag-and-drop yet. >+ if (getPartItem(newPart)!=null) { >+ return; >+ } >+ > PartItem item = new PartItem(titleArea, newPart); > > // Attach the newPart pointer to the ToolItem. This is used for getPartForTab
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 137527
:
39175
| 39262