Class ShortcutHandler

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

    public class ShortcutHandler
    extends org.eclipse.core.commands.AbstractHandler
    The ShorcutHandler receives the shortcuts defined in plugin.xml and passes them to the editor.
    See Also:
    IHandler, AbstractHandler
    • Constructor Summary

      Constructors 
      Constructor Description
      ShortcutHandler()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.eclipse.jface.dialogs.Dialog createNewElementDialog​(org.eclipse.emf.edit.domain.EditingDomain editingDomain, org.eclipse.jface.viewers.ISelectionProvider selectionProvider, org.eclipse.emf.ecore.EObject selection, java.lang.String title)
      Creates the new element dialog.
      java.lang.Object execute​(org.eclipse.core.commands.ExecutionEvent event)
      protected java.lang.String getDeleteCmdName()  
      protected java.lang.String getNewChildCmdName()  
      protected java.lang.String getNewSiblingCmdName()  
      • 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

      • ShortcutHandler

        public ShortcutHandler()
    • 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
        See Also:
        IHandler.execute(org.eclipse.core.commands.ExecutionEvent)
      • getNewSiblingCmdName

        protected java.lang.String getNewSiblingCmdName()
        Returns:
        the cmd name for new siblings
      • getNewChildCmdName

        protected java.lang.String getNewChildCmdName()
        Returns:
        the cmd name for new children
      • getDeleteCmdName

        protected java.lang.String getDeleteCmdName()
        Returns:
        the cmd name for deletions
      • createNewElementDialog

        protected org.eclipse.jface.dialogs.Dialog createNewElementDialog​(org.eclipse.emf.edit.domain.EditingDomain editingDomain,
                                                                          org.eclipse.jface.viewers.ISelectionProvider selectionProvider,
                                                                          org.eclipse.emf.ecore.EObject selection,
                                                                          java.lang.String title)
        Creates the new element dialog.
        Parameters:
        editingDomain - the editing domain
        selectionProvider - the selection
        selection - the selection
        title - the title
        Returns:
        the dialog