diff --git a/Plugins/org.blueberry.core.expressions/plugin.xml b/Plugins/org.blueberry.core.expressions/plugin.xml index 7e2896abbf..3509a3e70b 100644 --- a/Plugins/org.blueberry.core.expressions/plugin.xml +++ b/Plugins/org.blueberry.core.expressions/plugin.xml @@ -1,14 +1,18 @@ + + + + diff --git a/Plugins/org.blueberry.core.expressions/schema/definitions.exsd b/Plugins/org.blueberry.core.expressions/schema/definitions.exsd new file mode 100644 index 0000000000..ad07cdb214 --- /dev/null +++ b/Plugins/org.blueberry.core.expressions/schema/definitions.exsd @@ -0,0 +1,166 @@ + + + + + + + + + <p> +This extension point allows you to create reusable extensions. They can then be used in other core expression constructs. +</p> +<p> +The reference element in a core expression will evaluated the expression definition with the evaluation context that is active for the reference element. +</p> + + + + + + + + + + + + + + + a fully qualified identifier of the target extension point + + + + + + + an optional identifier of the extension instance + + + + + + + an optional name of the extension instance + + + + + + + + + + + + + Provides a global definition of an expression to be used with the &lt;reference/&gt; expression element. This helps to reuse common expressions. + + + + + + + + + + + + + + + + + + + + + A globally unique identifier for the expression definition. + + + + + + + + + + + + You can define and the use core expressions: + +<p> +<pre> +&lt;extension point="org.blueberry.core.expressions.definitions"&gt; + &lt;definition id="com.example.parts.activeProblemsView"&gt; + &lt;with variable="activePartId"&gt; + &lt;equals value="org.blueberry.ui.views.ProblemsView"/&gt; + &lt;/with&gt; + &lt;/definition&gt; + &lt;definition id="com.example.markers.markerSelection"&gt; + &lt;iterate&gt; + &lt;instanceof value="org.blueberry.core.resources.IMarker"/&gt; + &lt;/with&gt; + &lt;/definition&gt; +&lt;/extension&gt; +</pre> +</p> +<p> +Then this expression definition can be used when composing other expressions. +</p> +<p> +<pre> +&lt;enabledWhen&gt; + &lt;reference definitionId="com.example.parts.activeProblemsView"&gt; +&lt;/enabledWhen&gt; +</pre> +<pre> +&lt;visibleWhen&gt; + &lt;and&gt; + &lt;reference definitionId="com.example.parts.activeProblemsView"/&gt; + &lt;reference definitionId="com.example.markers.markerSelection"/&gt; + &lt;/and&gt; +&lt;/visibleWhen&gt; +</pre> +</p> + + + + + + + + + + 3.3 + + + + + + + + + + + + + + + + + + + + + + + + + + + Copyright (c) 2007 IBM Corporation and others.<br> +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 <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a> + + + + diff --git a/Plugins/org.blueberry.core.expressions/schema/expressionLanguage.exsd b/Plugins/org.blueberry.core.expressions/schema/expressionLanguage.exsd new file mode 100644 index 0000000000..400743a1d2 --- /dev/null +++ b/Plugins/org.blueberry.core.expressions/schema/expressionLanguage.exsd @@ -0,0 +1,535 @@ + + + + + + + + + + + + + + + + A generic root element. The element can be used inside an extension point to define its enablement expression. + The children of an enablement expression are combined using the and operator. + + + + + + + + + + + + + + + + + + + + + + + + + This element represent a NOT operation on the result of evaluating it's sub-element expression. + + + + + + + + + + + + + + + + + + + + + + + + + This element represent an AND operation on the result of evaluating all it's sub-elements expressions. + + + + + + + + + + + + + + + + + + + + + + + + + This element represent an OR operation on the result of evaluating all it's sub-element expressions. + + + + + + + + + + + + + + + + + + + + + + + + + + + + This element is used to perform an instanceof check of the object in focus. The expression returns + EvaluationResult.TRUE if the object's type is a sub type of the type specified by the attribute value. + Otherwise EvaluationResult.FALSE is returned. + + + + + + + a fully qualified name of a class or interface. + + + + + + + + + + + + + + + + This element is used to evaluate the property state of the object in focus. The set of + testable properties can be extended using the propery tester extension point. The test + expression returns EvaluationResult.NOT_LOADED if the property tester doing the actual + testing isn't loaded yet and the attribute forcePluginActivation is set to false. + If forcePluginActivation is set to true and the evaluation context used to evaluate + this expression support plug-in activation then evaluating the property will result in + activating the plug-in defining the tester. + + + + + + + the name of an object's property to test. + + + + + + + additional arguments passed to the property tester. Multiple arguments are seperated + by commas. Each individual argument is converted into a Java base type using the same + rules as defined for the value attribute of the test expression. + + + + + + + the expected value of the property. Can be omitted if the property + is a boolean property. The test expression is supposed to return +EvaluationResult.TRUE if the property matches the value and EvaluationResult.FALSE +otherwise. The value attribute is converted into a Java base type using the following +rules: +<ul> + <li>the string &quot;true&quot; is converted into Boolean.TRUE</li> + <li>the string &quot;false&quot; is converted into Boolean.FALSE</li> + <li>if the string contains a dot then the interpreter tries to convert + the value into a Float object. If this fails the string is treated as a + java.lang.String</li> + <li>if the string only consists of numbers then the interpreter + converts the value in an Integer object.</li> + <li>in all other cases the string is treated as a java.lang.String</li> + <li>the conversion of the string into a Boolean, Float, or Integer can + be suppressed by surrounding the string with single quotes. For + example, the attribute value=&quot;'true'&quot; is converted into the + string &quot;true&quot;</li> +</ul> + + + + + + + a flag indicating whether the plug-in contributing the property tester + should be loaded if necessary. As such, this flag should be used judiciously, + in order to avoid unnecessary plug-in activations. Most clients should avoid + setting this flag to true. This flag is only honored if the evaluation context + used to evaluate this expression allows plug-in activation. Otherwise the flag + is ignored and no plug-in loading takes place. + + + + + + + + + + + + + Tests a system property by calling the System.getProperty method and compares the result + with the value specified through the value attribute. + + + + + + + the name of an system property to test. + + + + + + + the expected value of the property. The value is interpreted as a string value. + + + + + + + + + + + + + This element is used to perform an equals check of the object in focus. The expression returns + EvaluationResult.TRUE if the object is equal to the value provided by the attribute value. Otherwise + EvaluationResult.FALSE is returned. + + + + + + + the expected value. The value provided as a string is converted into + a Java base type using the same rules as for the value attribute of the test expression. + + + + + + + + + + This element is used to test the number of elements in a collection. + + + + + + + an expression to specify the number of elements in a list. Following wildcard + characters can be used: + <dl> + <dt>*</dt> <dd>any number of elements</dd> + <dt>?</dt> <dd>no elements or one element</dd> + <dt>+</dt> <dd>one or more elements</dd> + <dt>!</dt> <dd>no elements</dd> + <dt>integer value</dt> <dd>the list must contain the exact number of elements</dd> + </dl> + + + + + + + + + + + + + This element changes the object to be inspected for all its child element to the object + referenced by the given variable. If the variable can not be resolved then the expression + will throw a ExpressionException when evaluating it. The children of a with expression + are combined using the and operator. + + + + + + + + + + + + + + + + + + + + + + the name of the variable to be used for further inspection. It is up to the evaluator + of an extension point to provide the variable in the variable pool. + + + + + + + + + + + + + This element changes the object to be inspected for all its child element to the object + referenced by the given variable. If the variable can not be resolved then the expression + will throw a ExpressionException when evaluating it. The children of a with expression + are combined using the and operator. + + + + + + + + + + + + + + + + + + + + + + the name of the variable to be resolved. This variable is then used as the object in focus + for child element evaluation. It is up to the evaluator of an extension point to provide a + corresponding variable resolver (see IVariableResolver) through the evaluation context passed + to the root expression element when evaluating the expression. + + + + + + + additional arguments passed to the variable resolver. Multiple arguments are seperated + by commas. Each individual argument is converted into a Java base type using the same + rules as defined for the value attribute of the test expression. + + + + + + + + + + + + + This element is used to adapt the object in focus to the type specified by the attribute + type. The expression returns not loaded if either the adapter or the type referenced isn't + loaded yet. It throws a ExpressionException during evaluation if the type name doesn't exist + at all. The children of an adapt expression are combined using the and operator. + + + + + + + + + + + + + + + + + + + + + + the type to which the object in focus is to be adapted. + + + + + + + + + + + + + This element is used to iterate over a variable that is of type java.util.Collection. If + the object in focus is not of type java.util.Collection then an ExpressionException will + be thrown while evaluating the expression. + + + + + + + + + + + + + + + + + + + + + + either "and" or "or". The operator defines how the child + elements will be combined. If not specified, "and" will be used. + + + + + + + + + + + + + + + the value return from the iterate expression if the collection is empty. If + not specified then true is returned when the operator equals "and" + and false is return if the operator equals "or". + + + + + + + + + + + + + This element is used to reference an expression from the <b>org.blueberry.core.expressions.definitions</b> extension point. The expression definition will be evaluated within the current expression element using the current evaluation context. + + + + + + + The unique id of an expression from <b>org.blueberry.core.expressions.definitions</b>. + + + + + + + + + + + + Release 3.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Copyright (c) 2001, 2004 IBM Corporation and others.<br> +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 <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a> + + + + diff --git a/Plugins/org.blueberry.core.expressions/schema/propertyTesters.exsd b/Plugins/org.blueberry.core.expressions/schema/propertyTesters.exsd new file mode 100644 index 0000000000..30f9b60ca4 --- /dev/null +++ b/Plugins/org.blueberry.core.expressions/schema/propertyTesters.exsd @@ -0,0 +1,146 @@ + + + + + + + + + This extension point allows to add properties to an already existing type. Those + properties can then be used inside the expression language's test expression + element. + + + + + + + + + + + + a fully qualified identifier of the target extension point + + + + + + + an optional identifier of the extension instance + + + + + + + an optional name of the extension instance + + + + + + + + + + + + + + + unique identifier for the property tester + + + + + + + the type to be extended by this property tester + + + + + + + + + + a unique id determining the name space the properties are added to + + + + + + + a comma separated list of properties provided by this property tester + + + + + + + the name of the class that implements the testing methods. The class must be public and extend +<samp>org.blueberry.core.expressions.PropertyTester</samp> with a public 0-argument constructor. + + + + + + + + + + + + + + + 3.0 + + + + + + + + + The following is an example of a property tester contribution: + +<p> +<pre> + <extension point="org.eclipse.core.expressions.propertyTesters"> + <propertyTester + id="org.eclipse.jdt.ui.IResourceTester" + type="org.eclipse.core.resources.IResource" + namespace="org.eclipse.jdt.ui" + properties="canDelete" + class="org.eclipse.jdt.ui.internal.ResourceTester"> + </propertyTester> + </extension> +</pre> +</p> + + + + + + + + + The contributed class must extend <code>berry::PropertyTester</code> + + + + + + + + + + Copyright (c) 2001, 2004 IBM Corporation and others.<br> +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 <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a> + + + + diff --git a/Plugins/org.blueberry.core.runtime/plugin.xml b/Plugins/org.blueberry.core.runtime/plugin.xml index 4e81473ab7..4516950d8c 100644 --- a/Plugins/org.blueberry.core.runtime/plugin.xml +++ b/Plugins/org.blueberry.core.runtime/plugin.xml @@ -1,11 +1,13 @@ + + diff --git a/Plugins/org.blueberry.core.runtime/schema/applications.exsd b/Plugins/org.blueberry.core.runtime/schema/applications.exsd new file mode 100644 index 0000000000..48350bda0e --- /dev/null +++ b/Plugins/org.blueberry.core.runtime/schema/applications.exsd @@ -0,0 +1,113 @@ + + + + + + + + + The applications extension point allows plugins to contribute applications to the BlueBerry Platform. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Following is an example of an application declaration. +<p> + <pre> + <extension id="sampleApplication" point="org.blueberry.osgi.applications"> + <application id="my.domain.application"> + <run class="xyz::SampleApp"/> + </application> + </extension> + </pre> +</p> + + + + + + + + + Application classes must subclass <code>berry::IApplication</code>. + + + + + + diff --git a/Plugins/org.blueberry.core.runtime/schema/products.exsd b/Plugins/org.blueberry.core.runtime/schema/products.exsd new file mode 100644 index 0000000000..39956abccc --- /dev/null +++ b/Plugins/org.blueberry.core.runtime/schema/products.exsd @@ -0,0 +1,213 @@ + + + + + + + + + Products are the BlueBerry unit of branding. Product extensions are supplied by plug-ins wishing to define one or more products. There must be one product per extension as the extension id is used in processing and identifying the product. +<p> +There are two possible forms of product extension, static and dynamic. Static product extensions directly contain all relevant information about the product. Dynamic product extensions identify a class (an <code>IProductProvider</code>) which is capable of defining one or more products when queried. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + the default application to run when running this product + + + + + + + the human-readable name of this product + + + + + + + + + + the human-readable description of this product + + + + + + + + + + + + + + + + + + + + the key under which this property is stored + + + + + + + the value of this property + + + + + + + + + + details of a product provider + + + + + + + + + + + + + + + the fully-qualified name of a class which implements +<samp>berry::IProductProvider</samp>. + + + + + + + + + + + + next_release + + + + + + + + + Following is an example of static product declaration: +<p> +<pre> + <extension id="coolProduct" point="org.blueberry.core.runtime.products"> + <product name="%coolName" application="coolApplication" description="%coolDescription"> + <property name="windowImages" value="window.gif"/> + <property name="aboutImage" value="image.gif"/> + <property name="aboutText" value="%aboutText"/> + <property name="appName" value="CoolApp"/> + <property name="welcomePage" value="$nl$/welcome.xml"/> + <property name="preferenceCustomization" value="plugin_customization.ini"/> + </product> + </extension> +</pre> +</p> + +The following is an example of a dynamic product (product provider) declaration: +Following is an example of an application declaration: +<p> +<pre> + <extension id="coolProvider" point="org.blueberry.core.runtime.products"> + <provider> + <run class="me::CoolProvider"/> + </provider> + </extension> +</pre> +</p> + + + + + + + + + Static product extensions provided here are represented at runtime by instances of <code>IProduct</code>. Dynamic product extensions must identify an implementor of <code>IProductProvider</code>. See <code>IProductConstants</code> +for details of the branding related product properties defined by the Eclipse UI. + + + + + + + + + No implementations of <code>IProductProvider</code> are supplied. + + + + + + + + + Copyright (c) 2004, 2005 IBM Corporation and others.<br> +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 +<a +href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a> + + + + diff --git a/Plugins/org.blueberry.ui.qt/plugin.xml b/Plugins/org.blueberry.ui.qt/plugin.xml index 4da5fa1273..561a9ec8a7 100644 --- a/Plugins/org.blueberry.ui.qt/plugin.xml +++ b/Plugins/org.blueberry.ui.qt/plugin.xml @@ -1,451 +1,465 @@ + + + + + + + + + + + + + + diff --git a/Plugins/org.blueberry.ui.qt/schema/commands.exsd b/Plugins/org.blueberry.ui.qt/schema/commands.exsd new file mode 100644 index 0000000000..84ddaf81da --- /dev/null +++ b/Plugins/org.blueberry.ui.qt/schema/commands.exsd @@ -0,0 +1,466 @@ + + + + + + + + + <p> +The <code>org.blueberry.ui.commands</code> extension point is used to declare commands and command categories, using the <code>command</code> and <code>category</code> elements. A command is an abstract representation of some semantic behaviour, but not it's actual implementation. This allows different developers to contribute specific behaviour for their individual parts. For example, there might be a "paste" command with one implementation in an editor and a different implementation in an explorer widget. These implementations are called handlers. Commands can also be viewed as declarative function pointers, or signal handlers. +</p> + + + + + + + + + + + + + + + + + + + An optional identifier of the extension instance. + + + + + + + An optional name of the extension instance. + + + + + + + + + + A fully qualified identifier of the target extension point. + + + + + + + + + + <p> +This element is used to define commands. A command represents an request from the user that can be handled by an action, and should be semantically unique among other commands. Do not define a command if there is already one defined with the same meaning. 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 plugin registry) is considered valid. See the extension points <a href="org_blueberry_ui_actionSets.html">org.blueberry.ui.actionSets</a> and <a href="org_blueberry_ui_editorActions.html">org.blueberry.ui.editorActions</a> to understand how actions are connected to commands. +</p> + + + + + + + + + + + + A translatable short description of this command for display in the UI. + + + + + + + + + + The unique identifier of this command. + + + + + + + The translatable name of this command for display in the UI. Commands are typically named in the form of an imperative verb. + + + + + + + + + + The unique id of the category for this command. If this command does not specify a category it will be placed in an global "Uncategorized" category. + + + + + + + The default handler for this command (see the <a href="org_blueberry_ui_handlers.html">org.blueberry.ui.handlers</a> extension point). If no other handler is active, this handler will be active. This handler will conflict with other handler definitions that specify no <code>activeWhen</code> conditions. If you are creating an <code>IExecutableExtension</code>, you can use the <code>defaultHandler</code> element instead. + + + + + + + + + + The id of a <code>commandParameterType</code> indicating the type of value returned by this command. Specifying a <code>returnTypeId</code> allows clients executing the command to associate the value returned with a type and to convert the value to a QString form that may be stored and/or passed to another command that accepts parameters of the same type. + + + + + + + The identifier of the help context that relates to this command in general. Handlers can override this context identifier to provide help that is more specific to their particular behaviours. +<p><em>Not used yet</em></p> + + + + + + + + + + <p> +In the UI, commands are often organized by category to make them more manageable. This element is used to define these categories. Commands can add themselves to at most one category. 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 plugin registry) is considered valid. +</p> + + + + + + + A translatable short description of this category for display in the UI. + + + + + + + + + + The unique identifier of this category. + + + + + + + The translatable name of this category for display in the UI. + + + + + + + + + + + + + + + + <p> +Defines a parameter that a command should understand. A parameter is a way to provide more information to a handler at execution time. For example, a "show view" command might take a view as a parameter. Handlers should be able to understand these parameters, so they should be treated like API. +</p> + + + + + + + + + + The unique identifier for this parameter. + + + + + + + The name for the parameter. This is the name as it will be displayed to an end-user. As such, it should be translatable. The name should be short -- preferrably one word. + + + + + + + + + + The class providing a list of parameter values for the user to select. This class should implement <code>org.blueberry.core.commands.IParameterValues</code>. If this class is not specified, you must specify the more verbose <code>values</code> element. Please see <code>org.blueberry.osgi.IExecutableExtension</code>. + + + + + + + + + + The id of a commandParameterType for this commandParameter. Specifying a typeId allows handlers of a command to convert string parameter values to objects in a consistent way and it allows potential callers of a command to look for commands that take objects of various types for their parameters. + + + + + + + Whether this parameter is optional. If a parameter is optional, the handler should be able to handle the absence of the parameter. By default, all parameters are optional. + + + + + + + + + + <p> +Defines the object type of a commandParameter and may specify an <code>org.blueberry.core.commands.AbstractParameterValueConverter</code> subclass to convert between string parameter values and objects. +</p> + + + + + + + The unique identifier for this commandParameterType. + + + + + + + The fully qualified name of a class to use as the type of this command parameter. This attribute is optional, however if omitted, <code>org.blueberry.osgi.Object</code> will be used as the parameter type. + + + + + + + + + + The class for converting between objects and string representations of objects for command parameter values. This class should extend <code>org.blueberry.core.commands.AbstractParameterValueConverter</code>. The converter should produce and consume objects of the type indicated in the <code>type</code> attribute. If this class is not specified, this facility to convert between string and object values for this parameter type will not be available (the <code>GetValueConverter()</code> on class <code>ParameterType</code> will return <code>null</code>). + + + + + + + + + + + + + + + + <p> +The more verbose version of the <code>values</code> attribute on the <code>commandParameter</code>. +</p> + + + + + + + + + + The class providing a list of parameter values for the user to select. This class should implement <code>org.blueberry.core.commands.IParameterValues</code>. If this class is not specified, you must specify the more verbose <code>values</code> element. Please see <code>org.blueberry.osgi.IExecutableExtension</code>. + + + + + + + + + + + + + + + + <p> +A possible value for a parameter. +</p> + + + + + + + The name of the parameter to pass to the <code>IExecutableExtension</code>. + + + + + + + The value of the parameter to pass to the <code>IExecutableExtension</code>. + + + + + + + + + + + + + <p> +The default handler for this command. If no other handler is active, this handler will be active. This handler will conflict with other handler definitions that specify no <code>activeWhen</code> conditions. If you are not creating an <code>IExecutableExtension</code>, you can use the <code>defaultHandler</code> attribute instead. +</p> + + + + + + + + + + The class which implements <code>org.blueberry.core.commands.IHandler</code>. + + + + + + + + + + + + + + + + <p> +State information shared between all handlers, and potentially persisted between sessions.The state is simply a class that is loaded to look after the state. See the API Information for more details. This is not used for UI attributes like a menu contribution check box state or label. +</p> + + + + + + + + + + The class that can be loaded to store the state of this command. State is shared amongst handlers, and can be persisted between sessions. This class must implement <code>org.blueberry.core.commands.State</code>. Please see API Information. + + + + + + + + + + A unique identifier for this state. This is used for persisting the state between sessions (if the state is an instance of <code>org.blueberry.core.commands.PersistentState</code>). Certain common identifiers (see <code>org.blueberry.ui.menus.IMenuStateIds</code>) are understood when the command is being rendered in the menus or tool bars. The identifier only needs to be unique within the command defining the state. + + + + + + + + + + + + + <p> +The class that can be loaded to store the state of this command. This element is used if you wish to pass multiple parameters to an <code>org.blueberry.osgi.IExecutableExtension</code>. +</p> + + + + + + + + + + The class that can be loaded to store the state of this command. State is shared amongst handlers, and can be persisted between sessions. This class must implement <code>org.blueberry.core.commands.State</code>. Please see API Information. + + + + + + + + + + + + + + + <p> +1.0 +</p> + + + + + + + + + <p> +The <code>plugin.xml</code> file in the <code>org.blueberry.ui</code> plugin makes extensive use of the <code>org.blueberry.ui.commands</code> extension point. +</p> + + + + + + + + + <p> +Handlers can be registered with commands using the <code>org.blueberry.ui.handlers.IHandlerService</code>. This can be retrieved from various workbench components (e.g., workbench, workbench window, part site, etc.) by calling <code>GetService(IHandlerService::ID)</code>. +</p> +<p> +In general, it is preferrably to declare all commands statically (in <code>plugin.xml</code>). This is so that users can attach key bindings to the commands. However, it is possible to declare commands at run-time. To do this, retrieve the <code>org.blueberry.ui.commands.ICommandService</code> from a workbench component, call <code>GetCommand(yourCommandID)</code> and then call <code>Command::Define(...)</code>. +Commands defined programmatically must be cleaned up by the plugin if it is unloaded. +</p> +<p> +There are a few default implementations of handler states that may be useful to users of this extension point: +</p> +<ul> +<!-- +<li>org.eclipse.jface.commands.TextState</li> +<li>org.eclipse.jface.commands.RadioState</li> +<li>org.eclipse.jface.commands.ToggleState</li> +<li>org.eclipse.ui.handlers.RegistryRadioState</li> +<li>org.eclipse.ui.handlers.RegistryToggleState</li> +--> +</ul> + + + + + + diff --git a/Plugins/org.blueberry.ui.qt/schema/editors.exsd b/Plugins/org.blueberry.ui.qt/schema/editors.exsd new file mode 100644 index 0000000000..93f1db4a0f --- /dev/null +++ b/Plugins/org.blueberry.ui.qt/schema/editors.exsd @@ -0,0 +1,328 @@ + + + + + + + + + This extension point is used to add new editors to the +workbench. A editor is a visual component within a +workbench page. It is typically used to edit or browse +a document or input object. To open an editor, the user +will typically invoke "Open" on an <samp>IFile</samp>. +When this action is performed the workbench registry +is consulted to determine an appropriate editor for +the file type and then a new instance of the editor +type is created. The actual result depends on the +type of the editor. The workbench provides support +for the creation of internal editors, which are tightly +integrated into the workbench, and external editors, +which are launched in a separate frame window. +There are also various level of integration between +these extremes. +<p> +In the case of an internal editor tight integration can +be achieved between the workbench window and the editor +part. The workbench menu and toolbar are pre-loaded +with a number of common actions, such as cut, copy, and +paste. The active part, view or editor, is expected to +provide the implementation for these actions. An internal +editor may also define new actions which appear in the +workbench window. These actions only appear when the +editor is active. +<p> +The integration between the workbench and external +editors is more tenuous. In this case the workbench +may launch an editor but after has no way of determining +the state of the external editor or collaborating +with it by any means except through the file system. + + + + + + + + + + + + a fully qualified identifier of the target extension point + + + + + + + an optional identifier of the extension instance + + + + + + + an optional name of the extension instance + + + + + + + + + + + + + + + + + + + + + + + a unique name that will be used to identify this editor + + + + + + + a translatable name that will be used in the UI for this editor + + + + + + + + + + A relative name of the icon that will be used for all resources that match the specified extensions. Editors should provide an icon to make it easy for users to distinguish between different editor types. If you specify a command rather than a class, an icon is not needed. In that case, the workbench +will use the icon provided by the operating system. + + + + + + + + + + an optional field containing the list of file types understood by the editor. This is a string containing comma separate file extensions. For instance, an editor which understands hypertext documents may register for "htm, html". + + + + + + + the name of a class that implements <samp>berry::IEditorPart</samp>. The attributes <samp>class</samp>, <samp>command</samp>, and <samp>launcher</samp> are mutually exclusive. If this attribute is defined then <samp>contributorClass</samp> should also be defined. + + + + + + + + + + a command to run in order to launch an external editor. The executable command must be located on the system path or in the plug-in's directory. The attributes <samp>class</samp>, <samp>command</samp>, and <samp>launcher</samp> are mutually exclusive. + + + + + + + the name of a class which that implements <samp>berry::IEditorLauncher</samp>. +A launcher will open an external editor. The attributes <samp>class</samp>, <samp>command</samp>, and <samp>launcher</samp> are mutually exclusive. + + + + + + + + + + the name of a class that implements <samp>berry::IEditorActionBarContributor</samp>. This attribute should only be defined if the <samp>class</samp> attribute is defined. This class is used to add new actions to the workbench menu and tool bar which reflect the features of the editor type. + + + + + + + + + + if true, this editor will be used as the default editor for the +type. This is only relevant in a case where more than one editor +is registered for the same type. If an editor is not the default +for the type, it can still be launched using "Open with..." +submenu for the selected resource. +<p> +Please note that this attribute is only honored for filename and extension associations at this time. It will not be honored for content type bindings. Content type-based resolution will occur on a first come, first serve basis and is not explicitly specified.</p> + + + + + + + an optional field containing the list of file names +understood by the editor. This is a string +containing comma separate file names. For instance, +an editor which understands specific hypertext +documents may register for "ejb.htm, ejb.html". + + + + + + + the name of a class that implements <samp>berry::IEditorMatchingStrategy</samp>. This attribute should only be defined if the <samp>class</samp> attribute is defined. This allows the editor extension to provide its own algorithm for matching the input of one of its editors to a given editor input. + + + + + + + + + + + + + + + + Advertises that the containing editor understands the given content type and is suitable for editing files of that type. + + + + + + + The content type identifier. This is an ID defined by the 'org.blueberry.core.runtime.contentTypes' extension point. + + + + + + + + + + + + + The following is an example +of an internal editor extension definition: +<p> +<pre> + <extension point="org.blueberry.ui.editors"> + <editor + id="com.xyz.XMLEditor" + name="Fancy XYZ XML editor" + icon="./icons/XMLEditor.gif" + extensions="xml" + class="xyz::XMLEditor" + contributorClass="xyz::XMLEditorContributor" + default="false"> + </editor> + </extension> +</pre> +</p> + + + + + + + + + If the command attribute is used, it will be treated +as an external program command line that will be executed + in a platform-dependent manner. +<p> +If the launcher attribute is used the editor will also +be treated as an external program. In this case the +specified class must implement +<samp>org.eclipse.ui.IEditorLauncher</samp>. +The launcher will be instantiated and then +<samp>open(IPath path)</samp> will be invoked to +launch the editor on the provided local file system path. +<p> +If the class attribute is used, the workbench will +assume that it is an internal editor and the specified +class must implement <samp>org.eclipse.ui.IEditorPart</samp>. +It is common practice to +<samp>subclass org.eclipse.ui.EditorPart</samp> when +defining a new editor type. It is also necessary to +define a <samp>contributorClass</samp> attribute. +The specified class must implement +<samp>org.eclipse.ui.IEditorActionBarContributor</samp>, +and is used to add new actions to the workbench +menu and tool bar which reflect the features of the +editor type. +<p> +Within the workbench there may be more than one open +editor of a particular type. For instance, there may +be one or more open Java Editors. To avoid the creation +of duplicate actions and action images the editor +concept has been split into two. An +<samp>IEditorActionBarContributor</samp> is responsible +for the creation of actions. The editor is responsible +for action implementation. Furthermore, the contributor +is shared by each open editor. As a result of this +design there is only one set of actions for one or +more open editors. +<p> +The contributor will add new actions to the workbench +menu and toolbar which reflect the editor type. These +actions are shared and, when invoked, act upon the +active editor. The active editor is passed to the +contributor by invoking +<samp>IEditorActionBarContributor.setActiveEditor</samp>. +The identifiers for actions and major groups within +the workbench window are defined in +<samp>org.eclipse.ui.IWorkbenchActionConstants</samp>. +These should be used as a reference point for the +addition of new actions. Top level menus are created +by using the following values for the path attribute: +<ul> +<li> +additions - represents a group to the left of the Window menu. +</li> +</ul> +Actions and menus added into these paths will only be +shown while the associated editor is active. When the +editor is closed, menus and actions will be removed. + + + + + + + + + The workbench provides a "Default Text Editor". The end user product may contain other editors as part of the shipping bundle. In that case, editors will be registered as extensions using the syntax described above. + + + + + + + + + Copyright (c) 2002, 2007 IBM Corporation and others.<br> +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 <a +href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a> + + + + diff --git a/Plugins/org.blueberry.ui.qt/schema/elementFactories.exsd b/Plugins/org.blueberry.ui.qt/schema/elementFactories.exsd new file mode 100644 index 0000000000..ac2acf1c37 --- /dev/null +++ b/Plugins/org.blueberry.ui.qt/schema/elementFactories.exsd @@ -0,0 +1,167 @@ + + + + + + + + + This extension point is used to add element factories +to the workbench. An element factory is used to +recreate <samp>IAdaptable</samp> objects which are +persisted during workbench shutdown. +<p> +As an example, the element factory is used to +persist editor input. The input for an +editor must implement +<samp>berry::EditorInput</samp>. +The life cycle of an <samp>berry::IEditorInput</samp> within +an editor has a number of phases. +<ol> +<li> +The initial input for an editor is passed in during +editor creation. +</li> +<li> +On shutdown the workbench state is captured. +In this process the workbench will create a memento +for each open editor and its input. The input is +saved as a two part memento containing a factory ID +and any primitive data required to recreate the +element on startup. For more information see +the documentation on +<samp>berry::IPersistableElement</samp>. +</li> +<li> +On startup the workbench state is read and the +editors from the previous session are recreated. +In this process the workbench will recreate the input +element for each open editor. To do this it will +map the original factory ID for the input element +to a concrete factory class defined in the registry. +If a mapping exists, and the factory class is valid, +an instance of the factory class is created. Then +the workbench asks the factory to recreate the original +element from the remaining primitive data within the +memento. The resulting <samp>berry::IAdaptable</samp> is cast +to an <samp>berry::IEditorInput</samp> and passed to the +new editor. +</li> +</ol> + + + + + + + + + + + + a fully qualified identifier of the target extension point + + + + + + + an optional identifier of the extension instance + + + + + + + an optional name of the extension instance + + + + + + + + + + + + + + + a unique name that will be used to identify this factory. + + + + + + + a fully qualified name of a class that implements +<samp>berry::IElementFactory</samp> + + + + + + + + + + + + + + + The following is an example of an element factory extension: +<p> +<pre> + <extension + point = "org.blueberry.ui.elementFactories"> + <factory + id ="com.xyz.ElementFactory" + class="xyz::ElementFactory"> + </factory> + </extension> +</pre> +</p> + + + + + + + + + The value of the <samp>class</samp> attribute must +be a fully qualified name of a class that implements +<samp>berry::IElementFactory</samp>. An instance +of this class must create an <samp>berry::IAdaptable</samp> +object from a workbench memento. + + + + + + + + + The workbench provides an <samp>IResource</samp> factory. +Additional factories should be added to recreate other +<samp>berry::IAdaptable</samp> types commonly found in other +object models. + + + + + + + + + Copyright (c) 2002, 2005 IBM Corporation and others.<br> +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 <a +href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a> + + + + diff --git a/Plugins/org.blueberry.ui.qt/schema/handlers.exsd b/Plugins/org.blueberry.ui.qt/schema/handlers.exsd new file mode 100644 index 0000000000..1ce19c0c10 --- /dev/null +++ b/Plugins/org.blueberry.ui.qt/schema/handlers.exsd @@ -0,0 +1,309 @@ + + + + + + + + + <p> +The handlers extension point is an elaboration of the experimental <code>handlerSubmission</code> element defined in Eclipse 3.0. A handler is the behaviour of a command at a particular point in time. A command can have zero or more handlers associated with it. At any one point in time, however, a command will either have no active handler or one active handler. The active handler is the one which is currently responsible for carrying out the behaviour of the command. This is very similar to the concept of an action handler and a retargettable action. +</p> +<p> +The handlers extension point allows a plug-in developer to specify a handler that should become active and/or enabled under certain conditions. If a handler is inactive, then no command will delegate its behaviour to the handler. If a handler is disabled, then the handler will not be asked to execute; execution of the handler is blocked. The conditions are defined using the expression language facility added during 3.0. They are expressed using <code>activeWhen</code> and <code>enabledWhen</code> clauses. +</p> +<p> +The workbench provides some variables that these expressions can rely on. Variables that are valid in activeWhen and enabledWhen expressions can be found in <code>org.eclipse.ui.ISources</code>. The types of the variables are determined by the <code>org.eclipse.ui.ISourceProvider</code> that provides them. +</p> +<p> +A handler that specifies no conditions is a default handler. A default handler is only active if no other handler has all of its conditions satisfied. If two handlers still have conditions that are satisfied, then the conditions are compared. The idea is to select a handler whose condition is more specific or more local. To do this, the variables referred to by the condition are looked at. The condition that refers to the most specific variable "wins". The order of specificity (from least specific to most specific) is suggested in <code>org.eclipse.ui.ISources</code>. +</p> +<p> +If this still doesn't resolve the conflict, then no handler is active. If a particular tracing option is turned on, then this leads to a message in the log. A conflict can also occur if there are two default handlers. It is the responsibility of the plug-in developers and integration testers to ensure that this does not happen. +</p> +<p> +These conditions are used to avoid unnecessary plug-in loading. These handler definitions are wrapped in a proxy. For a proxy to load its underlying handler, two things must happen: the conditions for the proxy must be met so that it becomes active, and the command must be asked to do something which it must delegate (e.g., execute(), isEnabled()). +</p> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <p>Associated a command with a handler implementation.</p> + + + + + + + + + + + + <p>The id of the command to associate with this handler implementation.</p> + + + + + + + <p>The handler class that imlements <code>org.eclipse.core.commands.IHandler</code> or extends <code>org.eclipse.core.commands.AbstractHandler</code>.</p> + + + + + + + + + + <p> +The identifier of the help context that relates to this specific handler. While a command can provide a general description of a command's behaviour, it is sometimes appropriate for a handler to provide help more specific to their implementation. +</p> +<p><em>Since: 3.2</em></p> + + + + + + + + + + <p>Contains a core expression used by the <code>IHandlerService</code> to determine when this handler is active.</p> + + + + + + + + + + + + + + + + + + + + + + + + + <p>Contains a core expression used by the workbench handler proxy to determine when this handler is enabled without loading it.</p> + + + + + + + + + + + + + + + + + + + + + + + + + <p>Used when creating an <code>IExecutableExtension</code> with a named parameter, or more than one.</p> + + + + + + + + + + <p>The handler class that imlements <code>org.eclipse.core.commands.IHandler</code> or extends <code>org.eclipse.core.commands.AbstractHandler</code>.</p> + + + + + + + + + + + + + <p>A parameter for an <code>IExecutableExtension</code>.</p> + + + + + + + <p>The parameter name.</p> + + + + + + + <p>The parameter value.</p> + + + + + + + + + + + + 3.1 + + + + + + + + + <p> +Variables that are valid in activeWhen and enabledWhen expressions can be found in <code>org.eclipse.ui.ISources</code>. The types of the variables are determined by the <code>org.eclipse.ui.ISourceProvider</code> that provides them. +</p> +<pre> +<extension + point="org.eclipse.ui.handlers"> + <handler + commandId="commandId" + class="org.eclipse.compare.Command"> + <activeWhen> + <with variable="selection"> + <count value="1" /> + <iterate operator="and"> + <adapt type="org.eclipse.core.resources.IResource" /> + </iterate> + </with> + </activeWhen> + </handler> + <handler + commandId="other.commandId" + class="org.eclipse.ui.TalkToMe"> + <activeWhen> + <with variable="activePartId"> + <equals value="org.eclipse.ui.views.SampleView"/> + </with> + </activeWhen> + </handler> +</extension> +</pre> +<p> +To further avoid plug-in loading, it is possible to specify when the handler is enabled. If the proxy has not yet loaded the handler, then only the expressions syntax is used to decide if the handler is enabled. If the proxy has loaded the handler, then the expressions syntax is consulted first. If the expressions syntax evaluates to true, then the handler is asked if it is enabled. (This is a short-circuit Boolean "and" operation between the expressions syntax and the handler's enabled state.) +</p> +<pre> +<extension + point="org.eclipse.ui.handlers"> + <handler + commandId="commandId" + class="org.eclipse.Handler"> + <enabledWhen> + <with variable="activeContexts"> + <iterator operator="or"> + <equals value="org.eclipse.ui.contexts.window"/> + </iterator> + </with> + </enabledWhen> + </handler> +</extension> +</pre> + + + + + + + + + <p> +All handlers implement <code>org.eclipse.core.commands.IHandler</code>, and can use <code>org.eclipse.core.commands.AbstractHandler</code> as a base class. Within the workbench, it is possible to activate and deactivate handlers using the <code>org.eclipse.ui.handlers.IHandlerService</code> interface. This interface can be retrieved from supporting workbench objects, such as <code>IWorkbench</code> itself, a workbench window, or a part site. To retrieve the service, you would make a call like <code>IWorkbench.getService(IHandlerService.class)</code>. +</p> +<p> +It is also possible to activate and deactive handlers using legacy code in the workbench. This can be done through the legacy mechanism shown below. This mechanism is useful to clients who are using actions to contribute to menus or toolbars. This is deprecated and not recommended. +</p> +<pre> + IWorkbenchPartSite mySite; + IAction myAction; + + myAction.setActionDefinitionId(commandId); + IKeyBindingService service = mySite.getKeyBindingService(); + service.registerAction(myAction); +</pre> + + + + + + + + + + + + + + + + + + Copyright (c) 2005, 2007 IBM Corporation and others.<br> +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 <a +href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a> + + + + diff --git a/Plugins/org.blueberry.ui.qt/schema/intro.exsd b/Plugins/org.blueberry.ui.qt/schema/intro.exsd new file mode 100644 index 0000000000..b1badeb3bd --- /dev/null +++ b/Plugins/org.blueberry.ui.qt/schema/intro.exsd @@ -0,0 +1,208 @@ + + + + + + + + + <p>This extension point is used to register implementations of special workbench parts, called intro parts, that are responsible for introducing a product to new users. An intro part is typically shown the first time a product is started up. Rules for associating an intro part implementation with particular products are also contributed via this extension point. +</p> +The life cycle is as follows: +<ul> +<li>The intro area is created on workbench start up. As with editor and view areas, this area is managed by an intro site (implementing <code>IIntroSite</code>).</li> +<li>The id of the current product (Platform::GetProduct()) is used to choose the relevant intro part implementation. +</li> +<li>The intro part class (implementing <code>IIntroPart</code>) is created and initialized with the intro site. +</li> +<li>While the intro part is showing to the user, it can transition back and forth between full and standby mode (either programmatically or explicitly by the user). +</li> +<li>Eventually the intro part is closed (either programmatically or explicitly by the user). The current perspective takes over the entire workbench window area. +</li> +</ul> + + + + + + + + + + + + + + + + + + a fully qualified identifier of the target extension point + + + + + + + an optional identifier of the extension instance + + + + + + + an optional name of the extension instance + + + + + + + + + + + + + + + + Specifies an introduction. An introduction is a product-specific presentation shown to first-time users on product start up. + + + + + + + a unique identifier for this introduction + + + + + + + a plug-in-relative file name of the icon that will be associated with this introduction + + + + + + + + + + a fully qualified name of the class implementing the <code>berry::IIntroPart</code> interface. A common practice +is to subclass <samp>berry::IntroPart</samp> +in order to inherit the default functionality. This class implements the introduction. + + + + + + + + + + a fully qualified name of a class extending <code>berry::IntroContentDetector</code>. This optional class is used to detect newly added introduction content. If new content is available, the view showing the introduction will be opened again. + + + + + + + + + + an string label for this introduction that will be used in the construction of the open action as well as the part label. + + + + + + + + + + Specifies a binding between a product and an introduction. These bindings determine which introduction is appropriate for the current product (as defined by <code>Platform::GetProduct()</code>). + + + + + + + unique id of a product + + + + + + + unique id of an introduction + + + + + + + + + + + + 3.0 + + + + + + + + + The following is an example of an intro part extension that contributes an particular introduction and associates it with a particular product: +<p> +<pre> + <extension point="org.eclipse.ui.intro"> + <intro + id="com.example.xyz.intro.custom" + class="com.example.xyz.intro.IntroPart"/> + <introProductBinding + productId="com.example.xyz.Product" + introId="com.example.xyz.intro.custom"/> + </extension> +</pre> +</p> + + + + + + + + + The value of the <code>class</code> attribute must be the fully qualified name of a class that implements the<code>org.eclipse.ui.intro.IIntroPart</code> interface by subclassing <code>org.eclipse.ui.part.intro.IntroPart</code>. + + + + + + + + + There are no default implementations of the initial user experience. Each Eclipse-based product is responsible for providing one that is closely matched to its branding and function. + + + + + + + + + Copyright (c) 2004, 2007 IBM Corporation and others.<br> +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 <a +href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a> + + + + diff --git a/Plugins/org.blueberry.ui.qt/schema/keywords.exsd b/Plugins/org.blueberry.ui.qt/schema/keywords.exsd new file mode 100644 index 0000000000..ac8a532caf --- /dev/null +++ b/Plugins/org.blueberry.ui.qt/schema/keywords.exsd @@ -0,0 +1,127 @@ + + + + + + + + + The keywords extension point defines keywords and a unique id for reference by other schemas. + +See propertyPages and preferencePages. + + + + + + + + + + + + + + + + a fully qualified identifier of the target extension point + + + + + + + an optional identifier of the extension instance + + + + + + + an optional name of the extension instance + + + + + + + + + + + + + + + + + + + The id is the unique id used to reference the keyword. + + + + + + + The human readable label of the keyword + + + + + + + + + + + + + + + The following is an example of a keyword extension: +<p> +<pre> + <extension + point="org.blueberry.ui.keywords"> + <keyword + label="presentation tab themes" + id="com.xyz.AppearanceKeywords"/> + </extension> +</pre> +</p> + + + + + + + + + There currently is no public API for retrieving or creating keywords other than this extension point. + + + + + + + + + Keywords are used only with preference and property pages. See the <samp>keywordReference</samp> element of the org.blueberry.ui.propertyPages and org.blueberry.ui.preferencePages extension points. + + + + + + + + + Copyright (c) 2005,2006 IBM Corporation and others.<br> +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 <a +href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a> + + + + diff --git a/Plugins/org.blueberry.ui.qt/schema/menus.exsd b/Plugins/org.blueberry.ui.qt/schema/menus.exsd new file mode 100644 index 0000000000..ecae8da9b0 --- /dev/null +++ b/Plugins/org.blueberry.ui.qt/schema/menus.exsd @@ -0,0 +1,646 @@ + + + + + + + + +<p> +This extension point allows the plug-in developer to add (contribute) a variety of custom additions to the BlueBerry framework: +<ul> + <li>Main Menu</li> + <li>Main Toolbars</li> + <li>View Menus/Toolbars: + <ul> + <li>View Dropdown Menu</li> + <li>View Toolbar</li> + <li>Context Menu(s)</li> + </ul> + </li> + <li>Trim</li> +</ul> +</p> +<p> +The general strategy for this mechanism is to separate the 'location' where the contributions should be inserted from the visibility and enablement state of the element. Each contribution first defines its insertion location through a Menu 'URI', a string (loosely) formatted according to the jave.net.URI format: +</p><p> +<b>"[Scheme]:[ID]?[ArgList]"</b> +<ul> +<li><b>Scheme</b> - The 'type' of the UI component into which the contributions will be added. It may be either "menu", "popup" or "toolbar". While 'popup' is indeed a form of menu it is provided to allow a distinction between a view's 'chevron' menu (for which we use the "menu" scheme) and its default context menu which, by convention, should be registered using the "popup" scheme.</li> +<li><b>ID</b> - This is the id of menu or toolbar into which the contributions should be added. By convention views should use their view id as the id of the root of their chevron and default popup menu. Note that there is no explicit distinction between contributions supporting editors and 'normal' contributions into the Menu Menu or Toolbar; both global contributions and editor contributions would use the "org.blueberry.ui.main.menu" id or "org.blueberry.ui.main.toolbar". A special id used with popup:, "org.blueberry.ui.popup.any", is reserved to handle contributions which are candidates to appear on any (top level) context menu. Note that these contributions are expected to implement a 'visibleWhen' expression sufficient to limit their visibility to appropriate menus</li> +<li><b>Query</b> - This field allows fine-grained definition of the specific location <i>within</i> a given menu. It has the form "[placement]=[id]" where placement is one of "before", "after", or "endof" and the id is expected to be the id of some IContributionItem in the menu.</li> +</ul> +<p> +This will define the location at which the contributions will appear in the BlueBerry UI. Once the insertion point has been defined the rest of the contributions describe the UI elements that will be added at that location. Each element supports a 'visibleWhen' expression that determines at run time whether a particular item should appear in the menu based on the system's current state (selection, active view/editor, context...). See <code>berry::ISources</code> for a list of currently +supported variables. +</p> + + + + + + + + + + + + + + + + + + + + + org.blueberry.ui.menus + + + + + + + An optional identifier of the extension instance. + + + + + + + An optional name of the extension instance. + + + + + + + + + + + + + A class element supporting the executable extension parsing syntax for both <code>widget</code> and <code>dynamic</code> elements. + + + + + + + + + + The class to load as an <code>IExecutableExtension</code>. + + + + + + + + + + + + + A core Expression that controls the visibility of the given element. + + + + + + + + + + + + + + + + + + + + + + If this attribute is set to <code>true</code>, then there should be no sub-elements. This just checks the enabled state of the command, and makes the corresponding element visible if the command is enabled. + + + + + + + + + + A parameter to either an executable extension or a command -- depending on where it appears in the extension. + + + + + + + The name is either the name of the parameter to pass to the executable extension, or the identifier of the parameter for the command. + + + + + + + + + + The value to pass for this parameter. + + + + + + + + + + <p>Defines an ordered set of additions to the command UI structure. The defined elements will be added into the command UI structure at the location specified by the <code>locationURI</code> element. +</p><p> +This should be the starting point for <i>all</i> contributions into menus, toolbars or trim, wherever they occur in the UI. +</p> + + + + + + + + + + + + + + + A <code>URI</code> specification that defines the insertion point at which the contained additions will be added. + +The format for the URI is comprised of three basic parts: + +Scheme: One of "menu", "popup" or "toolbar. Indicates the type of the manager used to handle the contributions +Id: This is either the id of an existing menu, a view id or the id of the editor 'type' +Query: The query format is &lt;placement&gt;=&lt;id&gt; where: + &lt;placement&gt; is either "before", "after", or "endof" and + &lt;id&gt; is the id of an existing menu item. The placement modifier is executed when this contribution is processed. Following contributions may change the final shape of the menu when they are processed. + + + + + + + If this optional attribute is specified the provided class will be instantiated and used to provide menu contributions at this location. If provided, all child elements will be ignored. + + + + + + + + + + By default popup contributions are not contributed to context menus that do not include an <b>additions</b> marker. + + + + + + + + + + Defines a new menu contribution at the given insertion point. + + + + + + + + + + + + + + + + The label to be displayed for this element when it is placed in either a menu or a toolbar. This value should be translatable. + + + + + + + + + + The 'id' of this menu contribution. If defined then it can be extended through other 'menuAddition' elements or the id can be used as a reference in the Query part of the location defining whether the additions are to go before or after this element. + + + + + + + The character of the Label that should be given the mnemonic affordance. This is to allow the menu system to re-define the value during translation without having to understand the various platforms' conventions for menu label definition (i.e. using the '&amp;' character...). + + + + + + + + + + A plugin relative path to the image to be used as the icon for this menu in either a menu or a toolbar. + + + + + + + + + + The tooltip to be displayed for this element when it is placed in a toolbar. This value should be translatable. + + + + + + + + + + Th commandId is used to update the submenu text with a keyboard shortcut. The command should have a handler that can launch a quickmenu version of this menu. + + + + + + + + + + + + + Defines a new Command Contribution at the defined insertion point. + + + + + + + + + + + The label to be displayed for this element when it is placed in either a menu. This value should be translatable. + + + + + + + + + + This is the id of the Command that is to be bound to this element. This is the hook into the Commands/Handlers/Key binding services that actually do the work should this item be selected. In many cases this command will have been defined in a previous extension declaration. + + + + + + + + + + The 'id' of this contribution. If defined then it can be used as a reference in the Query part of the location defining whether the additions are to go before or after this element. + + + + + + + The character of the Label that should be given the mnemonic affordance. This is to allow the menu system to re-define the value during translation without having to understand the various platforms' conventions for menu label definition (i.e. using the '&amp;' character...). + + + + + + + + + + a relative path of an icon used to visually represent the action in its context. +If omitted and the action appears in the toolbar, the Workbench will use a placeholder icon. The path is relative to the location of the plugin.xml file of the contributing plug-in, or the <code>ISharedImages</code> constant. + + + + + + + + + + a relative path of an icon used to visually represent the action in its context when the action is disabled. If omitted, the normal icon will simply appear greyed out. The path is relative to the location of the plugin.xml file of the contributing plug-in. The disabled icon will appear in toolbars but not in menus. Icons for disabled actions in menus will be supplied by the OS. + + + + + + + + + + a relative path of an icon used to visually represent the action in its context when the mouse pointer is over the action. If omitted, the normal icon will be used. The path is relative to the location of the plugin.xml file of the contributing plug-in. + + + + + + + + + + The tooltip to be displayed for this element when it is placed in a toolbar. This value should be translatable. + + + + + + + + + + a unique identifier indicating the help context for this action. If the action appears as a menu item, then pressing F1 while the menu item is highlighted will display help. This overrides the help context id provided by the active handler or command. + + + + + + + an attribute to define the user interface style type for the action. If omitted, then it is <samp>push</samp> by default. The attribute value will be one of the following: + <table border="0" width="80%"> + <tr> + <td valign="top" width="25"></td> + <td valign="top" nowrap><b>push</b></td> + <td valign="top">- as a regular menu item or tool item.</td> + </tr> + <tr> + <td valign="top" width="25"></td> + <td valign="top" nowrap><b>radio</b></td> + <td valign="top">- as a radio style menu item or tool item. Actions with the radio style within the same menu or toolbar group behave as a radio set. The initial value is specified by the <samp>state</samp> attribute.</td> + </tr> + <tr> + <td valign="top" width="25"></td> + <td valign="top" nowrap><b>toggle</b></td> + <td valign="top">- as a checked style menu item or as a toggle tool item. The initial value is specified by the <samp>state</samp> attribute.</td> + </tr> + <tr> + <td valign="top" width="25"></td> + <td valign="top" nowrap><b>pulldown</b></td> + <td valign="top">- (ToolBar only) Creates a ToolItem with the <code>SWT.DROP_DOWN</code> affordance. The URI of the menu is "menu:" + this item's ID.</td> + </tr> + </table> + + + + + + + + + + + + + + + + + + + For commands appearing in a toolbar, <code>FORCE_TEXT</code> will show text even if there is an icon. See CommandContributionItem. + + + + + + + + + + + + + + + + Inserts a separator at the current insertion point. + + + + + + + The 'id' of this contribution. If defined then it can be used as a reference in the Query part of the location defining whether the additions are to go before or after this element (or at the end of the logical group containing this element using the 'endof' value). +<p> +Separator contributions that have an id define the start of a logical group so the result of using the 'endof' value for placement is to search forward in the current menu to locate the next separator and to place the inserted elements before that element. If no trailing separator is found then the items are placed at the end of the menu. +</p> + + + + + + + Indicates whether or not the separator should be visible in the UI. <code>false</code> by default. + + + + + + + + + + Contributes a new ToolBar at the current insertion point. This element is only currently valid for CoolBarManagers, which can contain toolbars. For example, the trim location URIs specified in <code>org.blueberry.ui.menus.MenuUtil</code>. + + + + + + + + + + + + + + + + The 'id' of this toolbar contribution. If defined then it can be extended through other 'menuAddition' elements or the id can be used as a reference in the Query part of the location defining whether the additions are to go before or after this element. + + + + + + + The label to be displayed for this element when it is displayed in the customize perspective dialog. This value should be translatable. + + + + + + + + + + + + + Used to contribute controls to ToolBars in the workbench. The 'class' attribute must be a derivative of the +WorkbenchWindowControlContribution base class. +<p> +<b>NOTE:</b> Due to platform restrictions control contributions are only supported for toolbars; Attempts to contribute controls into a menu or popup will be treated as a NO-OP. +</p> + + + + + + + + + + The 'id' of this menu contribution. If defined then it can be used as a reference in the Query part of the location defining whether the additions are to go before or after this element. + + + + + + + The class which will be used to create the control that is to be hosted in a ToolBar. This must be a subclass of +WorkbenchWindowControlContribution which provides information as to the control's location (i.e. which workbench window it's being hosted in and the side of the window that it is currently being displayed on. + + + + + + + + + + + + + The element provides a mechanism that will call back into the defined class to provide an IContributionItem to be shown when the menu or toolbar is built. The defined class must be a derivative of the org.blueberry.jface.action.ContributionItem base class. It can also use org.blueberry.ui.action.CompoundContributionItem and provide an implementation for the abstract <code>getContributionItems</code> method to provide a dynamic menu item. + + + + + + + + + + + A unique identifier for this contribution. It is recommended that the identifier be prefixed by the plug-in name, to guarantee uniqueness. For example, a widget contributed by <code>org.blueberry.ui</code> might be called <code>org.blueberry.ui.widget1</code>. +<p> +If defined then it can be used as a reference in the Query part of the location defining whether the additions are to go before or after this element (or at the end of the logical group containing this element using the 'endof' value). +</p> + + + + + + + This class is expected to be a subclass of ContributionItem. The item may implement IWorkbenchContribution to be provided an IServiceLocator. + + + + + + + + + + + + + + + <p> +It is preferred that menu contributions be added in the <code>plugin.xml</code>. Plugins can +programmatically add their own menu contributions using <code>org.blueberry.ui.menus.IMenuService</code> and <code>org.blueberry.ui.menus.AbstractContributionFactory</code>, but should be sure to remove them if the plugin is unloaded. The <code>IMenuService</code> can be retrieved through any of the <code>IServiceLocators</code>, the workbench, the workbench window, or the part site. +</p> +<p> +See <a href="org_blueberry_ui_commands.html">org.blueberry.ui.commands</a> to define a command and <a href="org_blueberry_ui_handlers.html">org.blueberry.ui.handlers</a> to define an implementation for the command. +</p> +<p>To register a context menu, use the <code>IWorkbenchPartSite.registerContextMenu</code> methods.</p> + + + + + + + + + 3.3 + + + + + + + + + <p> +A basic extension looks like this. +</p> +<pre> + <extension + id="add.item" + point="org.blueberry.ui.menus"> + <menuContribution + locationURI="menu:someorg.somemenu.id?after=additions"> + <command + commandId="someorg.someid.someCommand" + icon="icons/anything.gif" + id="someorg.someid.BasicCmdItem" + label="Simple Item" + mnemonic="S"> + </command> + </menuContribution> + </extension> +</pre> +<p> +This is the simplest example; adding a command contribution after an existing menu's additions group. +</p> + + + + + + + + + + Copyright (c) 2005,2007 IBM Corporation and others.<br> +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 <a +href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a> + + + + diff --git a/Plugins/org.blueberry.ui.qt/schema/perspectiveExtensions.exsd b/Plugins/org.blueberry.ui.qt/schema/perspectiveExtensions.exsd new file mode 100644 index 0000000000..d908729c13 --- /dev/null +++ b/Plugins/org.blueberry.ui.qt/schema/perspectiveExtensions.exsd @@ -0,0 +1,373 @@ + + + + + + + + + This extension point is used to extend perspectives +registered by other plug-ins. A perspective defines +the initial contents of the window action bars +(menu and toolbar) and the initial set of views +and their layout within a workbench page. +Other plug-ins may contribute actions or views to +the perspective which appear when the perspective +is selected. Optional additions by other plug-ins +are appended to the initial definition. + + + + + + + + + + + + + + + + + a fully qualified identifier of the target extension point + + + + + + + an optional identifier of the extension instance + + + + + + + an optional name of the extension instance + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + the unique identifier of the perspective (as specified in the registry) into which the contribution is made. If the value is set to "*" the extension is applied to all perspectives. + + + + + + + + + + + + + + + + + + + + + the unique identifier of the action set which will be added to the perspective. + + + + + + + + + + + + + + + the unique identifier of the view which will be added to the perspective's "Show View" submenu of the "Window" menu. + + + + + + + + + + + + + + + the unique identifier of the perspective which will be added to the perspective's "Open Perspective" submenu of the "Window" menu. + + + + + + + + + + + + + + + the unique identifier of the new wizard which will be added to the perspective's "New" submenu of the "File" menu. + + + + + + + + + + + + + + + the unique identifier of the view which will be added to the perspective's "Show In..." prompter in the Navigate menu. + + + + + + + + + + + + + + + the unique identifier of the view which will be added to the perspective layout. + + + + + + + + + + the unique identifier of a view which already exists in the perspective. This will be used as a reference point for placement of the view. The relationship between these two views is defined by <samp>relationship</samp>. Ignored if relationship is "fast". + + + + + + + + + + + + + + + + specifies the relationship between <samp>id</samp> and +<samp>relative</samp>. +The following values are supported: +<ul> +<b>fast</b> - the view extension will be created as a fast view. +<br><b>stack</b> - the view extension will be stacked with the relative +view in a folder. +<br><b>left, right, top, bottom</b> - the view extension will be placed +beside the relative view. In this case a <samp>ratio</samp> must also +be defined.</ul> + + + + + + + + + + + + + + + + + + + + + + + the percentage of area within the relative view which will be donated to the view extension. If the view extension is a fast view, the ratio is the percentage of the workbench the fast view will cover when active. This must be defined as a floating point value and lie between 0.05 and 0.95. + + + + + + + whether the view is initially visible when the perspective is opened. This attribute should have a value of "true" or "false" if used. +If this attribute is not used, the view will be initially visible by default. + + + + + + + whether the view is closeable in the target perspective. This attribute should have a value of "true" or "false" if used. If this attribute is not used, the view will be closeable, unless the perspective itself is marked as fixed. + + + + + + + whether the view is moveable. A non-moveable view cannot be moved either within the same folder, or moved between folders in the perspective. This attribute should have a value of "true" or "false" if used. +If this attribute is not used, the view will be moveable, unless the perspective itself is marked as fixed. + + + + + + + whether the view is a standalone view. A standalone view cannot be docked together with others in the same folder. This attribute should have a value of "true" or "false" if used. This attribute is ignored if the relationship attribute is "fast" or "stacked". If this attribute is not used, the view will be a regular view, not a standalone view (default is "false"). + + + + + + + whether the view's title is shown. This attribute should have a value of "true" or "false" if used. This attribute only applies to standalone views. If this attribute is not used, the view's title will be shown (default is "true"). + + + + + + + If the perspective extension will result in a new view stack being created (i.e. the 'relationship' attribute is one of left, right, top or bottom) this field determines the new stack's initial display state. + + + + + + + + + + + + The unique identifier of the Command which is to be removed from the menu. + +<strong>WARNING:</strong> This is considered to be a 'Product level' extension and should not be used in consumable plugins without great care. + + + + + + + + + + + + The unique identifier of the Command which is to be removed from thetoolbar. + +<strong>WARNING:</strong> This is considered to be a 'Product level' extension and should not be used in consumable plugins without great care. + + + + + + + + + + + + The following is an example of a perspective extension (note the subelements and the way attributes are used): +<p> +<pre> + <extension point="org.blueberry.ui.perspectiveExtensions"> + <perspectiveExtension + targetID="org.blueberry.ui.resourcePerspective"> + <actionSet id="org.xyz.MyActionSet"/> + <viewShortcut id="org.xyz.views.PackageExplorer"/> + <newWizardShortcut id="org.xyz.wizards.NewProjectCreationWizard"/> + <perspectiveShortcut id="org.xyz.MyPerspective"/> + <view id="org.xyz.views.PackageExplorer" + relative="org.blueberry.ui.views.ResourceNavigator" + relationship="stack"/> + <view id="org.xyz.views.TypeHierarchy" + relative="org.blueberry.ui.views.ResourceNavigator" + relationship="left" + ratio="0.50"/> + </perspectiveExtension> + </extension> +</pre> +</p> +<p> +In the example above, an action set, view shortcut, +new wizard shortcut, and perspective shortcut are +contributed to the initial contents of the +Resource Perspective. In addition, the +Package Explorer view is stacked on the +Resource Navigator and the Type Hierarchy View is +added beside the Resource Navigator. +</p> + + + + + + + + + The items defined within the perspective extension are contributed to the initial contents of the target perspective. Following this, the user may remove any contribution or add others to a perspective from within the workbench user interface. + + + + + + + + + + + Copyright (c) 2002, 2007 IBM Corporation and others.<br> +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 <a +href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a> + + + + diff --git a/Plugins/org.blueberry.ui.qt/schema/perspectives.exsd b/Plugins/org.blueberry.ui.qt/schema/perspectives.exsd new file mode 100644 index 0000000000..8e355d8ed3 --- /dev/null +++ b/Plugins/org.blueberry.ui.qt/schema/perspectives.exsd @@ -0,0 +1,181 @@ + + + + + + + + + This extension point is used to add perspective factories to the workbench. A perspective factory is used to define the initial layout and visible action sets for a perspective. The user can select a perspective by invoking the "Open Perspective" submenu of the "Window" menu. + + + + + + + + + + + + a fully qualified identifier of the target extension point + + + + + + + an optional identifier of the extension instance + + + + + + + an optional name of the extension instance + + + + + + + + + + + + + + + + + + + + + + + + a unique name that will be used to identify this perspective. + + + + + + + a translatable name that will be used in the workbench window menu bar to represent this perspective. + + + + + + + + + + a fully qualified name of the class that implements +<samp>berry::IPerspectiveFactory</samp> interface. + + + + + + + + + + a relative name of the icon that will be associated +with this perspective. + + + + + + + + + + indicates whether the layout of the perspective is fixed. If true, then views created by the perspective factory are not closeable, and cannot be moved. The default is false. + + + + + + + + + + + + + an optional subelement whose body should contain text providing a short description of the perspective. + + + + + + + + + + The following is an example of a perspective extension: +<p> +<pre> + <extension + point="org.blueberry.ui.perspectives"> + <perspective + id="org.blueberry.ui.resourcePerspective" + name="Resource" + class="berry::ResourcePerspective" + icon="resources/MyIcon.gif"> + </perspective> + </extension> +</pre> +</p> + + + + + + + + + The value of the <samp>class</samp> attribute must be the +fully qualified name of a class that implements +<samp>berry::IPerspectiveFactory</samp>. +The class must supply the initial layout for a +perspective when asked by the workbench. +<p> +The <samp>plugin_customization.ini</samp> file is used to define the default perspective. The <i>default perspective</i> is the first perspective which appears when the product is launched after install. It is also used when the user opens a page or window with no specified perspective. The default perspective is defined as a property within the plugin_customization.ini, as shown below. The user may also override this perspective from the workbench perspectives preference page. +<pre> + defaultPerspectiveId = org.blueberry.ui.resourcePerspective +</pre> +The perspectives which appear in the "Open Perspective" menu are shortcuts for perspective selection. This set is defined by the active perspective itself, and extensions made through the perspectiveExtensions extension point. + + + + + + + + + The workbench provides a "Resource Perspective". +Additional perspectives may be added by plug-ins. +They are selected using the "Open Perspective" submenu of the "Window" menu. + + + + + + + + + Copyright (c) 2002, 2005 IBM Corporation and others.<br> +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 <a +href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a> + + + + diff --git a/Plugins/org.blueberry.ui.qt/schema/preferencePages.exsd b/Plugins/org.blueberry.ui.qt/schema/preferencePages.exsd new file mode 100644 index 0000000000..0869da9db8 --- /dev/null +++ b/Plugins/org.blueberry.ui.qt/schema/preferencePages.exsd @@ -0,0 +1,195 @@ + + + + + + + + + The workbench provides one common dialog box for preferences. +The purpose of this extension point is to allow plug-ins to add +pages to the preference dialog box. When preference dialog box +is opened (initiated from the menu bar), pages contributed in +this way will be added to the dialog box. + +<p> +The preference dialog +box provides for hierarchical grouping of the pages. For this +reason, a page can optionally specify a <samp>category</samp> attribute. +This +attribute represents a path composed of parent page IDs separated +by '/'. If this attribute is omitted or if any of the parent +nodes in the path cannot be found, the page will be added at +the root level. +</p> + + + + + + + + + + + + a fully qualified identifier of the target extension point + + + + + + + an optional identifier of the extension instance + + + + + + + an optional name of the extension instance + + + + + + + + + + + + + + + + + + + + + + + a unique name that will be used to identify this page. + + + + + + + a translatable name that will be used in the UI for this page. + + + + + + + + + + a name of the fully qualified class that implements +<samp>berry::IWorkbenchPreferencePage</samp>. + + + + + + + + + + a path indicating the location of the page in the preference tree. The path may either be a parent node ID or a sequence + of IDs separated by '/', representing the full path from the root node. + + + + + + + + + + + + + A reference by a preference page to a keyword. See the keywords extension point. + + + + + + + The id of the keyword being referred to. + + + + + + + + + + + + + + + The following is an example for the preference extension point: +<p> +<pre> + <extension + point="org.blueberry.ui.preferencePages"> + <page + id="com.xyz.prefpage1" + name="XYZ" + class="xyz::PrefPage1"> + <keywordReference id="xyz.Keyword"/> + </page> + <page + id="com.xyz.prefpage2" + name="Keyboard Settings" + class="xyz::PrefPage2" + category="com.xyz.prefpage1"> + </page> + </extension> +</pre> +</p> + + + + + + + + + The value of the attribute class must represent a fully qualified name of the class that implements +<samp>berry::IWorkbenchPreferencePage</samp>. + + + + + + + + + + + The workbench adds several pages for setting the preferences of the platform. Pages registered +through this extension will be added after them according to their category information. + + + + + + + + + Copyright (c) 2002, 2005 IBM Corporation and others.<br> +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 <a +href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a> + + + + diff --git a/Plugins/org.blueberry.ui.qt/schema/presentationFactories.exsd b/Plugins/org.blueberry.ui.qt/schema/presentationFactories.exsd new file mode 100644 index 0000000000..e7dcb6d72f --- /dev/null +++ b/Plugins/org.blueberry.ui.qt/schema/presentationFactories.exsd @@ -0,0 +1,125 @@ + + + + + + + + + This extension point is used to add presentation factories to the workbench. + A presentation factory defines the overall look and feel of the workbench, + including how views and editors are presented. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Specify the fully qualified class to be used for the presentation factory. The specified value must implement the interface <code>berry::IPresentationFactory</code>. + + + + + + + + + + a unique name that will be used to identify this presentation factory + + + + + + + a translatable name that can be used to show this presentation factory in the UI + + + + + + + + + + + + + + + The following is an example of a presentationFactory extension: +<pre> + <extension point="org.blueberry.ui.presentationFactories"> + <factory + class="berry::ExampleWorkbenchPresentationFactory"/> + </extension> + </pre> + + + + + + + + + The class specified in the factory element must be a concrete subclass of <code>org.eclipse.ui.presentations.AbstractPresentationFactory</code>. + + + + + + + + + If a presentation factory is not specified or is missing then the implementation in <code>berry::QtWorkbenchPresentationFactory</code> will be used. + + + + + + + + + Copyright (c) 2004, 2005 IBM Corporation and others.<br> +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 <a +href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a> + + + + diff --git a/Plugins/org.blueberry.ui.qt/schema/services.exsd b/Plugins/org.blueberry.ui.qt/schema/services.exsd new file mode 100644 index 0000000000..b07d5c4c07 --- /dev/null +++ b/Plugins/org.blueberry.ui.qt/schema/services.exsd @@ -0,0 +1,226 @@ + + + + + + + + + Define service factories so that services can be contributed declaratively and will be available through <code>berry::IServiceLocator::GetService(Class)</code>. The implementation of <code>AbstractServiceFactory</code> must be able to return a global service and multiple child services (if applicable). +<p> +Services must follow a general contract: +<ul> +<li>The top level service has no parent.</li> +<li>The child service may use the supplied parent, which can be cast to the service interface.</li> +<li>Any other services needed for initialization should be retrieved from the <code>berry::IServiceLocator</code>.</li> +<li>If the service needs to clean up any state (like listeners) it should implement <code>berry::IDisposable</code>.</li> +<li>Services should clearly specify when they perform cleanup for clients, such as removing listeners automatically on disposal.</li> +</ul> +</p> + + + + + + + Contribute services to the workbench. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Match a service interface to a factory that can supply a hierachical implementation of that service. + + + + + + + + + + The factory that extends <code>AbstractServiceFactory</code> and can create the implementation for the serviceClass. + + + + + + + + + + + + + A service this factory can provide. + + + + + + + The interface that represents a service contract. + + + + + + + + + + + + + A Source Provider supplies source variables to the IEvaluationService. It can also notify the IEvaluationService when one or more of the variables change. + + + + + + + + + + This class must provide variables and call the appropriate fireSourceChanged(*) method when any of the variables change. + + + + + + + + + + + + + A source variable from this provider. A source provider must declare all variables that it provides. + + + + + + + The name of a contributed source variable. It is a good practice to prepend the plugin id to the variable name to avoid collisions with other source providers. + + + + + + + For conflict resolution used by services like the IHandlerService, contributed source variables must assign a priority. <b>workbench</b> is the global default priority. See <code>ISources</code> for relative priority information. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <p> +Here is a basic definition: +<pre> + <extension + point="org.blueberry.ui.services"> + <serviceFactory + factoryClass="my::LevelServiceFactory"> + <service + serviceClass="my::ILevelService"> + </service> + </serviceFactory> + </extension> +</pre></p> +<p> +The <code>LevelServiceFactory</code> can return an <code>ILevelService</code> when it is requested from the <code>IServiceLocator</code>: +<pre> + berry::ILevelService::Pointer s = GetSite()->GetService(my::ILevelService::GetStaticClassName()); + std::cout << s->GetLevel(); +</pre> +</p> +<p> +In this test example, the factory would instantiate three <code>ILevelService</code> implementations during the first call to <code>GetSite()->GetService(*)</code>. The global one in the workbench, one for the workbench window, and one for the site. +</p> + + + + + + + + + <p> +Please see <code>org.eclipse.ui.services.AbstractServiceFactory</code>, <code>org.eclipse.ui.services.IDisposable</code>, and <code>org.eclipse.ui.services.IServiceWithSources</code> for more information. +</p> + + + + + + + + + + + Copyright (c) 2007 IBM Corporation and others.<br> +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 <a +href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a> + + + + diff --git a/Plugins/org.blueberry.ui.qt/schema/tweaklets.exsd b/Plugins/org.blueberry.ui.qt/schema/tweaklets.exsd new file mode 100644 index 0000000000..6d4f0a67d4 --- /dev/null +++ b/Plugins/org.blueberry.ui.qt/schema/tweaklets.exsd @@ -0,0 +1,145 @@ + + + + + + + + + This extension point is used to define tweaklets. A tweaklet is anything that can be used to tweak the look and feel of the Workbench. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + a unique name that will be used to identify this tweaklet + + + + + + + a translatable name that will be used in the UI for this tweaklet + + + + + + + + + + a translatable short description of this tweaklet, to be used in the UI + + + + + + + + + + an identifier of the tweaklet definition in the workbench, typically a fully qualified type name without colons + + + + + + + an identifier of the tweaklet implementation provided by the extender, typically a fully qualified class name + + + + + + + + + + + + + The following is an example tweaklet: +<p> +<pre> + <extension point="org.blueberry.ui.tweaklets"> + <tweaklet + id="org.blueberry.ui.tweaklets.ConcreteXYZTweaklet" + name="XYZ Tweaklet" + description="Short description of the tweak" + definition="berryAbstractXYZTweaklet" + implementation="berry::ConcreteXYZTweaklet"/> + </extension> +</pre> +</p> + + + + + + + + + Typically, although not required, the value of the <samp>definition</samp> attribute is the +fully qualified name without colons of an abstract class defined by the +workbench, and the value of the <samp>implementation</samp> attribute is the +fully qualified name of a non-abstract class provided by the extending plug-in. + + + + + + + + + Tweaklets are usually used to specialize the workbench for a specific GUI toolkit. + + + + + diff --git a/Plugins/org.blueberry.ui.qt/schema/views.exsd b/Plugins/org.blueberry.ui.qt/schema/views.exsd new file mode 100644 index 0000000000..3ebdced734 --- /dev/null +++ b/Plugins/org.blueberry.ui.qt/schema/views.exsd @@ -0,0 +1,311 @@ + + + + + + + + + This extension point is used to define additional views +for the workbench. A view is a visual component +within a workbench page. It is typically used to +navigate a hierarchy of information (like the workspace), +open an editor, or display properties for +the active editor. The user can make a view +visible from the Window > Show View menu or close it from the +view local title bar. +<p> +In order to reduce the visual clutter in the Show View Dialog, views should be grouped using categories. + + + + + + + + + + + + + + + + + + + a fully qualified identifier of the target extension point + + + + + + + an optional identifier of the extension instance + + + + + + + an optional name of the extension instance + + + + + + + + + + + + + + + a unique name that will be used to identify this category + + + + + + + a translatable name that will be used in the UI for this category + + + + + + + + + + an optional path composed of category IDs separated by '/'. This +allows the creation of a hierarchy of categories. + + + + + + + + + + + + + + + + + + + a unique name that will be used to identify this view + + + + + + + a translatable name that will be used in the UI for this view + + + + + + + + + + an optional attribute that is composed of the category IDs separated +by '/'. Each referenced category must be declared in a corresponding category element. + + + + + + + + + + a fully qualified name of the class that implements +<samp>berry::IViewPart</samp>. A common practice +is to subclass <samp>berry::ViewPart</samp> or <samp>berry::QtViewPart</samp> +in order to inherit the default functionality. + + + + + + + + + + a relative name of the icon that will +be associated with the view. + + + + + + + + + + the percentage of the width of the workbench that the view will take up as an active fast view. +This must be defined as a floating point value and lie between 0.05 and 0.95. +If no value is supplied, a default ratio will be used. + + + + + + + flag indicating whether this view allows multiple instances to be created using IWorkbenchPage::ShowView(QString id, QString secondaryId). The default is false. + + + + + + + flag indicating whether this view allows to be restored upon workbench restart. If set to false, the view will not be open after a workbench restart. The default is true. + + + + + + + + + + + + + an optional subelement whose body should contain text providing a short description of the view. + + + + + + + + A sticky view is a view that will appear by default across all perspectives in a window once it is opened. Its initial placement is governemed by the location attribute, but nothing prevents it from being moved or closed by the user. Use of this element will only cause a placeholder for the view to be created, it will not show the view. Please note that usage of this element should be done with great care and should only be applied to views that truely have a need to live across perspectives. + + + + + + + the id of the view to be made sticky. + + + + + + + + + + optional attribute that specifies the location of the sticky view relative to the editor area. If absent, the view will be docked to the right of the editor area. + + + + + + + + + + + + + + + + + + + optional attribute that specifies wether the view should be closeable. If absent it will be closeable. + + + + + + + optional attribute that specifies wether the view should be moveable. If absent it will be moveable. + + + + + + + + + + + + The following is an example of the extension point: +<p> +<pre> + <extension point="org.blueberry.ui.views"> + <category + id="com.xyz.views.XYZviews" + name="XYZ"/> + <view + id="com.xyz.views.XYZView" + name="XYZ View" + category="com.xyz.views.XYZviews" + class="ns::XYZView" + icon="icons/XYZ.gif"/> + </extension> +</pre> +</p> +The following is an example of a sticky view declaration: +<p> +<pre> + <extension point="org.blueberry.ui.views"> + <stickyView + id="com.xyz.views.XYZView" /> + </extension> +</pre> +</p> + + + + + + + + + The value of the <samp>class</samp> attribute must be a +fully qualified name of the class that implements +<samp>berry::IViewPart</samp>. It is common +practice to subclass <samp>berry::ViewPart</samp> +or <samp>berry::QtViewPart<samp> when developing a new view. + + + + + + + + + + The BlueBerry Platform provides a number of standard views. From the user point of view, these views are no different from any other view provided by the plug-ins. All the views can be shown from the "Show View" submenu of the "Window" menu. The position of a view is persistent: it is saved when the view is closed and restored when the view is reopened in a single session. The position is also persisted between workbench sessions. + + + + + + + + + Copyright (c) 2002, 2005 IBM Corporation and others.<br> +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 <a +href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a> + + + + diff --git a/Plugins/org.mitk.core.ext/plugin.xml b/Plugins/org.mitk.core.ext/plugin.xml index 8e95e4d3c5..6b6ceeb06f 100644 --- a/Plugins/org.mitk.core.ext/plugin.xml +++ b/Plugins/org.mitk.core.ext/plugin.xml @@ -1,3 +1,4 @@ + diff --git a/Plugins/org.mitk.core.ext/schema/inputdevice.exsd b/Plugins/org.mitk.core.ext/schema/inputdevice.exsd new file mode 100644 index 0000000000..6fc8bb6533 --- /dev/null +++ b/Plugins/org.mitk.core.ext/schema/inputdevice.exsd @@ -0,0 +1,153 @@ + + + + + + + + This extension point is used to define additional input devices. + + + + + + + + + + + + + + + + + a fully qualified identifier of the target extension point + + + + + + + an optional identifier of the extension instance + + + + + + + an optional name of the extension instance + + + + + + + + + + + + + + + + + + + + + + + the identifier of the input device + + + + + + + an optional name of the input device + + + + + + + + + + a fully qualified name of the class that implements +<samp>mitk::IInputDevice</samp>. + + + + + + + + + + + + + + + + an optional subelement whose body should contain text providing a short description of the input device. + + + + + + + + + + The following is an example of the extension point: +<p> +<pre> + <extension point="org.mitk.core.ext.inputdevices"> + <inputdevice + id="com.xyz.inputdevice.XYZDevice" + name="XYZ Device" + class="ns::XYZDevice" > + <description>My new 20-dimensional input device</description> + </inputdevice> + </extension> +</pre> +</p> + + + + + + + + + The value of the <samp>class</samp> attribute must be a +fully qualified name of the class that implements +<samp>mitk::IInputDevice</samp>. + + + + + + + + + + The MITK Platform can handle multiple distinct input devices by... + + + + + + + + + Copyright (c) German Cancer Research Center (DKFZ)<br> +All rights reserved. + + + +