diff options
author | Matt Biggs | 2015-09-22 10:22:57 +0000 |
---|---|---|
committer | Mickael Istria | 2015-10-06 12:26:59 +0000 |
commit | 0f98dc41c15e448c57b8aa337e94cbe71418bc05 (patch) | |
tree | 9371e973c1f7040eb0eb2444bdc95026fe3d1027 | |
parent | e374e2b5f15948e212448a6653cde0e1e65fe2c6 (diff) | |
download | org.eclipse.swtbot-0f98dc41c15e448c57b8aa337e94cbe71418bc05.tar.gz org.eclipse.swtbot-0f98dc41c15e448c57b8aa337e94cbe71418bc05.tar.xz org.eclipse.swtbot-0f98dc41c15e448c57b8aa337e94cbe71418bc05.zip |
Added API to maximise, minimise and restore a workbench part
Change-Id: Ibc9ca053aeb6ce6a53043b4544157842c97be909
Signed-off-by: Matt Biggs <zebbedi@gmail.com>
-rw-r--r-- | org.eclipse.swtbot.e4.finder/src/org/eclipse/swtbot/e4/finder/widgets/SWTBotView.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/org.eclipse.swtbot.e4.finder/src/org/eclipse/swtbot/e4/finder/widgets/SWTBotView.java b/org.eclipse.swtbot.e4.finder/src/org/eclipse/swtbot/e4/finder/widgets/SWTBotView.java index 0684b118..c4b475fc 100644 --- a/org.eclipse.swtbot.e4.finder/src/org/eclipse/swtbot/e4/finder/widgets/SWTBotView.java +++ b/org.eclipse.swtbot.e4.finder/src/org/eclipse/swtbot/e4/finder/widgets/SWTBotView.java @@ -22,6 +22,7 @@ import org.eclipse.core.runtime.Assert; import org.eclipse.e4.ui.model.application.ui.basic.MPart; import org.eclipse.e4.ui.model.application.ui.menu.MToolBar; import org.eclipse.e4.ui.model.application.ui.menu.MToolBarElement; +import org.eclipse.e4.ui.workbench.IPresentationEngine; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.ToolItem; import org.eclipse.swt.widgets.Widget; @@ -245,6 +246,31 @@ public class SWTBotView { public String getId() { return this.part.getElementId(); } + + /** + * Maximise the part's part-stack/sash. + * @since 2.4 + */ + public void maximise() { + this.part.getParent().getTags().add(IPresentationEngine.MAXIMIZED); + } + + /** + * Minimise the part's part-stack/sash. + * @since 2.4 + */ + public void minimise() { + this.part.getParent().getTags().add(IPresentationEngine.MINIMIZED); + } + + /** + * Restore the part's part-stack/sash. + * @since 2.4 + */ + public void restore() { + this.part.getParent().getTags().remove(IPresentationEngine.MAXIMIZED); + this.part.getParent().getTags().remove(IPresentationEngine.MINIMIZED); + } /** * Returns a SWTBot instance that matches the contents of this workbench part. |