Class GenerateTableColumnSegmentDmrsHandler

  • All Implemented Interfaces:
    org.eclipse.core.commands.IHandler, org.eclipse.core.commands.IHandler2
    Direct Known Subclasses:
    GenerateTableColumnSegmentDmrsForSubclassesHandler

    public class GenerateTableColumnSegmentDmrsHandler
    extends MasterDetailAction
    Tree master detail action that generates segment based table column DMRs. This action is only used in the segment mode of the tooling.
    Author:
    Lucas Koehler
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object execute​(org.eclipse.core.commands.ExecutionEvent event)  
      void execute​(org.eclipse.emf.ecore.EObject object)  
      protected java.util.Optional<org.eclipse.emf.ecore.EClass> getColumnDmrRootEClass​(org.eclipse.emf.ecore.EClass baseEClass)
      Returns the root EClass of the generated column dmrs.
      boolean shouldShow​(org.eclipse.emf.ecore.EObject eObject)  
      • Methods inherited from class org.eclipse.core.commands.AbstractHandler

        addHandlerListener, dispose, fireHandlerChanged, hasListeners, isEnabled, isHandled, removeHandlerListener, setBaseEnabled, setEnabled
      • Methods inherited from class org.eclipse.core.commands.common.EventManager

        addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
      • Methods inherited from class java.lang.Object

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

      • GenerateTableColumnSegmentDmrsHandler

        public GenerateTableColumnSegmentDmrsHandler()
        Creates a new instance. Gets needed services from the bundle activator.
    • Method Detail

      • execute

        public java.lang.Object execute​(org.eclipse.core.commands.ExecutionEvent event)
                                 throws org.eclipse.core.commands.ExecutionException
        Throws:
        org.eclipse.core.commands.ExecutionException
      • shouldShow

        public boolean shouldShow​(org.eclipse.emf.ecore.EObject eObject)
        Specified by:
        shouldShow in class MasterDetailAction
        Parameters:
        eObject - the EObject on which to test if the action can be executed
        Returns:
        true if the action can be executed on the parameter eObject
      • execute

        public void execute​(org.eclipse.emf.ecore.EObject object)
        Specified by:
        execute in class MasterDetailAction
        Parameters:
        object - The EObject on which the action is executed
      • getColumnDmrRootEClass

        protected java.util.Optional<org.eclipse.emf.ecore.EClass> getColumnDmrRootEClass​(org.eclipse.emf.ecore.EClass baseEClass)
        Returns the root EClass of the generated column dmrs. By default this is the same as the given baseEClass. This can be overridden to select a subclass of the base EClass.
        Parameters:
        baseEClass - The reference type which the multi dmr points to
        Returns:
        The root EClass for the column dmrs or nothing if none was determined