Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 122941 Details for
Bug 111778
[Contributions] enablement expression in object contributions is parsed by legacy mechanism and new mechanism
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Add a pointer to useful core expression doc v01
popup-v01.txt (text/plain), 13.08 KB, created by
Paul Webster
on 2009-01-19 10:06:49 EST
(
hide
)
Description:
Add a pointer to useful core expression doc v01
Filename:
MIME Type:
Creator:
Paul Webster
Created:
2009-01-19 10:06:49 EST
Size:
13.08 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui >Index: schema/commonExpression.exsd >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui/schema/commonExpression.exsd,v >retrieving revision 1.13 >diff -u -r1.13 commonExpression.exsd >--- schema/commonExpression.exsd 16 Mar 2007 18:00:05 -0000 1.13 >+++ schema/commonExpression.exsd 19 Jan 2009 15:06:12 -0000 >@@ -1,12 +1,12 @@ > <?xml version='1.0' encoding='UTF-8'?> > <!-- Schema file written by PDE --> >-<schema targetNamespace="org.eclipse.ui"> >+<schema targetNamespace="org.eclipse.ui" xmlns="http://www.w3.org/2001/XMLSchema"> > <annotation> > <appInfo> > <meta.schema plugin="org.eclipse.ui" id="commonExpression" name="Common Expressions"/> > </appInfo> > <documentation> >- An action's enablement and/or visibility can be defined using the elements <samp>enablement</samp> and <samp>visibility</samp> respectively. These two elements contain a boolean expression that is evaluated to determine the enablement and/or visibility. >+ An action's enablement and/or visibility can be defined using the elements <samp>enablement</samp> and <samp>visibility</samp> respectively, if the extension point supports it. These two elements contain a boolean expression that is evaluated to determine the enablement and/or visibility. > <p> > The syntax is the same for the <samp>enablement</samp> and <samp>visibility</samp> elements. Both contain only one boolean expression sub-element. In the simplest case, this will be an <samp>objectClass</samp>, <samp>objectState</samp>, <samp>pluginState</samp>, or <samp>systemProperty</samp> element. In the more complex case, the <samp>and</samp>, <samp>or</samp>, and <samp>not</samp> elements can be combined to form a boolean expression. Both the <samp>and</samp>, and <samp>or</samp> elements must contain 2 sub-elements. The <samp>not</samp> element must contain only 1 sub-element. > </p> >@@ -231,32 +231,8 @@ > </documentation> > </annotation> > >- <annotation> >- <appInfo> >- <meta.section type="examples"/> >- </appInfo> >- <documentation> >- >- </documentation> >- </annotation> > >- <annotation> >- <appInfo> >- <meta.section type="apiInfo"/> >- </appInfo> >- <documentation> >- >- </documentation> >- </annotation> > >- <annotation> >- <appInfo> >- <meta.section type="implementation"/> >- </appInfo> >- <documentation> >- >- </documentation> >- </annotation> > > <annotation> > <appInfo> >Index: schema/popupMenus.exsd >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui/schema/popupMenus.exsd,v >retrieving revision 1.34 >diff -u -r1.34 popupMenus.exsd >--- schema/popupMenus.exsd 26 Feb 2008 17:57:27 -0000 1.34 >+++ schema/popupMenus.exsd 19 Jan 2009 15:06:12 -0000 >@@ -2,9 +2,9 @@ > <!-- Schema file written by PDE --> > <schema targetNamespace="org.eclipse.ui" xmlns="http://www.w3.org/2001/XMLSchema"> > <annotation> >- <appinfo> >+ <appInfo> > <meta.schema plugin="org.eclipse.ui" id="popupMenus" name="Pop-up Menus"/> >- </appinfo> >+ </appInfo> > <documentation> > This extension point is used to add new actions to context menus owned by other plug-ins. Action contributions may be made against a specific object type (<samp>objectContribution</samp>) or against a specific context menu of a view or editor part (<samp>viewerContribution</samp>). When using <samp>objectContribution</samp>, the contribution will appear in all view or editor part context menus where objects of the specified type are selected. In contrast, using <samp>viewerContribution</samp>, the contribution will only appear in the specified view or editor part context menu, regardless of the selection. > <p> >@@ -18,6 +18,8 @@ > Individual actions in an object contribution can use the attribute <code>enablesFor</code> to specify if it should only apply for a single, multiple, or any other selection type. > <p> > If these filtering mechanisms are inadequate an action contribution may use the <samp>filter</samp> mechanism. In this case the attributes of the target object are described in a series of name-value pairs. The attributes which apply to the selection are type-specific and beyond the domain of the workbench itself, so the workbench will delegate filtering at this level to the actual selection. >+<p> >+The </code>objectContribution</code> element uses the core expression <code>enablement</code>, as defined in <a href="org_eclipse_core_expressions_definitions.html">org.eclipse.core.expressions.definitions</a>. > </documentation> > </annotation> > >@@ -28,6 +30,11 @@ > <include schemaLocation="schema://org.eclipse.core.expressions/schema/expressionLanguage.exsd"/> > > <element name="extension"> >+ <annotation> >+ <appInfo> >+ <meta.element /> >+ </appInfo> >+ </annotation> > <complexType> > <sequence> > <element ref="objectContribution" minOccurs="0" maxOccurs="unbounded"/> >@@ -45,9 +52,9 @@ > <documentation> > an optional identifier of the extension instance > </documentation> >- <appinfo> >+ <appInfo> > <meta.attribute translatable="true"/> >- </appinfo> >+ </appInfo> > </annotation> > </attribute> > <attribute name="name" type="string"> >@@ -63,7 +70,7 @@ > <element name="objectContribution"> > <annotation> > <documentation> >- This element is used to define a group of actions and/or menus for any viewer context menus for which the objects of the specified type are selected. >+ This element is used to define a group of actions and/or menus for any viewer context menus for which the objects of the specified type are selected. <code>enablement</code> in this element refers to core expression enablement, as defined in <a href="org_eclipse_core_expressions_definitions.html">org.eclipse.core.expressions.definitions</a>, and effects the enablement of the objectContribution not the contained actions. > </documentation> > </annotation> > <complexType> >@@ -87,9 +94,9 @@ > a fully qualified name of the class or interface that all objects in the > selection must subclass or implement. > </documentation> >- <appinfo> >+ <appInfo> > <meta.attribute kind="java" basedOn="java.lang.object"/> >- </appinfo> >+ </appInfo> > </annotation> > </attribute> > <attribute name="nameFilter" type="string"> >@@ -140,9 +147,9 @@ > > <element name="action"> > <annotation> >- <appinfo> >+ <appInfo> > <meta.element labelAttribute="label" icon="icon"/> >- </appinfo> >+ </appInfo> > <documentation> > This element defines an action that the user can invoke in the UI. > </documentation> >@@ -165,9 +172,9 @@ > <documentation> > a translatable name used as the menu item text. The name can include mnenomic information. > </documentation> >- <appinfo> >+ <appInfo> > <meta.attribute translatable="true"/> >- </appinfo> >+ </appInfo> > </annotation> > </attribute> > <attribute name="definitionId" type="string"> >@@ -175,9 +182,9 @@ > <documentation> > This specifies the command that this action is handling. This is used to decide which key binding to display in the pop-up menu. > </documentation> >- <appinfo> >+ <appInfo> > <meta.attribute kind="identifier" basedOn="org.eclipse.ui.commands/command/@id"/> >- </appinfo> >+ </appInfo> > </annotation> > </attribute> > <attribute name="menubarPath" type="string"> >@@ -193,9 +200,9 @@ > a relative path of an icon used to visually represent the action in its context. > The path is relative to the location of the plugin.xml file of the contributing plug-in. > </documentation> >- <appinfo> >+ <appInfo> > <meta.attribute kind="resource"/> >- </appinfo> >+ </appInfo> > </annotation> > </attribute> > <attribute name="helpContextId" type="string"> >@@ -258,9 +265,9 @@ > <documentation> > a name of the fully qualified class that implements <samp>org.eclipse.ui.IObjectActionDelegate</samp> (for object contributions), <samp>org.eclipse.ui.IViewActionDelegate</samp> (for viewer contributions to a view part), or <samp>org.eclipse.ui.IEditorActionDelegate</samp> (for viewer contributions to an editor part). For backwards compatibility, <samp>org.eclipse.ui.IActionDelegate</samp> may be implemented for object contributions. > </documentation> >- <appinfo> >+ <appInfo> > <meta.attribute kind="java"/> >- </appinfo> >+ </appInfo> > </annotation> > </attribute> > <attribute name="enablesFor" type="string"> >@@ -318,9 +325,9 @@ > <documentation> > an optional attribute that specifies the identifier of an action which this action overrides. The action represented by this identifier will not be contributed to the context menu. The action identifier must be from a prerequisite plug-in only. This attribute is only applicable to action elements of an object contribution. > </documentation> >- <appinfo> >+ <appInfo> > <meta.attribute kind="identifier" basedOn="org.eclipse.ui.popupMenus/objectContribution/action/@id"/> >- </appinfo> >+ </appInfo> > </annotation> > </attribute> > <attribute name="tooltip" type="string"> >@@ -328,9 +335,9 @@ > <documentation> > a translatable text representing the action's tool tip. Only used if the action appears in the toolbar. > </documentation> >- <appinfo> >+ <appInfo> > <meta.attribute translatable="true"/> >- </appinfo> >+ </appInfo> > </annotation> > </attribute> > </complexType> >@@ -338,9 +345,9 @@ > > <element name="filter"> > <annotation> >- <appinfo> >+ <appInfo> > <meta.element labelAttribute="name"/> >- </appinfo> >+ </appInfo> > <documentation> > This element is used to evaluate the attribute state of each object in the current selection. A match only if each object in the selection has the specified attribute state. Each object in the selection must implement, or adapt to, <samp>org.eclipse.ui.IActionFilter</samp>. > </documentation> >@@ -402,18 +409,18 @@ > <documentation> > A class that implements one of the interfaces listed for the class attribute. It may also implement <code>org.eclipse.core.runtime.IExecutableExtension</code>. > </documentation> >- <appinfo> >+ <appInfo> > <meta.attribute kind="java"/> >- </appinfo> >+ </appInfo> > </annotation> > </attribute> > </complexType> > </element> > > <annotation> >- <appinfo> >+ <appInfo> > <meta.section type="examples"/> >- </appinfo> >+ </appInfo> > <documentation> > The following is an example of a pop-up menu extension point: > <p> >@@ -511,9 +518,9 @@ > </annotation> > > <annotation> >- <appinfo> >+ <appInfo> > <meta.section type="apiInfo"/> >- </appinfo> >+ </appInfo> > <documentation> > The value of the action attribute <samp>class</samp> > must be a fully qualified class name of a Java class >@@ -605,11 +612,10 @@ > </annotation> > > >- > <annotation> >- <appinfo> >+ <appInfo> > <meta.section type="implementation"/> >- </appinfo> >+ </appInfo> > <documentation> > The workbench views have built-in context menus > that already come loaded with a number of actions. >@@ -622,9 +628,9 @@ > </annotation> > > <annotation> >- <appinfo> >+ <appInfo> > <meta.section type="copyright"/> >- </appinfo> >+ </appInfo> > <documentation> > Copyright (c) 2000, 2007 IBM Corporation and others.<br> > All rights reserved. This program and the accompanying materials are made
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 111778
: 122941