Class OperationInstanceHelper


  • public class OperationInstanceHelper
    extends Object
    Helper to deal with operation instances
    Version:
    $Rev$
    Author:
    herrmama, $Author$
    • Constructor Detail

      • OperationInstanceHelper

        public OperationInstanceHelper​(IExtentProvider provider)
        Constructor
    • Method Detail

      • getPossibleOperations

        public List<OperationInstance> getPossibleOperations​(List<org.eclipse.emf.ecore.EObject> selectedElements)
        Create operation instances for operations which are applicable on a list of selected elements
        Parameters:
        selectedElements - Selected elements
        Returns:
        List of instances of applicable operations
      • createOperationInstance

        public OperationInstance createOperationInstance​(Operation operation,
                                                         List<org.eclipse.emf.ecore.EObject> selectedElements)
        Create an instance of an operation based on the list of selected elements
        Parameters:
        operation - Operation
        selectedElements - List of selected elements
        Returns:
        Operation instance
      • getViolatedConstraints

        public List<Constraint> getViolatedConstraints​(OperationInstance operationInstance)
        Evaluate all constraints of an operation instance and return those which are not fulfilled
        Parameters:
        operationInstance - Operation instance
        Returns:
        List of violated constraints
      • getExtent

        public MetamodelExtent getExtent()
        Get metamodel extent
        Returns:
        Metamodel extent