diff options
author | Benoit Maggi | 2017-04-27 14:34:49 +0000 |
---|---|---|
committer | Benoit Maggi | 2017-05-10 18:59:59 +0000 |
commit | 991616abba4978a03dbcb8d33f89ac851b8ad405 (patch) | |
tree | 8268447dd887ead00d204f0333ce257d89414f8c /plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen | |
parent | 83ac51bef2da01382d78d85905b47da589684ba5 (diff) | |
download | org.eclipse.papyrus-991616abba4978a03dbcb8d33f89ac851b8ad405.tar.gz org.eclipse.papyrus-991616abba4978a03dbcb8d33f89ac851b8ad405.tar.xz org.eclipse.papyrus-991616abba4978a03dbcb8d33f89ac851b8ad405.zip |
Bug 515235 - [Architecture Framework] Palette Configuration shall be
have a better integration to AF
- add a property palettes in Meta model
- remove old customePalette in Meta model
- the palette application filter should be done with the name of the
PapyrusDiagram defined in the architecture (currently the key, hopfully
will be changed for an id field)
Change-Id: I7a4163874bbb94f92bd76043d956ee8e79b4a6bb
Diffstat (limited to 'plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen')
5 files changed, 139 insertions, 183 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/PapyrusDiagram.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/PapyrusDiagram.java index 5fcbaf71c45..3e1ad7993c9 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/PapyrusDiagram.java +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/PapyrusDiagram.java @@ -16,6 +16,7 @@ package org.eclipse.papyrus.infra.gmfdiag.representation; import org.eclipse.emf.common.util.EList; import org.eclipse.papyrus.infra.architecture.representation.PapyrusRepresentationKind; +import org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.PaletteConfiguration; /** * <!-- begin-user-doc --> @@ -26,12 +27,12 @@ import org.eclipse.papyrus.infra.architecture.representation.PapyrusRepresentati * The following features are supported: * </p> * <ul> - * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram#getCustomPalette <em>Custom Palette</em>}</li> * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram#getCustomStyle <em>Custom Style</em>}</li> * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram#getChildRules <em>Child Rules</em>}</li> * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram#getPaletteRules <em>Palette Rules</em>}</li> * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram#getAssistantRules <em>Assistant Rules</em>}</li> * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram#getCreationCommandClass <em>Creation Command Class</em>}</li> + * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram#getPalettes <em>Palettes</em>}</li> * </ul> * * @see org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage#getPapyrusDiagram() @@ -40,32 +41,6 @@ import org.eclipse.papyrus.infra.architecture.representation.PapyrusRepresentati */ public interface PapyrusDiagram extends PapyrusRepresentationKind { /** - * Returns the value of the '<em><b>Custom Palette</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Custom Palette</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Custom Palette</em>' attribute. - * @see #setCustomPalette(String) - * @see org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage#getPapyrusDiagram_CustomPalette() - * @model - * @generated - */ - String getCustomPalette(); - - /** - * Sets the value of the '{@link org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram#getCustomPalette <em>Custom Palette</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Custom Palette</em>' attribute. - * @see #getCustomPalette() - * @generated - */ - void setCustomPalette(String value); - - /** * Returns the value of the '<em><b>Custom Style</b></em>' attribute. * <!-- begin-user-doc --> * <p> @@ -162,4 +137,20 @@ public interface PapyrusDiagram extends PapyrusRepresentationKind { */ void setCreationCommandClass(Class<?> value); + /** + * Returns the value of the '<em><b>Palettes</b></em>' reference list. + * The list contents are of type {@link org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.PaletteConfiguration}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Palettes</em>' reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Palettes</em>' reference list. + * @see org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage#getPapyrusDiagram_Palettes() + * @model + * @generated + */ + EList<PaletteConfiguration> getPalettes(); + } // PapyrusDiagram diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/RepresentationPackage.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/RepresentationPackage.java index 33f59f74fb8..a7e6f9f8595 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/RepresentationPackage.java +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/RepresentationPackage.java @@ -43,7 +43,7 @@ public interface RepresentationPackage extends EPackage { * <!-- end-user-doc --> * @generated */ - String eNAME = "representation"; + String eNAME = "representation"; //$NON-NLS-1$ /** * The package namespace URI. @@ -51,7 +51,7 @@ public interface RepresentationPackage extends EPackage { * <!-- end-user-doc --> * @generated */ - String eNS_URI = "http://www.eclipse.org/papyrus/infra/gmfdiag/representation"; + String eNS_URI = "http://www.eclipse.org/papyrus/infra/gmfdiag/representation"; //$NON-NLS-1$ /** * The package namespace name. @@ -59,7 +59,7 @@ public interface RepresentationPackage extends EPackage { * <!-- end-user-doc --> * @generated */ - String eNS_PREFIX = "gmfdiagrepresentation"; + String eNS_PREFIX = "gmfdiagrepresentation"; //$NON-NLS-1$ /** * The singleton instance of the package. @@ -170,58 +170,58 @@ public interface RepresentationPackage extends EPackage { int PAPYRUS_DIAGRAM__IMPLEMENTATION_ID = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND__IMPLEMENTATION_ID; /** - * The feature id for the '<em><b>Custom Palette</b></em>' attribute. + * The feature id for the '<em><b>Custom Style</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int PAPYRUS_DIAGRAM__CUSTOM_PALETTE = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND_FEATURE_COUNT + 0; + int PAPYRUS_DIAGRAM__CUSTOM_STYLE = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND_FEATURE_COUNT + 0; /** - * The feature id for the '<em><b>Custom Style</b></em>' attribute. + * The feature id for the '<em><b>Child Rules</b></em>' containment reference list. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int PAPYRUS_DIAGRAM__CUSTOM_STYLE = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND_FEATURE_COUNT + 1; + int PAPYRUS_DIAGRAM__CHILD_RULES = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND_FEATURE_COUNT + 1; /** - * The feature id for the '<em><b>Child Rules</b></em>' containment reference list. + * The feature id for the '<em><b>Palette Rules</b></em>' containment reference list. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int PAPYRUS_DIAGRAM__CHILD_RULES = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND_FEATURE_COUNT + 2; + int PAPYRUS_DIAGRAM__PALETTE_RULES = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND_FEATURE_COUNT + 2; /** - * The feature id for the '<em><b>Palette Rules</b></em>' containment reference list. + * The feature id for the '<em><b>Assistant Rules</b></em>' containment reference list. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int PAPYRUS_DIAGRAM__PALETTE_RULES = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND_FEATURE_COUNT + 3; + int PAPYRUS_DIAGRAM__ASSISTANT_RULES = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND_FEATURE_COUNT + 3; /** - * The feature id for the '<em><b>Assistant Rules</b></em>' containment reference list. + * The feature id for the '<em><b>Creation Command Class</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int PAPYRUS_DIAGRAM__ASSISTANT_RULES = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND_FEATURE_COUNT + 4; + int PAPYRUS_DIAGRAM__CREATION_COMMAND_CLASS = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND_FEATURE_COUNT + 4; /** - * The feature id for the '<em><b>Creation Command Class</b></em>' attribute. + * The feature id for the '<em><b>Palettes</b></em>' reference list. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int PAPYRUS_DIAGRAM__CREATION_COMMAND_CLASS = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND_FEATURE_COUNT + 5; + int PAPYRUS_DIAGRAM__PALETTES = org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.PAPYRUS_REPRESENTATION_KIND_FEATURE_COUNT + 5; /** * The number of structural features of the '<em>Papyrus Diagram</em>' class. @@ -492,17 +492,6 @@ public interface RepresentationPackage extends EPackage { EClass getPapyrusDiagram(); /** - * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram#getCustomPalette <em>Custom Palette</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Custom Palette</em>'. - * @see org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram#getCustomPalette() - * @see #getPapyrusDiagram() - * @generated - */ - EAttribute getPapyrusDiagram_CustomPalette(); - - /** * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram#getCustomStyle <em>Custom Style</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -558,6 +547,17 @@ public interface RepresentationPackage extends EPackage { EAttribute getPapyrusDiagram_CreationCommandClass(); /** + * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram#getPalettes <em>Palettes</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference list '<em>Palettes</em>'. + * @see org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram#getPalettes() + * @see #getPapyrusDiagram() + * @generated + */ + EReference getPapyrusDiagram_Palettes(); + + /** * Returns the meta object for class '{@link org.eclipse.papyrus.infra.gmfdiag.representation.ChildRule <em>Child Rule</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -751,14 +751,6 @@ public interface RepresentationPackage extends EPackage { EClass PAPYRUS_DIAGRAM = eINSTANCE.getPapyrusDiagram(); /** - * The meta object literal for the '<em><b>Custom Palette</b></em>' attribute feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - EAttribute PAPYRUS_DIAGRAM__CUSTOM_PALETTE = eINSTANCE.getPapyrusDiagram_CustomPalette(); - - /** * The meta object literal for the '<em><b>Custom Style</b></em>' attribute feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -799,6 +791,14 @@ public interface RepresentationPackage extends EPackage { EAttribute PAPYRUS_DIAGRAM__CREATION_COMMAND_CLASS = eINSTANCE.getPapyrusDiagram_CreationCommandClass(); /** + * The meta object literal for the '<em><b>Palettes</b></em>' reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference PAPYRUS_DIAGRAM__PALETTES = eINSTANCE.getPapyrusDiagram_Palettes(); + + /** * The meta object literal for the '{@link org.eclipse.papyrus.infra.gmfdiag.representation.impl.ChildRuleImpl <em>Child Rule</em>}' class. * <!-- begin-user-doc --> * <!-- end-user-doc --> diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/PapyrusDiagramImpl.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/PapyrusDiagramImpl.java index 6200d1e8814..c4283222d86 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/PapyrusDiagramImpl.java +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/PapyrusDiagramImpl.java @@ -17,19 +17,15 @@ import java.util.Collection; 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.EObjectResolvingEList; import org.eclipse.emf.ecore.util.InternalEList; - import org.eclipse.papyrus.infra.architecture.representation.impl.PapyrusRepresentationKindImpl; - +import org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.PaletteConfiguration; import org.eclipse.papyrus.infra.gmfdiag.representation.AssistantRule; import org.eclipse.papyrus.infra.gmfdiag.representation.ChildRule; import org.eclipse.papyrus.infra.gmfdiag.representation.PaletteRule; @@ -37,48 +33,26 @@ import org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram; import org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage; /** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>Papyrus Diagram</b></em>'. - * <!-- end-user-doc --> + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Papyrus + * Diagram</b></em>'. <!-- end-user-doc --> * <p> * The following features are implemented: * </p> * <ul> - * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.impl.PapyrusDiagramImpl#getCustomPalette <em>Custom Palette</em>}</li> * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.impl.PapyrusDiagramImpl#getCustomStyle <em>Custom Style</em>}</li> * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.impl.PapyrusDiagramImpl#getChildRules <em>Child Rules</em>}</li> * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.impl.PapyrusDiagramImpl#getPaletteRules <em>Palette Rules</em>}</li> * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.impl.PapyrusDiagramImpl#getAssistantRules <em>Assistant Rules</em>}</li> * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.impl.PapyrusDiagramImpl#getCreationCommandClass <em>Creation Command Class</em>}</li> + * <li>{@link org.eclipse.papyrus.infra.gmfdiag.representation.impl.PapyrusDiagramImpl#getPalettes <em>Palettes</em>}</li> * </ul> * * @generated */ public class PapyrusDiagramImpl extends PapyrusRepresentationKindImpl implements PapyrusDiagram { /** - * The default value of the '{@link #getCustomPalette() <em>Custom Palette</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getCustomPalette() - * @generated - * @ordered - */ - protected static final String CUSTOM_PALETTE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getCustomPalette() <em>Custom Palette</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getCustomPalette() - * @generated - * @ordered - */ - protected String customPalette = CUSTOM_PALETTE_EDEFAULT; - - /** * The default value of the '{@link #getCustomStyle() <em>Custom Style</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- begin-user-doc --> <!-- end-user-doc --> * @see #getCustomStyle() * @generated * @ordered @@ -87,8 +61,7 @@ public class PapyrusDiagramImpl extends PapyrusRepresentationKindImpl implements /** * The cached value of the '{@link #getCustomStyle() <em>Custom Style</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- begin-user-doc --> <!-- end-user-doc --> * @see #getCustomStyle() * @generated * @ordered @@ -97,8 +70,7 @@ public class PapyrusDiagramImpl extends PapyrusRepresentationKindImpl implements /** * The cached value of the '{@link #getChildRules() <em>Child Rules</em>}' containment reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- begin-user-doc --> <!-- end-user-doc --> * @see #getChildRules() * @generated * @ordered @@ -107,8 +79,8 @@ public class PapyrusDiagramImpl extends PapyrusRepresentationKindImpl implements /** * The cached value of the '{@link #getPaletteRules() <em>Palette Rules</em>}' containment reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- begin-user-doc --> <!-- + * end-user-doc --> * @see #getPaletteRules() * @generated * @ordered @@ -117,8 +89,8 @@ public class PapyrusDiagramImpl extends PapyrusRepresentationKindImpl implements /** * The cached value of the '{@link #getAssistantRules() <em>Assistant Rules</em>}' containment reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- begin-user-doc --> <!-- + * end-user-doc --> * @see #getAssistantRules() * @generated * @ordered @@ -126,9 +98,10 @@ public class PapyrusDiagramImpl extends PapyrusRepresentationKindImpl implements protected EList<AssistantRule> assistantRules; /** - * The cached value of the '{@link #getCreationCommandClass() <em>Creation Command Class</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * The cached value of the '{@link #getCreationCommandClass() <em>Creation + * Command Class</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * * @see #getCreationCommandClass() * @generated * @ordered @@ -136,8 +109,16 @@ public class PapyrusDiagramImpl extends PapyrusRepresentationKindImpl implements protected Class<?> creationCommandClass; /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * The cached value of the '{@link #getPalettes() <em>Palettes</em>}' reference list. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @see #getPalettes() + * @generated + * @ordered + */ + protected EList<PaletteConfiguration> palettes; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ protected PapyrusDiagramImpl() { @@ -145,8 +126,7 @@ public class PapyrusDiagramImpl extends PapyrusRepresentationKindImpl implements } /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ @Override @@ -155,29 +135,7 @@ public class PapyrusDiagramImpl extends PapyrusRepresentationKindImpl implements } /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String getCustomPalette() { - return customPalette; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setCustomPalette(String newCustomPalette) { - String oldCustomPalette = customPalette; - customPalette = newCustomPalette; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, RepresentationPackage.PAPYRUS_DIAGRAM__CUSTOM_PALETTE, oldCustomPalette, customPalette)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ public String getCustomStyle() { @@ -185,8 +143,7 @@ public class PapyrusDiagramImpl extends PapyrusRepresentationKindImpl implements } /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ public void setCustomStyle(String newCustomStyle) { @@ -197,8 +154,7 @@ public class PapyrusDiagramImpl extends PapyrusRepresentationKindImpl implements } /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ public EList<ChildRule> getChildRules() { @@ -209,8 +165,7 @@ public class PapyrusDiagramImpl extends PapyrusRepresentationKindImpl implements } /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ public EList<PaletteRule> getPaletteRules() { @@ -221,8 +176,7 @@ public class PapyrusDiagramImpl extends PapyrusRepresentationKindImpl implements } /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ public EList<AssistantRule> getAssistantRules() { @@ -233,8 +187,7 @@ public class PapyrusDiagramImpl extends PapyrusRepresentationKindImpl implements } /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ public Class<?> getCreationCommandClass() { @@ -242,8 +195,7 @@ public class PapyrusDiagramImpl extends PapyrusRepresentationKindImpl implements } /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ public void setCreationCommandClass(Class<?> newCreationCommandClass) { @@ -254,8 +206,18 @@ public class PapyrusDiagramImpl extends PapyrusRepresentationKindImpl implements } /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public EList<PaletteConfiguration> getPalettes() { + if (palettes == null) { + palettes = new EObjectResolvingEList<PaletteConfiguration>(PaletteConfiguration.class, this, RepresentationPackage.PAPYRUS_DIAGRAM__PALETTES); + } + return palettes; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ @Override @@ -272,15 +234,12 @@ public class PapyrusDiagramImpl extends PapyrusRepresentationKindImpl implements } /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { - case RepresentationPackage.PAPYRUS_DIAGRAM__CUSTOM_PALETTE: - return getCustomPalette(); case RepresentationPackage.PAPYRUS_DIAGRAM__CUSTOM_STYLE: return getCustomStyle(); case RepresentationPackage.PAPYRUS_DIAGRAM__CHILD_RULES: @@ -291,22 +250,20 @@ public class PapyrusDiagramImpl extends PapyrusRepresentationKindImpl implements return getAssistantRules(); case RepresentationPackage.PAPYRUS_DIAGRAM__CREATION_COMMAND_CLASS: return getCreationCommandClass(); + case RepresentationPackage.PAPYRUS_DIAGRAM__PALETTES: + return getPalettes(); } return super.eGet(featureID, resolve, coreType); } /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { - case RepresentationPackage.PAPYRUS_DIAGRAM__CUSTOM_PALETTE: - setCustomPalette((String)newValue); - return; case RepresentationPackage.PAPYRUS_DIAGRAM__CUSTOM_STYLE: setCustomStyle((String)newValue); return; @@ -325,21 +282,21 @@ public class PapyrusDiagramImpl extends PapyrusRepresentationKindImpl implements case RepresentationPackage.PAPYRUS_DIAGRAM__CREATION_COMMAND_CLASS: setCreationCommandClass((Class<?>)newValue); return; + case RepresentationPackage.PAPYRUS_DIAGRAM__PALETTES: + getPalettes().clear(); + getPalettes().addAll((Collection<? extends PaletteConfiguration>)newValue); + return; } super.eSet(featureID, newValue); } /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { - case RepresentationPackage.PAPYRUS_DIAGRAM__CUSTOM_PALETTE: - setCustomPalette(CUSTOM_PALETTE_EDEFAULT); - return; case RepresentationPackage.PAPYRUS_DIAGRAM__CUSTOM_STYLE: setCustomStyle(CUSTOM_STYLE_EDEFAULT); return; @@ -355,20 +312,20 @@ public class PapyrusDiagramImpl extends PapyrusRepresentationKindImpl implements case RepresentationPackage.PAPYRUS_DIAGRAM__CREATION_COMMAND_CLASS: setCreationCommandClass((Class<?>)null); return; + case RepresentationPackage.PAPYRUS_DIAGRAM__PALETTES: + getPalettes().clear(); + return; } super.eUnset(featureID); } /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { - case RepresentationPackage.PAPYRUS_DIAGRAM__CUSTOM_PALETTE: - return CUSTOM_PALETTE_EDEFAULT == null ? customPalette != null : !CUSTOM_PALETTE_EDEFAULT.equals(customPalette); case RepresentationPackage.PAPYRUS_DIAGRAM__CUSTOM_STYLE: return CUSTOM_STYLE_EDEFAULT == null ? customStyle != null : !CUSTOM_STYLE_EDEFAULT.equals(customStyle); case RepresentationPackage.PAPYRUS_DIAGRAM__CHILD_RULES: @@ -379,13 +336,14 @@ public class PapyrusDiagramImpl extends PapyrusRepresentationKindImpl implements return assistantRules != null && !assistantRules.isEmpty(); case RepresentationPackage.PAPYRUS_DIAGRAM__CREATION_COMMAND_CLASS: return creationCommandClass != null; + case RepresentationPackage.PAPYRUS_DIAGRAM__PALETTES: + return palettes != null && !palettes.isEmpty(); } return super.eIsSet(featureID); } /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> + * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ @Override @@ -393,9 +351,7 @@ public class PapyrusDiagramImpl extends PapyrusRepresentationKindImpl implements if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); - result.append(" (customPalette: "); //$NON-NLS-1$ - result.append(customPalette); - result.append(", customStyle: "); //$NON-NLS-1$ + result.append(" (customStyle: "); //$NON-NLS-1$ result.append(customStyle); result.append(", creationCommandClass: "); //$NON-NLS-1$ result.append(creationCommandClass); @@ -403,4 +359,4 @@ public class PapyrusDiagramImpl extends PapyrusRepresentationKindImpl implements return result.toString(); } -} //PapyrusDiagramImpl +} // PapyrusDiagramImpl diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/RepresentationPackageImpl.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/RepresentationPackageImpl.java index cc553227d70..77c81213d8a 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/RepresentationPackageImpl.java +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/impl/RepresentationPackageImpl.java @@ -20,13 +20,18 @@ import org.eclipse.emf.ecore.EGenericType; import org.eclipse.emf.ecore.EOperation; 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; import org.eclipse.gmf.runtime.emf.type.core.IElementType; import org.eclipse.papyrus.infra.constraints.ConstraintsPackage; + import org.eclipse.papyrus.infra.core.architecture.ArchitecturePackage; + +import org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.PaletteconfigurationPackage; + import org.eclipse.papyrus.infra.gmfdiag.representation.AssistantRule; import org.eclipse.papyrus.infra.gmfdiag.representation.ChildRule; import org.eclipse.papyrus.infra.gmfdiag.representation.PaletteRule; @@ -34,6 +39,7 @@ import org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram; import org.eclipse.papyrus.infra.gmfdiag.representation.PathElement; import org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationFactory; import org.eclipse.papyrus.infra.gmfdiag.representation.RepresentationPackage; + import org.eclipse.papyrus.infra.types.ElementTypesConfigurationsPackage; /** @@ -134,7 +140,9 @@ public class RepresentationPackageImpl extends EPackageImpl implements Represent // Initialize simple dependencies ArchitecturePackage.eINSTANCE.eClass(); ConstraintsPackage.eINSTANCE.eClass(); + EcorePackage.eINSTANCE.eClass(); ElementTypesConfigurationsPackage.eINSTANCE.eClass(); + PaletteconfigurationPackage.eINSTANCE.eClass(); org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.eINSTANCE.eClass(); // Create package meta-data objects @@ -166,7 +174,7 @@ public class RepresentationPackageImpl extends EPackageImpl implements Represent * <!-- end-user-doc --> * @generated */ - public EAttribute getPapyrusDiagram_CustomPalette() { + public EAttribute getPapyrusDiagram_CustomStyle() { return (EAttribute)papyrusDiagramEClass.getEStructuralFeatures().get(0); } @@ -175,8 +183,8 @@ public class RepresentationPackageImpl extends EPackageImpl implements Represent * <!-- end-user-doc --> * @generated */ - public EAttribute getPapyrusDiagram_CustomStyle() { - return (EAttribute)papyrusDiagramEClass.getEStructuralFeatures().get(1); + public EReference getPapyrusDiagram_ChildRules() { + return (EReference)papyrusDiagramEClass.getEStructuralFeatures().get(1); } /** @@ -184,7 +192,7 @@ public class RepresentationPackageImpl extends EPackageImpl implements Represent * <!-- end-user-doc --> * @generated */ - public EReference getPapyrusDiagram_ChildRules() { + public EReference getPapyrusDiagram_PaletteRules() { return (EReference)papyrusDiagramEClass.getEStructuralFeatures().get(2); } @@ -193,7 +201,7 @@ public class RepresentationPackageImpl extends EPackageImpl implements Represent * <!-- end-user-doc --> * @generated */ - public EReference getPapyrusDiagram_PaletteRules() { + public EReference getPapyrusDiagram_AssistantRules() { return (EReference)papyrusDiagramEClass.getEStructuralFeatures().get(3); } @@ -202,8 +210,8 @@ public class RepresentationPackageImpl extends EPackageImpl implements Represent * <!-- end-user-doc --> * @generated */ - public EReference getPapyrusDiagram_AssistantRules() { - return (EReference)papyrusDiagramEClass.getEStructuralFeatures().get(4); + public EAttribute getPapyrusDiagram_CreationCommandClass() { + return (EAttribute)papyrusDiagramEClass.getEStructuralFeatures().get(4); } /** @@ -211,8 +219,8 @@ public class RepresentationPackageImpl extends EPackageImpl implements Represent * <!-- end-user-doc --> * @generated */ - public EAttribute getPapyrusDiagram_CreationCommandClass() { - return (EAttribute)papyrusDiagramEClass.getEStructuralFeatures().get(5); + public EReference getPapyrusDiagram_Palettes() { + return (EReference)papyrusDiagramEClass.getEStructuralFeatures().get(5); } /** @@ -379,12 +387,12 @@ public class RepresentationPackageImpl extends EPackageImpl implements Represent // Create classes and their features papyrusDiagramEClass = createEClass(PAPYRUS_DIAGRAM); - createEAttribute(papyrusDiagramEClass, PAPYRUS_DIAGRAM__CUSTOM_PALETTE); createEAttribute(papyrusDiagramEClass, PAPYRUS_DIAGRAM__CUSTOM_STYLE); createEReference(papyrusDiagramEClass, PAPYRUS_DIAGRAM__CHILD_RULES); createEReference(papyrusDiagramEClass, PAPYRUS_DIAGRAM__PALETTE_RULES); createEReference(papyrusDiagramEClass, PAPYRUS_DIAGRAM__ASSISTANT_RULES); createEAttribute(papyrusDiagramEClass, PAPYRUS_DIAGRAM__CREATION_COMMAND_CLASS); + createEReference(papyrusDiagramEClass, PAPYRUS_DIAGRAM__PALETTES); childRuleEClass = createEClass(CHILD_RULE); createEReference(childRuleEClass, CHILD_RULE__ELEMENT); @@ -433,6 +441,7 @@ public class RepresentationPackageImpl extends EPackageImpl implements Represent // Obtain other dependent packages org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage theRepresentationPackage_1 = (org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage)EPackage.Registry.INSTANCE.getEPackage(org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage.eNS_URI); + PaletteconfigurationPackage thePaletteconfigurationPackage = (PaletteconfigurationPackage)EPackage.Registry.INSTANCE.getEPackage(PaletteconfigurationPackage.eNS_URI); // Create type parameters @@ -446,7 +455,6 @@ public class RepresentationPackageImpl extends EPackageImpl implements Represent // Initialize classes, features, and operations; add parameters initEClass(papyrusDiagramEClass, PapyrusDiagram.class, "PapyrusDiagram", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ - initEAttribute(getPapyrusDiagram_CustomPalette(), ecorePackage.getEString(), "customPalette", null, 0, 1, PapyrusDiagram.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ initEAttribute(getPapyrusDiagram_CustomStyle(), ecorePackage.getEString(), "customStyle", null, 0, 1, PapyrusDiagram.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ initEReference(getPapyrusDiagram_ChildRules(), this.getChildRule(), null, "childRules", null, 0, -1, PapyrusDiagram.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ initEReference(getPapyrusDiagram_PaletteRules(), this.getPaletteRule(), null, "paletteRules", null, 0, -1, PapyrusDiagram.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ @@ -455,6 +463,7 @@ public class RepresentationPackageImpl extends EPackageImpl implements Represent EGenericType g2 = createEGenericType(); g1.getETypeArguments().add(g2); initEAttribute(getPapyrusDiagram_CreationCommandClass(), g1, "creationCommandClass", null, 1, 1, PapyrusDiagram.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEReference(getPapyrusDiagram_Palettes(), thePaletteconfigurationPackage.getPaletteConfiguration(), null, "palettes", null, 0, -1, PapyrusDiagram.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ initEClass(childRuleEClass, ChildRule.class, "ChildRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ initEReference(getChildRule_Element(), ecorePackage.getEClass(), null, "element", null, 0, 1, ChildRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/util/RepresentationAdapterFactory.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/util/RepresentationAdapterFactory.java index 280bef9953f..c73a01c3e97 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/util/RepresentationAdapterFactory.java +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.representation/src-gen/org/eclipse/papyrus/infra/gmfdiag/representation/util/RepresentationAdapterFactory.java @@ -20,12 +20,12 @@ import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; import org.eclipse.emf.ecore.EObject; -import org.eclipse.papyrus.infra.core.architecture.ADElement; -import org.eclipse.papyrus.infra.core.architecture.RepresentationKind; - import org.eclipse.papyrus.infra.architecture.representation.PapyrusRepresentationKind; import org.eclipse.papyrus.infra.architecture.representation.Rule; +import org.eclipse.papyrus.infra.core.architecture.ADElement; +import org.eclipse.papyrus.infra.core.architecture.RepresentationKind; + import org.eclipse.papyrus.infra.gmfdiag.representation.*; /** |