Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Context Activation doesn't work
Context Activation doesn't work [message #488589] Tue, 29 September 2009 11:17 Go to next message
Ralf Heydenreich is currently offline Ralf HeydenreichFriend
Messages: 186
Registered: July 2009
Senior Member
Hi all,
I want to activate a defined context programmatically. What I've done is
the following:

<!-- define a new context -->
description="Context for editing Sources"

Now, in the Activator class of my plugin I've overwritten the start()

private static final String MYEDITORCONTEXT = "my.own.EditorScope";

public void start(BundleContext context) throws Exception {
IContextService contextService =
(IContextService)getWorkbench().getService(IContextService.c lass);
IContextActivation activation =
System.out.println("*** NEW CONTEXT: "+activation.getContextId());

If I start a new Eclipse Application based on my new plugin (there are
some more plugins, yet), the console tells me that the context was
changed. But if I look in Window -> Preferences -> General -> Keys the
Scheme is always set to Default. I thought that changing the context
changes this, too. Any hints are welcome.

Re: Context Activation doesn't work [message #488650 is a reply to message #488589] Tue, 29 September 2009 15:32 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

The context is active. But schemes are something else entirely (groups of keybindings).

Activating a context simply activates it. If you have a keybinding in that context, it will be considered to see if can be an active keybinding.


Previous Topic:TextCellEditor+ICellModifier+ContentProposalAdapter+IControlContentAdapter
Next Topic:Application could not be found in the registry.
Goto Forum:

Current Time: Thu Apr 26 00:20:31 GMT 2018

Powered by FUDForum. Page generated in 0.01848 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software