| <?xml version='1.0' encoding='UTF-8'?> |
| <!-- Schema file written by PDE --> |
| <schema targetNamespace="org.eclipse.ui" xmlns="http://www.w3.org/2001/XMLSchema"> |
| <annotation> |
| <appinfo> |
| <meta.schema plugin="org.eclipse.ui" id="contexts" name="Contexts"/> |
| </appinfo> |
| <documentation> |
| <p> |
| The <code>org.eclipse.ui.contexts</code> extension point is used to declare contexts and associated elements. |
| </p> |
| </documentation> |
| </annotation> |
| |
| <element name="extension"> |
| <complexType> |
| <sequence> |
| <element ref="context" minOccurs="0" maxOccurs="unbounded"/> |
| </sequence> |
| <attribute name="id" type="string"> |
| <annotation> |
| <documentation> |
| An optional identifier of the extension instance. |
| </documentation> |
| </annotation> |
| </attribute> |
| <attribute name="name" type="string"> |
| <annotation> |
| <documentation> |
| An optional name of the extension instance. |
| </documentation> |
| <appinfo> |
| <meta.attribute translatable="true"/> |
| </appinfo> |
| </annotation> |
| </attribute> |
| <attribute name="point" type="string" use="required"> |
| <annotation> |
| <documentation> |
| A fully qualified identifier of the target extension point. |
| </documentation> |
| </annotation> |
| </attribute> |
| </complexType> |
| </element> |
| |
| <element name="context"> |
| <annotation> |
| <documentation> |
| This element is used to define contexts. If more than one of these elements exist with the same <code>id</code> attribute, only the last declared element (in order of reading the registry) is considered valid. |
| </documentation> |
| </annotation> |
| <complexType> |
| <attribute name="description" type="string"> |
| <annotation> |
| <documentation> |
| A translatable short description of this context for display in the UI. |
| </documentation> |
| <appinfo> |
| <meta.attribute translatable="true"/> |
| </appinfo> |
| </annotation> |
| </attribute> |
| <attribute name="id" type="string" use="required"> |
| <annotation> |
| <documentation> |
| The unique identifier of this context. |
| </documentation> |
| </annotation> |
| </attribute> |
| <attribute name="name" type="string" use="required"> |
| <annotation> |
| <documentation> |
| The translatable name of this context for display in the UI. |
| </documentation> |
| <appinfo> |
| <meta.attribute translatable="true"/> |
| </appinfo> |
| </annotation> |
| </attribute> |
| <attribute name="parentId" type="string"> |
| <annotation> |
| <documentation> |
| The unique identifier of the parent of this context. |
| </documentation> |
| <appinfo> |
| <meta.attribute kind="identifier" basedOn="org.eclipse.ui.contexts/context/@id"/> |
| </appinfo> |
| </annotation> |
| </attribute> |
| </complexType> |
| </element> |
| |
| <annotation> |
| <appinfo> |
| <meta.section type="since"/> |
| </appinfo> |
| <documentation> |
| 3.0 |
| </documentation> |
| </annotation> |
| |
| <annotation> |
| <appinfo> |
| <meta.section type="examples"/> |
| </appinfo> |
| <documentation> |
| <p> |
| The <code>plugin.xml</code> file in the <code>org.eclipse.ui</code> plugin makes use of the <code>org.eclipse.ui.contexts</code> extension point. |
| </p> |
| </documentation> |
| </annotation> |
| |
| <annotation> |
| <appinfo> |
| <meta.section type="apiInfo"/> |
| </appinfo> |
| <documentation> |
| <p> |
| In general, it is preferrably to declare all contexts statically (in <code>plugin.xml</code>). 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 <code>org.eclipse.ui.commands.IContextService</code> from a workbench component, call <code>getContext(contextId)</code> and then call <code>Context#define(...)</code>. |
| Contexts defined programmatically must be cleaned up by the plugin if it is unloaded. |
| </p> |
| </documentation> |
| </annotation> |
| |
| |
| |
| <annotation> |
| <appinfo> |
| <meta.section type="copyright"/> |
| </appinfo> |
| <documentation> |
| Copyright (c) 2000, 2007 IBM Corporation and others.<br> |
| |
| This program and the accompanying materials are made |
| available under the terms of the Eclipse Public License 2.0 which accompanies |
| this distribution, and is available at <a |
| href="https://www.eclipse.org/legal/epl-2.0">https://www.eclipse.org/legal/epl-v20.html</a>/ |
| |
| SPDX-License-Identifier: EPL-2.0 |
| </documentation> |
| </annotation> |
| |
| </schema> |