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 12662 Details for
Bug 25303
[EditorMgmt] would like to have a way to temporarily reduce and restore individual editors
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Implements this enhancement
25303_workbench_patch.txt (text/plain), 8.75 KB, created by
Stefan Xenos
on 2004-06-22 13:02:27 EDT
(
hide
)
Description:
Implements this enhancement
Filename:
MIME Type:
Creator:
Stefan Xenos
Created:
2004-06-22 13:02:27 EDT
Size:
8.75 KB
patch
obsolete
>Index: Eclipse UI/org/eclipse/ui/internal/EditorStack.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorStack.java,v >retrieving revision 1.8 >diff -u -r1.8 EditorStack.java >--- Eclipse UI/org/eclipse/ui/internal/EditorStack.java 17 Jun 2004 19:53:34 -0000 1.8 >+++ Eclipse UI/org/eclipse/ui/internal/EditorStack.java 22 Jun 2004 16:52:00 -0000 >@@ -86,7 +86,9 @@ > public boolean supportsState(int state) { > if (page.isFixedLayout()) > return false; >- return state == IStackPresentationSite.STATE_MAXIMIZED || state == IStackPresentationSite.STATE_RESTORED; >+ >+ return true; >+ //return state == IStackPresentationSite.STATE_MAXIMIZED || state == IStackPresentationSite.STATE_RESTORED; > } > > /** >Index: Eclipse UI/org/eclipse/ui/internal/ILayoutContainer.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ILayoutContainer.java,v >retrieving revision 1.8 >diff -u -r1.8 ILayoutContainer.java >--- Eclipse UI/org/eclipse/ui/internal/ILayoutContainer.java 8 May 2004 00:14:14 -0000 1.8 >+++ Eclipse UI/org/eclipse/ui/internal/ILayoutContainer.java 22 Jun 2004 16:52:00 -0000 >@@ -45,6 +45,14 @@ > public void setZoomed(boolean isZoomed); > > /** >+ * Called when the preferred size of the given child has changed, requiring a >+ * layout to be triggered. >+ * >+ * @param childThatChanged the child that triggered the new layout >+ */ >+public void resizeChild(LayoutPart childThatChanged); >+ >+/** > * Gets the parent for this container. > */ > //public ILayoutContainer getContainer(); >Index: Eclipse UI/org/eclipse/ui/internal/LayoutPart.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/LayoutPart.java,v >retrieving revision 1.33 >diff -u -r1.33 LayoutPart.java >--- Eclipse UI/org/eclipse/ui/internal/LayoutPart.java 16 Jun 2004 14:54:31 -0000 1.33 >+++ Eclipse UI/org/eclipse/ui/internal/LayoutPart.java 22 Jun 2004 16:52:00 -0000 >@@ -77,14 +77,6 @@ > public Rectangle getBounds() { > return new Rectangle(0, 0, 0, 0); > } >-// /** >-// * Gets root container for this part. >-// */ >-// public ViewSashContainer getRootContainer() { >-// if (container != null) >-// return container.getRootContainer(); >-// return null; >-// } > > /** > * Gets the parent for this part. >@@ -368,6 +360,17 @@ > */ > public String getPlaceHolderId() { > return getID(); >+} >+ >+public void resizeChild(LayoutPart childThatChanged) { >+ >+} >+ >+public void forceLayout() { >+ ILayoutContainer container = getContainer(); >+ if (getContainer() != null) { >+ container.resizeChild(this); >+ } > } > > /** >Index: Eclipse UI/org/eclipse/ui/internal/LayoutTreeNode.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/LayoutTreeNode.java,v >retrieving revision 1.13 >diff -u -r1.13 LayoutTreeNode.java >--- Eclipse UI/org/eclipse/ui/internal/LayoutTreeNode.java 27 May 2004 21:25:55 -0000 1.13 >+++ Eclipse UI/org/eclipse/ui/internal/LayoutTreeNode.java 22 Jun 2004 16:52:00 -0000 >@@ -335,14 +335,14 @@ > sashBounds.width = SASH_WIDTH; > > if (children[0].fixedHeight()) { >- leftBounds.height = children[0].getBounds().height; >+ leftBounds.height = children[0].getMinimumHeight(); > } > > rightBounds.x = sashBounds.x + sashBounds.width; > rightBounds.width = bounds.x + bounds.width - rightBounds.x; > > if (children[1].fixedHeight()) { >- rightBounds.height = children[1].getBounds().height; >+ rightBounds.height = children[1].getMinimumHeight(); > } > > adjustWidths(bounds, leftBounds, rightBounds, sashBounds); >@@ -351,9 +351,9 @@ > int redistribute = bounds.height - SASH_WIDTH - total; > > if (children[0].fixedHeight()) { >- leftBounds.height = children[0].getBounds().height; >+ leftBounds.height = children[0].getMinimumHeight(); > } else if (children[1].fixedHeight()) { >- leftBounds.height = bounds.height - children[1].getBounds().height - SASH_WIDTH; >+ leftBounds.height = bounds.height - children[1].getMinimumHeight() - SASH_WIDTH; > } else { > leftBounds.height = left + (int)Math.round(redistribute * wLeft / wTotal); > } >@@ -362,7 +362,7 @@ > rightBounds.y = sashBounds.y + sashBounds.height; > > if (children[1].fixedHeight()) { >- rightBounds.height = children[1].getBounds().height; >+ rightBounds.height = children[1].getMinimumHeight(); > } else { > rightBounds.height = bounds.y + bounds.height - rightBounds.y; > } >Index: Eclipse UI/org/eclipse/ui/internal/PartSashContainer.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartSashContainer.java,v >retrieving revision 1.27 >diff -u -r1.27 PartSashContainer.java >--- Eclipse UI/org/eclipse/ui/internal/PartSashContainer.java 8 Jun 2004 19:46:21 -0000 1.27 >+++ Eclipse UI/org/eclipse/ui/internal/PartSashContainer.java 22 Jun 2004 16:52:00 -0000 >@@ -575,6 +575,16 @@ > return (unzoomRoot != null); > } > >+/* (non-Javadoc) >+ * @see org.eclipse.ui.internal.LayoutPart#forceLayout(org.eclipse.ui.internal.LayoutPart) >+ */ >+public void resizeChild(LayoutPart childThatChanged) { >+ forceLayout(); >+ >+ if (root != null) { >+ root.setBounds(getParent().getClientArea()); >+ } >+} > /** > * Remove a part. > */ >@@ -960,6 +970,16 @@ > info.right = right; > info.relative = relative; > addChild(info); >+} >+ >+/* (non-Javadoc) >+ * @see org.eclipse.ui.internal.LayoutPart#resizesVertically() >+ */ >+public boolean resizesVertically() { >+ if (root == null) { >+ return true; >+ } >+ return !root.fixedHeight(); > } > > /* (non-Javadoc) >Index: Eclipse UI/org/eclipse/ui/internal/PartStack.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartStack.java,v >retrieving revision 1.29 >diff -u -r1.29 PartStack.java >--- Eclipse UI/org/eclipse/ui/internal/PartStack.java 17 Jun 2004 19:53:34 -0000 1.29 >+++ Eclipse UI/org/eclipse/ui/internal/PartStack.java 22 Jun 2004 16:52:00 -0000 >@@ -465,16 +465,6 @@ > } > > refreshPresentationSelection(); >- >- Rectangle bounds = presentation.getControl().getBounds(); >- int minimumHeight = getMinimumHeight(); >- >- if (presentationSite.getState() == IStackPresentationSite.STATE_MINIMIZED >- && bounds.height != minimumHeight) { >- bounds.width = getMinimumWidth(); >- bounds.height = minimumHeight; >- getPresentation().setBounds(bounds); >- } > } > > /** >@@ -527,17 +517,6 @@ > } > > /** >- * Forces the layout to be recomputed for all parts >- */ >- private void forceLayout() { >- PartSashContainer cont = (PartSashContainer) getContainer(); >- if (cont != null) { >- LayoutTree tree = cont.getLayoutTree(); >- tree.setBounds(getParent().getClientArea()); >- } >- } >- >- /** > * Gets the presentation bounds. > */ > public Rectangle getBounds() { >@@ -886,7 +865,7 @@ > */ > public void setActive(int activeState) { > >- if (activeState != StackPresentation.AS_INACTIVE) { >+ if (activeState == StackPresentation.AS_ACTIVE_FOCUS) { > if (presentationSite.getState() == IStackPresentationSite.STATE_MINIMIZED) { > setState(IStackPresentationSite.STATE_RESTORED); > } >@@ -968,11 +947,7 @@ > page.zoomOut(); > } > >- updateControlBounds(); >- >- if (oldState == IStackPresentationSite.STATE_MINIMIZED) { >- forceLayout(); >- } >+ forceLayout(); > } > } > } >@@ -1066,24 +1041,6 @@ > } > > setSelection(selPart); >- } >- >- private void updateControlBounds() { >- StackPresentation presentation = getPresentation(); >- >- if (presentation != null) { >- Rectangle bounds = presentation.getControl().getBounds(); >- int minimumHeight = getMinimumHeight(); >- >- if (presentationSite.getState() == IStackPresentationSite.STATE_MINIMIZED >- && bounds.height != minimumHeight) { >- bounds.width = getMinimumWidth(); >- bounds.height = minimumHeight; >- getPresentation().setBounds(bounds); >- >- forceLayout(); >- } >- } > } > > /**
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 25303
:
11989
| 12662 |
12666
|
12667
|
120832