Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 385126 - child scheme bindings not overriding parent bindings
Summary: child scheme bindings not overriding parent bindings
Status: CLOSED DUPLICATE of bug 387728
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 4.2.2+   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-15 17:03 EDT by Phil Beauvoir CLA
Modified: 2013-01-31 08:53 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Phil Beauvoir CLA 2012-07-15 17:03:47 EDT
Eclipse 4.2

In my RCP application's plugin.xml file I declare the following:

<extension point="org.eclipse.core.runtime.products" id="product">
   <product application="editor.app" name="My App">
    <property name="preferenceCustomization" value="plugin_customization.ini"></property>
    </product>
</extension>

This references the file "plugin_customization.ini" which contains:

# Over-ride keybindings
org.eclipse.ui/KEY_CONFIGURATION_ID=my.editor.keybindings

# No progress on startup
org.eclipse.ui/SHOW_PROGRESS_ON_STARTUP = false

I do this so I can over-ride Eclipse's own ketbindings and not show progress bar in splash screen.

In Eclipse 3.7.x all of this works. In 4.2 the customisation file is ignored.
Comment 1 Paul Webster CLA 2012-07-16 12:10:07 EDT
The SHOW_PROGESS_ON_STARTUP is not being initialized.

If you run your RCP app in a new workspace, are you not seeing your keybinding scheme set as the default?

PW
Comment 2 Phil Beauvoir CLA 2012-07-16 12:13:36 EDT
(In reply to comment #1)
> The SHOW_PROGESS_ON_STARTUP is not being initialized.
> 
> If you run your RCP app in a new workspace, are you not seeing your keybinding
> scheme set as the default?
> 
> PW

It is not set as the default with any workspace, new or otherwise. For example, I have bound M1+N to invike the action "New Model". When I hit Ctrl-N a popup appears offering the original Eclipse option ("New") and mine ("New Model").
Comment 3 Paul Webster CLA 2012-07-16 13:33:01 EDT
(In reply to comment #2)
> 
> It is not set as the default with any workspace, new or otherwise. For example,
> I have bound M1+N to invike the action "New Model". When I hit Ctrl-N a popup
> appears offering the original Eclipse option ("New") and mine ("New Model").

That implies that your scheme is being set as the default (or it wouldn't offer New Model).  So the plugin_customization is being set, just SHOW_PROGRESS_ON_STARTUP isn't working (a different bug) and they keybinding system is reporting 2 bindings for CTRL+N, new and new model.

If you open the keys pref page in a new workspace where you've hit this problem, what does it report for CTRL+N?

PW
Comment 4 Phil Beauvoir CLA 2012-07-16 13:57:54 EDT
Perhaps I didn't explain myself properly.

The app is a standalone RCP app and I hide as much of the "Eclipse" stuff as possible, so there is no keys prefs page for the user. They get my provided key bindings in my scheme that over-ride the Eclipse scheme.

In the plugin.xml file :

   <extension point="org.eclipse.ui.bindings">
      <scheme
            description="My Key Configuration"
            id="my.editor.keybindings"
            name="My Editor"
            parentId="org.eclipse.ui.defaultAcceleratorConfiguration">
      </scheme>
      <key
            schemeId="my.editor.keybindings"
            sequence="M1+M2+F8">
      </key>
      <key
            schemeId="my.editor.keybindings"
            sequence="M1+F8">
      </key>
      <key
            commandId="my.editor.action.newModel"
            schemeId="my.editor.keybindings"
            sequence="M1+N">
      </key>
      <key
            commandId="my.editor.action.openModel"
            schemeId="my.editor.keybindings"
            sequence="M1+O">
      </key>
      <key
            commandId="my.editor.action.closeModel"
            schemeId="my.editor.keybindings"
            sequence="M1+M">
      </key>
// Etc...
   </extension>

This effectively overr-rides the Eclipse keybindings. This works fine in Eclipse 3.7.x but, as I said, in 4.2 instead of just using my keys, the little popup offering a choice appears.
Comment 5 Paul Webster CLA 2013-01-31 08:53:57 EST
This is the same problem, the scheme is being ignored within one context, and so the keybindings are reported as a conflict.

PW

*** This bug has been marked as a duplicate of bug 387728 ***