diff options
| author | Stéphane Bégaudeau | 2016-09-01 07:56:40 +0000 |
|---|---|---|
| committer | Stéphane Bégaudeau | 2016-09-07 08:55:04 +0000 |
| commit | 7c49d5d606123487c19bcc29b3b23c45748ff2c6 (patch) | |
| tree | e5025cf354a5447f76f7f48b88601761ddc82f53 | |
| parent | 8a8e954a2c83bdb52528947c0aff133a9f2deee1 (diff) | |
| download | org.eclipse.eef-7c49d5d606123487c19bcc29b3b23c45748ff2c6.tar.gz org.eclipse.eef-7c49d5d606123487c19bcc29b3b23c45748ff2c6.tar.xz org.eclipse.eef-7c49d5d606123487c19bcc29b3b23c45748ff2c6.zip | |
[500472] Add support for widget actions on label and hyperlink
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=500472
Change-Id: I7b7a6a39c3974de996b7753a8fbdde79e97f73dd
Signed-off-by: Stéphane Bégaudeau <stephane.begaudeau@obeo.fr>
39 files changed, 940 insertions, 75 deletions
diff --git a/doc/org.eclipse.eef.documentation/pages/language/widgets/hyperlink.html b/doc/org.eclipse.eef.documentation/pages/language/widgets/hyperlink.html index 16ed00603..d0ac6c8b4 100644 --- a/doc/org.eclipse.eef.documentation/pages/language/widgets/hyperlink.html +++ b/doc/org.eclipse.eef.documentation/pages/language/widgets/hyperlink.html @@ -13,7 +13,8 @@ <a href="text.html">text</a> widgets. On top of the common properties of all widgets (identifier, labelExpression, helpExpression, isEnabledExpression, propertyValidationRules), it has the following properties: </p> <ul> - <li>valueExpression: This expression is used in order to compute the text of the hyperlink. This expression must return a string.</li> + <li>valueExpression: This expression is used in order to compute the text of the hyperlink.</li> + <li>displayExpression: This expression will have access to the result of the valueExpression thanks to a variable named value and it should return a string. If this expression is blank, a call to java.lang.Object#toString() will be performed on the result of the valueExpression instead.</li> <li>onClickExpression: This expression will be executed once the end user will click on the hyperlink. This expression does not have to return anything.</li> <li>style: The style of the hyperlink widget.</li> <li>conditionalStyles: All the conditional styles of the hyperlink widget.</li> @@ -24,6 +25,9 @@ <li>valueExpression: <code>aql:'Click'</code> </li> + <li>displayExpression: + <code>aql:value</code> + </li> <li>onClickExpression: <code>aql:self.doSomething()</code> </li> diff --git a/doc/org.eclipse.eef.documentation/pages/language/widgets/hyperlink.textile b/doc/org.eclipse.eef.documentation/pages/language/widgets/hyperlink.textile index 8f69a8da9..1d904187d 100644 --- a/doc/org.eclipse.eef.documentation/pages/language/widgets/hyperlink.textile +++ b/doc/org.eclipse.eef.documentation/pages/language/widgets/hyperlink.textile @@ -4,7 +4,8 @@ h3(#description). Description The hyperlink widget can be used to display a read-only piece of text in your user interface and allow the user to click on it. Its behavior is almost the same as the "label":label.html or the "text":text.html widgets. On top of the common properties of all widgets (identifier, labelExpression, helpExpression, isEnabledExpression, propertyValidationRules), it has the following properties: -* valueExpression: This expression is used in order to compute the text of the hyperlink. This expression must return a string. +* valueExpression: This expression is used in order to compute the text of the hyperlink. +* displayExpression: This expression will have access to the result of the valueExpression thanks to a variable named value and it should return a string. If this expression is blank, a call to java.lang.Object#toString() will be performed on the result of the valueExpression instead. * onClickExpression: This expression will be executed once the end user will click on the hyperlink. This expression does not have to return anything. * style: The style of the hyperlink widget. * conditionalStyles: All the conditional styles of the hyperlink widget. @@ -14,4 +15,5 @@ h3(#displayanaction). Display an action In order to create a hyperlink widget, you can use the following properties: * valueExpression: @aql:'Click'@ +* displayExpression: @aql:value@ * onClickExpression: @aql:self.doSomething()@
\ No newline at end of file diff --git a/doc/org.eclipse.eef.documentation/pages/language/widgets/label.html b/doc/org.eclipse.eef.documentation/pages/language/widgets/label.html index c11859cea..2b312f2e8 100644 --- a/doc/org.eclipse.eef.documentation/pages/language/widgets/label.html +++ b/doc/org.eclipse.eef.documentation/pages/language/widgets/label.html @@ -12,7 +12,8 @@ <a href="text.html">text</a> widget. On top of the common properties of all widgets (identifier, labelExpression, helpExpression, isEnabledExpression, propertyValidationRules), it has the following properties: </p> <ul> - <li>valueExpression: The value expression is used to compute the body of the label widget. This expression must return a string.</li> + <li>valueExpression: The value expression is used to compute the body of the label widget.</li> + <li>displayExpression: This expression will have access to the result of the valueExpression thanks to a variable named value and it should return a string. If this expression is blank, a call to java.lang.Object#toString() will be performed on the result of the valueExpression instead.</li> <li>style: The style of the label widget.</li> <li>conditionalStyle: All the conditional styles of the label widget.</li> </ul> @@ -25,6 +26,9 @@ <li>valueExpression: <code>aql:self.documentation</code> </li> + <li>displayExpression: + <code>aql:value</code> + </li> </ul> <p>EEF does not provide a default interpreter but you can easily configure EEF to be used with the AQL interpreter. In the integration of EEF with the AQL interpreter, you can register additional services, written in Java, in which you can expose to AQL new operations.</p> </body> diff --git a/doc/org.eclipse.eef.documentation/pages/language/widgets/label.textile b/doc/org.eclipse.eef.documentation/pages/language/widgets/label.textile index 8db221955..9b7b9c53c 100644 --- a/doc/org.eclipse.eef.documentation/pages/language/widgets/label.textile +++ b/doc/org.eclipse.eef.documentation/pages/language/widgets/label.textile @@ -4,7 +4,8 @@ h3(#description). Description The label widget can be used to display a read-only piece of text in your user interface. Its behavior is almost the same as the "text":text.html widget. On top of the common properties of all widgets (identifier, labelExpression, helpExpression, isEnabledExpression, propertyValidationRules), it has the following properties: -* valueExpression: The value expression is used to compute the body of the label widget. This expression must return a string. +* valueExpression: The value expression is used to compute the body of the label widget. +* displayExpression: This expression will have access to the result of the valueExpression thanks to a variable named value and it should return a string. If this expression is blank, a call to java.lang.Object#toString() will be performed on the result of the valueExpression instead. * style: The style of the label widget. * conditionalStyle: All the conditional styles of the label widget. @@ -14,5 +15,6 @@ In order to display in the user interface a label with the value of a read-only * labelExpression: @aql:'Documentation'@ * valueExpression: @aql:self.documentation@ +* displayExpression: @aql:value@ EEF does not provide a default interpreter but you can easily configure EEF to be used with the AQL interpreter. In the integration of EEF with the AQL interpreter, you can register additional services, written in Java, in which you can expose to AQL new operations.
\ No newline at end of file diff --git a/doc/org.eclipse.eef.documentation/pages/releasenotes.html b/doc/org.eclipse.eef.documentation/pages/releasenotes.html index eb5dab3f7..3f5e18e75 100644 --- a/doc/org.eclipse.eef.documentation/pages/releasenotes.html +++ b/doc/org.eclipse.eef.documentation/pages/releasenotes.html @@ -23,16 +23,24 @@ <p>This document contains the release notes for recent major releases of EEF.</p> <h3 id="eef1.7.0">Changes in EEF 1.7.0</h3> <h4 id="UserVisibleChanges">User-Visible Changes</h4> + <ul> + <li><span class="label label-success">Added</span> Labels and hyperlinks can now have buttons on their right side</li> + </ul> <h4 id="SpecifierVisibleChanges">Specifier-Visible Changes</h4> <ul> <li><span class="label label-success">Added</span> A brand new widget outside of the default library is now available to edit references using an easier approach. Only the name of the reference to edit is necessary and the rest will be computed by the EEF runtime.</li> + <li><span class="label label-success">Added</span> Widget actions are now available on labels and hyperlinks.</li> + <li><span class="label label-success">Added</span> Labels and hyperlinks now have a displayExpression. If unused, the result of the valueExpression will be converted to a string using the + <code>java.lang.Object#toString()</code> operation. + </li> </ul> <h4 id="DeveloperVisibleChanges">Developer-Visible Changes</h4> <ul> <li><span class="label label-info">Modified</span> The interface <code>org.eclipse.eef.core.api.EditingContextAdapter</code> has now a new method - <code>getEditingDomain()</code> which is used to return an EditingDomain for the EEF runtime. + <code>getEditingDomain()</code> which is used to return an EditingDomain for the EEF runtime. </li> + <li><span class="label label-info">Modified</span> The constructor of the EEFLabelController now requires an EditingContextAdapter to run the expression of the widget actions. </li> </ul> <h3 id="eef1.6.0">Changes in EEF 1.6.0</h3> <h4 id="UserVisibleChanges2">User-Visible Changes</h4> diff --git a/doc/org.eclipse.eef.documentation/pages/releasenotes.textile b/doc/org.eclipse.eef.documentation/pages/releasenotes.textile index c7a47482c..adb9e8f31 100644 --- a/doc/org.eclipse.eef.documentation/pages/releasenotes.textile +++ b/doc/org.eclipse.eef.documentation/pages/releasenotes.textile @@ -9,14 +9,18 @@ h3(#eef1.7.0). Changes in EEF 1.7.0 h4. User-Visible Changes +* <span class="label label-success">Added</span> Labels and hyperlinks can now have buttons on their right side h4. Specifier-Visible Changes * <span class="label label-success">Added</span> A brand new widget outside of the default library is now available to edit references using an easier approach. Only the name of the reference to edit is necessary and the rest will be computed by the EEF runtime. +* <span class="label label-success">Added</span> Widget actions are now available on labels and hyperlinks. +* <span class="label label-success">Added</span> Labels and hyperlinks now have a displayExpression. If unused, the result of the valueExpression will be converted to a string using the @java.lang.Object#toString()@ operation. h4. Developer-Visible Changes -* <span class="label label-info">Modified</span> The interface @org.eclipse.eef.core.api.EditingContextAdapter@ has now a new method @getEditingDomain()@ which is used to return an EditingDomain for the EEF runtime. +* <span class="label label-info">Modified</span> The interface @org.eclipse.eef.core.api.EditingContextAdapter@ has now a new method @getEditingDomain()@ which is used to return an EditingDomain for the EEF runtime. +* <span class="label label-info">Modified</span> The constructor of the EEFLabelController now requires an EditingContextAdapter to run the expression of the widget actions. h3(#eef1.6.0). Changes in EEF 1.6.0 diff --git a/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/api/controllers/EEFControllersFactory.java b/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/api/controllers/EEFControllersFactory.java index d5411e830..fdadcf6a5 100644 --- a/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/api/controllers/EEFControllersFactory.java +++ b/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/api/controllers/EEFControllersFactory.java @@ -83,10 +83,13 @@ public class EEFControllersFactory { * The variable manager * @param interpreter * The interpreter + * @param contextAdapter + * The context adapter * @return A label controller */ - public IEEFLabelController createLabelController(EEFLabelDescription description, IVariableManager variableManager, IInterpreter interpreter) { - return new EEFLabelController(description, variableManager, interpreter); + public IEEFLabelController createLabelController(EEFLabelDescription description, IVariableManager variableManager, IInterpreter interpreter, + EditingContextAdapter contextAdapter) { + return new EEFLabelController(description, variableManager, interpreter, contextAdapter); } /** diff --git a/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/api/controllers/IEEFHyperlinkController.java b/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/api/controllers/IEEFHyperlinkController.java index 888b5b1e1..12d55f99d 100644 --- a/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/api/controllers/IEEFHyperlinkController.java +++ b/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/api/controllers/IEEFHyperlinkController.java @@ -10,6 +10,8 @@ *******************************************************************************/ package org.eclipse.eef.core.api.controllers; +import org.eclipse.eef.EEFWidgetAction; + /** * The EEFHyperlinkController is responsible of supporting all the interactions with the widgets created for an * EEFHyperlinkDescription. @@ -39,4 +41,12 @@ public interface IEEFHyperlinkController extends IEEFWidgetController { */ void removeNewValueConsumer(); + /** + * Invoked when the user clicks on an action button. + * + * @param action + * Widget action + */ + void action(EEFWidgetAction action); + } diff --git a/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/api/controllers/IEEFLabelController.java b/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/api/controllers/IEEFLabelController.java index 06687ef2d..6eb917517 100644 --- a/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/api/controllers/IEEFLabelController.java +++ b/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/api/controllers/IEEFLabelController.java @@ -10,6 +10,8 @@ *******************************************************************************/ package org.eclipse.eef.core.api.controllers; +import org.eclipse.eef.EEFWidgetAction; + /** * The EEFLabelController is responsible of supporting all the interactions with the widgets created for an * EEFLabelDescription. @@ -29,4 +31,12 @@ public interface IEEFLabelController extends IEEFWidgetController { * Remove the consumer of the new value of the label. */ void removeNewValueConsumer(); + + /** + * Invoked when the user clicks on an action button. + * + * @param action + * Widget action + */ + void action(EEFWidgetAction action); } diff --git a/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/internal/controllers/EEFHyperlinkController.java b/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/internal/controllers/EEFHyperlinkController.java index 3d3cc5d0c..90ebe71e9 100644 --- a/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/internal/controllers/EEFHyperlinkController.java +++ b/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/internal/controllers/EEFHyperlinkController.java @@ -14,8 +14,10 @@ import java.util.HashMap; import java.util.Map; import org.eclipse.eef.EEFHyperlinkDescription; +import org.eclipse.eef.EEFWidgetAction; import org.eclipse.eef.EEFWidgetDescription; import org.eclipse.eef.EefPackage; +import org.eclipse.eef.common.api.utils.Util; import org.eclipse.eef.core.api.EEFExpressionUtils; import org.eclipse.eef.core.api.EditingContextAdapter; import org.eclipse.eef.core.api.controllers.AbstractEEFWidgetController; @@ -76,7 +78,17 @@ public class EEFHyperlinkController extends AbstractEEFWidgetController implemen super.refresh(); String valueExpression = this.description.getValueExpression(); - this.newEval().logIfInvalidType(String.class).call(valueExpression, this.newValueConsumer); + Object valueExpressionResult = this.newEval().evaluate(valueExpression); + + String displayExpression = this.description.getDisplayExpression(); + if (!Util.isBlank(displayExpression)) { + Map<String, Object> variables = new HashMap<String, Object>(); + variables.putAll(this.variableManager.getVariables()); + variables.put(EEFExpressionUtils.EEFReference.VALUE, valueExpressionResult); + EvalFactory.of(this.interpreter, variables).logIfInvalidType(String.class).call(displayExpression, this.newValueConsumer); + } else if (valueExpressionResult != null) { + this.newValueConsumer.apply(valueExpressionResult.toString()); + } } /** @@ -131,4 +143,25 @@ public class EEFHyperlinkController extends AbstractEEFWidgetController implemen return this.description; } + /** + * {@inheritDoc} + * + * @see org.eclipse.eef.core.api.controllers.IEEFHyperlinkController#action(EEFWidgetAction) + */ + @Override + public void action(final EEFWidgetAction action) { + this.contextAdapter.performModelChange(new Runnable() { + @Override + public void run() { + String expression = action.getActionExpression(); + EAttribute eAttribute = EefPackage.Literals.EEF_WIDGET_ACTION__ACTION_EXPRESSION; + + Map<String, Object> variables = new HashMap<String, Object>(); + variables.putAll(EEFHyperlinkController.this.variableManager.getVariables()); + + EvalFactory.of(EEFHyperlinkController.this.interpreter, variables).logIfBlank(eAttribute).call(expression); + } + }); + } + } diff --git a/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/internal/controllers/EEFLabelController.java b/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/internal/controllers/EEFLabelController.java index c81d58b66..5dd4cf8b3 100644 --- a/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/internal/controllers/EEFLabelController.java +++ b/plugins/org.eclipse.eef.core/src/org/eclipse/eef/core/internal/controllers/EEFLabelController.java @@ -10,11 +10,21 @@ *******************************************************************************/ package org.eclipse.eef.core.internal.controllers; +import java.util.HashMap; +import java.util.Map; + import org.eclipse.eef.EEFLabelDescription; +import org.eclipse.eef.EEFWidgetAction; import org.eclipse.eef.EEFWidgetDescription; +import org.eclipse.eef.EefPackage; +import org.eclipse.eef.common.api.utils.Util; +import org.eclipse.eef.core.api.EEFExpressionUtils; +import org.eclipse.eef.core.api.EditingContextAdapter; import org.eclipse.eef.core.api.controllers.AbstractEEFWidgetController; import org.eclipse.eef.core.api.controllers.IConsumer; import org.eclipse.eef.core.api.controllers.IEEFLabelController; +import org.eclipse.eef.core.api.utils.EvalFactory; +import org.eclipse.emf.ecore.EAttribute; import org.eclipse.sirius.common.interpreter.api.IInterpreter; import org.eclipse.sirius.common.interpreter.api.IVariableManager; @@ -30,6 +40,11 @@ public class EEFLabelController extends AbstractEEFWidgetController implements I private EEFLabelDescription description; /** + * The editing context adapter. + */ + private EditingContextAdapter contextAdapter; + + /** * The consumer of the new body. */ private IConsumer<String> newValueConsumer; @@ -43,10 +58,14 @@ public class EEFLabelController extends AbstractEEFWidgetController implements I * The variable manager * @param interpreter * The interpreter + * @param contextAdapter + * The editing context adapter */ - public EEFLabelController(EEFLabelDescription description, IVariableManager variableManager, IInterpreter interpreter) { + public EEFLabelController(EEFLabelDescription description, IVariableManager variableManager, IInterpreter interpreter, + EditingContextAdapter contextAdapter) { super(variableManager, interpreter); this.description = description; + this.contextAdapter = contextAdapter; } /** @@ -60,7 +79,17 @@ public class EEFLabelController extends AbstractEEFWidgetController implements I super.refresh(); String valueExpression = this.description.getValueExpression(); - this.newEval().logIfInvalidType(String.class).call(valueExpression, this.newValueConsumer); + Object valueExpressionResult = this.newEval().evaluate(valueExpression); + + String displayExpression = this.description.getDisplayExpression(); + if (!Util.isBlank(displayExpression)) { + Map<String, Object> variables = new HashMap<String, Object>(); + variables.putAll(this.variableManager.getVariables()); + variables.put(EEFExpressionUtils.EEFReference.VALUE, valueExpressionResult); + EvalFactory.of(this.interpreter, variables).logIfInvalidType(String.class).call(displayExpression, this.newValueConsumer); + } else if (valueExpressionResult != null) { + this.newValueConsumer.apply(valueExpressionResult.toString()); + } } /** @@ -93,4 +122,25 @@ public class EEFLabelController extends AbstractEEFWidgetController implements I this.newValueConsumer = null; } + /** + * {@inheritDoc} + * + * @see org.eclipse.eef.core.api.controllers.IEEFLabelController#action(EEFWidgetAction) + */ + @Override + public void action(final EEFWidgetAction action) { + this.contextAdapter.performModelChange(new Runnable() { + @Override + public void run() { + String expression = action.getActionExpression(); + EAttribute eAttribute = EefPackage.Literals.EEF_WIDGET_ACTION__ACTION_EXPRESSION; + + Map<String, Object> variables = new HashMap<String, Object>(); + variables.putAll(EEFLabelController.this.variableManager.getVariables()); + + EvalFactory.of(EEFLabelController.this.interpreter, variables).logIfBlank(eAttribute).call(expression); + } + }); + } + } diff --git a/plugins/org.eclipse.eef.edit/plugin.properties b/plugins/org.eclipse.eef.edit/plugin.properties index bc91a736b..46e5acd0d 100644 --- a/plugins/org.eclipse.eef.edit/plugin.properties +++ b/plugins/org.eclipse.eef.edit/plugin.properties @@ -117,6 +117,8 @@ _UI_EEFTextDescription_conditionalStyles_feature = Conditional Styles _UI_EEFLabelDescription_valueExpression_feature = Value Expression _UI_EEFLabelDescription_style_feature = Style _UI_EEFLabelDescription_conditionalStyles_feature = Conditional Styles +_UI_EEFLabelDescription_actions_feature = Actions +_UI_EEFLabelDescription_displayExpression_feature = Display Expression _UI_EEFButtonDescription_buttonLabelExpression_feature = Button Label Expression _UI_EEFButtonDescription_pushExpression_feature = Push Expression _UI_EEFButtonDescription_style_feature = Style @@ -142,6 +144,8 @@ _UI_EEFHyperlinkDescription_valueExpression_feature = Value Expression _UI_EEFHyperlinkDescription_onClickExpression_feature = On Click Expression _UI_EEFHyperlinkDescription_style_feature = Style _UI_EEFHyperlinkDescription_conditionalStyles_feature = Conditional Styles +_UI_EEFHyperlinkDescription_actions_feature = Actions +_UI_EEFHyperlinkDescription_displayExpression_feature = Display Expression _UI_EEFDynamicMappingFor_iterator_feature = Iterator _UI_EEFDynamicMappingFor_iterableExpression_feature = Iterable Expression _UI_EEFDynamicMappingFor_ifs_feature = Ifs diff --git a/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFConditionalStyleItemProvider.java b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFConditionalStyleItemProvider.java index a38a9648a..5632e165e 100644 --- a/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFConditionalStyleItemProvider.java +++ b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFConditionalStyleItemProvider.java @@ -17,6 +17,7 @@ import org.eclipse.emf.common.notify.AdapterFactory; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.util.ResourceLocator; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IChildCreationExtender; import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; import org.eclipse.emf.edit.provider.IItemLabelProvider; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; @@ -136,7 +137,7 @@ ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { */ @Override public ResourceLocator getResourceLocator() { - return EefEditPlugin.INSTANCE; + return ((IChildCreationExtender) adapterFactory).getResourceLocator(); } } diff --git a/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFControlDescriptionItemProvider.java b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFControlDescriptionItemProvider.java index bf5a56f1f..f761cb9d3 100644 --- a/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFControlDescriptionItemProvider.java +++ b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFControlDescriptionItemProvider.java @@ -17,6 +17,7 @@ import org.eclipse.emf.common.notify.AdapterFactory; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.util.ResourceLocator; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IChildCreationExtender; import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; import org.eclipse.emf.edit.provider.IItemLabelProvider; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; @@ -130,7 +131,7 @@ ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { */ @Override public ResourceLocator getResourceLocator() { - return EefEditPlugin.INSTANCE; + return ((IChildCreationExtender) adapterFactory).getResourceLocator(); } } diff --git a/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFCustomExpressionItemProvider.java b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFCustomExpressionItemProvider.java index 37d56af02..d63290747 100644 --- a/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFCustomExpressionItemProvider.java +++ b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFCustomExpressionItemProvider.java @@ -17,6 +17,7 @@ import org.eclipse.emf.common.notify.AdapterFactory; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.util.ResourceLocator; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IChildCreationExtender; import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; import org.eclipse.emf.edit.provider.IItemLabelProvider; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; @@ -156,7 +157,7 @@ ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { */ @Override public ResourceLocator getResourceLocator() { - return EefEditPlugin.INSTANCE; + return ((IChildCreationExtender) adapterFactory).getResourceLocator(); } } diff --git a/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFDynamicMappingIfItemProvider.java b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFDynamicMappingIfItemProvider.java index 81e53a9e4..218da708b 100644 --- a/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFDynamicMappingIfItemProvider.java +++ b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFDynamicMappingIfItemProvider.java @@ -19,6 +19,7 @@ import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.util.ResourceLocator; import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IChildCreationExtender; import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; import org.eclipse.emf.edit.provider.IItemLabelProvider; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; @@ -208,7 +209,7 @@ ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { */ @Override public ResourceLocator getResourceLocator() { - return EefEditPlugin.INSTANCE; + return ((IChildCreationExtender) adapterFactory).getResourceLocator(); } } diff --git a/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFGroupDescriptionItemProvider.java b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFGroupDescriptionItemProvider.java index ab4dfbdbc..794c8b314 100644 --- a/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFGroupDescriptionItemProvider.java +++ b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFGroupDescriptionItemProvider.java @@ -19,6 +19,7 @@ import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.util.ResourceLocator; import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IChildCreationExtender; import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; import org.eclipse.emf.edit.provider.IItemLabelProvider; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; @@ -297,7 +298,7 @@ ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { */ @Override public ResourceLocator getResourceLocator() { - return EefEditPlugin.INSTANCE; + return ((IChildCreationExtender) adapterFactory).getResourceLocator(); } } diff --git a/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFGroupStyleItemProvider.java b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFGroupStyleItemProvider.java index beb11a0da..e5be3bc8c 100644 --- a/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFGroupStyleItemProvider.java +++ b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFGroupStyleItemProvider.java @@ -17,6 +17,7 @@ import org.eclipse.emf.common.notify.AdapterFactory; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.util.ResourceLocator; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IChildCreationExtender; import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; import org.eclipse.emf.edit.provider.IItemLabelProvider; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; @@ -242,7 +243,7 @@ ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { */ @Override public ResourceLocator getResourceLocator() { - return EefEditPlugin.INSTANCE; + return ((IChildCreationExtender) adapterFactory).getResourceLocator(); } } diff --git a/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFHyperlinkDescriptionItemProvider.java b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFHyperlinkDescriptionItemProvider.java index 3d063733c..ade85976b 100644 --- a/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFHyperlinkDescriptionItemProvider.java +++ b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFHyperlinkDescriptionItemProvider.java @@ -49,6 +49,7 @@ public class EEFHyperlinkDescriptionItemProvider extends EEFWidgetDescriptionIte super.getPropertyDescriptors(object); addValueExpressionPropertyDescriptor(object); + addDisplayExpressionPropertyDescriptor(object); addOnClickExpressionPropertyDescriptor(object); } return itemPropertyDescriptors; @@ -72,6 +73,23 @@ public class EEFHyperlinkDescriptionItemProvider extends EEFWidgetDescriptionIte } /** + * This adds a property descriptor for the Display Expression feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addDisplayExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors + .add(createItemPropertyDescriptor( + ((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_EEFHyperlinkDescription_displayExpression_feature"), //$NON-NLS-1$ + getString( + "_UI_PropertyDescriptor_description", "_UI_EEFHyperlinkDescription_displayExpression_feature", "_UI_EEFHyperlinkDescription_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + EefPackage.Literals.EEF_HYPERLINK_DESCRIPTION__DISPLAY_EXPRESSION, true, false, false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** * This adds a property descriptor for the On Click Expression feature. <!-- begin-user-doc --> <!-- end-user-doc * --> * @@ -103,6 +121,7 @@ public class EEFHyperlinkDescriptionItemProvider extends EEFWidgetDescriptionIte super.getChildrenFeatures(object); childrenFeatures.add(EefPackage.Literals.EEF_HYPERLINK_DESCRIPTION__STYLE); childrenFeatures.add(EefPackage.Literals.EEF_HYPERLINK_DESCRIPTION__CONDITIONAL_STYLES); + childrenFeatures.add(EefPackage.Literals.EEF_HYPERLINK_DESCRIPTION__ACTIONS); } return childrenFeatures; } @@ -165,11 +184,13 @@ public class EEFHyperlinkDescriptionItemProvider extends EEFWidgetDescriptionIte switch (notification.getFeatureID(EEFHyperlinkDescription.class)) { case EefPackage.EEF_HYPERLINK_DESCRIPTION__VALUE_EXPRESSION: + case EefPackage.EEF_HYPERLINK_DESCRIPTION__DISPLAY_EXPRESSION: case EefPackage.EEF_HYPERLINK_DESCRIPTION__ON_CLICK_EXPRESSION: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; case EefPackage.EEF_HYPERLINK_DESCRIPTION__STYLE: case EefPackage.EEF_HYPERLINK_DESCRIPTION__CONDITIONAL_STYLES: + case EefPackage.EEF_HYPERLINK_DESCRIPTION__ACTIONS: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); return; } @@ -191,6 +212,9 @@ public class EEFHyperlinkDescriptionItemProvider extends EEFWidgetDescriptionIte newChildDescriptors.add(createChildParameter(EefPackage.Literals.EEF_HYPERLINK_DESCRIPTION__CONDITIONAL_STYLES, EefFactory.eINSTANCE.createEEFHyperlinkConditionalStyle())); + + newChildDescriptors.add(createChildParameter(EefPackage.Literals.EEF_HYPERLINK_DESCRIPTION__ACTIONS, + EefFactory.eINSTANCE.createEEFWidgetAction())); } } diff --git a/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFLabelDescriptionItemProvider.java b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFLabelDescriptionItemProvider.java index 7d1177e90..c293df67d 100644 --- a/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFLabelDescriptionItemProvider.java +++ b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFLabelDescriptionItemProvider.java @@ -25,13 +25,13 @@ import org.eclipse.emf.edit.provider.ViewerNotification; /** * This is the item provider adapter for a {@link org.eclipse.eef.EEFLabelDescription} object. <!-- begin-user-doc --> * <!-- end-user-doc --> - * + * * @generated */ public class EEFLabelDescriptionItemProvider extends EEFWidgetDescriptionItemProvider { /** * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ public EEFLabelDescriptionItemProvider(AdapterFactory adapterFactory) { @@ -40,7 +40,7 @@ public class EEFLabelDescriptionItemProvider extends EEFWidgetDescriptionItemPro /** * This returns the property descriptors for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ @Override @@ -48,31 +48,46 @@ public class EEFLabelDescriptionItemProvider extends EEFWidgetDescriptionItemPro if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); - addBodyExpressionPropertyDescriptor(object); + addValueExpressionPropertyDescriptor(object); + addDisplayExpressionPropertyDescriptor(object); } return itemPropertyDescriptors; } /** - * This adds a property descriptor for the Body Expression feature. <!-- begin-user-doc --> <!-- end-user-doc --> - * + * This adds a property descriptor for the Value Expression feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * * @generated */ - protected void addBodyExpressionPropertyDescriptor(Object object) { + protected void addValueExpressionPropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), - getString("_UI_EEFLabelDescription_bodyExpression_feature"), //$NON-NLS-1$ - getString("_UI_PropertyDescriptor_description", "_UI_EEFLabelDescription_bodyExpression_feature", "_UI_EEFLabelDescription_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + getString("_UI_EEFLabelDescription_valueExpression_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_EEFLabelDescription_valueExpression_feature", "_UI_EEFLabelDescription_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ EefPackage.Literals.EEF_LABEL_DESCRIPTION__VALUE_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } /** + * This adds a property descriptor for the Display Expression feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addDisplayExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_EEFLabelDescription_displayExpression_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_EEFLabelDescription_displayExpression_feature", "_UI_EEFLabelDescription_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + EefPackage.Literals.EEF_LABEL_DESCRIPTION__DISPLAY_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, + null)); + } + + /** * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. <!-- begin-user-doc --> <!-- * end-user-doc --> - * + * * @generated */ @Override @@ -81,13 +96,14 @@ public class EEFLabelDescriptionItemProvider extends EEFWidgetDescriptionItemPro super.getChildrenFeatures(object); childrenFeatures.add(EefPackage.Literals.EEF_LABEL_DESCRIPTION__STYLE); childrenFeatures.add(EefPackage.Literals.EEF_LABEL_DESCRIPTION__CONDITIONAL_STYLES); + childrenFeatures.add(EefPackage.Literals.EEF_LABEL_DESCRIPTION__ACTIONS); } return childrenFeatures; } /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ @Override @@ -100,7 +116,7 @@ public class EEFLabelDescriptionItemProvider extends EEFWidgetDescriptionItemPro /** * This returns EEFLabelDescription.gif. <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ @Override @@ -110,7 +126,7 @@ public class EEFLabelDescriptionItemProvider extends EEFWidgetDescriptionItemPro /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ @Override @@ -120,14 +136,14 @@ public class EEFLabelDescriptionItemProvider extends EEFWidgetDescriptionItemPro /** * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ @Override public String getText(Object object) { String label = ((EEFLabelDescription) object).getIdentifier(); return label == null || label.length() == 0 ? getString("_UI_EEFLabelDescription_type") : //$NON-NLS-1$ - getString("_UI_EEFLabelDescription_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + getString("_UI_EEFLabelDescription_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ } /** @@ -143,10 +159,12 @@ public class EEFLabelDescriptionItemProvider extends EEFWidgetDescriptionItemPro switch (notification.getFeatureID(EEFLabelDescription.class)) { case EefPackage.EEF_LABEL_DESCRIPTION__VALUE_EXPRESSION: + case EefPackage.EEF_LABEL_DESCRIPTION__DISPLAY_EXPRESSION: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; case EefPackage.EEF_LABEL_DESCRIPTION__STYLE: case EefPackage.EEF_LABEL_DESCRIPTION__CONDITIONAL_STYLES: + case EefPackage.EEF_LABEL_DESCRIPTION__ACTIONS: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); return; } @@ -156,7 +174,7 @@ public class EEFLabelDescriptionItemProvider extends EEFWidgetDescriptionItemPro /** * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be created * under this object. <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ @Override @@ -167,6 +185,9 @@ public class EEFLabelDescriptionItemProvider extends EEFWidgetDescriptionItemPro newChildDescriptors.add(createChildParameter(EefPackage.Literals.EEF_LABEL_DESCRIPTION__CONDITIONAL_STYLES, EefFactory.eINSTANCE.createEEFLabelConditionalStyle())); + + newChildDescriptors + .add(createChildParameter(EefPackage.Literals.EEF_LABEL_DESCRIPTION__ACTIONS, EefFactory.eINSTANCE.createEEFWidgetAction())); } } diff --git a/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFLayoutDescriptionItemProvider.java b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFLayoutDescriptionItemProvider.java index 64c1a47ce..e11a7c071 100644 --- a/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFLayoutDescriptionItemProvider.java +++ b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFLayoutDescriptionItemProvider.java @@ -14,6 +14,7 @@ import java.util.List; import org.eclipse.emf.common.notify.AdapterFactory; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.edit.provider.IChildCreationExtender; import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; import org.eclipse.emf.edit.provider.IItemLabelProvider; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; @@ -104,7 +105,7 @@ ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { */ @Override public ResourceLocator getResourceLocator() { - return EefEditPlugin.INSTANCE; + return ((IChildCreationExtender) adapterFactory).getResourceLocator(); } } diff --git a/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFPageDescriptionItemProvider.java b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFPageDescriptionItemProvider.java index 4176fbcac..07b335246 100644 --- a/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFPageDescriptionItemProvider.java +++ b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFPageDescriptionItemProvider.java @@ -19,6 +19,7 @@ import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.util.ResourceLocator; import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IChildCreationExtender; import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; import org.eclipse.emf.edit.provider.IItemLabelProvider; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; @@ -261,7 +262,7 @@ ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { */ @Override public ResourceLocator getResourceLocator() { - return EefEditPlugin.INSTANCE; + return ((IChildCreationExtender) adapterFactory).getResourceLocator(); } } diff --git a/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFRuleAuditDescriptionItemProvider.java b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFRuleAuditDescriptionItemProvider.java index e69aeed3c..50b351bac 100644 --- a/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFRuleAuditDescriptionItemProvider.java +++ b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFRuleAuditDescriptionItemProvider.java @@ -17,6 +17,7 @@ import org.eclipse.emf.common.notify.AdapterFactory; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.util.ResourceLocator; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IChildCreationExtender; import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; import org.eclipse.emf.edit.provider.IItemLabelProvider; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; @@ -145,7 +146,7 @@ ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { */ @Override public ResourceLocator getResourceLocator() { - return EefEditPlugin.INSTANCE; + return ((IChildCreationExtender) adapterFactory).getResourceLocator(); } } diff --git a/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFValidationFixDescriptionItemProvider.java b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFValidationFixDescriptionItemProvider.java index 6e2b37b20..3a76c3709 100644 --- a/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFValidationFixDescriptionItemProvider.java +++ b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFValidationFixDescriptionItemProvider.java @@ -17,6 +17,7 @@ import org.eclipse.emf.common.notify.AdapterFactory; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.util.ResourceLocator; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IChildCreationExtender; import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; import org.eclipse.emf.edit.provider.IItemLabelProvider; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; @@ -164,7 +165,7 @@ IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, II */ @Override public ResourceLocator getResourceLocator() { - return EefEditPlugin.INSTANCE; + return ((IChildCreationExtender) adapterFactory).getResourceLocator(); } } diff --git a/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFValidationRuleDescriptionItemProvider.java b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFValidationRuleDescriptionItemProvider.java index 3c900fd8d..bcea9e50a 100644 --- a/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFValidationRuleDescriptionItemProvider.java +++ b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFValidationRuleDescriptionItemProvider.java @@ -20,6 +20,7 @@ import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.util.ResourceLocator; import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IChildCreationExtender; import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; import org.eclipse.emf.edit.provider.IItemLabelProvider; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; @@ -199,7 +200,7 @@ IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, II */ @Override public ResourceLocator getResourceLocator() { - return EefEditPlugin.INSTANCE; + return ((IChildCreationExtender) adapterFactory).getResourceLocator(); } } diff --git a/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFViewDescriptionItemProvider.java b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFViewDescriptionItemProvider.java index b0aab1c87..588936b98 100644 --- a/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFViewDescriptionItemProvider.java +++ b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFViewDescriptionItemProvider.java @@ -19,6 +19,7 @@ import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.util.ResourceLocator; import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IChildCreationExtender; import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; import org.eclipse.emf.edit.provider.IItemLabelProvider; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; @@ -228,7 +229,7 @@ ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { */ @Override public ResourceLocator getResourceLocator() { - return EefEditPlugin.INSTANCE; + return ((IChildCreationExtender) adapterFactory).getResourceLocator(); } } diff --git a/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFWidgetActionItemProvider.java b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFWidgetActionItemProvider.java index 958d83bd4..305660a04 100644 --- a/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFWidgetActionItemProvider.java +++ b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFWidgetActionItemProvider.java @@ -17,6 +17,7 @@ import org.eclipse.emf.common.notify.AdapterFactory; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.util.ResourceLocator; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IChildCreationExtender; import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; import org.eclipse.emf.edit.provider.IItemLabelProvider; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; @@ -157,7 +158,7 @@ ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { */ @Override public ResourceLocator getResourceLocator() { - return EefEditPlugin.INSTANCE; + return ((IChildCreationExtender) adapterFactory).getResourceLocator(); } } diff --git a/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFWidgetStyleItemProvider.java b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFWidgetStyleItemProvider.java index b346b8f5e..9479ccc87 100644 --- a/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFWidgetStyleItemProvider.java +++ b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EEFWidgetStyleItemProvider.java @@ -17,6 +17,7 @@ import org.eclipse.emf.common.notify.AdapterFactory; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.util.ResourceLocator; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IChildCreationExtender; import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; import org.eclipse.emf.edit.provider.IItemLabelProvider; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; @@ -207,7 +208,7 @@ ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { */ @Override public ResourceLocator getResourceLocator() { - return EefEditPlugin.INSTANCE; + return ((IChildCreationExtender) adapterFactory).getResourceLocator(); } } diff --git a/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EefItemProviderAdapterFactory.java b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EefItemProviderAdapterFactory.java index 0860b9075..36b0545a4 100644 --- a/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EefItemProviderAdapterFactory.java +++ b/plugins/org.eclipse.eef.edit/src-gen/org/eclipse/eef/provider/EefItemProviderAdapterFactory.java @@ -10,15 +10,21 @@ package org.eclipse.eef.provider; import java.util.ArrayList; import java.util.Collection; +import java.util.List; +import org.eclipse.eef.EefPackage; import org.eclipse.eef.util.EefAdapterFactory; import org.eclipse.emf.common.notify.Adapter; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.edit.domain.EditingDomain; import org.eclipse.emf.edit.provider.ChangeNotifier; +import org.eclipse.emf.edit.provider.ChildCreationExtenderManager; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ComposedAdapterFactory; import org.eclipse.emf.edit.provider.IChangeNotifier; +import org.eclipse.emf.edit.provider.IChildCreationExtender; import org.eclipse.emf.edit.provider.IDisposable; import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; import org.eclipse.emf.edit.provider.IItemLabelProvider; @@ -32,10 +38,11 @@ import org.eclipse.emf.edit.provider.ITreeItemContentProvider; * factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}. The adapters * also support Eclipse property sheets. Note that most of the adapters are shared among multiple instances. <!-- * begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ -public class EefItemProviderAdapterFactory extends EefAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable { +public class EefItemProviderAdapterFactory extends EefAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable, +IChildCreationExtender { /** * This keeps track of the root adapter factory that delegates to this adapter factory. <!-- begin-user-doc --> <!-- * end-user-doc --> @@ -53,6 +60,13 @@ public class EefItemProviderAdapterFactory extends EefAdapterFactory implements protected IChangeNotifier changeNotifier = new ChangeNotifier(); /** + * This helps manage the child creation extenders. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected ChildCreationExtenderManager childCreationExtenderManager = new ChildCreationExtenderManager(EefEditPlugin.INSTANCE, EefPackage.eNS_URI); + + /** * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}. <!-- * begin-user-doc --> <!-- end-user-doc --> * @@ -1120,6 +1134,35 @@ public class EefItemProviderAdapterFactory extends EefAdapterFactory implements } /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public List<IChildCreationExtender> getChildCreationExtenders() { + return childCreationExtenderManager.getChildCreationExtenders(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Collection<?> getNewChildDescriptors(Object object, EditingDomain editingDomain) { + return childCreationExtenderManager.getNewChildDescriptors(object, editingDomain); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return childCreationExtenderManager; + } + + /** * This adds a listener. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated diff --git a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFHyperlinkLifecycleManager.java b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFHyperlinkLifecycleManager.java index 72268860e..6e1c59bae 100644 --- a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFHyperlinkLifecycleManager.java +++ b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFHyperlinkLifecycleManager.java @@ -12,8 +12,12 @@ package org.eclipse.eef.ide.ui.internal.widgets; import com.google.common.base.Objects; +import java.util.ArrayList; +import java.util.List; + import org.eclipse.eef.EEFHyperlinkDescription; import org.eclipse.eef.EEFHyperlinkStyle; +import org.eclipse.eef.EEFWidgetAction; import org.eclipse.eef.EEFWidgetDescription; import org.eclipse.eef.EEFWidgetStyle; import org.eclipse.eef.common.ui.api.EEFWidgetFactory; @@ -32,7 +36,10 @@ import org.eclipse.swt.SWT; import org.eclipse.swt.custom.StyleRange; import org.eclipse.swt.custom.StyledText; import org.eclipse.swt.events.MouseListener; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; @@ -54,6 +61,16 @@ public class EEFHyperlinkLifecycleManager extends AbstractEEFWidgetLifecycleMana private StyledText hyperlink; /** + * The widget factory. + */ + private EEFWidgetFactory widgetFactory; + + /** + * The action buttons. + */ + private List<ActionButton> actionButtons = new ArrayList<ActionButton>(); + + /** * The controller. */ private IEEFHyperlinkController controller; @@ -89,18 +106,60 @@ public class EEFHyperlinkLifecycleManager extends AbstractEEFWidgetLifecycleMana */ @Override protected void createMainControl(Composite parent, IEEFFormContainer formContainer) { - EEFWidgetFactory widgetFactory = formContainer.getWidgetFactory(); + this.widgetFactory = formContainer.getWidgetFactory(); + + // this is the parent composite + Composite hyperlinkComposite = this.widgetFactory.createFlatFormComposite(parent); + GridLayout layout = new GridLayout(2, false); + // Remove the 5px left margin only + layout.marginWidth = 0; + layout.marginRight = 5; + hyperlinkComposite.setLayout(layout); + + GridData gridData = new GridData(SWT.FILL, SWT.CENTER, true, false); + hyperlinkComposite.setLayoutData(gridData); + this.createHyperlink(hyperlinkComposite); + this.createWidgetActionButtons(hyperlinkComposite); + + this.controller = new EEFControllersFactory().createHyperlinkController(this.description, this.variableManager, this.interpreter, + this.contextAdapter); + } + + /** + * Create the hyperlink widget. + * + * @param parent + * The parent composite + */ + private void createHyperlink(Composite parent) { this.hyperlink = widgetFactory.createStyledText(parent, SWT.READ_ONLY); GridData gridData = new GridData(SWT.FILL, SWT.CENTER, true, false); gridData.horizontalIndent = VALIDATION_MARKER_OFFSET; this.hyperlink.setLayoutData(gridData); this.hyperlink.setEditable(false); - this.hyperlink.setEnabled(true); - widgetFactory.paintBordersFor(parent); + } - this.controller = new EEFControllersFactory().createHyperlinkController(this.description, this.variableManager, this.interpreter, - this.contextAdapter); + /** + * Creates widget action buttons. + * + * @param parent + * The parent composite + */ + private void createWidgetActionButtons(Composite parent) { + Composite buttons = this.widgetFactory.createFlatFormComposite(parent); + + GridData gridData = new GridData(); + gridData.grabExcessHorizontalSpace = false; + buttons.setLayoutData(gridData); + + buttons.setLayout(new GridLayout(this.description.getActions().size(), true)); + + // Buttons are visible only if an action is defined + for (EEFWidgetAction action : this.description.getActions()) { + ActionButton actionButton = new ActionButton(action, buttons, this.widgetFactory, this.interpreter, this.variableManager); + actionButtons.add(actionButton); + } } /** @@ -160,8 +219,18 @@ public class EEFHyperlinkLifecycleManager extends AbstractEEFWidgetLifecycleMana } } } - }); + + for (final ActionButton actionButton : actionButtons) { + SelectionAdapter selectionListener = new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + controller.action(actionButton.getAction()); + } + }; + + actionButton.addSelectionListener(selectionListener); + } } /** @@ -218,7 +287,13 @@ public class EEFHyperlinkLifecycleManager extends AbstractEEFWidgetLifecycleMana if (!hyperlink.isDisposed()) { this.hyperlink.removeMouseListener(this.hyperlinkListener); } + + for (ActionButton actionButton : this.actionButtons) { + actionButton.removeSelectionListener(); + } + this.controller.removeNewValueConsumer(); + this.actionButtons.clear(); } /** @@ -230,5 +305,9 @@ public class EEFHyperlinkLifecycleManager extends AbstractEEFWidgetLifecycleMana public void refresh() { super.refresh(); this.hyperlink.setEnabled(isEnabled()); + + for (ActionButton actionButton : this.actionButtons) { + actionButton.setEnabled(this.isEnabled()); + } } } diff --git a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFLabelLifecycleManager.java b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFLabelLifecycleManager.java index 3a7ceb220..5826c5f84 100644 --- a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFLabelLifecycleManager.java +++ b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFLabelLifecycleManager.java @@ -12,8 +12,12 @@ package org.eclipse.eef.ide.ui.internal.widgets; import com.google.common.base.Objects; +import java.util.ArrayList; +import java.util.List; + import org.eclipse.eef.EEFLabelDescription; import org.eclipse.eef.EEFLabelStyle; +import org.eclipse.eef.EEFWidgetAction; import org.eclipse.eef.EEFWidgetDescription; import org.eclipse.eef.EEFWidgetStyle; import org.eclipse.eef.common.ui.api.EEFWidgetFactory; @@ -29,7 +33,10 @@ import org.eclipse.sirius.common.interpreter.api.IInterpreter; import org.eclipse.sirius.common.interpreter.api.IVariableManager; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.StyledText; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; @@ -58,11 +65,21 @@ public class EEFLabelLifecycleManager extends AbstractEEFWidgetLifecycleManager private StyledText body; /** + * The action buttons. + */ + private List<ActionButton> actionButtons = new ArrayList<ActionButton>(); + + /** * The controller. */ private IEEFLabelController controller; /** + * The widget factory. + */ + private EEFWidgetFactory widgetFactory; + + /** * The constructor. * * @param description @@ -88,9 +105,35 @@ public class EEFLabelLifecycleManager extends AbstractEEFWidgetLifecycleManager */ @Override protected void createMainControl(Composite parent, IEEFFormContainer formContainer) { - EEFWidgetFactory widgetFactory = formContainer.getWidgetFactory(); - this.body = widgetFactory.createStyledText(parent, SWT.WRAP); - GridData gridData = new GridData(SWT.FILL, SWT.BEGINNING, true, false); + this.widgetFactory = formContainer.getWidgetFactory(); + + // this is the parent composite + Composite labelComposite = this.widgetFactory.createFlatFormComposite(parent); + GridLayout layout = new GridLayout(2, false); + // Remove the 5px left margin only + layout.marginWidth = 0; + layout.marginRight = 5; + labelComposite.setLayout(layout); + + GridData gridData = new GridData(SWT.FILL, SWT.CENTER, true, false); + labelComposite.setLayoutData(gridData); + + this.createLabel(labelComposite); + this.createWidgetActionButtons(labelComposite); + + this.controller = new EEFControllersFactory().createLabelController(this.description, this.variableManager, this.interpreter, + this.contextAdapter); + } + + /** + * Create the label widget. + * + * @param parent + * The parent composite + */ + private void createLabel(Composite parent) { + this.body = this.widgetFactory.createStyledText(parent, SWT.WRAP); + GridData gridData = new GridData(SWT.FILL, SWT.CENTER, true, false); // TODO Add a linecount property to the label and use it to compute the height of the widget gridData.heightHint = this.body.getLineHeight(); @@ -98,8 +141,28 @@ public class EEFLabelLifecycleManager extends AbstractEEFWidgetLifecycleManager gridData.horizontalIndent = VALIDATION_MARKER_OFFSET; this.body.setLayoutData(gridData); this.body.setEditable(false); + } + + /** + * Create widget action buttons. + * + * @param parent + * The parent composite + */ + private void createWidgetActionButtons(Composite parent) { + Composite buttons = this.widgetFactory.createFlatFormComposite(parent); + + GridData gridData = new GridData(); + gridData.grabExcessHorizontalSpace = false; + buttons.setLayoutData(gridData); - this.controller = new EEFControllersFactory().createLabelController(this.description, this.variableManager, this.interpreter); + buttons.setLayout(new GridLayout(this.description.getActions().size(), true)); + + // Buttons are visible only if an action is defined + for (EEFWidgetAction action : this.description.getActions()) { + ActionButton actionButton = new ActionButton(action, buttons, this.widgetFactory, this.interpreter, this.variableManager); + actionButtons.add(actionButton); + } } /** @@ -132,6 +195,17 @@ public class EEFLabelLifecycleManager extends AbstractEEFWidgetLifecycleManager } } }); + + for (final ActionButton actionButton : actionButtons) { + SelectionAdapter selectionListener = new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + controller.action(actionButton.getAction()); + } + }; + + actionButton.addSelectionListener(selectionListener); + } } /** @@ -158,6 +232,10 @@ public class EEFLabelLifecycleManager extends AbstractEEFWidgetLifecycleManager public void refresh() { super.refresh(); this.body.setEnabled(isEnabled()); + + for (ActionButton actionButton : this.actionButtons) { + actionButton.setEnabled(this.isEnabled()); + } } /** @@ -168,7 +246,12 @@ public class EEFLabelLifecycleManager extends AbstractEEFWidgetLifecycleManager @Override public void aboutToBeHidden() { super.aboutToBeHidden(); + for (ActionButton actionButton : this.actionButtons) { + actionButton.removeSelectionListener(); + } + this.controller.removeNewValueConsumer(); + this.actionButtons.clear(); } /** diff --git a/plugins/org.eclipse.eef/model/eef.ecore b/plugins/org.eclipse.eef/model/eef.ecore index 37a83ce0b..41c77c2f0 100644 --- a/plugins/org.eclipse.eef/model/eef.ecore +++ b/plugins/org.eclipse.eef/model/eef.ecore @@ -331,6 +331,11 @@ <details key="documentation" value="The body of the label containing the meaningful content"/> </eAnnotations> </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="displayExpression" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"> + <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> + <details key="documentation" value="This function will return the label to display"/> + </eAnnotations> + </eStructuralFeatures> <eStructuralFeatures xsi:type="ecore:EReference" name="style" eType="#//EEFLabelStyle" containment="true"> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> @@ -343,6 +348,8 @@ <details key="documentation" value="Defines the label style associated to a precondition"/> </eAnnotations> </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="actions" upperBound="-1" + eType="#//EEFWidgetAction" containment="true"/> </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="EEFButtonDescription" eSuperTypes="#//EEFWidgetDescription"> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> @@ -490,6 +497,11 @@ <details key="documentation" value="Indicates how to display the input value."/> </eAnnotations> </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="displayExpression" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"> + <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> + <details key="documentation" value="This function will return the label to display"/> + </eAnnotations> + </eStructuralFeatures> <eStructuralFeatures xsi:type="ecore:EAttribute" name="onClickExpression" eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> <details key="documentation" value="Defines the behavior executed when the end-user clicks on the hyperlink."/> @@ -507,6 +519,8 @@ <details key="documentation" value="Defines the hyperlink style associated to a precondition"/> </eAnnotations> </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="actions" upperBound="-1" + eType="#//EEFWidgetAction" containment="true"/> </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="EEFDynamicMappingFor" eSuperTypes="#//EEFControlDescription"> <eStructuralFeatures xsi:type="ecore:EAttribute" name="iterator" lowerBound="1" diff --git a/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/EEFHyperlinkDescription.java b/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/EEFHyperlinkDescription.java index 4efada047..998f5a1f6 100644 --- a/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/EEFHyperlinkDescription.java +++ b/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/EEFHyperlinkDescription.java @@ -20,9 +20,11 @@ import org.eclipse.emf.common.util.EList; * The following features are supported: * <ul> * <li>{@link org.eclipse.eef.EEFHyperlinkDescription#getValueExpression <em>Value Expression</em>}</li> + * <li>{@link org.eclipse.eef.EEFHyperlinkDescription#getDisplayExpression <em>Display Expression</em>}</li> * <li>{@link org.eclipse.eef.EEFHyperlinkDescription#getOnClickExpression <em>On Click Expression</em>}</li> * <li>{@link org.eclipse.eef.EEFHyperlinkDescription#getStyle <em>Style</em>}</li> * <li>{@link org.eclipse.eef.EEFHyperlinkDescription#getConditionalStyles <em>Conditional Styles</em>}</li> + * <li>{@link org.eclipse.eef.EEFHyperlinkDescription#getActions <em>Actions</em>}</li> * </ul> * </p> * @@ -55,6 +57,29 @@ public interface EEFHyperlinkDescription extends EEFWidgetDescription { void setValueExpression(String value); /** + * Returns the value of the '<em><b>Display Expression</b></em>' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> <!-- begin-model-doc --> This function will return the label to display <!-- end-model-doc --> + * + * @return the value of the '<em>Display Expression</em>' attribute. + * @see #setDisplayExpression(String) + * @see org.eclipse.eef.EefPackage#getEEFHyperlinkDescription_DisplayExpression() + * @model + * @generated + */ + String getDisplayExpression(); + + /** + * Sets the value of the '{@link org.eclipse.eef.EEFHyperlinkDescription#getDisplayExpression + * <em>Display Expression</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Display Expression</em>' attribute. + * @see #getDisplayExpression() + * @generated + */ + void setDisplayExpression(String value); + + /** * Returns the value of the '<em><b>On Click Expression</b></em>' attribute. <!-- begin-user-doc --> <!-- * end-user-doc --> <!-- begin-model-doc --> Defines the behavior executed when the end-user updates the value of * the text field. <!-- end-model-doc --> @@ -113,4 +138,20 @@ public interface EEFHyperlinkDescription extends EEFWidgetDescription { */ EList<EEFHyperlinkConditionalStyle> getConditionalStyles(); + /** + * Returns the value of the '<em><b>Actions</b></em>' containment reference list. The list contents are of type + * {@link org.eclipse.eef.EEFWidgetAction}. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Actions</em>' containment reference list isn't clear, there really should be more of a + * description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Actions</em>' containment reference list. + * @see org.eclipse.eef.EefPackage#getEEFHyperlinkDescription_Actions() + * @model containment="true" resolveProxies="true" + * @generated + */ + EList<EEFWidgetAction> getActions(); + } // EEFHyperlinkDescription diff --git a/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/EEFLabelDescription.java b/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/EEFLabelDescription.java index 90b2b6037..6fe8ed518 100644 --- a/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/EEFLabelDescription.java +++ b/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/EEFLabelDescription.java @@ -20,8 +20,10 @@ import org.eclipse.emf.common.util.EList; * The following features are supported: * <ul> * <li>{@link org.eclipse.eef.EEFLabelDescription#getValueExpression <em>Value Expression</em>}</li> + * <li>{@link org.eclipse.eef.EEFLabelDescription#getDisplayExpression <em>Display Expression</em>}</li> * <li>{@link org.eclipse.eef.EEFLabelDescription#getStyle <em>Style</em>}</li> * <li>{@link org.eclipse.eef.EEFLabelDescription#getConditionalStyles <em>Conditional Styles</em>}</li> + * <li>{@link org.eclipse.eef.EEFLabelDescription#getActions <em>Actions</em>}</li> * </ul> * </p> * @@ -54,6 +56,29 @@ public interface EEFLabelDescription extends EEFWidgetDescription { void setValueExpression(String value); /** + * Returns the value of the '<em><b>Display Expression</b></em>' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> <!-- begin-model-doc --> This function will return the label to display <!-- end-model-doc --> + * + * @return the value of the '<em>Display Expression</em>' attribute. + * @see #setDisplayExpression(String) + * @see org.eclipse.eef.EefPackage#getEEFLabelDescription_DisplayExpression() + * @model + * @generated + */ + String getDisplayExpression(); + + /** + * Sets the value of the '{@link org.eclipse.eef.EEFLabelDescription#getDisplayExpression + * <em>Display Expression</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Display Expression</em>' attribute. + * @see #getDisplayExpression() + * @generated + */ + void setDisplayExpression(String value); + + /** * Returns the value of the '<em><b>Style</b></em>' containment reference. <!-- begin-user-doc --> <!-- end-user-doc * --> <!-- begin-model-doc --> Defines the label style <!-- end-model-doc --> * @@ -88,4 +113,20 @@ public interface EEFLabelDescription extends EEFWidgetDescription { */ EList<EEFLabelConditionalStyle> getConditionalStyles(); + /** + * Returns the value of the '<em><b>Actions</b></em>' containment reference list. The list contents are of type + * {@link org.eclipse.eef.EEFWidgetAction}. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Actions</em>' containment reference list isn't clear, there really should be more of a + * description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Actions</em>' containment reference list. + * @see org.eclipse.eef.EefPackage#getEEFLabelDescription_Actions() + * @model containment="true" resolveProxies="true" + * @generated + */ + EList<EEFWidgetAction> getActions(); + } // EEFLabelDescription diff --git a/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/EefPackage.java b/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/EefPackage.java index 77867ac8d..570510077 100644 --- a/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/EefPackage.java +++ b/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/EefPackage.java @@ -940,13 +940,22 @@ public interface EefPackage extends EPackage { int EEF_LABEL_DESCRIPTION__VALUE_EXPRESSION = EefPackage.EEF_WIDGET_DESCRIPTION_FEATURE_COUNT + 0; /** + * The feature id for the '<em><b>Display Expression</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + * @ordered + */ + int EEF_LABEL_DESCRIPTION__DISPLAY_EXPRESSION = EefPackage.EEF_WIDGET_DESCRIPTION_FEATURE_COUNT + 1; + + /** * The feature id for the '<em><b>Style</b></em>' containment reference. <!-- begin-user-doc --> <!-- end-user-doc * --> * * @generated * @ordered */ - int EEF_LABEL_DESCRIPTION__STYLE = EefPackage.EEF_WIDGET_DESCRIPTION_FEATURE_COUNT + 1; + int EEF_LABEL_DESCRIPTION__STYLE = EefPackage.EEF_WIDGET_DESCRIPTION_FEATURE_COUNT + 2; /** * The feature id for the '<em><b>Conditional Styles</b></em>' containment reference list. <!-- begin-user-doc --> @@ -955,7 +964,16 @@ public interface EefPackage extends EPackage { * @generated * @ordered */ - int EEF_LABEL_DESCRIPTION__CONDITIONAL_STYLES = EefPackage.EEF_WIDGET_DESCRIPTION_FEATURE_COUNT + 2; + int EEF_LABEL_DESCRIPTION__CONDITIONAL_STYLES = EefPackage.EEF_WIDGET_DESCRIPTION_FEATURE_COUNT + 3; + + /** + * The feature id for the '<em><b>Actions</b></em>' containment reference list. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int EEF_LABEL_DESCRIPTION__ACTIONS = EefPackage.EEF_WIDGET_DESCRIPTION_FEATURE_COUNT + 4; /** * The number of structural features of the '<em>EEF Label Description</em>' class. <!-- begin-user-doc --> <!-- @@ -964,7 +982,7 @@ public interface EefPackage extends EPackage { * @generated * @ordered */ - int EEF_LABEL_DESCRIPTION_FEATURE_COUNT = EefPackage.EEF_WIDGET_DESCRIPTION_FEATURE_COUNT + 3; + int EEF_LABEL_DESCRIPTION_FEATURE_COUNT = EefPackage.EEF_WIDGET_DESCRIPTION_FEATURE_COUNT + 5; /** * The meta object id for the '{@link org.eclipse.eef.impl.EEFButtonDescriptionImpl <em>EEF Button Description</em>} @@ -1462,13 +1480,22 @@ public interface EefPackage extends EPackage { int EEF_HYPERLINK_DESCRIPTION__VALUE_EXPRESSION = EefPackage.EEF_WIDGET_DESCRIPTION_FEATURE_COUNT + 0; /** + * The feature id for the '<em><b>Display Expression</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + * @ordered + */ + int EEF_HYPERLINK_DESCRIPTION__DISPLAY_EXPRESSION = EefPackage.EEF_WIDGET_DESCRIPTION_FEATURE_COUNT + 1; + + /** * The feature id for the '<em><b>On Click Expression</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc * --> * * @generated * @ordered */ - int EEF_HYPERLINK_DESCRIPTION__ON_CLICK_EXPRESSION = EefPackage.EEF_WIDGET_DESCRIPTION_FEATURE_COUNT + 1; + int EEF_HYPERLINK_DESCRIPTION__ON_CLICK_EXPRESSION = EefPackage.EEF_WIDGET_DESCRIPTION_FEATURE_COUNT + 2; /** * The feature id for the '<em><b>Style</b></em>' containment reference. <!-- begin-user-doc --> <!-- end-user-doc @@ -1477,16 +1504,25 @@ public interface EefPackage extends EPackage { * @generated * @ordered */ - int EEF_HYPERLINK_DESCRIPTION__STYLE = EefPackage.EEF_WIDGET_DESCRIPTION_FEATURE_COUNT + 2; + int EEF_HYPERLINK_DESCRIPTION__STYLE = EefPackage.EEF_WIDGET_DESCRIPTION_FEATURE_COUNT + 3; /** * The feature id for the '<em><b>Conditional Styles</b></em>' containment reference list. <!-- begin-user-doc --> * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int EEF_HYPERLINK_DESCRIPTION__CONDITIONAL_STYLES = EefPackage.EEF_WIDGET_DESCRIPTION_FEATURE_COUNT + 4; + + /** + * The feature id for the '<em><b>Actions</b></em>' containment reference list. <!-- begin-user-doc --> <!-- + * end-user-doc --> * * @generated * @ordered */ - int EEF_HYPERLINK_DESCRIPTION__CONDITIONAL_STYLES = EefPackage.EEF_WIDGET_DESCRIPTION_FEATURE_COUNT + 3; + int EEF_HYPERLINK_DESCRIPTION__ACTIONS = EefPackage.EEF_WIDGET_DESCRIPTION_FEATURE_COUNT + 5; /** * The number of structural features of the '<em>EEF Hyperlink Description</em>' class. <!-- begin-user-doc --> <!-- @@ -1495,7 +1531,7 @@ public interface EefPackage extends EPackage { * @generated * @ordered */ - int EEF_HYPERLINK_DESCRIPTION_FEATURE_COUNT = EefPackage.EEF_WIDGET_DESCRIPTION_FEATURE_COUNT + 4; + int EEF_HYPERLINK_DESCRIPTION_FEATURE_COUNT = EefPackage.EEF_WIDGET_DESCRIPTION_FEATURE_COUNT + 6; /** * The meta object id for the '{@link org.eclipse.eef.impl.EEFDynamicMappingForImpl @@ -3862,6 +3898,17 @@ public interface EefPackage extends EPackage { EAttribute getEEFLabelDescription_ValueExpression(); /** + * Returns the meta object for the attribute '{@link org.eclipse.eef.EEFLabelDescription#getDisplayExpression + * <em>Display Expression</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Display Expression</em>'. + * @see org.eclipse.eef.EEFLabelDescription#getDisplayExpression() + * @see #getEEFLabelDescription() + * @generated + */ + EAttribute getEEFLabelDescription_DisplayExpression(); + + /** * Returns the meta object for the containment reference '{@link org.eclipse.eef.EEFLabelDescription#getStyle * <em>Style</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> * @@ -3885,6 +3932,18 @@ public interface EefPackage extends EPackage { EReference getEEFLabelDescription_ConditionalStyles(); /** + * Returns the meta object for the containment reference list ' + * {@link org.eclipse.eef.EEFLabelDescription#getActions <em>Actions</em>}'. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @return the meta object for the containment reference list '<em>Actions</em>'. + * @see org.eclipse.eef.EEFLabelDescription#getActions() + * @see #getEEFLabelDescription() + * @generated + */ + EReference getEEFLabelDescription_Actions(); + + /** * Returns the meta object for class '{@link org.eclipse.eef.EEFButtonDescription <em>EEF Button Description</em>}'. * <!-- begin-user-doc --> <!-- end-user-doc --> * @@ -4183,9 +4242,20 @@ public interface EefPackage extends EPackage { EAttribute getEEFHyperlinkDescription_ValueExpression(); /** + * Returns the meta object for the attribute '{@link org.eclipse.eef.EEFHyperlinkDescription#getDisplayExpression + * <em>Display Expression</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Display Expression</em>'. + * @see org.eclipse.eef.EEFHyperlinkDescription#getDisplayExpression() + * @see #getEEFHyperlinkDescription() + * @generated + */ + EAttribute getEEFHyperlinkDescription_DisplayExpression(); + + /** * Returns the meta object for the attribute '{@link org.eclipse.eef.EEFHyperlinkDescription#getOnClickExpression * <em>On Click Expression</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @return the meta object for the attribute '<em>On Click Expression</em>'. * @see org.eclipse.eef.EEFHyperlinkDescription#getOnClickExpression() * @see #getEEFHyperlinkDescription() @@ -4196,7 +4266,7 @@ public interface EefPackage extends EPackage { /** * Returns the meta object for the containment reference '{@link org.eclipse.eef.EEFHyperlinkDescription#getStyle * <em>Style</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @return the meta object for the containment reference '<em>Style</em>'. * @see org.eclipse.eef.EEFHyperlinkDescription#getStyle() * @see #getEEFHyperlinkDescription() @@ -4217,6 +4287,18 @@ public interface EefPackage extends EPackage { EReference getEEFHyperlinkDescription_ConditionalStyles(); /** + * Returns the meta object for the containment reference list ' + * {@link org.eclipse.eef.EEFHyperlinkDescription#getActions <em>Actions</em>}'. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @return the meta object for the containment reference list '<em>Actions</em>'. + * @see org.eclipse.eef.EEFHyperlinkDescription#getActions() + * @see #getEEFHyperlinkDescription() + * @generated + */ + EReference getEEFHyperlinkDescription_Actions(); + + /** * Returns the meta object for class '{@link org.eclipse.eef.EEFDynamicMappingFor <em>EEF Dynamic Mapping For</em>} * '. <!-- begin-user-doc --> <!-- end-user-doc --> * @@ -5731,6 +5813,14 @@ public interface EefPackage extends EPackage { EAttribute EEF_LABEL_DESCRIPTION__VALUE_EXPRESSION = EefPackage.eINSTANCE.getEEFLabelDescription_ValueExpression(); /** + * The meta object literal for the '<em><b>Display Expression</b></em>' attribute feature. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + EAttribute EEF_LABEL_DESCRIPTION__DISPLAY_EXPRESSION = EefPackage.eINSTANCE.getEEFLabelDescription_DisplayExpression(); + + /** * The meta object literal for the '<em><b>Style</b></em>' containment reference feature. <!-- begin-user-doc * --> <!-- end-user-doc --> * @@ -5747,6 +5837,14 @@ public interface EefPackage extends EPackage { EReference EEF_LABEL_DESCRIPTION__CONDITIONAL_STYLES = EefPackage.eINSTANCE.getEEFLabelDescription_ConditionalStyles(); /** + * The meta object literal for the '<em><b>Actions</b></em>' containment reference list feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EReference EEF_LABEL_DESCRIPTION__ACTIONS = EefPackage.eINSTANCE.getEEFLabelDescription_Actions(); + + /** * The meta object literal for the '{@link org.eclipse.eef.impl.EEFButtonDescriptionImpl * <em>EEF Button Description</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc --> * @@ -5767,7 +5865,7 @@ public interface EefPackage extends EPackage { /** * The meta object literal for the '<em><b>Push Expression</b></em>' attribute feature. <!-- begin-user-doc --> * <!-- end-user-doc --> - * + * * @generated */ EAttribute EEF_BUTTON_DESCRIPTION__PUSH_EXPRESSION = EefPackage.eINSTANCE.getEEFButtonDescription_PushExpression(); @@ -5775,7 +5873,7 @@ public interface EefPackage extends EPackage { /** * The meta object literal for the '<em><b>Style</b></em>' containment reference feature. <!-- begin-user-doc * --> <!-- end-user-doc --> - * + * * @generated */ EReference EEF_BUTTON_DESCRIPTION__STYLE = EefPackage.eINSTANCE.getEEFButtonDescription_Style(); @@ -5973,6 +6071,14 @@ public interface EefPackage extends EPackage { EAttribute EEF_HYPERLINK_DESCRIPTION__VALUE_EXPRESSION = EefPackage.eINSTANCE.getEEFHyperlinkDescription_ValueExpression(); /** + * The meta object literal for the '<em><b>Display Expression</b></em>' attribute feature. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + EAttribute EEF_HYPERLINK_DESCRIPTION__DISPLAY_EXPRESSION = EefPackage.eINSTANCE.getEEFHyperlinkDescription_DisplayExpression(); + + /** * The meta object literal for the '<em><b>On Click Expression</b></em>' attribute feature. <!-- begin-user-doc * --> <!-- end-user-doc --> * @@ -5997,6 +6103,14 @@ public interface EefPackage extends EPackage { EReference EEF_HYPERLINK_DESCRIPTION__CONDITIONAL_STYLES = EefPackage.eINSTANCE.getEEFHyperlinkDescription_ConditionalStyles(); /** + * The meta object literal for the '<em><b>Actions</b></em>' containment reference list feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EReference EEF_HYPERLINK_DESCRIPTION__ACTIONS = EefPackage.eINSTANCE.getEEFHyperlinkDescription_Actions(); + + /** * The meta object literal for the '{@link org.eclipse.eef.impl.EEFDynamicMappingForImpl * <em>EEF Dynamic Mapping For</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc --> * diff --git a/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/impl/EEFHyperlinkDescriptionImpl.java b/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/impl/EEFHyperlinkDescriptionImpl.java index 0aabf64cf..f649d39c3 100644 --- a/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/impl/EEFHyperlinkDescriptionImpl.java +++ b/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/impl/EEFHyperlinkDescriptionImpl.java @@ -13,6 +13,7 @@ import java.util.Collection; import org.eclipse.eef.EEFHyperlinkConditionalStyle; import org.eclipse.eef.EEFHyperlinkDescription; import org.eclipse.eef.EEFHyperlinkStyle; +import org.eclipse.eef.EEFWidgetAction; import org.eclipse.eef.EefPackage; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; @@ -30,9 +31,11 @@ import org.eclipse.emf.ecore.util.InternalEList; * The following features are implemented: * <ul> * <li>{@link org.eclipse.eef.impl.EEFHyperlinkDescriptionImpl#getValueExpression <em>Value Expression</em>}</li> + * <li>{@link org.eclipse.eef.impl.EEFHyperlinkDescriptionImpl#getDisplayExpression <em>Display Expression</em>}</li> * <li>{@link org.eclipse.eef.impl.EEFHyperlinkDescriptionImpl#getOnClickExpression <em>On Click Expression</em>}</li> * <li>{@link org.eclipse.eef.impl.EEFHyperlinkDescriptionImpl#getStyle <em>Style</em>}</li> * <li>{@link org.eclipse.eef.impl.EEFHyperlinkDescriptionImpl#getConditionalStyles <em>Conditional Styles</em>}</li> + * <li>{@link org.eclipse.eef.impl.EEFHyperlinkDescriptionImpl#getActions <em>Actions</em>}</li> * </ul> * </p> * @@ -60,6 +63,26 @@ public class EEFHyperlinkDescriptionImpl extends EEFWidgetDescriptionImpl implem protected String valueExpression = EEFHyperlinkDescriptionImpl.VALUE_EXPRESSION_EDEFAULT; /** + * The default value of the '{@link #getDisplayExpression() <em>Display Expression</em>}' attribute. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @see #getDisplayExpression() + * @generated + * @ordered + */ + protected static final String DISPLAY_EXPRESSION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDisplayExpression() <em>Display Expression</em>}' attribute. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @see #getDisplayExpression() + * @generated + * @ordered + */ + protected String displayExpression = EEFHyperlinkDescriptionImpl.DISPLAY_EXPRESSION_EDEFAULT; + + /** * The default value of the '{@link #getOnClickExpression() <em>On Click Expression</em>}' attribute. <!-- * begin-user-doc --> <!-- end-user-doc --> * @@ -100,6 +123,16 @@ public class EEFHyperlinkDescriptionImpl extends EEFWidgetDescriptionImpl implem protected EList<EEFHyperlinkConditionalStyle> conditionalStyles; /** + * The cached value of the '{@link #getActions() <em>Actions</em>}' containment reference list. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @see #getActions() + * @generated + * @ordered + */ + protected EList<EEFWidgetAction> actions; + + /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated @@ -149,6 +182,31 @@ public class EEFHyperlinkDescriptionImpl extends EEFWidgetDescriptionImpl implem * @generated */ @Override + public String getDisplayExpression() { + return displayExpression; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setDisplayExpression(String newDisplayExpression) { + String oldDisplayExpression = displayExpression; + displayExpression = newDisplayExpression; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, EefPackage.EEF_HYPERLINK_DESCRIPTION__DISPLAY_EXPRESSION, oldDisplayExpression, + displayExpression)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override public String getOnClickExpression() { return onClickExpression; } @@ -272,12 +330,28 @@ public class EEFHyperlinkDescriptionImpl extends EEFWidgetDescriptionImpl implem * @generated */ @Override + public EList<EEFWidgetAction> getActions() { + if (actions == null) { + actions = new EObjectContainmentEList.Resolving<EEFWidgetAction>(EEFWidgetAction.class, this, + EefPackage.EEF_HYPERLINK_DESCRIPTION__ACTIONS); + } + return actions; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case EefPackage.EEF_HYPERLINK_DESCRIPTION__STYLE: return basicSetStyle(null, msgs); case EefPackage.EEF_HYPERLINK_DESCRIPTION__CONDITIONAL_STYLES: return ((InternalEList<?>) getConditionalStyles()).basicRemove(otherEnd, msgs); + case EefPackage.EEF_HYPERLINK_DESCRIPTION__ACTIONS: + return ((InternalEList<?>) getActions()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } @@ -292,6 +366,8 @@ public class EEFHyperlinkDescriptionImpl extends EEFWidgetDescriptionImpl implem switch (featureID) { case EefPackage.EEF_HYPERLINK_DESCRIPTION__VALUE_EXPRESSION: return getValueExpression(); + case EefPackage.EEF_HYPERLINK_DESCRIPTION__DISPLAY_EXPRESSION: + return getDisplayExpression(); case EefPackage.EEF_HYPERLINK_DESCRIPTION__ON_CLICK_EXPRESSION: return getOnClickExpression(); case EefPackage.EEF_HYPERLINK_DESCRIPTION__STYLE: @@ -301,6 +377,8 @@ public class EEFHyperlinkDescriptionImpl extends EEFWidgetDescriptionImpl implem return basicGetStyle(); case EefPackage.EEF_HYPERLINK_DESCRIPTION__CONDITIONAL_STYLES: return getConditionalStyles(); + case EefPackage.EEF_HYPERLINK_DESCRIPTION__ACTIONS: + return getActions(); } return super.eGet(featureID, resolve, coreType); } @@ -317,6 +395,9 @@ public class EEFHyperlinkDescriptionImpl extends EEFWidgetDescriptionImpl implem case EefPackage.EEF_HYPERLINK_DESCRIPTION__VALUE_EXPRESSION: setValueExpression((String) newValue); return; + case EefPackage.EEF_HYPERLINK_DESCRIPTION__DISPLAY_EXPRESSION: + setDisplayExpression((String) newValue); + return; case EefPackage.EEF_HYPERLINK_DESCRIPTION__ON_CLICK_EXPRESSION: setOnClickExpression((String) newValue); return; @@ -327,6 +408,10 @@ public class EEFHyperlinkDescriptionImpl extends EEFWidgetDescriptionImpl implem getConditionalStyles().clear(); getConditionalStyles().addAll((Collection<? extends EEFHyperlinkConditionalStyle>) newValue); return; + case EefPackage.EEF_HYPERLINK_DESCRIPTION__ACTIONS: + getActions().clear(); + getActions().addAll((Collection<? extends EEFWidgetAction>) newValue); + return; } super.eSet(featureID, newValue); } @@ -342,6 +427,9 @@ public class EEFHyperlinkDescriptionImpl extends EEFWidgetDescriptionImpl implem case EefPackage.EEF_HYPERLINK_DESCRIPTION__VALUE_EXPRESSION: setValueExpression(EEFHyperlinkDescriptionImpl.VALUE_EXPRESSION_EDEFAULT); return; + case EefPackage.EEF_HYPERLINK_DESCRIPTION__DISPLAY_EXPRESSION: + setDisplayExpression(EEFHyperlinkDescriptionImpl.DISPLAY_EXPRESSION_EDEFAULT); + return; case EefPackage.EEF_HYPERLINK_DESCRIPTION__ON_CLICK_EXPRESSION: setOnClickExpression(EEFHyperlinkDescriptionImpl.ON_CLICK_EXPRESSION_EDEFAULT); return; @@ -351,6 +439,9 @@ public class EEFHyperlinkDescriptionImpl extends EEFWidgetDescriptionImpl implem case EefPackage.EEF_HYPERLINK_DESCRIPTION__CONDITIONAL_STYLES: getConditionalStyles().clear(); return; + case EefPackage.EEF_HYPERLINK_DESCRIPTION__ACTIONS: + getActions().clear(); + return; } super.eUnset(featureID); } @@ -366,6 +457,9 @@ public class EEFHyperlinkDescriptionImpl extends EEFWidgetDescriptionImpl implem case EefPackage.EEF_HYPERLINK_DESCRIPTION__VALUE_EXPRESSION: return EEFHyperlinkDescriptionImpl.VALUE_EXPRESSION_EDEFAULT == null ? valueExpression != null : !EEFHyperlinkDescriptionImpl.VALUE_EXPRESSION_EDEFAULT.equals(valueExpression); + case EefPackage.EEF_HYPERLINK_DESCRIPTION__DISPLAY_EXPRESSION: + return EEFHyperlinkDescriptionImpl.DISPLAY_EXPRESSION_EDEFAULT == null ? displayExpression != null + : !EEFHyperlinkDescriptionImpl.DISPLAY_EXPRESSION_EDEFAULT.equals(displayExpression); case EefPackage.EEF_HYPERLINK_DESCRIPTION__ON_CLICK_EXPRESSION: return EEFHyperlinkDescriptionImpl.ON_CLICK_EXPRESSION_EDEFAULT == null ? onClickExpression != null : !EEFHyperlinkDescriptionImpl.ON_CLICK_EXPRESSION_EDEFAULT.equals(onClickExpression); @@ -373,6 +467,8 @@ public class EEFHyperlinkDescriptionImpl extends EEFWidgetDescriptionImpl implem return style != null; case EefPackage.EEF_HYPERLINK_DESCRIPTION__CONDITIONAL_STYLES: return conditionalStyles != null && !conditionalStyles.isEmpty(); + case EefPackage.EEF_HYPERLINK_DESCRIPTION__ACTIONS: + return actions != null && !actions.isEmpty(); } return super.eIsSet(featureID); } @@ -391,6 +487,8 @@ public class EEFHyperlinkDescriptionImpl extends EEFWidgetDescriptionImpl implem StringBuffer result = new StringBuffer(super.toString()); result.append(" (valueExpression: "); //$NON-NLS-1$ result.append(valueExpression); + result.append(", displayExpression: "); //$NON-NLS-1$ + result.append(displayExpression); result.append(", onClickExpression: "); //$NON-NLS-1$ result.append(onClickExpression); result.append(')'); diff --git a/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/impl/EEFLabelDescriptionImpl.java b/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/impl/EEFLabelDescriptionImpl.java index 79a205a5c..71aa94487 100644 --- a/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/impl/EEFLabelDescriptionImpl.java +++ b/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/impl/EEFLabelDescriptionImpl.java @@ -13,6 +13,7 @@ import java.util.Collection; import org.eclipse.eef.EEFLabelConditionalStyle; import org.eclipse.eef.EEFLabelDescription; import org.eclipse.eef.EEFLabelStyle; +import org.eclipse.eef.EEFWidgetAction; import org.eclipse.eef.EefPackage; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; @@ -30,8 +31,10 @@ import org.eclipse.emf.ecore.util.InternalEList; * The following features are implemented: * <ul> * <li>{@link org.eclipse.eef.impl.EEFLabelDescriptionImpl#getValueExpression <em>Value Expression</em>}</li> + * <li>{@link org.eclipse.eef.impl.EEFLabelDescriptionImpl#getDisplayExpression <em>Display Expression</em>}</li> * <li>{@link org.eclipse.eef.impl.EEFLabelDescriptionImpl#getStyle <em>Style</em>}</li> * <li>{@link org.eclipse.eef.impl.EEFLabelDescriptionImpl#getConditionalStyles <em>Conditional Styles</em>}</li> + * <li>{@link org.eclipse.eef.impl.EEFLabelDescriptionImpl#getActions <em>Actions</em>}</li> * </ul> * </p> * @@ -59,6 +62,26 @@ public class EEFLabelDescriptionImpl extends EEFWidgetDescriptionImpl implements protected String valueExpression = EEFLabelDescriptionImpl.VALUE_EXPRESSION_EDEFAULT; /** + * The default value of the '{@link #getDisplayExpression() <em>Display Expression</em>}' attribute. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @see #getDisplayExpression() + * @generated + * @ordered + */ + protected static final String DISPLAY_EXPRESSION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDisplayExpression() <em>Display Expression</em>}' attribute. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @see #getDisplayExpression() + * @generated + * @ordered + */ + protected String displayExpression = EEFLabelDescriptionImpl.DISPLAY_EXPRESSION_EDEFAULT; + + /** * The cached value of the '{@link #getStyle() <em>Style</em>}' containment reference. <!-- begin-user-doc --> <!-- * end-user-doc --> * @@ -79,6 +102,16 @@ public class EEFLabelDescriptionImpl extends EEFWidgetDescriptionImpl implements protected EList<EEFLabelConditionalStyle> conditionalStyles; /** + * The cached value of the '{@link #getActions() <em>Actions</em>}' containment reference list. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @see #getActions() + * @generated + * @ordered + */ + protected EList<EEFWidgetAction> actions; + + /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated @@ -124,7 +157,32 @@ public class EEFLabelDescriptionImpl extends EEFWidgetDescriptionImpl implements /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * + * + * @generated + */ + @Override + public String getDisplayExpression() { + return displayExpression; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setDisplayExpression(String newDisplayExpression) { + String oldDisplayExpression = displayExpression; + displayExpression = newDisplayExpression; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, EefPackage.EEF_LABEL_DESCRIPTION__DISPLAY_EXPRESSION, oldDisplayExpression, + displayExpression)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * * @generated */ @Override @@ -221,7 +279,20 @@ public class EEFLabelDescriptionImpl extends EEFWidgetDescriptionImpl implements /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * + * + * @generated + */ + @Override + public EList<EEFWidgetAction> getActions() { + if (actions == null) { + actions = new EObjectContainmentEList.Resolving<EEFWidgetAction>(EEFWidgetAction.class, this, EefPackage.EEF_LABEL_DESCRIPTION__ACTIONS); + } + return actions; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * * @generated */ @Override @@ -231,6 +302,8 @@ public class EEFLabelDescriptionImpl extends EEFWidgetDescriptionImpl implements return basicSetStyle(null, msgs); case EefPackage.EEF_LABEL_DESCRIPTION__CONDITIONAL_STYLES: return ((InternalEList<?>) getConditionalStyles()).basicRemove(otherEnd, msgs); + case EefPackage.EEF_LABEL_DESCRIPTION__ACTIONS: + return ((InternalEList<?>) getActions()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } @@ -245,6 +318,8 @@ public class EEFLabelDescriptionImpl extends EEFWidgetDescriptionImpl implements switch (featureID) { case EefPackage.EEF_LABEL_DESCRIPTION__VALUE_EXPRESSION: return getValueExpression(); + case EefPackage.EEF_LABEL_DESCRIPTION__DISPLAY_EXPRESSION: + return getDisplayExpression(); case EefPackage.EEF_LABEL_DESCRIPTION__STYLE: if (resolve) { return getStyle(); @@ -252,6 +327,8 @@ public class EEFLabelDescriptionImpl extends EEFWidgetDescriptionImpl implements return basicGetStyle(); case EefPackage.EEF_LABEL_DESCRIPTION__CONDITIONAL_STYLES: return getConditionalStyles(); + case EefPackage.EEF_LABEL_DESCRIPTION__ACTIONS: + return getActions(); } return super.eGet(featureID, resolve, coreType); } @@ -268,6 +345,9 @@ public class EEFLabelDescriptionImpl extends EEFWidgetDescriptionImpl implements case EefPackage.EEF_LABEL_DESCRIPTION__VALUE_EXPRESSION: setValueExpression((String) newValue); return; + case EefPackage.EEF_LABEL_DESCRIPTION__DISPLAY_EXPRESSION: + setDisplayExpression((String) newValue); + return; case EefPackage.EEF_LABEL_DESCRIPTION__STYLE: setStyle((EEFLabelStyle) newValue); return; @@ -275,6 +355,10 @@ public class EEFLabelDescriptionImpl extends EEFWidgetDescriptionImpl implements getConditionalStyles().clear(); getConditionalStyles().addAll((Collection<? extends EEFLabelConditionalStyle>) newValue); return; + case EefPackage.EEF_LABEL_DESCRIPTION__ACTIONS: + getActions().clear(); + getActions().addAll((Collection<? extends EEFWidgetAction>) newValue); + return; } super.eSet(featureID, newValue); } @@ -290,12 +374,18 @@ public class EEFLabelDescriptionImpl extends EEFWidgetDescriptionImpl implements case EefPackage.EEF_LABEL_DESCRIPTION__VALUE_EXPRESSION: setValueExpression(EEFLabelDescriptionImpl.VALUE_EXPRESSION_EDEFAULT); return; + case EefPackage.EEF_LABEL_DESCRIPTION__DISPLAY_EXPRESSION: + setDisplayExpression(EEFLabelDescriptionImpl.DISPLAY_EXPRESSION_EDEFAULT); + return; case EefPackage.EEF_LABEL_DESCRIPTION__STYLE: setStyle((EEFLabelStyle) null); return; case EefPackage.EEF_LABEL_DESCRIPTION__CONDITIONAL_STYLES: getConditionalStyles().clear(); return; + case EefPackage.EEF_LABEL_DESCRIPTION__ACTIONS: + getActions().clear(); + return; } super.eUnset(featureID); } @@ -310,11 +400,16 @@ public class EEFLabelDescriptionImpl extends EEFWidgetDescriptionImpl implements switch (featureID) { case EefPackage.EEF_LABEL_DESCRIPTION__VALUE_EXPRESSION: return EEFLabelDescriptionImpl.VALUE_EXPRESSION_EDEFAULT == null ? valueExpression != null - : !EEFLabelDescriptionImpl.VALUE_EXPRESSION_EDEFAULT.equals(valueExpression); + : !EEFLabelDescriptionImpl.VALUE_EXPRESSION_EDEFAULT.equals(valueExpression); + case EefPackage.EEF_LABEL_DESCRIPTION__DISPLAY_EXPRESSION: + return EEFLabelDescriptionImpl.DISPLAY_EXPRESSION_EDEFAULT == null ? displayExpression != null + : !EEFLabelDescriptionImpl.DISPLAY_EXPRESSION_EDEFAULT.equals(displayExpression); case EefPackage.EEF_LABEL_DESCRIPTION__STYLE: return style != null; case EefPackage.EEF_LABEL_DESCRIPTION__CONDITIONAL_STYLES: return conditionalStyles != null && !conditionalStyles.isEmpty(); + case EefPackage.EEF_LABEL_DESCRIPTION__ACTIONS: + return actions != null && !actions.isEmpty(); } return super.eIsSet(featureID); } @@ -333,6 +428,8 @@ public class EEFLabelDescriptionImpl extends EEFWidgetDescriptionImpl implements StringBuffer result = new StringBuffer(super.toString()); result.append(" (valueExpression: "); //$NON-NLS-1$ result.append(valueExpression); + result.append(", displayExpression: "); //$NON-NLS-1$ + result.append(displayExpression); result.append(')'); return result.toString(); } diff --git a/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/impl/EefPackageImpl.java b/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/impl/EefPackageImpl.java index 28e58c2bc..b21d2df59 100644 --- a/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/impl/EefPackageImpl.java +++ b/plugins/org.eclipse.eef/src-gen/org/eclipse/eef/impl/EefPackageImpl.java @@ -1155,8 +1155,18 @@ public class EefPackageImpl extends EPackageImpl implements EefPackage { * @generated */ @Override + public EAttribute getEEFLabelDescription_DisplayExpression() { + return (EAttribute) eefLabelDescriptionEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override public EReference getEEFLabelDescription_Style() { - return (EReference) eefLabelDescriptionEClass.getEStructuralFeatures().get(1); + return (EReference) eefLabelDescriptionEClass.getEStructuralFeatures().get(2); } /** @@ -1166,7 +1176,17 @@ public class EefPackageImpl extends EPackageImpl implements EefPackage { */ @Override public EReference getEEFLabelDescription_ConditionalStyles() { - return (EReference) eefLabelDescriptionEClass.getEStructuralFeatures().get(2); + return (EReference) eefLabelDescriptionEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getEEFLabelDescription_Actions() { + return (EReference) eefLabelDescriptionEClass.getEStructuralFeatures().get(4); } /** @@ -1445,28 +1465,48 @@ public class EefPackageImpl extends EPackageImpl implements EefPackage { * @generated */ @Override - public EAttribute getEEFHyperlinkDescription_OnClickExpression() { + public EAttribute getEEFHyperlinkDescription_DisplayExpression() { return (EAttribute) eefHyperlinkDescriptionEClass.getEStructuralFeatures().get(1); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * + * + * @generated + */ + @Override + public EAttribute getEEFHyperlinkDescription_OnClickExpression() { + return (EAttribute) eefHyperlinkDescriptionEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * * @generated */ @Override public EReference getEEFHyperlinkDescription_Style() { - return (EReference) eefHyperlinkDescriptionEClass.getEStructuralFeatures().get(2); + return (EReference) eefHyperlinkDescriptionEClass.getEStructuralFeatures().get(3); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ @Override public EReference getEEFHyperlinkDescription_ConditionalStyles() { - return (EReference) eefHyperlinkDescriptionEClass.getEStructuralFeatures().get(3); + return (EReference) eefHyperlinkDescriptionEClass.getEStructuralFeatures().get(4); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getEEFHyperlinkDescription_Actions() { + return (EReference) eefHyperlinkDescriptionEClass.getEStructuralFeatures().get(5); } /** @@ -2458,8 +2498,10 @@ public class EefPackageImpl extends EPackageImpl implements EefPackage { eefLabelDescriptionEClass = createEClass(EefPackage.EEF_LABEL_DESCRIPTION); createEAttribute(eefLabelDescriptionEClass, EefPackage.EEF_LABEL_DESCRIPTION__VALUE_EXPRESSION); + createEAttribute(eefLabelDescriptionEClass, EefPackage.EEF_LABEL_DESCRIPTION__DISPLAY_EXPRESSION); createEReference(eefLabelDescriptionEClass, EefPackage.EEF_LABEL_DESCRIPTION__STYLE); createEReference(eefLabelDescriptionEClass, EefPackage.EEF_LABEL_DESCRIPTION__CONDITIONAL_STYLES); + createEReference(eefLabelDescriptionEClass, EefPackage.EEF_LABEL_DESCRIPTION__ACTIONS); eefButtonDescriptionEClass = createEClass(EefPackage.EEF_BUTTON_DESCRIPTION); createEAttribute(eefButtonDescriptionEClass, EefPackage.EEF_BUTTON_DESCRIPTION__BUTTON_LABEL_EXPRESSION); @@ -2492,9 +2534,11 @@ public class EefPackageImpl extends EPackageImpl implements EefPackage { eefHyperlinkDescriptionEClass = createEClass(EefPackage.EEF_HYPERLINK_DESCRIPTION); createEAttribute(eefHyperlinkDescriptionEClass, EefPackage.EEF_HYPERLINK_DESCRIPTION__VALUE_EXPRESSION); + createEAttribute(eefHyperlinkDescriptionEClass, EefPackage.EEF_HYPERLINK_DESCRIPTION__DISPLAY_EXPRESSION); createEAttribute(eefHyperlinkDescriptionEClass, EefPackage.EEF_HYPERLINK_DESCRIPTION__ON_CLICK_EXPRESSION); createEReference(eefHyperlinkDescriptionEClass, EefPackage.EEF_HYPERLINK_DESCRIPTION__STYLE); createEReference(eefHyperlinkDescriptionEClass, EefPackage.EEF_HYPERLINK_DESCRIPTION__CONDITIONAL_STYLES); + createEReference(eefHyperlinkDescriptionEClass, EefPackage.EEF_HYPERLINK_DESCRIPTION__ACTIONS); eefDynamicMappingForEClass = createEClass(EefPackage.EEF_DYNAMIC_MAPPING_FOR); createEAttribute(eefDynamicMappingForEClass, EefPackage.EEF_DYNAMIC_MAPPING_FOR__ITERATOR); @@ -2945,6 +2989,10 @@ public class EefPackageImpl extends EPackageImpl implements EefPackage { getEEFLabelDescription_ValueExpression(), ecorePackage.getEString(), "valueExpression", null, 0, 1, EEFLabelDescription.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); //$NON-NLS-1$ + initEAttribute( + getEEFLabelDescription_DisplayExpression(), + ecorePackage.getEString(), + "displayExpression", null, 0, 1, EEFLabelDescription.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); //$NON-NLS-1$ initEReference( getEEFLabelDescription_Style(), this.getEEFLabelStyle(), @@ -2955,6 +3003,11 @@ public class EefPackageImpl extends EPackageImpl implements EefPackage { this.getEEFLabelConditionalStyle(), null, "conditionalStyles", null, 0, -1, EEFLabelDescription.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, EPackageImpl.IS_COMPOSITE, EPackageImpl.IS_RESOLVE_PROXIES, !EPackageImpl.IS_UNSETTABLE, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); //$NON-NLS-1$ + initEReference( + getEEFLabelDescription_Actions(), + this.getEEFWidgetAction(), + null, + "actions", null, 0, -1, EEFLabelDescription.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, EPackageImpl.IS_COMPOSITE, EPackageImpl.IS_RESOLVE_PROXIES, !EPackageImpl.IS_UNSETTABLE, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); //$NON-NLS-1$ initEClass(eefButtonDescriptionEClass, EEFButtonDescription.class, "EEFButtonDescription", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ @@ -3067,6 +3120,10 @@ public class EefPackageImpl extends EPackageImpl implements EefPackage { theEcorePackage.getEString(), "valueExpression", null, 0, 1, EEFHyperlinkDescription.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); //$NON-NLS-1$ initEAttribute( + getEEFHyperlinkDescription_DisplayExpression(), + ecorePackage.getEString(), + "displayExpression", null, 0, 1, EEFHyperlinkDescription.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); //$NON-NLS-1$ + initEAttribute( getEEFHyperlinkDescription_OnClickExpression(), theEcorePackage.getEString(), "onClickExpression", null, 0, 1, EEFHyperlinkDescription.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); //$NON-NLS-1$ @@ -3080,6 +3137,11 @@ public class EefPackageImpl extends EPackageImpl implements EefPackage { this.getEEFHyperlinkConditionalStyle(), null, "conditionalStyles", null, 0, -1, EEFHyperlinkDescription.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, EPackageImpl.IS_COMPOSITE, EPackageImpl.IS_RESOLVE_PROXIES, !EPackageImpl.IS_UNSETTABLE, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); //$NON-NLS-1$ + initEReference( + getEEFHyperlinkDescription_Actions(), + this.getEEFWidgetAction(), + null, + "actions", null, 0, -1, EEFHyperlinkDescription.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, EPackageImpl.IS_COMPOSITE, EPackageImpl.IS_RESOLVE_PROXIES, !EPackageImpl.IS_UNSETTABLE, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); //$NON-NLS-1$ initEClass(eefDynamicMappingForEClass, EEFDynamicMappingFor.class, "EEFDynamicMappingFor", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ diff --git a/tests/org.eclipse.eef.tests/src/org/eclipse/eef/tests/internal/controllers/EEFLabelControllerTests.java b/tests/org.eclipse.eef.tests/src/org/eclipse/eef/tests/internal/controllers/EEFLabelControllerTests.java index c032da914..7f51ca9fc 100644 --- a/tests/org.eclipse.eef.tests/src/org/eclipse/eef/tests/internal/controllers/EEFLabelControllerTests.java +++ b/tests/org.eclipse.eef.tests/src/org/eclipse/eef/tests/internal/controllers/EEFLabelControllerTests.java @@ -39,7 +39,7 @@ public class EEFLabelControllerTests extends AbstractEEFControllerTests { private IEEFLabelController labelController(String modelPath) { EClassifier eClassifier = this.ePackage(DART_ECORE, 0).getEClassifier(PROJECT_ECLASS_NAME); EEFLabelDescription description = widget(group(page(modelPath, 0), 0), EEFLabelDescription.class, 0); - return new EEFLabelController(description, newVariableManager(eClassifier), this.interpreter); + return new EEFLabelController(description, newVariableManager(eClassifier), this.interpreter, this.contextAdapter); } @Test |
