Class UIModelManipulator

java.lang.Object
org.eclipse.ease.modules.platform.UIModelManipulator

public class UIModelManipulator
extends Object
  • Constructor Summary

    Constructors
    Constructor Description
    UIModelManipulator()  
  • Method Summary

    Modifier and Type Method Description
    static 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 getCurrentPerspective()
    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 given MPartStack.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • UIModelManipulator

      public UIModelManipulator()
  • Method Details

    • getIDForName

      public static String getIDForName​(String name)
      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

      public static org.eclipse.e4.ui.model.application.ui.MUIElement findElement​(String id)
      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 given MPartStack. Effectively we replace the part stack with a sash container and put the old part stack into the sash container.
      Parameters:
      stack - stack to split
      position - where to put the existing stack within the sash. One of SWT.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 move
      targetContainer - 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