Class ECPModelView


  • public class ECPModelView
    extends java.lang.Object
    Model Explorer View Part.
    Author:
    Jonas
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String P_LINK_WITH_EDITOR
      Constant for the setting whether the model explorer is linked with the editor.
    • Constructor Summary

      Constructors 
      Constructor Description
      ECPModelView()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void create​(org.eclipse.swt.widgets.Composite composite, org.eclipse.e4.ui.services.EMenuService menuService, org.eclipse.e4.ui.workbench.modeling.ESelectionService selectionService, org.eclipse.e4.ui.model.application.ui.basic.MPart part)
      Creates the model explorer view.
      void setActivePart​(org.eclipse.e4.ui.model.application.ui.basic.MPart part)
      Sets the currently active part.
      void setFocus()
      Sets the focus to the tree.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • P_LINK_WITH_EDITOR

        public static final java.lang.String P_LINK_WITH_EDITOR
        Constant for the setting whether the model explorer is linked with the editor.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ECPModelView

        public ECPModelView()
    • Method Detail

      • create

        @PostConstruct
        public void create​(org.eclipse.swt.widgets.Composite composite,
                           org.eclipse.e4.ui.services.EMenuService menuService,
                           org.eclipse.e4.ui.workbench.modeling.ESelectionService selectionService,
                           org.eclipse.e4.ui.model.application.ui.basic.MPart part)
        Creates the model explorer view.
        Parameters:
        composite - the parent Composite
        menuService - the menu service to register the context menu
        selectionService - the selection service to publish the selection of the tree viewer.
        part - the current MPart
      • setActivePart

        @Inject
        public void setActivePart​(@Named("e4ActivePart") @Optional
                                  org.eclipse.e4.ui.model.application.ui.basic.MPart part)
        Sets the currently active part. Used to update the selection in case the model explorer is linked to editors.
        Parameters:
        part - the active MPart
      • setFocus

        @Focus
        public void setFocus()
        Sets the focus to the tree.