Class GotoEventHandlerHandler

    • Constructor Detail

      • GotoEventHandlerHandler

        public GotoEventHandlerHandler()
    • Method Detail

      • getEventHandlerName

        protected String getEventHandlerName​(EventHandlerContainer eventOwner,
                                             org.eclipse.emf.ecore.EObject element,
                                             org.eclipse.core.commands.ExecutionEvent executionEvent)
        Description copied from class: AbstractGotoEventHandlerHandler
        Returns eventOwner event handler name. Can return null if not provided.
        Specified by:
        getEventHandlerName in class AbstractGotoEventHandlerHandler<EventHandlerContainer>
        Parameters:
        eventOwner - the owner of event, cannot be null
        element - the currently selected form element, cannot be null
        executionEvent - the current execution event, cannot be null
        Returns:
        the existing event handler name or null if none
      • isAllowedServerCall

        protected boolean isAllowedServerCall​(EventHandlerContainer eventOwner,
                                              org.eclipse.emf.ecore.EObject element,
                                              org.eclipse.core.commands.ExecutionEvent executionEvent)
        Description copied from class: AbstractGotoEventHandlerHandler
        Returns whether creating event handler server call is allowed.
        Overrides:
        isAllowedServerCall in class AbstractGotoEventHandlerHandler<EventHandlerContainer>
        Parameters:
        eventOwner - the owner of event, cannot be null
        element - the currently selected form element, cannot be null
        executionEvent - the current execution event, cannot be null
        Returns:
        whether creating event handler server call is allowed
      • getProcedureDirective

        protected String getProcedureDirective​(org.eclipse.swt.widgets.Shell shell,
                                               boolean isRussian,
                                               EventHandlerContainer eventOwner,
                                               org.eclipse.emf.ecore.EObject element,
                                               org.eclipse.core.commands.ExecutionEvent executionEvent)
        Description copied from class: AbstractGotoEventHandlerHandler
        Returns procedure directive for chosen event, or empty string if there is no procedure for creating event handler.

        Can return null if user cancelled event handler creation.

        Overrides:
        getProcedureDirective in class AbstractGotoEventHandlerHandler<EventHandlerContainer>
        Parameters:
        shell - the parent shell to open question dialog on, cannot be null
        isRussian - true if actual script variant is russian, false otherwise
        eventOwner - the owner of event, cannot be null
        element - the currently selected form element, cannot be null
        executionEvent - the current execution event, cannot be null
        Returns:
        the procedure directive for chosen event, or empty string if there is no procedure for chosen event, or null if user cancelled event handler creation
      • getCreatingEvent

        protected Event getCreatingEvent​(org.eclipse.emf.ecore.EObject eventOwner,
                                         org.eclipse.core.commands.ExecutionEvent executionEvent,
                                         String handlerName)
        Description copied from class: AbstractGotoEventHandlerHandler
        Gets event for handler creation.
        Specified by:
        getCreatingEvent in class AbstractGotoEventHandlerHandler<EventHandlerContainer>
        Parameters:
        eventOwner - the owner of event, cannot be null
        executionEvent - the current execution event, cannot be null
        handlerName - the event handler name to create event with, cannot be null
        Returns:
        creating event, never null
      • getEvent

        protected Event getEvent​(org.eclipse.emf.ecore.EObject eventOwner,
                                 org.eclipse.core.commands.ExecutionEvent executionEvent)
        Extracts event for the provided form event owner and command execution event.
        Parameters:
        eventOwner - the form event owner, cannot be null
        executionEvent - the command execution event, cannot be null
        Returns:
        event for the provided form event owner and command execution event, never null
      • getHandlerName

        protected String getHandlerName​(org.eclipse.core.commands.ExecutionEvent executionEvent)
        Returns the handler name provided by the execution event. Can return null.
        Parameters:
        executionEvent - the command execution event, cannot be null
        Returns:
        the handler name provided by the execution event or null if not provided
      • getEventName

        protected String getEventName​(org.eclipse.core.commands.ExecutionEvent executionEvent)
        Returns the handler event english name provided by the execution event. Can return null.
        Parameters:
        executionEvent - the command execution event, cannot be null
        Returns:
        the handler event english name provided by the execution event or null if not provided