Menu

#1113 Key binding conflict

open
Editor (491)
5
2010-04-09
2010-04-09
No

There is a key binding conflict between com.python.pydev.analysis.actions.pyGlobalsBrowserWorkbench and Java Open Type. The big problem is that the option to open "Python Show Class Browser" is shown in Java file, Java project and Java perspective which makes you unable to work effectively if pydev is installed.
The attached patch fixes this by setting pydev editor context to the relevant key binding.

Discussion

  • Fabio Zadrozny

    Fabio Zadrozny - 2010-04-09
    • status: open --> closed-rejected
     
  • Fabio Zadrozny

    Fabio Zadrozny - 2010-04-09

    Unfortunately, this won't be applied... The real problem is that the eclipse platform doesn't provide a way to specify when a global action should be active (in the pydev perspective one should be active and in the java the other one).

    Note that the issue works both ways (if you're primarily a python developer, you don't want the java actions in the pydev perspective).

    So, unfortunately, the only way to deal with it is o a per-case basis, meaning that each user must go to the keybinding preferences and choose which one should be the default -- removing the other one.

    Note however that when both actions are available, you can still work with it (which would be the case when you work 50/50 on python and java), if you are 'ok' dealing with the pop up with the choice you want.

    Also, in the pydev editor, there is already another action that's bound to it, so, it's ok if you remove the global action and only use it in the pydev editor (but again, if you are primarily a python developer, you want the python action to be available regardless of the scope).

     
  • Anonymous

    Anonymous - 2010-04-09

    Introducing a keybinding conflict with JDT visible in Error Log View out of box is not a good practice.

    Can you consider define a new schema to resolve this:
    <extension point="org.eclipse.ui.bindings">
    <key sequence="M1+M2+T"
    contextId="org.eclipse.ui.contexts.window"
    commandId="com.python.pydev.analysis.actions.pyGlobalsBrowserWorkbench"
    schemeId="PyDevSchema">
    </key>
    <scheme
    id="PyDevSchema"
    name="PyDev"
    parentId="org.eclipse.ui.defaultAcceleratorConfiguration">
    </scheme>
    </extension>

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2010-04-09
    • status: closed-rejected --> open-rejected
     
  • Fabio Zadrozny

    Fabio Zadrozny - 2010-04-09

    Reopening for consideration on creating a new schema (still need to analyze what are the implications) -- although the real way to fix it would be in the eclipse platform, reassigning it as needed in each context.

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2010-04-09
    • status: open-rejected --> open
     
  • Anonymous

    Anonymous - 2010-04-09

    When Eclipse starts, it is in Default schema. You can do this:

    BindingService bs = (BindingService)PlatformUI.getWorkbench().getService(IBindingService.class);
    BindingManager bm = bs.getBindingManager()
    bm.setActiveScheme(bs.getScheme( ID_OF_THE_SCHEMA )

    when user switches to PyDev perspective. The question is what to do when
    user leaves PyDev perspective.

    Back to the root cause of the problem: is it possible to change key sequence?
    I know it may annoy the Python developers :)

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.