Class UIModelManipulator

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

public class UIModelManipulator extends Object
  • 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 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 MPerspective getCurrentPerspective()
      Get the currently active perspective.
      Returns:
      active perspective instance
    • splitPartStack

      public static MPartSashContainer splitPartStack(MElementContainer<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(MUIElement uiElement, MElementContainer<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(MElementContainer<MUIElement> container)
      Remove empty containers if there are any.
      Parameters:
      container - container to reconcile