public class UIModelManipulator
extends java.lang.Object
| Constructor and Description |
|---|
UIModelManipulator() |
| Modifier and Type | Method and Description |
|---|---|
static org.eclipse.e4.ui.model.application.ui.MUIElement |
findElement(java.lang.String id)
Find the UI element for a given id.
|
static org.eclipse.e4.ui.model.application.ui.advanced.MPerspective |
getCurrentPerspective()
Get the currently active perspective.
|
static java.lang.String |
getIDForName(java.lang.String name)
Find ID for a given view name.
|
static void |
move(org.eclipse.e4.ui.model.application.ui.MUIElement uiElement,
org.eclipse.e4.ui.model.application.ui.MElementContainer<org.eclipse.e4.ui.model.application.ui.MUIElement> targetContainer)
Move a UI element to another container.
|
static void |
reconcileContainer(org.eclipse.e4.ui.model.application.ui.MElementContainer<org.eclipse.e4.ui.model.application.ui.MUIElement> container)
Remove empty containers if there are any.
|
static org.eclipse.e4.ui.model.application.ui.basic.MPartSashContainer |
splitPartStack(org.eclipse.e4.ui.model.application.ui.MElementContainer<org.eclipse.e4.ui.model.application.ui.MUIElement> stack,
int position)
Split a given
MPartStack. |
public static java.lang.String getIDForName(java.lang.String name)
name - name of viewnullpublic static org.eclipse.e4.ui.model.application.ui.MUIElement findElement(java.lang.String id)
id - id to look fornullpublic static org.eclipse.e4.ui.model.application.ui.advanced.MPerspective getCurrentPerspective()
public static org.eclipse.e4.ui.model.application.ui.basic.MPartSashContainer splitPartStack(org.eclipse.e4.ui.model.application.ui.MElementContainer<org.eclipse.e4.ui.model.application.ui.MUIElement> stack,
int position)
MPartStack. Effectively we replace the part stack with a sash container and put the old part stack into the sash container.stack - stack to splitposition - where to put the existing stack within the sash. One of SWT.TOP, SWT.BOTTOM, SWT.LEFT, SWT.RIGHTpublic static void move(org.eclipse.e4.ui.model.application.ui.MUIElement uiElement,
org.eclipse.e4.ui.model.application.ui.MElementContainer<org.eclipse.e4.ui.model.application.ui.MUIElement> targetContainer)
uiElement - element to movetargetContainer - target container to move topublic static void reconcileContainer(org.eclipse.e4.ui.model.application.ui.MElementContainer<org.eclipse.e4.ui.model.application.ui.MUIElement> container)
container - container to reconcile