Class UIModelManipulator
java.lang.Object
org.eclipse.ease.modules.platform.UIModelManipulator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.eclipse.e4.ui.model.application.ui.MUIElement
findElement
(String id) Find the UI element for a given id.static org.eclipse.e4.ui.model.application.ui.advanced.MPerspective
Get the currently active perspective.static String
getIDForName
(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 givenMPartStack
.
-
Constructor Details
-
UIModelManipulator
public UIModelManipulator()
-
-
Method Details
-
getIDForName
Find ID for a given view name. If name already contains a valid id, it will be returned.- Parameters:
name
- name of view- Returns:
- view ID or
null
-
findElement
Find the UI element for a given id.- Parameters:
id
- id to look for- Returns:
- UI element instance or
null
-
getCurrentPerspective
public static org.eclipse.e4.ui.model.application.ui.advanced.MPerspective getCurrentPerspective()Get the currently active perspective.- Returns:
- active perspective instance
-
splitPartStack
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) Split a givenMPartStack
. Effectively we replace the part stack with a sash container and put the old part stack into the sash container.- Parameters:
stack
- stack to splitposition
- where to put the existing stack within the sash. One ofSWT.TOP
,SWT.BOTTOM
,SWT.LEFT
,SWT.RIGHT
- Returns:
- newly created sash container
-
move
public 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.- Parameters:
uiElement
- element to movetargetContainer
- target container to move to
-
reconcileContainer
public 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.- Parameters:
container
- container to reconcile
-