capint
4/11/2017 - 8:07 AM

Eclipse >> Default shortcuts

Eclipse >> Default shortcuts

Source: http://www.vogella.com/tutorials/EclipseCommandsKeybindings/article.html

To define some shortcuts as default shortcuts in case of conflicts:

1. Define a new scheme that inherits the default Eclipse scheme

  <extension
     point="org.eclipse.ui.bindings">
    <scheme
        id="org.polarsys.capella.core.defaultAcceleratorConfiguration"
        name="Capella Accelerator Configuration"
        parentId="org.eclipse.ui.defaultAcceleratorConfiguration">
    </scheme>
  </extension>
  
2. When defining a key binding, reference the new scheme instead of the Eclipse one
  <extension point="org.eclipse.ui.bindings">
    <key
      commandId="org.polarsys.capella.core.platform.sirius.ui.navigator.moveDown"
      sequence="CTRL+PAGE_DOWN"
      schemeId="org.polarsys.capella.core.defaultAcceleratorConfiguration"/>
  </extension>
  
3. Modify Preference to take our scheme as the default one using:

PlatformUI.getPreferenceStore().setDefault(IWorkbenchPreferenceConstants.KEY_CONFIGURATION_ID,
        "org.polarsys.capella.core.defaultAcceleratorConfiguration"); //$NON-NLS-1$
        
or put 

org.eclipse.ui/KEY_CONFIGURATION_ID=myscheme in plugin_customization.ini