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

On Thursday 06 May 2004 15:07, Thomas Fletcher wrote:
> Can I also get an answer to the basic question of "should I have to be
> hard coding" multiple inheritances in my editor or should it all be
> resolved using the extension points.  I'm assuming that from your response
> it should be inheriting the values from the extension point.

Sorry, I shouldn't have been so short with my previous reply.  I'm feeling a 
little bit swamped right now.

You shouldn't have to hard-code inheritance for key bindings.  
WorkbenchContextSupport.createContextTree() provides a facility for 
converting a short list of contexts into the complete tree of contexts 
(including parents).  This method is used by WorkbenchCommandSupport to pass 
a complete tree into the key binding service.

Out of curiousity, which build are you using?  Up until I200405050200, there 
were issues with several issues with inheritance of contexts -- especially as 
they related to key bindings.  If you are still having problems with the new 
API and this build (or later), please file a bug.

> Also ... how come this <scope to <context extention point change
> has not been documented as part of the 3.0 editor migration (the extension
> point information still says since 2.1 and the code examples all still
> use <scope)  Is the plan to deprecate <scope in favour of <context?  Are
> all of the other references to scope (ie in the commands) also going to
> be deprecated and changed to context?  What about parent vs parentId in
> the extention point description?

I've inherited this code very recently, and am a little bit at a loss as to 
what to say about this.  The scopes were pulled out back in June 2003.  The 
"acceleratorScopes" extension point was pulled out, and then put back in.  
Unfortunately, tracing through the code, it appears that the deprecation 
support for acceleratorScopes trails off at some point.  I'd be surprised if 
it works.  "scopes" definitely do not work.

In talking with some other developers on the Platform UI team, we'd decided to 
put deprecated support for the scopes API back in for 3.0, and will be moving 
toward this over the next few days.  This bug is being tracked as Bug 61310 
("";).  I'd like to 
apologize for any trouble this has caused you.

I'm not aware of which code examples you are speaking about.  If you could 
point me to them, I would try to update them to the new API.

Back to the top