Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [platform-ui-dev] Proper way to inherit key binding scopes

Douglas,

  Just a quick question in my continuing quest to make this work. When you 
said use <context instead of <scope, did you mean for (as of yet
undocumented) 
org.eclipse.ui.context extension point instead of org.eclipse.ui.commands?

I made the change to the command extention point with no results.  Then
going
and scanning through all of the other plugin.xml to figure out how the heck
this is working for the Java editor, I came across this in the _common_
org.eclipse.ui plugin.xml file:

<extension point="org.eclipse.ui.contexts">
  <context name="%context.editingText.name" 
           description="%context.editingText.description" 
           parentId="org.eclipse.ui.contexts.window" 
           id="org.eclipse.ui.textEditorScope" /> 
  <context name="%context.editingJavaSource.name" 
           description="%context.editingJavaSource.description" 
           parentId="org.eclipse.ui.textEditorScope" 
           id="org.eclipse.jdt.ui.javaEditorScope" /> 
 <!-- 
 This is the root context.  Basically, all key bindings should have
           this context as their parent.  Key bindings in this context will
           apply to both windows and dialogs.
        

  --> 
  <context name="%context.dialogAndWindow.name" 
           description="%context.dialogAndWindow.description" 
           id="org.eclipse.ui.contexts.dialogAndWindow" /> 
 <!-- 
 This is the root context for key bindings that should apply in
           windows (e.g., IWorkbenchWindow).  Key bindings in this context
           will only apply to windows (not dialogs).
        

  --> 
  <context name="%context.window.name" 
           description="%context.window.description" 
           parentId="org.eclipse.ui.contexts.dialogAndWindow" 
           id="org.eclipse.ui.contexts.window" /> 
 <!-- 
 This is the root context for key bindings that should apply in
           dialogs (e.g., shells without parents).  Key bindings in this
           context will only apply to dialogs (not windows).
        

  --> 
  <context name="%context.dialog.name" 
           description="%context.dialog.description" 
           parentId="org.eclipse.ui.contexts.dialogAndWindow" 
           id="org.eclipse.ui.contexts.dialog" /> 
</extension>

What is this extension point (org.eclipse.ui.context) supposed to be used
for
and it is supposed to replace the org.eclipse.ui.command for defining
scopes?
Second question ... why is this where the Java keybindings are defined?

Thanks,
 Thomas


> -----Original Message-----
> From: Douglas Pollock [mailto:douglas.pollock@xxxxxxxx]
> Sent: Thursday, May 06, 2004 2:36 PM
> To: platform-ui-dev@xxxxxxxxxxx
> Subject: Re: [platform-ui-dev] Proper way to inherit key 
> binding scopes
> 
> 
> On Thursday 06 May 2004 14:19, Thomas Fletcher wrote:
> >       <scope
> >             name="%scope.cEditor.name"
> >             parent="org.eclipse.ui.textEditorScope"
> >             description="%cEditor.description"
> >             id="org.eclipse.cdt.ui.cEditorScope">
> >       </scope>
> 
> Please use "context" instead of "scope" and "parentId" 
> instead of "parent".
> 
> 
> > This doesn't seem to work any more with M8.  A simple 
> CTRL-L to bring up
> 
> Changing "scope" to "context" should fix this.  If not, then 
> please try using 
> the context tracing/debugging options on start-up ("-debug").
> 
> 
> 
> d.
> _______________________________________________
> platform-ui-dev mailing list
> platform-ui-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/platform-ui-dev
> 


Back to the top