diff options
| author | Stéphane Bégaudeau | 2016-09-19 09:36:48 +0000 |
|---|---|---|
| committer | Stéphane Bégaudeau | 2016-09-21 09:02:11 +0000 |
| commit | bbb5cb91d41894addf6c4befed20414a91373cb6 (patch) | |
| tree | b45ccb7466d7f157a61ed94675ef532f593955ad | |
| parent | 637852123256a46e969ec989047ed3b6b169d2a3 (diff) | |
| download | org.eclipse.eef-bbb5cb91d41894addf6c4befed20414a91373cb6.tar.gz org.eclipse.eef-bbb5cb91d41894addf6c4befed20414a91373cb6.tar.xz org.eclipse.eef-bbb5cb91d41894addf6c4befed20414a91373cb6.zip | |
[501680] Add support for style for the reference widget
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=501680
Change-Id: Ifdffc1d5b260b0f6d6321bfd6ff47293d67aa256
Signed-off-by: Stéphane Bégaudeau <stephane.begaudeau@obeo.fr>
30 files changed, 1488 insertions, 104 deletions
diff --git a/doc/org.eclipse.eef.documentation/pages/releasenotes.html b/doc/org.eclipse.eef.documentation/pages/releasenotes.html index ec411986f..eb2bd4993 100644 --- a/doc/org.eclipse.eef.documentation/pages/releasenotes.html +++ b/doc/org.eclipse.eef.documentation/pages/releasenotes.html @@ -41,7 +41,8 @@ <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. </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> + <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> + <li><span class="label label-success">Added</span> The class EEFStyleHelper is now API in order to help support style and conditional styles for custom widgets. Developers will need to override org.eclipse.eef.ide.ui.api.widgets.AbstractEEFWidgetLifecycleManager.getEEFStyleHelper() to provide their own implementation. The easiest way will need to extend the regular implementation and modify the three switchs to provide using the dedicated getters.</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 a0004255e..5fef0fad9 100644 --- a/doc/org.eclipse.eef.documentation/pages/releasenotes.textile +++ b/doc/org.eclipse.eef.documentation/pages/releasenotes.textile @@ -21,7 +21,8 @@ h4. Specifier-Visible Changes 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 constructor of the EEFLabelController now requires an EditingContextAdapter to run the expression of the widget actions. +* <span class="label label-info">Modified</span> The constructor of the EEFLabelController now requires an EditingContextAdapter to run the expression of the widget actions. +* <span class="label label-success">Added</span> The class EEFStyleHelper is now API in order to help support style and conditional styles for custom widgets. Developers will need to override org.eclipse.eef.ide.ui.api.widgets.AbstractEEFWidgetLifecycleManager.getEEFStyleHelper() to provide their own implementation. The easiest way will need to extend the regular implementation and modify the three switchs to provide using the dedicated getters. h3(#eef1.6.0). Changes in EEF 1.6.0 diff --git a/plugins/org.eclipse.eef.ext.widgets.reference/.classpath b/plugins/org.eclipse.eef.ext.widgets.reference/.classpath index f4080a9e1..6ee7c9d65 100644 --- a/plugins/org.eclipse.eef.ext.widgets.reference/.classpath +++ b/plugins/org.eclipse.eef.ext.widgets.reference/.classpath @@ -5,6 +5,7 @@ <attribute name="ignore_optional_problems" value="true"/> </attributes> </classpathentry> + <classpathentry kind="src" path="src"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="output" path="bin"/> diff --git a/plugins/org.eclipse.eef.ext.widgets.reference/build.properties b/plugins/org.eclipse.eef.ext.widgets.reference/build.properties index 3cf70b17b..71b851543 100644 --- a/plugins/org.eclipse.eef.ext.widgets.reference/build.properties +++ b/plugins/org.eclipse.eef.ext.widgets.reference/build.properties @@ -12,6 +12,7 @@ bin.includes = .,\ plugin.properties,\ about.html jars.compile.order = . -source.. = src-gen/ +source.. = src-gen/,\ + src/ output.. = bin/ javacProjectSettings = true diff --git a/plugins/org.eclipse.eef.ext.widgets.reference/model/eef-ext-widgets-reference.ecore b/plugins/org.eclipse.eef.ext.widgets.reference/model/eef-ext-widgets-reference.ecore index 1a0fd2310..caf44fd9f 100644 --- a/plugins/org.eclipse.eef.ext.widgets.reference/model/eef-ext-widgets-reference.ecore +++ b/plugins/org.eclipse.eef.ext.widgets.reference/model/eef-ext-widgets-reference.ecore @@ -18,5 +18,29 @@ <details key="documentation" value="The EObject to use to evaluate the value of the reference"/> </eAnnotations> </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="style" eType="#//EEFExtReferenceWidgetStyle" + containment="true"> + <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> + <details key="documentation" value="The style of the reference widget"/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="conditionalStyles" upperBound="-1" + eType="#//EEFExtReferenceConditionalStyle" containment="true"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="EEFExtReferenceWidgetStyle" eSuperTypes="../../org.eclipse.eef/model/eef.ecore#//EEFWidgetStyle"> + <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> + <details key="documentation" value="The style of the reference widget"/> + </eAnnotations> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="EEFExtReferenceConditionalStyle" eSuperTypes="../../org.eclipse.eef/model/eef.ecore#//EEFConditionalStyle"> + <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> + <details key="documentation" value="The conditional style of the reference widget"/> + </eAnnotations> + <eStructuralFeatures xsi:type="ecore:EReference" name="style" eType="#//EEFExtReferenceWidgetStyle" + containment="true"> + <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> + <details key="documentation" value="The style of the reference widget"/> + </eAnnotations> + </eStructuralFeatures> </eClassifiers> </ecore:EPackage> diff --git a/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/EEFExtReferenceConditionalStyle.java b/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/EEFExtReferenceConditionalStyle.java new file mode 100644 index 000000000..456f0d9ff --- /dev/null +++ b/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/EEFExtReferenceConditionalStyle.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) 2016 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.htm + * Contributors: Obeo - initial API and implementation + */ +package org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference; + +import org.eclipse.eef.EEFConditionalStyle; + +/** + * <!-- begin-user-doc --> A representation of the model object '<em><b>EEF Ext Reference Conditional Style</b></em>'. + * <!-- end-user-doc --> + * + * <!-- begin-model-doc --> The conditional style of the reference widget <!-- end-model-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceConditionalStyle#getStyle <em> + * Style</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EefExtWidgetsReferencePackage#getEEFExtReferenceConditionalStyle() + * @model + * @generated + */ +public interface EEFExtReferenceConditionalStyle extends EEFConditionalStyle { + /** + * Returns the value of the '<em><b>Style</b></em>' containment reference. <!-- begin-user-doc --> <!-- end-user-doc + * --> <!-- begin-model-doc --> The style of the reference widget <!-- end-model-doc --> + * + * @return the value of the '<em>Style</em>' containment reference. + * @see #setStyle(EEFExtReferenceWidgetStyle) + * @see org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EefExtWidgetsReferencePackage#getEEFExtReferenceConditionalStyle_Style() + * @model containment="true" resolveProxies="true" + * @generated + */ + EEFExtReferenceWidgetStyle getStyle(); + + /** + * Sets the value of the ' + * {@link org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceConditionalStyle#getStyle + * <em>Style</em>}' containment reference. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Style</em>' containment reference. + * @see #getStyle() + * @generated + */ + void setStyle(EEFExtReferenceWidgetStyle value); + +} // EEFExtReferenceConditionalStyle diff --git a/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/EEFExtReferenceDescription.java b/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/EEFExtReferenceDescription.java index b0b38220d..07301071f 100644 --- a/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/EEFExtReferenceDescription.java +++ b/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/EEFExtReferenceDescription.java @@ -9,6 +9,7 @@ package org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference; import org.eclipse.eef.EEFWidgetDescription; +import org.eclipse.emf.common.util.EList; /** * <!-- begin-user-doc --> A representation of the model object '<em><b>EEF Ext Reference Description</b></em>'. <!-- @@ -25,6 +26,11 @@ import org.eclipse.eef.EEFWidgetDescription; * <li> * {@link org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceDescription#getReferenceOwnerExpression * <em>Reference Owner Expression</em>}</li> + * <li>{@link org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceDescription#getStyle <em>Style + * </em>}</li> + * <li> + * {@link org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceDescription#getConditionalStyles + * <em>Conditional Styles</em>}</li> * </ul> * </p> * @@ -49,7 +55,7 @@ public interface EEFExtReferenceDescription extends EEFWidgetDescription { * Sets the value of the ' * {@link org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceDescription#getReferenceNameExpression * <em>Reference Name Expression</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @param value * the new value of the '<em>Reference Name Expression</em>' attribute. * @see #getReferenceNameExpression() @@ -61,7 +67,7 @@ public interface EEFExtReferenceDescription extends EEFWidgetDescription { * Returns the value of the '<em><b>Reference Owner Expression</b></em>' attribute. <!-- begin-user-doc --> <!-- * end-user-doc --> <!-- begin-model-doc --> The EObject to use to evaluate the value of the reference <!-- * end-model-doc --> - * + * * @return the value of the '<em>Reference Owner Expression</em>' attribute. * @see #setReferenceOwnerExpression(String) * @see org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EefExtWidgetsReferencePackage#getEEFExtReferenceDescription_ReferenceOwnerExpression() @@ -74,7 +80,7 @@ public interface EEFExtReferenceDescription extends EEFWidgetDescription { * Sets the value of the ' * {@link org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceDescription#getReferenceOwnerExpression * <em>Reference Owner Expression</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @param value * the new value of the '<em>Reference Owner Expression</em>' attribute. * @see #getReferenceOwnerExpression() @@ -82,4 +88,45 @@ public interface EEFExtReferenceDescription extends EEFWidgetDescription { */ void setReferenceOwnerExpression(String value); + /** + * Returns the value of the '<em><b>Style</b></em>' containment reference. <!-- begin-user-doc --> <!-- end-user-doc + * --> <!-- begin-model-doc --> The style of the reference widget <!-- end-model-doc --> + * + * @return the value of the '<em>Style</em>' containment reference. + * @see #setStyle(EEFExtReferenceWidgetStyle) + * @see org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EefExtWidgetsReferencePackage#getEEFExtReferenceDescription_Style() + * @model containment="true" resolveProxies="true" + * @generated + */ + EEFExtReferenceWidgetStyle getStyle(); + + /** + * Sets the value of the ' + * {@link org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceDescription#getStyle + * <em>Style</em>}' containment reference. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Style</em>' containment reference. + * @see #getStyle() + * @generated + */ + void setStyle(EEFExtReferenceWidgetStyle value); + + /** + * Returns the value of the '<em><b>Conditional Styles</b></em>' containment reference list. The list contents are + * of type {@link org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceConditionalStyle}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Conditional Styles</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>Conditional Styles</em>' containment reference list. + * @see org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EefExtWidgetsReferencePackage#getEEFExtReferenceDescription_ConditionalStyles() + * @model containment="true" resolveProxies="true" + * @generated + */ + EList<EEFExtReferenceConditionalStyle> getConditionalStyles(); + } // EEFExtReferenceDescription diff --git a/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/EEFExtReferenceWidgetStyle.java b/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/EEFExtReferenceWidgetStyle.java new file mode 100644 index 000000000..2706e8ac1 --- /dev/null +++ b/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/EEFExtReferenceWidgetStyle.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) 2016 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.htm + * Contributors: Obeo - initial API and implementation + */ +package org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference; + +import org.eclipse.eef.EEFWidgetStyle; + +/** + * <!-- begin-user-doc --> A representation of the model object '<em><b>EEF Ext Reference Widget Style</b></em>'. <!-- + * end-user-doc --> + * + * <!-- begin-model-doc --> The style of the reference widget <!-- end-model-doc --> + * + * + * @see org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EefExtWidgetsReferencePackage#getEEFExtReferenceWidgetStyle() + * @model + * @generated + */ +public interface EEFExtReferenceWidgetStyle extends EEFWidgetStyle { +} // EEFExtReferenceWidgetStyle diff --git a/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/EefExtWidgetsReferenceFactory.java b/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/EefExtWidgetsReferenceFactory.java index 05213915c..ccb2af468 100644 --- a/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/EefExtWidgetsReferenceFactory.java +++ b/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/EefExtWidgetsReferenceFactory.java @@ -13,14 +13,14 @@ import org.eclipse.emf.ecore.EFactory; /** * <!-- begin-user-doc --> The <b>Factory</b> for the model. It provides a create method for each non-abstract class of * the model. <!-- end-user-doc --> - * + * * @see org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EefExtWidgetsReferencePackage * @generated */ public interface EefExtWidgetsReferenceFactory extends EFactory { /** * The singleton instance of the factory. <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ EefExtWidgetsReferenceFactory eINSTANCE = org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.impl.EefExtWidgetsReferenceFactoryImpl @@ -36,8 +36,26 @@ public interface EefExtWidgetsReferenceFactory extends EFactory { EEFExtReferenceDescription createEEFExtReferenceDescription(); /** + * Returns a new object of class '<em>EEF Ext Reference Widget Style</em>'. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @return a new object of class '<em>EEF Ext Reference Widget Style</em>'. + * @generated + */ + EEFExtReferenceWidgetStyle createEEFExtReferenceWidgetStyle(); + + /** + * Returns a new object of class '<em>EEF Ext Reference Conditional Style</em>'. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @return a new object of class '<em>EEF Ext Reference Conditional Style</em>'. + * @generated + */ + EEFExtReferenceConditionalStyle createEEFExtReferenceConditionalStyle(); + + /** * Returns the package supported by this factory. <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @return the package supported by this factory. * @generated */ diff --git a/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/EefExtWidgetsReferencePackage.java b/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/EefExtWidgetsReferencePackage.java index bd8e86cc3..62ace07f1 100644 --- a/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/EefExtWidgetsReferencePackage.java +++ b/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/EefExtWidgetsReferencePackage.java @@ -12,6 +12,7 @@ import org.eclipse.eef.EefPackage; import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; /** * <!-- begin-user-doc --> The <b>Package</b> for the model. It contains accessors for the meta objects to represent @@ -22,7 +23,7 @@ import org.eclipse.emf.ecore.EPackage; * <li>and each data type</li> * </ul> * <!-- end-user-doc --> - * + * * @see org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EefExtWidgetsReferenceFactory * @model kind="package" * @generated @@ -30,28 +31,28 @@ import org.eclipse.emf.ecore.EPackage; public interface EefExtWidgetsReferencePackage extends EPackage { /** * The package name. <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ String eNAME = "eefextwidgetsreference"; //$NON-NLS-1$ /** * The package namespace URI. <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ String eNS_URI = "http://www.eclipse.org/eef/ext/widgets/reference"; //$NON-NLS-1$ /** * The package namespace name. <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ String eNS_PREFIX = "eef-ext-widgets-reference"; //$NON-NLS-1$ /** * The singleton instance of the package. <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ EefExtWidgetsReferencePackage eINSTANCE = org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.impl.EefExtWidgetsReferencePackageImpl @@ -61,7 +62,7 @@ public interface EefExtWidgetsReferencePackage extends EPackage { * The meta object id for the ' * {@link org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.impl.EEFExtReferenceDescriptionImpl * <em>EEF Ext Reference Description</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @see org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.impl.EEFExtReferenceDescriptionImpl * @see org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.impl.EefExtWidgetsReferencePackageImpl#getEEFExtReferenceDescription() * @generated @@ -70,7 +71,7 @@ public interface EefExtWidgetsReferencePackage extends EPackage { /** * The feature id for the '<em><b>Identifier</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated * @ordered */ @@ -87,7 +88,7 @@ public interface EefExtWidgetsReferencePackage extends EPackage { /** * The feature id for the '<em><b>Help Expression</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated * @ordered */ @@ -96,7 +97,7 @@ public interface EefExtWidgetsReferencePackage extends EPackage { /** * The feature id for the '<em><b>Is Enabled Expression</b></em>' attribute. <!-- begin-user-doc --> <!-- * end-user-doc --> - * + * * @generated * @ordered */ @@ -105,7 +106,7 @@ public interface EefExtWidgetsReferencePackage extends EPackage { /** * The feature id for the '<em><b>Property Validation Rules</b></em>' reference list. <!-- begin-user-doc --> <!-- * end-user-doc --> - * + * * @generated * @ordered */ @@ -114,7 +115,7 @@ public interface EefExtWidgetsReferencePackage extends EPackage { /** * The feature id for the '<em><b>Reference Name Expression</b></em>' attribute. <!-- begin-user-doc --> <!-- * end-user-doc --> - * + * * @generated * @ordered */ @@ -123,26 +124,147 @@ public interface EefExtWidgetsReferencePackage extends EPackage { /** * The feature id for the '<em><b>Reference Owner Expression</b></em>' attribute. <!-- begin-user-doc --> <!-- * end-user-doc --> - * + * * @generated * @ordered */ int EEF_EXT_REFERENCE_DESCRIPTION__REFERENCE_OWNER_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_EXT_REFERENCE_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 --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int EEF_EXT_REFERENCE_DESCRIPTION__CONDITIONAL_STYLES = EefPackage.EEF_WIDGET_DESCRIPTION_FEATURE_COUNT + 3; + + /** * The number of structural features of the '<em>EEF Ext Reference Description</em>' class. <!-- begin-user-doc --> * <!-- end-user-doc --> - * + * + * @generated + * @ordered + */ + int EEF_EXT_REFERENCE_DESCRIPTION_FEATURE_COUNT = EefPackage.EEF_WIDGET_DESCRIPTION_FEATURE_COUNT + 4; + + /** + * The meta object id for the ' + * {@link org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.impl.EEFExtReferenceWidgetStyleImpl + * <em>EEF Ext Reference Widget Style</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.impl.EEFExtReferenceWidgetStyleImpl + * @see org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.impl.EefExtWidgetsReferencePackageImpl#getEEFExtReferenceWidgetStyle() + * @generated + */ + int EEF_EXT_REFERENCE_WIDGET_STYLE = 1; + + /** + * The feature id for the '<em><b>Label Background Color Expression</b></em>' attribute. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int EEF_EXT_REFERENCE_WIDGET_STYLE__LABEL_BACKGROUND_COLOR_EXPRESSION = EefPackage.EEF_WIDGET_STYLE__LABEL_BACKGROUND_COLOR_EXPRESSION; + + /** + * The feature id for the '<em><b>Label Foreground Color Expression</b></em>' attribute. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int EEF_EXT_REFERENCE_WIDGET_STYLE__LABEL_FOREGROUND_COLOR_EXPRESSION = EefPackage.EEF_WIDGET_STYLE__LABEL_FOREGROUND_COLOR_EXPRESSION; + + /** + * The feature id for the '<em><b>Label Font Name Expression</b></em>' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int EEF_EXT_REFERENCE_WIDGET_STYLE__LABEL_FONT_NAME_EXPRESSION = EefPackage.EEF_WIDGET_STYLE__LABEL_FONT_NAME_EXPRESSION; + + /** + * The feature id for the '<em><b>Label Font Size Expression</b></em>' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int EEF_EXT_REFERENCE_WIDGET_STYLE__LABEL_FONT_SIZE_EXPRESSION = EefPackage.EEF_WIDGET_STYLE__LABEL_FONT_SIZE_EXPRESSION; + + /** + * The feature id for the '<em><b>Label Font Style Expression</b></em>' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int EEF_EXT_REFERENCE_WIDGET_STYLE__LABEL_FONT_STYLE_EXPRESSION = EefPackage.EEF_WIDGET_STYLE__LABEL_FONT_STYLE_EXPRESSION; + + /** + * The number of structural features of the '<em>EEF Ext Reference Widget Style</em>' class. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int EEF_EXT_REFERENCE_WIDGET_STYLE_FEATURE_COUNT = EefPackage.EEF_WIDGET_STYLE_FEATURE_COUNT + 0; + + /** + * The meta object id for the ' + * {@link org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.impl.EEFExtReferenceConditionalStyleImpl + * <em>EEF Ext Reference Conditional Style</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.impl.EEFExtReferenceConditionalStyleImpl + * @see org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.impl.EefExtWidgetsReferencePackageImpl#getEEFExtReferenceConditionalStyle() + * @generated + */ + int EEF_EXT_REFERENCE_CONDITIONAL_STYLE = 2; + + /** + * The feature id for the '<em><b>Precondition Expression</b></em>' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * * @generated * @ordered */ - int EEF_EXT_REFERENCE_DESCRIPTION_FEATURE_COUNT = EefPackage.EEF_WIDGET_DESCRIPTION_FEATURE_COUNT + 2; + int EEF_EXT_REFERENCE_CONDITIONAL_STYLE__PRECONDITION_EXPRESSION = EefPackage.EEF_CONDITIONAL_STYLE__PRECONDITION_EXPRESSION; + + /** + * The feature id for the '<em><b>Style</b></em>' containment reference. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + * @ordered + */ + int EEF_EXT_REFERENCE_CONDITIONAL_STYLE__STYLE = EefPackage.EEF_CONDITIONAL_STYLE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>EEF Ext Reference Conditional Style</em>' class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int EEF_EXT_REFERENCE_CONDITIONAL_STYLE_FEATURE_COUNT = EefPackage.EEF_CONDITIONAL_STYLE_FEATURE_COUNT + 1; /** * Returns the meta object for class ' * {@link org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceDescription * <em>EEF Ext Reference Description</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @return the meta object for class '<em>EEF Ext Reference Description</em>'. * @see org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceDescription * @generated @@ -153,7 +275,7 @@ public interface EefExtWidgetsReferencePackage extends EPackage { * Returns the meta object for the attribute ' * {@link org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceDescription#getReferenceNameExpression * <em>Reference Name Expression</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @return the meta object for the attribute '<em>Reference Name Expression</em>'. * @see org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceDescription#getReferenceNameExpression() * @see #getEEFExtReferenceDescription() @@ -165,7 +287,7 @@ public interface EefExtWidgetsReferencePackage extends EPackage { * Returns the meta object for the attribute ' * {@link org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceDescription#getReferenceOwnerExpression * <em>Reference Owner Expression</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @return the meta object for the attribute '<em>Reference Owner Expression</em>'. * @see org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceDescription#getReferenceOwnerExpression() * @see #getEEFExtReferenceDescription() @@ -174,8 +296,66 @@ public interface EefExtWidgetsReferencePackage extends EPackage { EAttribute getEEFExtReferenceDescription_ReferenceOwnerExpression(); /** + * Returns the meta object for the containment reference ' + * {@link org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceDescription#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.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceDescription#getStyle() + * @see #getEEFExtReferenceDescription() + * @generated + */ + EReference getEEFExtReferenceDescription_Style(); + + /** + * Returns the meta object for the containment reference list ' + * {@link org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceDescription#getConditionalStyles + * <em>Conditional Styles</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the containment reference list '<em>Conditional Styles</em>'. + * @see org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceDescription#getConditionalStyles() + * @see #getEEFExtReferenceDescription() + * @generated + */ + EReference getEEFExtReferenceDescription_ConditionalStyles(); + + /** + * Returns the meta object for class ' + * {@link org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceWidgetStyle + * <em>EEF Ext Reference Widget Style</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for class '<em>EEF Ext Reference Widget Style</em>'. + * @see org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceWidgetStyle + * @generated + */ + EClass getEEFExtReferenceWidgetStyle(); + + /** + * Returns the meta object for class ' + * {@link org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceConditionalStyle + * <em>EEF Ext Reference Conditional Style</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for class '<em>EEF Ext Reference Conditional Style</em>'. + * @see org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceConditionalStyle + * @generated + */ + EClass getEEFExtReferenceConditionalStyle(); + + /** + * Returns the meta object for the containment reference ' + * {@link org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceConditionalStyle#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.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceConditionalStyle#getStyle() + * @see #getEEFExtReferenceConditionalStyle() + * @generated + */ + EReference getEEFExtReferenceConditionalStyle_Style(); + + /** * Returns the factory that creates the instances of the model. <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @return the factory that creates the instances of the model. * @generated */ @@ -190,7 +370,7 @@ public interface EefExtWidgetsReferencePackage extends EPackage { * <li>and each data type</li> * </ul> * <!-- end-user-doc --> - * + * * @generated */ interface Literals { @@ -198,7 +378,7 @@ public interface EefExtWidgetsReferencePackage extends EPackage { * The meta object literal for the ' * {@link org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.impl.EEFExtReferenceDescriptionImpl * <em>EEF Ext Reference Description</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @see org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.impl.EEFExtReferenceDescriptionImpl * @see org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.impl.EefExtWidgetsReferencePackageImpl#getEEFExtReferenceDescription() * @generated @@ -217,12 +397,59 @@ public interface EefExtWidgetsReferencePackage extends EPackage { /** * The meta object literal for the '<em><b>Reference Owner Expression</b></em>' attribute feature. <!-- * begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ EAttribute EEF_EXT_REFERENCE_DESCRIPTION__REFERENCE_OWNER_EXPRESSION = EefExtWidgetsReferencePackage.eINSTANCE .getEEFExtReferenceDescription_ReferenceOwnerExpression(); + /** + * The meta object literal for the '<em><b>Style</b></em>' containment reference feature. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + EReference EEF_EXT_REFERENCE_DESCRIPTION__STYLE = EefExtWidgetsReferencePackage.eINSTANCE.getEEFExtReferenceDescription_Style(); + + /** + * The meta object literal for the '<em><b>Conditional Styles</b></em>' containment reference list feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EReference EEF_EXT_REFERENCE_DESCRIPTION__CONDITIONAL_STYLES = EefExtWidgetsReferencePackage.eINSTANCE + .getEEFExtReferenceDescription_ConditionalStyles(); + + /** + * The meta object literal for the ' + * {@link org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.impl.EEFExtReferenceWidgetStyleImpl + * <em>EEF Ext Reference Widget Style</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.impl.EEFExtReferenceWidgetStyleImpl + * @see org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.impl.EefExtWidgetsReferencePackageImpl#getEEFExtReferenceWidgetStyle() + * @generated + */ + EClass EEF_EXT_REFERENCE_WIDGET_STYLE = EefExtWidgetsReferencePackage.eINSTANCE.getEEFExtReferenceWidgetStyle(); + + /** + * The meta object literal for the ' + * {@link org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.impl.EEFExtReferenceConditionalStyleImpl + * <em>EEF Ext Reference Conditional Style</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.impl.EEFExtReferenceConditionalStyleImpl + * @see org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.impl.EefExtWidgetsReferencePackageImpl#getEEFExtReferenceConditionalStyle() + * @generated + */ + EClass EEF_EXT_REFERENCE_CONDITIONAL_STYLE = EefExtWidgetsReferencePackage.eINSTANCE.getEEFExtReferenceConditionalStyle(); + + /** + * The meta object literal for the '<em><b>Style</b></em>' containment reference feature. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + EReference EEF_EXT_REFERENCE_CONDITIONAL_STYLE__STYLE = EefExtWidgetsReferencePackage.eINSTANCE.getEEFExtReferenceConditionalStyle_Style(); + } } // EefExtWidgetsReferencePackage diff --git a/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/impl/EEFExtReferenceConditionalStyleImpl.java b/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/impl/EEFExtReferenceConditionalStyleImpl.java new file mode 100644 index 000000000..615454da8 --- /dev/null +++ b/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/impl/EEFExtReferenceConditionalStyleImpl.java @@ -0,0 +1,226 @@ +/** + * Copyright (c) 2016 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.htm + * Contributors: Obeo - initial API and implementation + */ +package org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.impl; + +import org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceConditionalStyle; +import org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceWidgetStyle; +import org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EefExtWidgetsReferencePackage; +import org.eclipse.eef.impl.EEFConditionalStyleImpl; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>EEF Ext Reference Conditional Style</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li> + * {@link org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.impl.EEFExtReferenceConditionalStyleImpl#getStyle + * <em>Style</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class EEFExtReferenceConditionalStyleImpl extends EEFConditionalStyleImpl implements EEFExtReferenceConditionalStyle { + /** + * The cached value of the '{@link #getStyle() <em>Style</em>}' containment reference. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #getStyle() + * @generated + * @ordered + */ + protected EEFExtReferenceWidgetStyle style; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected EEFExtReferenceConditionalStyleImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return EefExtWidgetsReferencePackage.Literals.EEF_EXT_REFERENCE_CONDITIONAL_STYLE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EEFExtReferenceWidgetStyle getStyle() { + if (style != null && style.eIsProxy()) { + InternalEObject oldStyle = (InternalEObject) style; + style = (EEFExtReferenceWidgetStyle) eResolveProxy(oldStyle); + if (style != oldStyle) { + InternalEObject newStyle = (InternalEObject) style; + NotificationChain msgs = oldStyle.eInverseRemove(this, InternalEObject.EOPPOSITE_FEATURE_BASE + - EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_CONDITIONAL_STYLE__STYLE, null, null); + if (newStyle.eInternalContainer() == null) { + msgs = newStyle.eInverseAdd(this, InternalEObject.EOPPOSITE_FEATURE_BASE + - EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_CONDITIONAL_STYLE__STYLE, null, msgs); + } + if (msgs != null) { + msgs.dispatch(); + } + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.RESOLVE, + EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_CONDITIONAL_STYLE__STYLE, oldStyle, style)); + } + } + } + return style; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EEFExtReferenceWidgetStyle basicGetStyle() { + return style; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public NotificationChain basicSetStyle(EEFExtReferenceWidgetStyle newStyle, NotificationChain msgs) { + EEFExtReferenceWidgetStyle oldStyle = style; + style = newStyle; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, + EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_CONDITIONAL_STYLE__STYLE, oldStyle, newStyle); + if (msgs == null) { + msgs = notification; + } else { + msgs.add(notification); + } + } + return msgs; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setStyle(EEFExtReferenceWidgetStyle newStyle) { + if (newStyle != style) { + NotificationChain msgs = null; + if (style != null) { + msgs = ((InternalEObject) style).eInverseRemove(this, InternalEObject.EOPPOSITE_FEATURE_BASE + - EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_CONDITIONAL_STYLE__STYLE, null, msgs); + } + if (newStyle != null) { + msgs = ((InternalEObject) newStyle).eInverseAdd(this, InternalEObject.EOPPOSITE_FEATURE_BASE + - EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_CONDITIONAL_STYLE__STYLE, null, msgs); + } + msgs = basicSetStyle(newStyle, msgs); + if (msgs != null) { + msgs.dispatch(); + } + } else if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_CONDITIONAL_STYLE__STYLE, newStyle, + newStyle)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_CONDITIONAL_STYLE__STYLE: + return basicSetStyle(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_CONDITIONAL_STYLE__STYLE: + if (resolve) { + return getStyle(); + } + return basicGetStyle(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_CONDITIONAL_STYLE__STYLE: + setStyle((EEFExtReferenceWidgetStyle) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_CONDITIONAL_STYLE__STYLE: + setStyle((EEFExtReferenceWidgetStyle) null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_CONDITIONAL_STYLE__STYLE: + return style != null; + } + return super.eIsSet(featureID); + } + +} // EEFExtReferenceConditionalStyleImpl diff --git a/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/impl/EEFExtReferenceDescriptionImpl.java b/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/impl/EEFExtReferenceDescriptionImpl.java index f5b0981b5..1ba91617a 100644 --- a/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/impl/EEFExtReferenceDescriptionImpl.java +++ b/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/impl/EEFExtReferenceDescriptionImpl.java @@ -8,12 +8,21 @@ */ package org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.impl; +import java.util.Collection; + +import org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceConditionalStyle; import org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceDescription; +import org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceWidgetStyle; import org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EefExtWidgetsReferencePackage; import org.eclipse.eef.impl.EEFWidgetDescriptionImpl; import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; /** * <!-- begin-user-doc --> An implementation of the model object '<em><b>EEF Ext Reference Description</b></em>'. <!-- @@ -27,6 +36,11 @@ import org.eclipse.emf.ecore.impl.ENotificationImpl; * <li> * {@link org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.impl.EEFExtReferenceDescriptionImpl#getReferenceOwnerExpression * <em>Reference Owner Expression</em>}</li> + * <li>{@link org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.impl.EEFExtReferenceDescriptionImpl#getStyle + * <em>Style</em>}</li> + * <li> + * {@link org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.impl.EEFExtReferenceDescriptionImpl#getConditionalStyles + * <em>Conditional Styles</em>}</li> * </ul> * </p> * @@ -36,7 +50,7 @@ public class EEFExtReferenceDescriptionImpl extends EEFWidgetDescriptionImpl imp /** * The default value of the '{@link #getReferenceNameExpression() <em>Reference Name Expression</em>}' attribute. * <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @see #getReferenceNameExpression() * @generated * @ordered @@ -46,7 +60,7 @@ public class EEFExtReferenceDescriptionImpl extends EEFWidgetDescriptionImpl imp /** * The cached value of the '{@link #getReferenceNameExpression() <em>Reference Name Expression</em>}' attribute. * <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @see #getReferenceNameExpression() * @generated * @ordered @@ -56,7 +70,7 @@ public class EEFExtReferenceDescriptionImpl extends EEFWidgetDescriptionImpl imp /** * The default value of the '{@link #getReferenceOwnerExpression() <em>Reference Owner Expression</em>}' attribute. * <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @see #getReferenceOwnerExpression() * @generated * @ordered @@ -66,7 +80,7 @@ public class EEFExtReferenceDescriptionImpl extends EEFWidgetDescriptionImpl imp /** * The cached value of the '{@link #getReferenceOwnerExpression() <em>Reference Owner Expression</em>}' attribute. * <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @see #getReferenceOwnerExpression() * @generated * @ordered @@ -74,8 +88,28 @@ public class EEFExtReferenceDescriptionImpl extends EEFWidgetDescriptionImpl imp protected String referenceOwnerExpression = EEFExtReferenceDescriptionImpl.REFERENCE_OWNER_EXPRESSION_EDEFAULT; /** + * The cached value of the '{@link #getStyle() <em>Style</em>}' containment reference. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #getStyle() + * @generated + * @ordered + */ + protected EEFExtReferenceWidgetStyle style; + + /** + * The cached value of the '{@link #getConditionalStyles() <em>Conditional Styles</em>}' containment reference list. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #getConditionalStyles() + * @generated + * @ordered + */ + protected EList<EEFExtReferenceConditionalStyle> conditionalStyles; + + /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ protected EEFExtReferenceDescriptionImpl() { @@ -84,7 +118,7 @@ public class EEFExtReferenceDescriptionImpl extends EEFWidgetDescriptionImpl imp /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ @Override @@ -94,7 +128,7 @@ public class EEFExtReferenceDescriptionImpl extends EEFWidgetDescriptionImpl imp /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ @Override @@ -104,7 +138,7 @@ public class EEFExtReferenceDescriptionImpl extends EEFWidgetDescriptionImpl imp /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ @Override @@ -120,7 +154,7 @@ public class EEFExtReferenceDescriptionImpl extends EEFWidgetDescriptionImpl imp /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ @Override @@ -130,7 +164,7 @@ public class EEFExtReferenceDescriptionImpl extends EEFWidgetDescriptionImpl imp /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ @Override @@ -146,7 +180,123 @@ public class EEFExtReferenceDescriptionImpl extends EEFWidgetDescriptionImpl imp /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * + * + * @generated + */ + @Override + public EEFExtReferenceWidgetStyle getStyle() { + if (style != null && style.eIsProxy()) { + InternalEObject oldStyle = (InternalEObject) style; + style = (EEFExtReferenceWidgetStyle) eResolveProxy(oldStyle); + if (style != oldStyle) { + InternalEObject newStyle = (InternalEObject) style; + NotificationChain msgs = oldStyle.eInverseRemove(this, InternalEObject.EOPPOSITE_FEATURE_BASE + - EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_DESCRIPTION__STYLE, null, null); + if (newStyle.eInternalContainer() == null) { + msgs = newStyle.eInverseAdd(this, InternalEObject.EOPPOSITE_FEATURE_BASE + - EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_DESCRIPTION__STYLE, null, msgs); + } + if (msgs != null) { + msgs.dispatch(); + } + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.RESOLVE, EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_DESCRIPTION__STYLE, + oldStyle, style)); + } + } + } + return style; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EEFExtReferenceWidgetStyle basicGetStyle() { + return style; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public NotificationChain basicSetStyle(EEFExtReferenceWidgetStyle newStyle, NotificationChain msgs) { + EEFExtReferenceWidgetStyle oldStyle = style; + style = newStyle; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, + EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_DESCRIPTION__STYLE, oldStyle, newStyle); + if (msgs == null) { + msgs = notification; + } else { + msgs.add(notification); + } + } + return msgs; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setStyle(EEFExtReferenceWidgetStyle newStyle) { + if (newStyle != style) { + NotificationChain msgs = null; + if (style != null) { + msgs = ((InternalEObject) style).eInverseRemove(this, InternalEObject.EOPPOSITE_FEATURE_BASE + - EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_DESCRIPTION__STYLE, null, msgs); + } + if (newStyle != null) { + msgs = ((InternalEObject) newStyle).eInverseAdd(this, InternalEObject.EOPPOSITE_FEATURE_BASE + - EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_DESCRIPTION__STYLE, null, msgs); + } + msgs = basicSetStyle(newStyle, msgs); + if (msgs != null) { + msgs.dispatch(); + } + } else if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_DESCRIPTION__STYLE, newStyle, + newStyle)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EList<EEFExtReferenceConditionalStyle> getConditionalStyles() { + if (conditionalStyles == null) { + conditionalStyles = new EObjectContainmentEList.Resolving<EEFExtReferenceConditionalStyle>(EEFExtReferenceConditionalStyle.class, this, + EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_DESCRIPTION__CONDITIONAL_STYLES); + } + return conditionalStyles; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_DESCRIPTION__STYLE: + return basicSetStyle(null, msgs); + case EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_DESCRIPTION__CONDITIONAL_STYLES: + return ((InternalEList<?>) getConditionalStyles()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * * @generated */ @Override @@ -156,15 +306,23 @@ public class EEFExtReferenceDescriptionImpl extends EEFWidgetDescriptionImpl imp return getReferenceNameExpression(); case EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_DESCRIPTION__REFERENCE_OWNER_EXPRESSION: return getReferenceOwnerExpression(); + case EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_DESCRIPTION__STYLE: + if (resolve) { + return getStyle(); + } + return basicGetStyle(); + case EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_DESCRIPTION__CONDITIONAL_STYLES: + return getConditionalStyles(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ + @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { @@ -174,13 +332,20 @@ public class EEFExtReferenceDescriptionImpl extends EEFWidgetDescriptionImpl imp case EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_DESCRIPTION__REFERENCE_OWNER_EXPRESSION: setReferenceOwnerExpression((String) newValue); return; + case EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_DESCRIPTION__STYLE: + setStyle((EEFExtReferenceWidgetStyle) newValue); + return; + case EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_DESCRIPTION__CONDITIONAL_STYLES: + getConditionalStyles().clear(); + getConditionalStyles().addAll((Collection<? extends EEFExtReferenceConditionalStyle>) newValue); + return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ @Override @@ -192,13 +357,19 @@ public class EEFExtReferenceDescriptionImpl extends EEFWidgetDescriptionImpl imp case EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_DESCRIPTION__REFERENCE_OWNER_EXPRESSION: setReferenceOwnerExpression(EEFExtReferenceDescriptionImpl.REFERENCE_OWNER_EXPRESSION_EDEFAULT); return; + case EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_DESCRIPTION__STYLE: + setStyle((EEFExtReferenceWidgetStyle) null); + return; + case EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_DESCRIPTION__CONDITIONAL_STYLES: + getConditionalStyles().clear(); + return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ @Override @@ -206,17 +377,21 @@ public class EEFExtReferenceDescriptionImpl extends EEFWidgetDescriptionImpl imp switch (featureID) { case EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_DESCRIPTION__REFERENCE_NAME_EXPRESSION: return EEFExtReferenceDescriptionImpl.REFERENCE_NAME_EXPRESSION_EDEFAULT == null ? referenceNameExpression != null - : !EEFExtReferenceDescriptionImpl.REFERENCE_NAME_EXPRESSION_EDEFAULT.equals(referenceNameExpression); + : !EEFExtReferenceDescriptionImpl.REFERENCE_NAME_EXPRESSION_EDEFAULT.equals(referenceNameExpression); case EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_DESCRIPTION__REFERENCE_OWNER_EXPRESSION: return EEFExtReferenceDescriptionImpl.REFERENCE_OWNER_EXPRESSION_EDEFAULT == null ? referenceOwnerExpression != null - : !EEFExtReferenceDescriptionImpl.REFERENCE_OWNER_EXPRESSION_EDEFAULT.equals(referenceOwnerExpression); + : !EEFExtReferenceDescriptionImpl.REFERENCE_OWNER_EXPRESSION_EDEFAULT.equals(referenceOwnerExpression); + case EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_DESCRIPTION__STYLE: + return style != null; + case EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_DESCRIPTION__CONDITIONAL_STYLES: + return conditionalStyles != null && !conditionalStyles.isEmpty(); } return super.eIsSet(featureID); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ @Override diff --git a/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/impl/EEFExtReferenceWidgetStyleImpl.java b/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/impl/EEFExtReferenceWidgetStyleImpl.java new file mode 100644 index 000000000..2cd177a28 --- /dev/null +++ b/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/impl/EEFExtReferenceWidgetStyleImpl.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) 2016 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.htm + * Contributors: Obeo - initial API and implementation + */ +package org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.impl; + +import org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceWidgetStyle; +import org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EefExtWidgetsReferencePackage; +import org.eclipse.eef.impl.EEFWidgetStyleImpl; +import org.eclipse.emf.ecore.EClass; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>EEF Ext Reference Widget Style</b></em>'. <!-- + * end-user-doc --> + * <p> + * </p> + * + * @generated + */ +public class EEFExtReferenceWidgetStyleImpl extends EEFWidgetStyleImpl implements EEFExtReferenceWidgetStyle { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected EEFExtReferenceWidgetStyleImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return EefExtWidgetsReferencePackage.Literals.EEF_EXT_REFERENCE_WIDGET_STYLE; + } + +} // EEFExtReferenceWidgetStyleImpl diff --git a/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/impl/EefExtWidgetsReferenceFactoryImpl.java b/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/impl/EefExtWidgetsReferenceFactoryImpl.java index 32295f789..435804725 100644 --- a/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/impl/EefExtWidgetsReferenceFactoryImpl.java +++ b/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/impl/EefExtWidgetsReferenceFactoryImpl.java @@ -8,7 +8,9 @@ */ package org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.impl; +import org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceConditionalStyle; import org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceDescription; +import org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceWidgetStyle; import org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EefExtWidgetsReferenceFactory; import org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EefExtWidgetsReferencePackage; import org.eclipse.emf.ecore.EClass; @@ -19,13 +21,13 @@ import org.eclipse.emf.ecore.plugin.EcorePlugin; /** * <!-- begin-user-doc --> An implementation of the model <b>Factory</b>. <!-- end-user-doc --> - * + * * @generated */ public class EefExtWidgetsReferenceFactoryImpl extends EFactoryImpl implements EefExtWidgetsReferenceFactory { /** * Creates the default factory implementation. <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ public static EefExtWidgetsReferenceFactory init() { @@ -43,7 +45,7 @@ public class EefExtWidgetsReferenceFactoryImpl extends EFactoryImpl implements E /** * Creates an instance of the factory. <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ public EefExtWidgetsReferenceFactoryImpl() { @@ -52,7 +54,7 @@ public class EefExtWidgetsReferenceFactoryImpl extends EFactoryImpl implements E /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ @Override @@ -60,6 +62,10 @@ public class EefExtWidgetsReferenceFactoryImpl extends EFactoryImpl implements E switch (eClass.getClassifierID()) { case EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_DESCRIPTION: return createEEFExtReferenceDescription(); + case EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_WIDGET_STYLE: + return createEEFExtReferenceWidgetStyle(); + case EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_CONDITIONAL_STYLE: + return createEEFExtReferenceConditionalStyle(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ } @@ -67,7 +73,7 @@ public class EefExtWidgetsReferenceFactoryImpl extends EFactoryImpl implements E /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ @Override @@ -78,7 +84,29 @@ public class EefExtWidgetsReferenceFactoryImpl extends EFactoryImpl implements E /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * + * + * @generated + */ + @Override + public EEFExtReferenceWidgetStyle createEEFExtReferenceWidgetStyle() { + EEFExtReferenceWidgetStyleImpl eefExtReferenceWidgetStyle = new EEFExtReferenceWidgetStyleImpl(); + return eefExtReferenceWidgetStyle; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EEFExtReferenceConditionalStyle createEEFExtReferenceConditionalStyle() { + EEFExtReferenceConditionalStyleImpl eefExtReferenceConditionalStyle = new EEFExtReferenceConditionalStyleImpl(); + return eefExtReferenceConditionalStyle; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * * @generated */ @Override @@ -88,7 +116,7 @@ public class EefExtWidgetsReferenceFactoryImpl extends EFactoryImpl implements E /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @deprecated * @generated */ diff --git a/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/impl/EefExtWidgetsReferencePackageImpl.java b/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/impl/EefExtWidgetsReferencePackageImpl.java index df8391c49..8670e2435 100644 --- a/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/impl/EefExtWidgetsReferencePackageImpl.java +++ b/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/impl/EefExtWidgetsReferencePackageImpl.java @@ -9,29 +9,45 @@ package org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.impl; import org.eclipse.eef.EefPackage; +import org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceConditionalStyle; import org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceDescription; +import org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceWidgetStyle; import org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EefExtWidgetsReferenceFactory; import org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EefExtWidgetsReferencePackage; import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; import org.eclipse.emf.ecore.EcorePackage; import org.eclipse.emf.ecore.impl.EPackageImpl; /** * <!-- begin-user-doc --> An implementation of the model <b>Package</b>. <!-- end-user-doc --> - * + * * @generated */ public class EefExtWidgetsReferencePackageImpl extends EPackageImpl implements EefExtWidgetsReferencePackage { /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ private EClass eefExtReferenceDescriptionEClass = null; /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EClass eefExtReferenceWidgetStyleEClass = null; + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EClass eefExtReferenceConditionalStyleEClass = null; + + /** * Creates an instance of the model <b>Package</b>, registered with {@link org.eclipse.emf.ecore.EPackage.Registry * EPackage.Registry} by the package package URI value. * <p> @@ -50,7 +66,7 @@ public class EefExtWidgetsReferencePackageImpl extends EPackageImpl implements E /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ private static boolean isInited = false; @@ -76,7 +92,7 @@ public class EefExtWidgetsReferencePackageImpl extends EPackageImpl implements E // Obtain or create and register package EefExtWidgetsReferencePackageImpl theEefExtWidgetsReferencePackage = (EefExtWidgetsReferencePackageImpl) (EPackage.Registry.INSTANCE .get(EefExtWidgetsReferencePackage.eNS_URI) instanceof EefExtWidgetsReferencePackageImpl ? EPackage.Registry.INSTANCE - .get(EefExtWidgetsReferencePackage.eNS_URI) : new EefExtWidgetsReferencePackageImpl()); + .get(EefExtWidgetsReferencePackage.eNS_URI) : new EefExtWidgetsReferencePackageImpl()); EefExtWidgetsReferencePackageImpl.isInited = true; @@ -99,7 +115,7 @@ public class EefExtWidgetsReferencePackageImpl extends EPackageImpl implements E /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ @Override @@ -109,7 +125,7 @@ public class EefExtWidgetsReferencePackageImpl extends EPackageImpl implements E /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ @Override @@ -119,7 +135,7 @@ public class EefExtWidgetsReferencePackageImpl extends EPackageImpl implements E /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ @Override @@ -129,7 +145,57 @@ public class EefExtWidgetsReferencePackageImpl extends EPackageImpl implements E /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * + * + * @generated + */ + @Override + public EReference getEEFExtReferenceDescription_Style() { + return (EReference) eefExtReferenceDescriptionEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getEEFExtReferenceDescription_ConditionalStyles() { + return (EReference) eefExtReferenceDescriptionEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EClass getEEFExtReferenceWidgetStyle() { + return eefExtReferenceWidgetStyleEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EClass getEEFExtReferenceConditionalStyle() { + return eefExtReferenceConditionalStyleEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getEEFExtReferenceConditionalStyle_Style() { + return (EReference) eefExtReferenceConditionalStyleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * * @generated */ @Override @@ -139,7 +205,7 @@ public class EefExtWidgetsReferencePackageImpl extends EPackageImpl implements E /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ private boolean isCreated = false; @@ -147,7 +213,7 @@ public class EefExtWidgetsReferencePackageImpl extends EPackageImpl implements E /** * Creates the meta-model objects for the package. This method is guarded to have no affect on any invocation but * its first. <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ public void createPackageContents() { @@ -160,11 +226,18 @@ public class EefExtWidgetsReferencePackageImpl extends EPackageImpl implements E eefExtReferenceDescriptionEClass = createEClass(EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_DESCRIPTION); createEAttribute(eefExtReferenceDescriptionEClass, EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_DESCRIPTION__REFERENCE_NAME_EXPRESSION); createEAttribute(eefExtReferenceDescriptionEClass, EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_DESCRIPTION__REFERENCE_OWNER_EXPRESSION); + createEReference(eefExtReferenceDescriptionEClass, EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_DESCRIPTION__STYLE); + createEReference(eefExtReferenceDescriptionEClass, EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_DESCRIPTION__CONDITIONAL_STYLES); + + eefExtReferenceWidgetStyleEClass = createEClass(EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_WIDGET_STYLE); + + eefExtReferenceConditionalStyleEClass = createEClass(EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_CONDITIONAL_STYLE); + createEReference(eefExtReferenceConditionalStyleEClass, EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_CONDITIONAL_STYLE__STYLE); } /** * <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ private boolean isInitialized = false; @@ -172,7 +245,7 @@ public class EefExtWidgetsReferencePackageImpl extends EPackageImpl implements E /** * Complete the initialization of the package and its meta-model. This method is guarded to have no affect on any * invocation but its first. <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ public void initializePackageContents() { @@ -196,6 +269,8 @@ public class EefExtWidgetsReferencePackageImpl extends EPackageImpl implements E // Add supertypes to classes eefExtReferenceDescriptionEClass.getESuperTypes().add(theEefPackage.getEEFWidgetDescription()); + eefExtReferenceWidgetStyleEClass.getESuperTypes().add(theEefPackage.getEEFWidgetStyle()); + eefExtReferenceConditionalStyleEClass.getESuperTypes().add(theEefPackage.getEEFConditionalStyle()); // Initialize classes and features; add operations and parameters initEClass(eefExtReferenceDescriptionEClass, EEFExtReferenceDescription.class, @@ -208,6 +283,27 @@ public class EefExtWidgetsReferencePackageImpl extends EPackageImpl implements E getEEFExtReferenceDescription_ReferenceOwnerExpression(), theEcorePackage.getEString(), "referenceOwnerExpression", null, 0, 1, EEFExtReferenceDescription.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( + getEEFExtReferenceDescription_Style(), + this.getEEFExtReferenceWidgetStyle(), + null, + "style", null, 0, 1, EEFExtReferenceDescription.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( + getEEFExtReferenceDescription_ConditionalStyles(), + this.getEEFExtReferenceConditionalStyle(), + null, + "conditionalStyles", null, 0, -1, EEFExtReferenceDescription.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(eefExtReferenceWidgetStyleEClass, EEFExtReferenceWidgetStyle.class, + "EEFExtReferenceWidgetStyle", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + + initEClass(eefExtReferenceConditionalStyleEClass, EEFExtReferenceConditionalStyle.class, + "EEFExtReferenceConditionalStyle", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEReference( + getEEFExtReferenceConditionalStyle_Style(), + this.getEEFExtReferenceWidgetStyle(), + null, + "style", null, 0, 1, EEFExtReferenceConditionalStyle.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$ // Create resource createResource(EefExtWidgetsReferencePackage.eNS_URI); diff --git a/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/util/EefExtWidgetsReferenceAdapterFactory.java b/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/util/EefExtWidgetsReferenceAdapterFactory.java index 9d39850dc..c1e6c2b40 100644 --- a/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/util/EefExtWidgetsReferenceAdapterFactory.java +++ b/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/util/EefExtWidgetsReferenceAdapterFactory.java @@ -8,9 +8,13 @@ */ package org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.util; +import org.eclipse.eef.EEFConditionalStyle; import org.eclipse.eef.EEFControlDescription; import org.eclipse.eef.EEFWidgetDescription; +import org.eclipse.eef.EEFWidgetStyle; +import org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceConditionalStyle; import org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceDescription; +import org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceWidgetStyle; import org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EefExtWidgetsReferencePackage; import org.eclipse.emf.common.notify.Adapter; import org.eclipse.emf.common.notify.Notifier; @@ -20,21 +24,21 @@ import org.eclipse.emf.ecore.EObject; /** * <!-- begin-user-doc --> The <b>Adapter Factory</b> for the model. It provides an adapter <code>createXXX</code> * method for each class of the model. <!-- end-user-doc --> - * + * * @see org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EefExtWidgetsReferencePackage * @generated */ public class EefExtWidgetsReferenceAdapterFactory extends AdapterFactoryImpl { /** * The cached model package. <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ protected static EefExtWidgetsReferencePackage modelPackage; /** * Creates an instance of the adapter factory. <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ public EefExtWidgetsReferenceAdapterFactory() { @@ -47,7 +51,7 @@ public class EefExtWidgetsReferenceAdapterFactory extends AdapterFactoryImpl { * Returns whether this factory is applicable for the type of the object. <!-- begin-user-doc --> This * implementation returns <code>true</code> if the object is either the model's package or is an instance object of * the model. <!-- end-user-doc --> - * + * * @return whether this factory is applicable for the type of the object. * @generated */ @@ -64,7 +68,7 @@ public class EefExtWidgetsReferenceAdapterFactory extends AdapterFactoryImpl { /** * The switch that delegates to the <code>createXXX</code> methods. <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ protected EefExtWidgetsReferenceSwitch<Adapter> modelSwitch = new EefExtWidgetsReferenceSwitch<Adapter>() { @@ -74,6 +78,16 @@ public class EefExtWidgetsReferenceAdapterFactory extends AdapterFactoryImpl { } @Override + public Adapter caseEEFExtReferenceWidgetStyle(EEFExtReferenceWidgetStyle object) { + return createEEFExtReferenceWidgetStyleAdapter(); + } + + @Override + public Adapter caseEEFExtReferenceConditionalStyle(EEFExtReferenceConditionalStyle object) { + return createEEFExtReferenceConditionalStyleAdapter(); + } + + @Override public Adapter caseEEFControlDescription(EEFControlDescription object) { return createEEFControlDescriptionAdapter(); } @@ -84,6 +98,16 @@ public class EefExtWidgetsReferenceAdapterFactory extends AdapterFactoryImpl { } @Override + public Adapter caseEEFWidgetStyle(EEFWidgetStyle object) { + return createEEFWidgetStyleAdapter(); + } + + @Override + public Adapter caseEEFConditionalStyle(EEFConditionalStyle object) { + return createEEFConditionalStyleAdapter(); + } + + @Override public Adapter defaultCase(EObject object) { return createEObjectAdapter(); } @@ -91,7 +115,7 @@ public class EefExtWidgetsReferenceAdapterFactory extends AdapterFactoryImpl { /** * Creates an adapter for the <code>target</code>. <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @param target * the object to adapt. * @return the adapter for the <code>target</code>. @@ -108,7 +132,7 @@ public class EefExtWidgetsReferenceAdapterFactory extends AdapterFactoryImpl { * <em>EEF Ext Reference Description</em>}'. <!-- begin-user-doc --> This default implementation returns null so * that we can easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> - * + * * @return the new adapter. * @see org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceDescription * @generated @@ -118,11 +142,41 @@ public class EefExtWidgetsReferenceAdapterFactory extends AdapterFactoryImpl { } /** + * Creates a new adapter for an object of class ' + * {@link org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceWidgetStyle + * <em>EEF Ext Reference Widget Style</em>}'. <!-- begin-user-doc --> This default implementation returns null so + * that we can easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * + * @return the new adapter. + * @see org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceWidgetStyle + * @generated + */ + public Adapter createEEFExtReferenceWidgetStyleAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class ' + * {@link org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceConditionalStyle + * <em>EEF Ext Reference Conditional Style</em>}'. <!-- begin-user-doc --> This default implementation returns null + * so that we can easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases + * anyway. <!-- end-user-doc --> + * + * @return the new adapter. + * @see org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceConditionalStyle + * @generated + */ + public Adapter createEEFExtReferenceConditionalStyleAdapter() { + return null; + } + + /** * Creates a new adapter for an object of class '{@link org.eclipse.eef.EEFControlDescription * <em>EEF Control Description</em>}'. <!-- begin-user-doc --> This default implementation returns null so that we * can easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. <!-- * end-user-doc --> - * + * * @return the new adapter. * @see org.eclipse.eef.EEFControlDescription * @generated @@ -136,7 +190,7 @@ public class EefExtWidgetsReferenceAdapterFactory extends AdapterFactoryImpl { * <em>EEF Widget Description</em>}'. <!-- begin-user-doc --> This default implementation returns null so that we * can easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. <!-- * end-user-doc --> - * + * * @return the new adapter. * @see org.eclipse.eef.EEFWidgetDescription * @generated @@ -146,9 +200,36 @@ public class EefExtWidgetsReferenceAdapterFactory extends AdapterFactoryImpl { } /** + * Creates a new adapter for an object of class '{@link org.eclipse.eef.EEFWidgetStyle <em>EEF Widget Style</em>}'. + * <!-- begin-user-doc --> This default implementation returns null so that we can easily ignore cases; it's useful + * to ignore a case when inheritance will catch all the cases anyway. <!-- end-user-doc --> + * + * @return the new adapter. + * @see org.eclipse.eef.EEFWidgetStyle + * @generated + */ + public Adapter createEEFWidgetStyleAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.eef.EEFConditionalStyle + * <em>EEF Conditional Style</em>}'. <!-- begin-user-doc --> This default implementation returns null so that we can + * easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. <!-- + * end-user-doc --> + * + * @return the new adapter. + * @see org.eclipse.eef.EEFConditionalStyle + * @generated + */ + public Adapter createEEFConditionalStyleAdapter() { + return null; + } + + /** * Creates a new adapter for the default case. <!-- begin-user-doc --> This default implementation returns null. * <!-- end-user-doc --> - * + * * @return the new adapter. * @generated */ diff --git a/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/util/EefExtWidgetsReferenceSwitch.java b/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/util/EefExtWidgetsReferenceSwitch.java index 817a53abf..9f9e6cb7e 100644 --- a/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/util/EefExtWidgetsReferenceSwitch.java +++ b/plugins/org.eclipse.eef.ext.widgets.reference/src-gen/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/util/EefExtWidgetsReferenceSwitch.java @@ -8,9 +8,13 @@ */ package org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.util; +import org.eclipse.eef.EEFConditionalStyle; import org.eclipse.eef.EEFControlDescription; import org.eclipse.eef.EEFWidgetDescription; +import org.eclipse.eef.EEFWidgetStyle; +import org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceConditionalStyle; import org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceDescription; +import org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceWidgetStyle; import org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EefExtWidgetsReferencePackage; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage; @@ -21,21 +25,21 @@ import org.eclipse.emf.ecore.util.Switch; * {@link #doSwitch(EObject) doSwitch(object)} to invoke the <code>caseXXX</code> method for each class of the model, * starting with the actual class of the object and proceeding up the inheritance hierarchy until a non-null result is * returned, which is the result of the switch. <!-- end-user-doc --> - * + * * @see org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EefExtWidgetsReferencePackage * @generated */ public class EefExtWidgetsReferenceSwitch<T> extends Switch<T> { /** * The cached model package <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ protected static EefExtWidgetsReferencePackage modelPackage; /** * Creates an instance of the switch. <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @generated */ public EefExtWidgetsReferenceSwitch() { @@ -46,7 +50,7 @@ public class EefExtWidgetsReferenceSwitch<T> extends Switch<T> { /** * Checks whether this is a switch for the given package. <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @parameter ePackage the package in question. * @return whether this is a switch for the given package. * @generated @@ -59,7 +63,7 @@ public class EefExtWidgetsReferenceSwitch<T> extends Switch<T> { /** * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that * result. <!-- begin-user-doc --> <!-- end-user-doc --> - * + * * @return the first non-null result returned by a <code>caseXXX</code> call. * @generated */ @@ -80,6 +84,28 @@ public class EefExtWidgetsReferenceSwitch<T> extends Switch<T> { } return result; } + case EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_WIDGET_STYLE: { + EEFExtReferenceWidgetStyle eefExtReferenceWidgetStyle = (EEFExtReferenceWidgetStyle) theEObject; + T result = caseEEFExtReferenceWidgetStyle(eefExtReferenceWidgetStyle); + if (result == null) { + result = caseEEFWidgetStyle(eefExtReferenceWidgetStyle); + } + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } + case EefExtWidgetsReferencePackage.EEF_EXT_REFERENCE_CONDITIONAL_STYLE: { + EEFExtReferenceConditionalStyle eefExtReferenceConditionalStyle = (EEFExtReferenceConditionalStyle) theEObject; + T result = caseEEFExtReferenceConditionalStyle(eefExtReferenceConditionalStyle); + if (result == null) { + result = caseEEFConditionalStyle(eefExtReferenceConditionalStyle); + } + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } default: return defaultCase(theEObject); } @@ -101,6 +127,36 @@ public class EefExtWidgetsReferenceSwitch<T> extends Switch<T> { } /** + * Returns the result of interpreting the object as an instance of '<em>EEF Ext Reference Widget Style</em>'. <!-- + * begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- + * end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of '<em>EEF Ext Reference Widget Style</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseEEFExtReferenceWidgetStyle(EEFExtReferenceWidgetStyle object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>EEF Ext Reference Conditional Style</em>'. + * <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of '<em>EEF Ext Reference Conditional Style</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseEEFExtReferenceConditionalStyle(EEFExtReferenceConditionalStyle object) { + return null; + } + + /** * Returns the result of interpreting the object as an instance of '<em>EEF Control Description</em>'. <!-- * begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- * end-user-doc --> @@ -131,10 +187,40 @@ public class EefExtWidgetsReferenceSwitch<T> extends Switch<T> { } /** + * Returns the result of interpreting the object as an instance of '<em>EEF Widget Style</em>'. <!-- begin-user-doc + * --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc + * --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of '<em>EEF Widget Style</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseEEFWidgetStyle(EEFWidgetStyle object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>EEF Conditional Style</em>'. <!-- + * begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- + * end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of '<em>EEF Conditional Style</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseEEFConditionalStyle(EEFConditionalStyle object) { + return null; + } + + /** * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. <!-- begin-user-doc --> This * implementation returns null; returning a non-null result will terminate the switch, but this is the last case * anyway. <!-- end-user-doc --> - * + * * @param object * the target of the switch. * @return the result of interpreting the object as an instance of '<em>EObject</em>'. diff --git a/plugins/org.eclipse.eef.ext.widgets.reference/src/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/util/EEFExtConditionalStyleToWidgetStyleSwitch.java b/plugins/org.eclipse.eef.ext.widgets.reference/src/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/util/EEFExtConditionalStyleToWidgetStyleSwitch.java new file mode 100644 index 000000000..c619c08a3 --- /dev/null +++ b/plugins/org.eclipse.eef.ext.widgets.reference/src/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/util/EEFExtConditionalStyleToWidgetStyleSwitch.java @@ -0,0 +1,31 @@ +/******************************************************************************* + * Copyright (c) 2016 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.util; + +import org.eclipse.eef.EEFWidgetStyle; +import org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceConditionalStyle; + +/** + * Switch used to compute the style of a widget style. + * + * @author sbegaudeau + */ +public class EEFExtConditionalStyleToWidgetStyleSwitch extends EefExtWidgetsReferenceSwitch<EEFWidgetStyle> { + /** + * {@inheritDoc} + * + * @see org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.util.EefExtWidgetsReferenceSwitch#caseEEFExtReferenceConditionalStyle(org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceConditionalStyle) + */ + @Override + public EEFWidgetStyle caseEEFExtReferenceConditionalStyle(EEFExtReferenceConditionalStyle object) { + return object.getStyle(); + } +} diff --git a/plugins/org.eclipse.eef.ext.widgets.reference/src/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/util/EEFExtDescriptionToConditionalStylesSwitch.java b/plugins/org.eclipse.eef.ext.widgets.reference/src/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/util/EEFExtDescriptionToConditionalStylesSwitch.java new file mode 100644 index 000000000..94a334807 --- /dev/null +++ b/plugins/org.eclipse.eef.ext.widgets.reference/src/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/util/EEFExtDescriptionToConditionalStylesSwitch.java @@ -0,0 +1,36 @@ +/******************************************************************************* + * Copyright (c) 2016 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.util; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.eef.EEFConditionalStyle; +import org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceDescription; + +/** + * Switch used to add support for the conditional styles of the reference widget. + * + * @author sbegaudeau + */ +public class EEFExtDescriptionToConditionalStylesSwitch extends EefExtWidgetsReferenceSwitch<List<EEFConditionalStyle>> { + /** + * {@inheritDoc} + * + * @see org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.util.EefExtWidgetsReferenceSwitch#caseEEFExtReferenceDescription(org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceDescription) + */ + @Override + public List<EEFConditionalStyle> caseEEFExtReferenceDescription(EEFExtReferenceDescription object) { + List<EEFConditionalStyle> styles = new ArrayList<EEFConditionalStyle>(); + styles.addAll(object.getConditionalStyles()); + return styles; + } +} diff --git a/plugins/org.eclipse.eef.ext.widgets.reference/src/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/util/EEFExtDescriptionToWidgetStyleSwitch.java b/plugins/org.eclipse.eef.ext.widgets.reference/src/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/util/EEFExtDescriptionToWidgetStyleSwitch.java new file mode 100644 index 000000000..758bba7e3 --- /dev/null +++ b/plugins/org.eclipse.eef.ext.widgets.reference/src/org/eclipse/eef/ext/widgets/reference/eefextwidgetsreference/util/EEFExtDescriptionToWidgetStyleSwitch.java @@ -0,0 +1,31 @@ +/******************************************************************************* + * Copyright (c) 2016 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.util; + +import org.eclipse.eef.EEFWidgetStyle; +import org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceDescription; + +/** + * Custom switch used to add support for the reference widget style. + * + * @author sbegaudeau + */ +public class EEFExtDescriptionToWidgetStyleSwitch extends EefExtWidgetsReferenceSwitch<EEFWidgetStyle> { + /** + * {@inheritDoc} + * + * @see org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.util.EefExtWidgetsReferenceSwitch#caseEEFExtReferenceDescription(org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceDescription) + */ + @Override + public EEFWidgetStyle caseEEFExtReferenceDescription(EEFExtReferenceDescription object) { + return object.getStyle(); + } +} diff --git a/plugins/org.eclipse.eef.ide.ui.ext.widgets.reference/src/org/eclipse/eef/ide/ui/ext/widgets/reference/internal/AbstractEEFExtReferenceLifecycleManager.java b/plugins/org.eclipse.eef.ide.ui.ext.widgets.reference/src/org/eclipse/eef/ide/ui/ext/widgets/reference/internal/AbstractEEFExtReferenceLifecycleManager.java index 2a14d754a..90713dedc 100644 --- a/plugins/org.eclipse.eef.ide.ui.ext.widgets.reference/src/org/eclipse/eef/ide/ui/ext/widgets/reference/internal/AbstractEEFExtReferenceLifecycleManager.java +++ b/plugins/org.eclipse.eef.ide.ui.ext.widgets.reference/src/org/eclipse/eef/ide/ui/ext/widgets/reference/internal/AbstractEEFExtReferenceLifecycleManager.java @@ -18,6 +18,7 @@ import org.eclipse.eef.core.api.controllers.IEEFWidgetController; import org.eclipse.eef.core.ext.widgets.reference.internal.EEFExtReferenceController; import org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceDescription; import org.eclipse.eef.ide.ui.api.widgets.AbstractEEFWidgetLifecycleManager; +import org.eclipse.eef.ide.ui.api.widgets.EEFStyleHelper; import org.eclipse.emf.common.notify.Adapter; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EReference; @@ -272,6 +273,7 @@ public abstract class AbstractEEFExtReferenceLifecycleManager extends AbstractEE } else { this.label.setText(this.eReference.getName()); } + this.setLabelFontStyle(); } } @@ -377,4 +379,14 @@ public abstract class AbstractEEFExtReferenceLifecycleManager extends AbstractEE this.contextAdapter.performModelChange(this.runnable); } } + + /** + * {@inheritDoc} + * + * @see org.eclipse.eef.ide.ui.api.widgets.AbstractEEFWidgetLifecycleManager#getEEFStyleHelper() + */ + @Override + protected EEFStyleHelper getEEFStyleHelper() { + return new EEFExtStyleHelper(this.interpreter, this.variableManager); + } } diff --git a/plugins/org.eclipse.eef.ide.ui.ext.widgets.reference/src/org/eclipse/eef/ide/ui/ext/widgets/reference/internal/EEFExtStyleHelper.java b/plugins/org.eclipse.eef.ide.ui.ext.widgets.reference/src/org/eclipse/eef/ide/ui/ext/widgets/reference/internal/EEFExtStyleHelper.java new file mode 100644 index 000000000..51b01e5ea --- /dev/null +++ b/plugins/org.eclipse.eef.ide.ui.ext.widgets.reference/src/org/eclipse/eef/ide/ui/ext/widgets/reference/internal/EEFExtStyleHelper.java @@ -0,0 +1,79 @@ +/******************************************************************************* + * Copyright (c) 2016 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.eef.ide.ui.ext.widgets.reference.internal; + +import java.util.Arrays; +import java.util.List; + +import org.eclipse.eef.EEFConditionalStyle; +import org.eclipse.eef.EEFWidgetStyle; +import org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.util.EEFExtConditionalStyleToWidgetStyleSwitch; +import org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.util.EEFExtDescriptionToConditionalStylesSwitch; +import org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.util.EEFExtDescriptionToWidgetStyleSwitch; +import org.eclipse.eef.ide.ui.api.widgets.EEFStyleHelper; +import org.eclipse.eef.util.EEFConditionalStyleToWidgetStyleSwitch; +import org.eclipse.eef.util.EEFDescriptionToConditionalStylesSwitch; +import org.eclipse.eef.util.EEFDescriptionToWidgetStyleSwitch; +import org.eclipse.emf.ecore.util.ComposedSwitch; +import org.eclipse.emf.ecore.util.Switch; +import org.eclipse.sirius.common.interpreter.api.IInterpreter; +import org.eclipse.sirius.common.interpreter.api.IVariableManager; + +/** + * Custom version of the {@link EEFStyleHelper} in order to add support for the style and conditional styles of the + * reference widget. + * + * @author sbegaudeau + */ +public class EEFExtStyleHelper extends EEFStyleHelper { + + /** + * The constructor. + * + * @param interpreter + * The interpeter + * @param variableManager + * The variable manager + */ + public EEFExtStyleHelper(IInterpreter interpreter, IVariableManager variableManager) { + super(interpreter, variableManager); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.eef.ide.ui.api.widgets.EEFStyleHelper#getDescriptionToWidgetStyleSwitch() + */ + @Override + protected Switch<EEFWidgetStyle> getDescriptionToWidgetStyleSwitch() { + return new ComposedSwitch<>(Arrays.asList(new EEFDescriptionToWidgetStyleSwitch(), new EEFExtDescriptionToWidgetStyleSwitch())); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.eef.ide.ui.api.widgets.EEFStyleHelper#getDescriptionToConditionalStylesSwitch() + */ + @Override + protected Switch<List<EEFConditionalStyle>> getDescriptionToConditionalStylesSwitch() { + return new ComposedSwitch<>(Arrays.asList(new EEFDescriptionToConditionalStylesSwitch(), new EEFExtDescriptionToConditionalStylesSwitch())); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.eef.ide.ui.api.widgets.EEFStyleHelper#getConditionalStyleToWidgetStyleSwitch() + */ + @Override + protected Switch<EEFWidgetStyle> getConditionalStyleToWidgetStyleSwitch() { + return new ComposedSwitch<>(Arrays.asList(new EEFConditionalStyleToWidgetStyleSwitch(), new EEFExtConditionalStyleToWidgetStyleSwitch())); + } +} diff --git a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/api/widgets/AbstractEEFWidgetLifecycleManager.java b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/api/widgets/AbstractEEFWidgetLifecycleManager.java index fac70a936..4209e0b9f 100644 --- a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/api/widgets/AbstractEEFWidgetLifecycleManager.java +++ b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/api/widgets/AbstractEEFWidgetLifecycleManager.java @@ -24,11 +24,10 @@ import org.eclipse.eef.core.api.EditingContextAdapter; import org.eclipse.eef.core.api.controllers.IConsumer; import org.eclipse.eef.core.api.controllers.IEEFWidgetController; import org.eclipse.eef.core.api.utils.EvalFactory; +import org.eclipse.eef.ide.ui.api.widgets.EEFStyleHelper.IEEFTextStyleCallback; import org.eclipse.eef.ide.ui.internal.EEFIdeUiPlugin; import org.eclipse.eef.ide.ui.internal.Icons; import org.eclipse.eef.ide.ui.internal.Messages; -import org.eclipse.eef.ide.ui.internal.widgets.EEFStyleHelper; -import org.eclipse.eef.ide.ui.internal.widgets.EEFStyleHelper.IEEFTextStyleCallback; import org.eclipse.eef.ide.ui.internal.widgets.EEFStyledTextStyleCallback; import org.eclipse.eef.ide.ui.internal.widgets.styles.EEFColor; import org.eclipse.eef.ide.ui.internal.widgets.styles.EEFFont; @@ -266,8 +265,8 @@ public abstract class AbstractEEFWidgetLifecycleManager extends AbstractEEFLifec /** * Set label font style. */ - private void setLabelFontStyle() { - EEFStyleHelper styleHelper = new EEFStyleHelper(interpreter, variableManager); + protected void setLabelFontStyle() { + EEFStyleHelper styleHelper = this.getEEFStyleHelper(); EEFWidgetStyle style = styleHelper.getWidgetStyle(getWidgetDescription()); IEEFTextStyleCallback callback = new EEFStyledTextStyleCallback(this.label); if (style != null) { @@ -288,6 +287,15 @@ public abstract class AbstractEEFWidgetLifecycleManager extends AbstractEEFLifec } /** + * Returns the style helper used to compute the style of the widget. + * + * @return The style helper + */ + protected EEFStyleHelper getEEFStyleHelper() { + return new EEFStyleHelper(interpreter, variableManager); + } + + /** * {@inheritDoc} * * @see org.eclipse.eef.ide.ui.api.widgets.AbstractEEFLifecycleManager#aboutToBeHidden() diff --git a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFStyleHelper.java b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/api/widgets/EEFStyleHelper.java index 4926d8c37..ebed4a4e9 100644 --- a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFStyleHelper.java +++ b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/api/widgets/EEFStyleHelper.java @@ -8,7 +8,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package org.eclipse.eef.ide.ui.internal.widgets; +package org.eclipse.eef.ide.ui.api.widgets; import java.util.Iterator; import java.util.List; @@ -23,6 +23,7 @@ import org.eclipse.eef.ide.ui.internal.widgets.styles.EEFFont; import org.eclipse.eef.util.EEFConditionalStyleToWidgetStyleSwitch; import org.eclipse.eef.util.EEFDescriptionToConditionalStylesSwitch; import org.eclipse.eef.util.EEFDescriptionToWidgetStyleSwitch; +import org.eclipse.emf.ecore.util.Switch; import org.eclipse.sirius.common.interpreter.api.IInterpreter; import org.eclipse.sirius.common.interpreter.api.IVariableManager; import org.eclipse.swt.SWT; @@ -67,25 +68,70 @@ public class EEFStyleHelper { */ public EEFWidgetStyle getWidgetStyle(EEFWidgetDescription widgetDescription) { EEFWidgetStyle widgetStyle = null; - List<EEFConditionalStyle> conditionalStyles = new EEFDescriptionToConditionalStylesSwitch().doSwitch(widgetDescription); + List<EEFConditionalStyle> conditionalStyles = this.getDescriptionToConditionalStylesSwitch().doSwitch(widgetDescription); Iterator<EEFConditionalStyle> iterator = conditionalStyles.iterator(); while (widgetStyle == null && iterator.hasNext()) { EEFConditionalStyle conditionalStyle = iterator.next(); String preconditionExpression = conditionalStyle.getPreconditionExpression(); Boolean preconditionValid = EvalFactory.of(interpreter, variableManager).logIfInvalidType(Boolean.class).evaluate(preconditionExpression); if (preconditionValid != null && preconditionValid.booleanValue()) { - widgetStyle = new EEFConditionalStyleToWidgetStyleSwitch().doSwitch(conditionalStyle); + widgetStyle = this.getConditionalStyleToWidgetStyleSwitch().doSwitch(conditionalStyle); } } if (widgetStyle == null) { - widgetStyle = new EEFDescriptionToWidgetStyleSwitch().doSwitch(widgetDescription); + widgetStyle = this.getDescriptionToWidgetStyleSwitch().doSwitch(widgetDescription); } return widgetStyle; } /** + * Returns the switch to use to find the conditional styles of a widget description. The switch returned should be + * able to handle the default use case, as a result it is highly recommended to return a composed switch with the + * default one and new switches. Example:<br> + * <code> + * return new ComposedSwitch<>(Arrays.asList(new EEFDescriptionToConditionalStylesSwitch(), new + * CustomDescriptionToConditionalStylesSwitch())); + * </code> + * + * @return The switch to use to find the conditional styles of a widget description + */ + protected Switch<List<EEFConditionalStyle>> getDescriptionToConditionalStylesSwitch() { + return new EEFDescriptionToConditionalStylesSwitch(); + } + + /** + * Returns the switch to use to find the style of a conditional style. The switch returned should be able to handle + * the default use case, as a result it is highly recommended to return a composed switch with the default one and + * new switches. Example:<br> + * <code> + * return new ComposedSwitch<>(Arrays.asList(new EEFConditionalStyleToWidgetStyleSwitch(), new + * CustomConditionalStyleToWidgetStyleSwitch())); + * </code> + * + * @return The switch to use to find the style of a conditional style + */ + protected Switch<EEFWidgetStyle> getConditionalStyleToWidgetStyleSwitch() { + return new EEFConditionalStyleToWidgetStyleSwitch(); + } + + /** + * Returns the switch to use to find the style of a description. The switch returned should be able to handle the + * default use case, as a result it is highly recommended to return a composed switch with the default one and new + * switches. Example:<br> + * <code> + * return new ComposedSwitch<>(Arrays.asList(new EEFDescriptionToWidgetStyleSwitch(), new + * EEFDescriptionToWidgetStyleSwitch())); + * </code> + * + * @return The switch to use to find the style of a description. + */ + protected Switch<EEFWidgetStyle> getDescriptionToWidgetStyleSwitch() { + return new EEFDescriptionToWidgetStyleSwitch(); + } + + /** * Uses the given expressions to update the style using the given callback. * * @param fontNameExpression diff --git a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFCheckboxLifecycleManager.java b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFCheckboxLifecycleManager.java index b8db96030..d164dc177 100644 --- a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFCheckboxLifecycleManager.java +++ b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFCheckboxLifecycleManager.java @@ -24,7 +24,8 @@ import org.eclipse.eef.core.api.controllers.IConsumer; import org.eclipse.eef.core.api.controllers.IEEFCheckboxController; import org.eclipse.eef.core.api.controllers.IEEFWidgetController; import org.eclipse.eef.ide.ui.api.widgets.AbstractEEFWidgetLifecycleManager; -import org.eclipse.eef.ide.ui.internal.widgets.EEFStyleHelper.IEEFTextStyleCallback; +import org.eclipse.eef.ide.ui.api.widgets.EEFStyleHelper; +import org.eclipse.eef.ide.ui.api.widgets.EEFStyleHelper.IEEFTextStyleCallback; import org.eclipse.sirius.common.interpreter.api.IInterpreter; import org.eclipse.sirius.common.interpreter.api.IVariableManager; import org.eclipse.swt.SWT; diff --git a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFCheckboxStyleCallback.java b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFCheckboxStyleCallback.java index ffa486609..00104be46 100644 --- a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFCheckboxStyleCallback.java +++ b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFCheckboxStyleCallback.java @@ -10,7 +10,7 @@ *******************************************************************************/ package org.eclipse.eef.ide.ui.internal.widgets; -import org.eclipse.eef.ide.ui.internal.widgets.EEFStyleHelper.IEEFTextStyleCallback; +import org.eclipse.eef.ide.ui.api.widgets.EEFStyleHelper.IEEFTextStyleCallback; import org.eclipse.eef.ide.ui.internal.widgets.styles.EEFColor; import org.eclipse.eef.ide.ui.internal.widgets.styles.EEFFont; import org.eclipse.swt.widgets.Button; @@ -40,7 +40,7 @@ public class EEFCheckboxStyleCallback implements IEEFTextStyleCallback { /** * {@inheritDoc} * - * @see org.eclipse.eef.ide.ui.internal.widgets.EEFStyleHelper.IEEFTextStyleCallback#applyFont(org.eclipse.eef.ide.ui.internal.widgets.styles.EEFFont) + * @see org.eclipse.eef.ide.ui.api.widgets.EEFStyleHelper.IEEFTextStyleCallback#applyFont(org.eclipse.eef.ide.ui.internal.widgets.styles.EEFFont) */ @Override public void applyFont(EEFFont font) { @@ -50,7 +50,7 @@ public class EEFCheckboxStyleCallback implements IEEFTextStyleCallback { /** * {@inheritDoc} * - * @see org.eclipse.eef.ide.ui.internal.widgets.EEFStyleHelper.IEEFTextStyleCallback#applyFontStyle(boolean, + * @see org.eclipse.eef.ide.ui.api.widgets.EEFStyleHelper.IEEFTextStyleCallback#applyFontStyle(boolean, * boolean) */ @Override @@ -61,7 +61,7 @@ public class EEFCheckboxStyleCallback implements IEEFTextStyleCallback { /** * {@inheritDoc} * - * @see org.eclipse.eef.ide.ui.internal.widgets.EEFStyleHelper.IEEFTextStyleCallback#applyForegroundColor(org.eclipse.eef.ide.ui.internal.widgets.styles.EEFColor) + * @see org.eclipse.eef.ide.ui.api.widgets.EEFStyleHelper.IEEFTextStyleCallback#applyForegroundColor(org.eclipse.eef.ide.ui.internal.widgets.styles.EEFColor) */ @Override public void applyForegroundColor(EEFColor color) { @@ -71,7 +71,7 @@ public class EEFCheckboxStyleCallback implements IEEFTextStyleCallback { /** * {@inheritDoc} * - * @see org.eclipse.eef.ide.ui.internal.widgets.EEFStyleHelper.IEEFTextStyleCallback#applyBackgroundColor(org.eclipse.eef.ide.ui.internal.widgets.styles.EEFColor) + * @see org.eclipse.eef.ide.ui.api.widgets.EEFStyleHelper.IEEFTextStyleCallback#applyBackgroundColor(org.eclipse.eef.ide.ui.internal.widgets.styles.EEFColor) */ @Override public void applyBackgroundColor(EEFColor color) { 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 6e1c59bae..d5278e7c0 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 @@ -29,7 +29,8 @@ import org.eclipse.eef.core.api.controllers.IConsumer; import org.eclipse.eef.core.api.controllers.IEEFHyperlinkController; import org.eclipse.eef.core.api.controllers.IEEFWidgetController; import org.eclipse.eef.ide.ui.api.widgets.AbstractEEFWidgetLifecycleManager; -import org.eclipse.eef.ide.ui.internal.widgets.EEFStyleHelper.IEEFTextStyleCallback; +import org.eclipse.eef.ide.ui.api.widgets.EEFStyleHelper; +import org.eclipse.eef.ide.ui.api.widgets.EEFStyleHelper.IEEFTextStyleCallback; import org.eclipse.sirius.common.interpreter.api.IInterpreter; import org.eclipse.sirius.common.interpreter.api.IVariableManager; import org.eclipse.swt.SWT; 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 5826c5f84..6671abce5 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 @@ -28,7 +28,8 @@ import org.eclipse.eef.core.api.controllers.IConsumer; import org.eclipse.eef.core.api.controllers.IEEFLabelController; import org.eclipse.eef.core.api.controllers.IEEFWidgetController; import org.eclipse.eef.ide.ui.api.widgets.AbstractEEFWidgetLifecycleManager; -import org.eclipse.eef.ide.ui.internal.widgets.EEFStyleHelper.IEEFTextStyleCallback; +import org.eclipse.eef.ide.ui.api.widgets.EEFStyleHelper; +import org.eclipse.eef.ide.ui.api.widgets.EEFStyleHelper.IEEFTextStyleCallback; import org.eclipse.sirius.common.interpreter.api.IInterpreter; import org.eclipse.sirius.common.interpreter.api.IVariableManager; import org.eclipse.swt.SWT; diff --git a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFStyledTextStyleCallback.java b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFStyledTextStyleCallback.java index 907457e4b..af3076878 100644 --- a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFStyledTextStyleCallback.java +++ b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFStyledTextStyleCallback.java @@ -10,7 +10,7 @@ *******************************************************************************/ package org.eclipse.eef.ide.ui.internal.widgets; -import org.eclipse.eef.ide.ui.internal.widgets.EEFStyleHelper.IEEFTextStyleCallback; +import org.eclipse.eef.ide.ui.api.widgets.EEFStyleHelper.IEEFTextStyleCallback; import org.eclipse.eef.ide.ui.internal.widgets.styles.EEFColor; import org.eclipse.eef.ide.ui.internal.widgets.styles.EEFFont; import org.eclipse.swt.custom.StyleRange; @@ -40,7 +40,7 @@ public class EEFStyledTextStyleCallback implements IEEFTextStyleCallback { /** * {@inheritDoc} * - * @see org.eclipse.eef.ide.ui.internal.widgets.EEFStyleHelper.IEEFTextStyleCallback#applyFont(org.eclipse.eef.ide.ui.internal.widgets.styles.EEFFont) + * @see org.eclipse.eef.ide.ui.api.widgets.EEFStyleHelper.IEEFTextStyleCallback#applyFont(org.eclipse.eef.ide.ui.internal.widgets.styles.EEFFont) */ @Override public void applyFont(EEFFont font) { @@ -50,7 +50,7 @@ public class EEFStyledTextStyleCallback implements IEEFTextStyleCallback { /** * {@inheritDoc} * - * @see org.eclipse.eef.ide.ui.internal.widgets.EEFStyleHelper.IEEFTextStyleCallback#applyFontStyle(boolean, boolean) + * @see org.eclipse.eef.ide.ui.api.widgets.EEFStyleHelper.IEEFTextStyleCallback#applyFontStyle(boolean, boolean) */ @Override public void applyFontStyle(boolean strikeout, boolean underline) { @@ -66,7 +66,7 @@ public class EEFStyledTextStyleCallback implements IEEFTextStyleCallback { /** * {@inheritDoc} * - * @see org.eclipse.eef.ide.ui.internal.widgets.EEFStyleHelper.IEEFTextStyleCallback#applyForegroundColor(org.eclipse.eef.ide.ui.internal.widgets.styles.EEFColor) + * @see org.eclipse.eef.ide.ui.api.widgets.EEFStyleHelper.IEEFTextStyleCallback#applyForegroundColor(org.eclipse.eef.ide.ui.internal.widgets.styles.EEFColor) */ @Override public void applyForegroundColor(EEFColor color) { @@ -76,7 +76,7 @@ public class EEFStyledTextStyleCallback implements IEEFTextStyleCallback { /** * {@inheritDoc} * - * @see org.eclipse.eef.ide.ui.internal.widgets.EEFStyleHelper.IEEFTextStyleCallback#applyBackgroundColor(org.eclipse.eef.ide.ui.internal.widgets.styles.EEFColor) + * @see org.eclipse.eef.ide.ui.api.widgets.EEFStyleHelper.IEEFTextStyleCallback#applyBackgroundColor(org.eclipse.eef.ide.ui.internal.widgets.styles.EEFColor) */ @Override public void applyBackgroundColor(EEFColor color) { diff --git a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFTextLifecycleManager.java b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFTextLifecycleManager.java index c52a550a5..9c04b82cd 100644 --- a/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFTextLifecycleManager.java +++ b/plugins/org.eclipse.eef.ide.ui/src/org/eclipse/eef/ide/ui/internal/widgets/EEFTextLifecycleManager.java @@ -23,7 +23,8 @@ import org.eclipse.eef.core.api.controllers.IConsumer; import org.eclipse.eef.core.api.controllers.IEEFTextController; import org.eclipse.eef.core.api.controllers.IEEFWidgetController; import org.eclipse.eef.ide.ui.api.widgets.AbstractEEFWidgetLifecycleManager; -import org.eclipse.eef.ide.ui.internal.widgets.EEFStyleHelper.IEEFTextStyleCallback; +import org.eclipse.eef.ide.ui.api.widgets.EEFStyleHelper; +import org.eclipse.eef.ide.ui.api.widgets.EEFStyleHelper.IEEFTextStyleCallback; import org.eclipse.eef.ide.ui.internal.widgets.styles.EEFColor; import org.eclipse.sirius.common.interpreter.api.IInterpreter; import org.eclipse.sirius.common.interpreter.api.IVariableManager; |
