org.eclipse.ui.contexts extension point is used to declare contexts and associated elements.
<!ELEMENT extension (context*)>
id CDATA #IMPLIED
name CDATA #IMPLIED
point CDATA #REQUIRED>
<!ELEMENT context EMPTY>
description CDATA #IMPLIED
id CDATA #REQUIRED
name CDATA #REQUIRED
parentId IDREF #IMPLIED>
This element is used to define contexts. If more than one of these elements exist with the same
id attribute, only the last declared element (in order of reading the registry) is considered valid.
plugin.xml file in the
org.eclipse.ui plugin makes use of the
org.eclipse.ui.contexts extension point.
In general, it is preferrably to declare all contexts statically (in
plugin.xml). This is so that users can use them in key bindings. However, it is possible to declare contexts at run-time. To do this, retrieve the
org.eclipse.ui.commands.IContextService from a workbench component, call
getContext(contextId) and then call
Contexts defined programmatically must be cleaned up by the plugin if it is unloaded.
Copyright (c) 2000, 2007 IBM Corporation and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html