diff options
Diffstat (limited to 'plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org')
17 files changed, 2860 insertions, 0 deletions
diff --git a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/CreateRelationshipMenu.java b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/CreateRelationshipMenu.java new file mode 100644 index 00000000000..db813e7631d --- /dev/null +++ b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/CreateRelationshipMenu.java @@ -0,0 +1,27 @@ +/** + * Copyright (c) 2013 CEA LIST. + * + * 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: + * CEA LIST - Initial API and implementation + * + */ +package org.eclipse.papyrus.infra.newchild.elementcreationmenumodel; + + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Create Relationship Menu</b></em>'. + * <!-- end-user-doc --> + * + * + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.ElementCreationMenuModelPackage#getCreateRelationshipMenu() + * @model + * @generated + */ +public interface CreateRelationshipMenu extends CreationMenu { +} // CreateRelationshipMenu diff --git a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/CreationMenu.java b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/CreationMenu.java new file mode 100644 index 00000000000..ba6842d7afd --- /dev/null +++ b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/CreationMenu.java @@ -0,0 +1,114 @@ +/** + * Copyright (c) 2013 CEA LIST. + * + * 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: + * CEA LIST - Initial API and implementation + * + */ +package org.eclipse.papyrus.infra.newchild.elementcreationmenumodel; + + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Creation Menu</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.CreationMenu#getElementTypeIdRef <em>Element Type Id Ref</em>}</li> + * <li>{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.CreationMenu#getRole <em>Role</em>}</li> + * <li>{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.CreationMenu#isDisplayAllRoles <em>Display All Roles</em>}</li> + * </ul> + * + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.ElementCreationMenuModelPackage#getCreationMenu() + * @model + * @generated + */ +public interface CreationMenu extends Menu { + /** + * Returns the value of the '<em><b>Element Type Id Ref</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Element Type Id Ref</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Element Type Id Ref</em>' attribute. + * @see #setElementTypeIdRef(String) + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.ElementCreationMenuModelPackage#getCreationMenu_ElementTypeIdRef() + * @model required="true" ordered="false" + * @generated + */ + String getElementTypeIdRef(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.CreationMenu#getElementTypeIdRef <em>Element Type Id Ref</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Element Type Id Ref</em>' attribute. + * @see #getElementTypeIdRef() + * @generated + */ + void setElementTypeIdRef(String value); + + /** + * Returns the value of the '<em><b>Role</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Role</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Role</em>' attribute. + * @see #setRole(String) + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.ElementCreationMenuModelPackage#getCreationMenu_Role() + * @model ordered="false" + * @generated + */ + String getRole(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.CreationMenu#getRole <em>Role</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Role</em>' attribute. + * @see #getRole() + * @generated + */ + void setRole(String value); + + /** + * Returns the value of the '<em><b>Display All Roles</b></em>' attribute. + * The default value is <code>"true"</code>. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Display All Roles</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Display All Roles</em>' attribute. + * @see #setDisplayAllRoles(boolean) + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.ElementCreationMenuModelPackage#getCreationMenu_DisplayAllRoles() + * @model default="true" required="true" ordered="false" + * @generated + */ + boolean isDisplayAllRoles(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.CreationMenu#isDisplayAllRoles <em>Display All Roles</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Display All Roles</em>' attribute. + * @see #isDisplayAllRoles() + * @generated + */ + void setDisplayAllRoles(boolean value); + +} // CreationMenu diff --git a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/ElementCreationMenuModelFactory.java b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/ElementCreationMenuModelFactory.java new file mode 100644 index 00000000000..2719cab7a04 --- /dev/null +++ b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/ElementCreationMenuModelFactory.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) 2013 CEA LIST. + * + * 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: + * CEA LIST - Initial API and implementation + * + */ +package org.eclipse.papyrus.infra.newchild.elementcreationmenumodel; + +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.papyrus.infra.newchild.elementcreationmenumodel.ElementCreationMenuModelPackage + * @generated + */ +public interface ElementCreationMenuModelFactory extends EFactory { + /** + * The singleton instance of the factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + ElementCreationMenuModelFactory eINSTANCE = org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl.ElementCreationMenuModelFactoryImpl.init(); + + /** + * Returns a new object of class '<em>Folder</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Folder</em>'. + * @generated + */ + Folder createFolder(); + + /** + * Returns a new object of class '<em>Creation Menu</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Creation Menu</em>'. + * @generated + */ + CreationMenu createCreationMenu(); + + /** + * Returns a new object of class '<em>Create Relationship Menu</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Create Relationship Menu</em>'. + * @generated + */ + CreateRelationshipMenu createCreateRelationshipMenu(); + + /** + * Returns the package supported by this factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the package supported by this factory. + * @generated + */ + ElementCreationMenuModelPackage getElementCreationMenuModelPackage(); + +} // ElementCreationMenuModelFactory diff --git a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/ElementCreationMenuModelPackage.java b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/ElementCreationMenuModelPackage.java new file mode 100644 index 00000000000..1c0a1e77d2b --- /dev/null +++ b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/ElementCreationMenuModelPackage.java @@ -0,0 +1,645 @@ +/** + * Copyright (c) 2013 CEA LIST. + * + * 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: + * CEA LIST - Initial API and implementation + * + */ +package org.eclipse.papyrus.infra.newchild.elementcreationmenumodel; + +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 + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each operation of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.ElementCreationMenuModelFactory + * @model kind="package" + * @generated + */ +public interface ElementCreationMenuModelPackage extends EPackage { + /** + * The package name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNAME = "elementcreationmenumodel"; + + /** + * The package namespace URI. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_URI = "http://www.eclipse.org/papyrus/infra/newchild/elementcreationmenumodel"; + + /** + * The package namespace name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_PREFIX = "ElementCreationMenuModel"; + + /** + * The singleton instance of the package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + ElementCreationMenuModelPackage eINSTANCE = org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl.ElementCreationMenuModelPackageImpl.init(); + + /** + * The meta object id for the '{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl.MenuImpl <em>Menu</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl.MenuImpl + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl.ElementCreationMenuModelPackageImpl#getMenu() + * @generated + */ + int MENU = 1; + + /** + * The feature id for the '<em><b>Label</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int MENU__LABEL = 0; + + /** + * The feature id for the '<em><b>Icon</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int MENU__ICON = 1; + + /** + * The feature id for the '<em><b>Visible</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int MENU__VISIBLE = 2; + + /** + * The feature id for the '<em><b>Filter</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int MENU__FILTER = 3; + + /** + * The number of structural features of the '<em>Menu</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int MENU_FEATURE_COUNT = 4; + + /** + * The number of operations of the '<em>Menu</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int MENU_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl.FolderImpl <em>Folder</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl.FolderImpl + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl.ElementCreationMenuModelPackageImpl#getFolder() + * @generated + */ + int FOLDER = 0; + + /** + * The feature id for the '<em><b>Label</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FOLDER__LABEL = MENU__LABEL; + + /** + * The feature id for the '<em><b>Icon</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FOLDER__ICON = MENU__ICON; + + /** + * The feature id for the '<em><b>Visible</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FOLDER__VISIBLE = MENU__VISIBLE; + + /** + * The feature id for the '<em><b>Filter</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FOLDER__FILTER = MENU__FILTER; + + /** + * The feature id for the '<em><b>Menu</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FOLDER__MENU = MENU_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>Folder</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FOLDER_FEATURE_COUNT = MENU_FEATURE_COUNT + 1; + + /** + * The number of operations of the '<em>Folder</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FOLDER_OPERATION_COUNT = MENU_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl.CreationMenuImpl <em>Creation Menu</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl.CreationMenuImpl + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl.ElementCreationMenuModelPackageImpl#getCreationMenu() + * @generated + */ + int CREATION_MENU = 2; + + /** + * The feature id for the '<em><b>Label</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CREATION_MENU__LABEL = MENU__LABEL; + + /** + * The feature id for the '<em><b>Icon</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CREATION_MENU__ICON = MENU__ICON; + + /** + * The feature id for the '<em><b>Visible</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CREATION_MENU__VISIBLE = MENU__VISIBLE; + + /** + * The feature id for the '<em><b>Filter</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CREATION_MENU__FILTER = MENU__FILTER; + + /** + * The feature id for the '<em><b>Element Type Id Ref</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CREATION_MENU__ELEMENT_TYPE_ID_REF = MENU_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Role</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CREATION_MENU__ROLE = MENU_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Display All Roles</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CREATION_MENU__DISPLAY_ALL_ROLES = MENU_FEATURE_COUNT + 2; + + /** + * The number of structural features of the '<em>Creation Menu</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CREATION_MENU_FEATURE_COUNT = MENU_FEATURE_COUNT + 3; + + /** + * The number of operations of the '<em>Creation Menu</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CREATION_MENU_OPERATION_COUNT = MENU_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl.CreateRelationshipMenuImpl <em>Create Relationship Menu</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl.CreateRelationshipMenuImpl + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl.ElementCreationMenuModelPackageImpl#getCreateRelationshipMenu() + * @generated + */ + int CREATE_RELATIONSHIP_MENU = 3; + + /** + * The feature id for the '<em><b>Label</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CREATE_RELATIONSHIP_MENU__LABEL = CREATION_MENU__LABEL; + + /** + * The feature id for the '<em><b>Icon</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CREATE_RELATIONSHIP_MENU__ICON = CREATION_MENU__ICON; + + /** + * The feature id for the '<em><b>Visible</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CREATE_RELATIONSHIP_MENU__VISIBLE = CREATION_MENU__VISIBLE; + + /** + * The feature id for the '<em><b>Filter</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CREATE_RELATIONSHIP_MENU__FILTER = CREATION_MENU__FILTER; + + /** + * The feature id for the '<em><b>Element Type Id Ref</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CREATE_RELATIONSHIP_MENU__ELEMENT_TYPE_ID_REF = CREATION_MENU__ELEMENT_TYPE_ID_REF; + + /** + * The feature id for the '<em><b>Role</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CREATE_RELATIONSHIP_MENU__ROLE = CREATION_MENU__ROLE; + + /** + * The feature id for the '<em><b>Display All Roles</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CREATE_RELATIONSHIP_MENU__DISPLAY_ALL_ROLES = CREATION_MENU__DISPLAY_ALL_ROLES; + + /** + * The number of structural features of the '<em>Create Relationship Menu</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CREATE_RELATIONSHIP_MENU_FEATURE_COUNT = CREATION_MENU_FEATURE_COUNT + 0; + + /** + * The number of operations of the '<em>Create Relationship Menu</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CREATE_RELATIONSHIP_MENU_OPERATION_COUNT = CREATION_MENU_OPERATION_COUNT + 0; + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.Folder <em>Folder</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Folder</em>'. + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.Folder + * @generated + */ + EClass getFolder(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.Folder#getMenu <em>Menu</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Menu</em>'. + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.Folder#getMenu() + * @see #getFolder() + * @generated + */ + EReference getFolder_Menu(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.Menu <em>Menu</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Menu</em>'. + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.Menu + * @generated + */ + EClass getMenu(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.Menu#getLabel <em>Label</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Label</em>'. + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.Menu#getLabel() + * @see #getMenu() + * @generated + */ + EAttribute getMenu_Label(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.Menu#getIcon <em>Icon</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Icon</em>'. + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.Menu#getIcon() + * @see #getMenu() + * @generated + */ + EAttribute getMenu_Icon(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.Menu#isVisible <em>Visible</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Visible</em>'. + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.Menu#isVisible() + * @see #getMenu() + * @generated + */ + EAttribute getMenu_Visible(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.Menu#getFilter <em>Filter</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference '<em>Filter</em>'. + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.Menu#getFilter() + * @see #getMenu() + * @generated + */ + EReference getMenu_Filter(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.CreationMenu <em>Creation Menu</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Creation Menu</em>'. + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.CreationMenu + * @generated + */ + EClass getCreationMenu(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.CreationMenu#getElementTypeIdRef <em>Element Type Id Ref</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Element Type Id Ref</em>'. + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.CreationMenu#getElementTypeIdRef() + * @see #getCreationMenu() + * @generated + */ + EAttribute getCreationMenu_ElementTypeIdRef(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.CreationMenu#getRole <em>Role</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Role</em>'. + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.CreationMenu#getRole() + * @see #getCreationMenu() + * @generated + */ + EAttribute getCreationMenu_Role(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.CreationMenu#isDisplayAllRoles <em>Display All Roles</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Display All Roles</em>'. + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.CreationMenu#isDisplayAllRoles() + * @see #getCreationMenu() + * @generated + */ + EAttribute getCreationMenu_DisplayAllRoles(); + + /** + * Returns the meta object for class '{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.CreateRelationshipMenu <em>Create Relationship Menu</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Create Relationship Menu</em>'. + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.CreateRelationshipMenu + * @generated + */ + EClass getCreateRelationshipMenu(); + + /** + * 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 + */ + ElementCreationMenuModelFactory getElementCreationMenuModelFactory(); + + /** + * <!-- begin-user-doc --> + * Defines literals for the meta objects that represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each operation of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl.FolderImpl <em>Folder</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl.FolderImpl + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl.ElementCreationMenuModelPackageImpl#getFolder() + * @generated + */ + EClass FOLDER = eINSTANCE.getFolder(); + + /** + * The meta object literal for the '<em><b>Menu</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference FOLDER__MENU = eINSTANCE.getFolder_Menu(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl.MenuImpl <em>Menu</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl.MenuImpl + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl.ElementCreationMenuModelPackageImpl#getMenu() + * @generated + */ + EClass MENU = eINSTANCE.getMenu(); + + /** + * The meta object literal for the '<em><b>Label</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute MENU__LABEL = eINSTANCE.getMenu_Label(); + + /** + * The meta object literal for the '<em><b>Icon</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute MENU__ICON = eINSTANCE.getMenu_Icon(); + + /** + * The meta object literal for the '<em><b>Visible</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute MENU__VISIBLE = eINSTANCE.getMenu_Visible(); + + /** + * The meta object literal for the '<em><b>Filter</b></em>' containment reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference MENU__FILTER = eINSTANCE.getMenu_Filter(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl.CreationMenuImpl <em>Creation Menu</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl.CreationMenuImpl + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl.ElementCreationMenuModelPackageImpl#getCreationMenu() + * @generated + */ + EClass CREATION_MENU = eINSTANCE.getCreationMenu(); + + /** + * The meta object literal for the '<em><b>Element Type Id Ref</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute CREATION_MENU__ELEMENT_TYPE_ID_REF = eINSTANCE.getCreationMenu_ElementTypeIdRef(); + + /** + * The meta object literal for the '<em><b>Role</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute CREATION_MENU__ROLE = eINSTANCE.getCreationMenu_Role(); + + /** + * The meta object literal for the '<em><b>Display All Roles</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute CREATION_MENU__DISPLAY_ALL_ROLES = eINSTANCE.getCreationMenu_DisplayAllRoles(); + + /** + * The meta object literal for the '{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl.CreateRelationshipMenuImpl <em>Create Relationship Menu</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl.CreateRelationshipMenuImpl + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl.ElementCreationMenuModelPackageImpl#getCreateRelationshipMenu() + * @generated + */ + EClass CREATE_RELATIONSHIP_MENU = eINSTANCE.getCreateRelationshipMenu(); + + } + +} // ElementCreationMenuModelPackage diff --git a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/Folder.java b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/Folder.java new file mode 100644 index 00000000000..1ecd7979991 --- /dev/null +++ b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/Folder.java @@ -0,0 +1,49 @@ +/** + * Copyright (c) 2013 CEA LIST. + * + * 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: + * CEA LIST - Initial API and implementation + * + */ +package org.eclipse.papyrus.infra.newchild.elementcreationmenumodel; + +import org.eclipse.emf.common.util.EList; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Folder</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.Folder#getMenu <em>Menu</em>}</li> + * </ul> + * + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.ElementCreationMenuModelPackage#getFolder() + * @model + * @generated + */ +public interface Folder extends Menu { + /** + * Returns the value of the '<em><b>Menu</b></em>' containment reference list. + * The list contents are of type {@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.Menu}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Menu</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>Menu</em>' containment reference list. + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.ElementCreationMenuModelPackage#getFolder_Menu() + * @model containment="true" + * @generated + */ + EList<Menu> getMenu(); + +} // Folder diff --git a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/Menu.java b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/Menu.java new file mode 100644 index 00000000000..e71fe059789 --- /dev/null +++ b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/Menu.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2013 CEA LIST. + * + * 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: + * CEA LIST - Initial API and implementation + * + */ +package org.eclipse.papyrus.infra.newchild.elementcreationmenumodel; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.papyrus.infra.filters.Filter; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Menu</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.Menu#getLabel <em>Label</em>}</li> + * <li>{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.Menu#getIcon <em>Icon</em>}</li> + * <li>{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.Menu#isVisible <em>Visible</em>}</li> + * <li>{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.Menu#getFilter <em>Filter</em>}</li> + * </ul> + * + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.ElementCreationMenuModelPackage#getMenu() + * @model abstract="true" + * @generated + */ +public interface Menu extends EObject { + /** + * Returns the value of the '<em><b>Label</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Label</em>' attribute isn't clear, there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Label</em>' attribute. + * @see #setLabel(String) + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.ElementCreationMenuModelPackage#getMenu_Label() + * @model required="true" ordered="false" + * @generated + */ + String getLabel(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.Menu#getLabel <em>Label</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Label</em>' attribute. + * @see #getLabel() + * @generated + */ + void setLabel(String value); + + /** + * Returns the value of the '<em><b>Icon</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Icon</em>' attribute isn't clear, there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Icon</em>' attribute. + * @see #setIcon(String) + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.ElementCreationMenuModelPackage#getMenu_Icon() + * @model ordered="false" + * @generated + */ + String getIcon(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.Menu#getIcon <em>Icon</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Icon</em>' attribute. + * @see #getIcon() + * @generated + */ + void setIcon(String value); + + /** + * Returns the value of the '<em><b>Visible</b></em>' attribute. + * The default value is <code>"true"</code>. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Visible</em>' attribute isn't clear, there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Visible</em>' attribute. + * @see #setVisible(boolean) + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.ElementCreationMenuModelPackage#getMenu_Visible() + * @model default="true" + * @generated + */ + boolean isVisible(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.Menu#isVisible <em>Visible</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Visible</em>' attribute. + * @see #isVisible() + * @generated + */ + void setVisible(boolean value); + + /** + * Returns the value of the '<em><b>Filter</b></em>' containment reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Filter</em>' containment reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Filter</em>' containment reference. + * @see #setFilter(Filter) + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.ElementCreationMenuModelPackage#getMenu_Filter() + * @model containment="true" + * @generated + */ + Filter getFilter(); + + /** + * Sets the value of the '{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.Menu#getFilter <em>Filter</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Filter</em>' containment reference. + * @see #getFilter() + * @generated + */ + void setFilter(Filter value); + +} // Menu diff --git a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/impl/CreateRelationshipMenuImpl.java b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/impl/CreateRelationshipMenuImpl.java new file mode 100644 index 00000000000..ce410f3c31c --- /dev/null +++ b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/impl/CreateRelationshipMenuImpl.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2013 CEA LIST. + * + * 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: + * CEA LIST - Initial API and implementation + * + */ +package org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.CreateRelationshipMenu; +import org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.ElementCreationMenuModelPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Create Relationship Menu</b></em>'. + * <!-- end-user-doc --> + * + * @generated + */ +public class CreateRelationshipMenuImpl extends CreationMenuImpl implements CreateRelationshipMenu { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CreateRelationshipMenuImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ElementCreationMenuModelPackage.Literals.CREATE_RELATIONSHIP_MENU; + } + +} //CreateRelationshipMenuImpl diff --git a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/impl/CreationMenuImpl.java b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/impl/CreationMenuImpl.java new file mode 100644 index 00000000000..84811b4abb8 --- /dev/null +++ b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/impl/CreationMenuImpl.java @@ -0,0 +1,280 @@ +/** + * Copyright (c) 2013 CEA LIST. + * + * 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: + * CEA LIST - Initial API and implementation + * + */ +package org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.CreationMenu; +import org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.ElementCreationMenuModelPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Creation Menu</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl.CreationMenuImpl#getElementTypeIdRef <em>Element Type Id Ref</em>}</li> + * <li>{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl.CreationMenuImpl#getRole <em>Role</em>}</li> + * <li>{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl.CreationMenuImpl#isDisplayAllRoles <em>Display All Roles</em>}</li> + * </ul> + * + * @generated + */ +public class CreationMenuImpl extends MenuImpl implements CreationMenu { + /** + * The default value of the '{@link #getElementTypeIdRef() <em>Element Type Id Ref</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getElementTypeIdRef() + * @generated + * @ordered + */ + protected static final String ELEMENT_TYPE_ID_REF_EDEFAULT = null; + + /** + * The cached value of the '{@link #getElementTypeIdRef() <em>Element Type Id Ref</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getElementTypeIdRef() + * @generated + * @ordered + */ + protected String elementTypeIdRef = ELEMENT_TYPE_ID_REF_EDEFAULT; + + /** + * The default value of the '{@link #getRole() <em>Role</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getRole() + * @generated + * @ordered + */ + protected static final String ROLE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getRole() <em>Role</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getRole() + * @generated + * @ordered + */ + protected String role = ROLE_EDEFAULT; + + /** + * The default value of the '{@link #isDisplayAllRoles() <em>Display All Roles</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isDisplayAllRoles() + * @generated + * @ordered + */ + protected static final boolean DISPLAY_ALL_ROLES_EDEFAULT = true; + + /** + * The cached value of the '{@link #isDisplayAllRoles() <em>Display All Roles</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isDisplayAllRoles() + * @generated + * @ordered + */ + protected boolean displayAllRoles = DISPLAY_ALL_ROLES_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CreationMenuImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ElementCreationMenuModelPackage.Literals.CREATION_MENU; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getElementTypeIdRef() { + return elementTypeIdRef; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setElementTypeIdRef(String newElementTypeIdRef) { + String oldElementTypeIdRef = elementTypeIdRef; + elementTypeIdRef = newElementTypeIdRef; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ElementCreationMenuModelPackage.CREATION_MENU__ELEMENT_TYPE_ID_REF, oldElementTypeIdRef, elementTypeIdRef)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getRole() { + return role; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setRole(String newRole) { + String oldRole = role; + role = newRole; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ElementCreationMenuModelPackage.CREATION_MENU__ROLE, oldRole, role)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isDisplayAllRoles() { + return displayAllRoles; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setDisplayAllRoles(boolean newDisplayAllRoles) { + boolean oldDisplayAllRoles = displayAllRoles; + displayAllRoles = newDisplayAllRoles; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ElementCreationMenuModelPackage.CREATION_MENU__DISPLAY_ALL_ROLES, oldDisplayAllRoles, displayAllRoles)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ElementCreationMenuModelPackage.CREATION_MENU__ELEMENT_TYPE_ID_REF: + return getElementTypeIdRef(); + case ElementCreationMenuModelPackage.CREATION_MENU__ROLE: + return getRole(); + case ElementCreationMenuModelPackage.CREATION_MENU__DISPLAY_ALL_ROLES: + return isDisplayAllRoles(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ElementCreationMenuModelPackage.CREATION_MENU__ELEMENT_TYPE_ID_REF: + setElementTypeIdRef((String)newValue); + return; + case ElementCreationMenuModelPackage.CREATION_MENU__ROLE: + setRole((String)newValue); + return; + case ElementCreationMenuModelPackage.CREATION_MENU__DISPLAY_ALL_ROLES: + setDisplayAllRoles((Boolean)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ElementCreationMenuModelPackage.CREATION_MENU__ELEMENT_TYPE_ID_REF: + setElementTypeIdRef(ELEMENT_TYPE_ID_REF_EDEFAULT); + return; + case ElementCreationMenuModelPackage.CREATION_MENU__ROLE: + setRole(ROLE_EDEFAULT); + return; + case ElementCreationMenuModelPackage.CREATION_MENU__DISPLAY_ALL_ROLES: + setDisplayAllRoles(DISPLAY_ALL_ROLES_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ElementCreationMenuModelPackage.CREATION_MENU__ELEMENT_TYPE_ID_REF: + return ELEMENT_TYPE_ID_REF_EDEFAULT == null ? elementTypeIdRef != null : !ELEMENT_TYPE_ID_REF_EDEFAULT.equals(elementTypeIdRef); + case ElementCreationMenuModelPackage.CREATION_MENU__ROLE: + return ROLE_EDEFAULT == null ? role != null : !ROLE_EDEFAULT.equals(role); + case ElementCreationMenuModelPackage.CREATION_MENU__DISPLAY_ALL_ROLES: + return displayAllRoles != DISPLAY_ALL_ROLES_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (elementTypeIdRef: "); + result.append(elementTypeIdRef); + result.append(", role: "); + result.append(role); + result.append(", displayAllRoles: "); + result.append(displayAllRoles); + result.append(')'); + return result.toString(); + } + +} //CreationMenuImpl diff --git a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/impl/ElementCreationMenuModelFactoryImpl.java b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/impl/ElementCreationMenuModelFactoryImpl.java new file mode 100644 index 00000000000..a72d9a71ea4 --- /dev/null +++ b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/impl/ElementCreationMenuModelFactoryImpl.java @@ -0,0 +1,124 @@ +/** + * Copyright (c) 2013 CEA LIST. + * + * 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: + * CEA LIST - Initial API and implementation + * + */ +package org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.impl.EFactoryImpl; +import org.eclipse.emf.ecore.plugin.EcorePlugin; +import org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.*; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Factory</b>. + * <!-- end-user-doc --> + * @generated + */ +public class ElementCreationMenuModelFactoryImpl extends EFactoryImpl implements ElementCreationMenuModelFactory { + /** + * Creates the default factory implementation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static ElementCreationMenuModelFactory init() { + try { + ElementCreationMenuModelFactory theElementCreationMenuModelFactory = (ElementCreationMenuModelFactory)EPackage.Registry.INSTANCE.getEFactory(ElementCreationMenuModelPackage.eNS_URI); + if (theElementCreationMenuModelFactory != null) { + return theElementCreationMenuModelFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new ElementCreationMenuModelFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ElementCreationMenuModelFactoryImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case ElementCreationMenuModelPackage.FOLDER: return createFolder(); + case ElementCreationMenuModelPackage.CREATION_MENU: return createCreationMenu(); + case ElementCreationMenuModelPackage.CREATE_RELATIONSHIP_MENU: return createCreateRelationshipMenu(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Folder createFolder() { + FolderImpl folder = new FolderImpl(); + return folder; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CreationMenu createCreationMenu() { + CreationMenuImpl creationMenu = new CreationMenuImpl(); + return creationMenu; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CreateRelationshipMenu createCreateRelationshipMenu() { + CreateRelationshipMenuImpl createRelationshipMenu = new CreateRelationshipMenuImpl(); + return createRelationshipMenu; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ElementCreationMenuModelPackage getElementCreationMenuModelPackage() { + return (ElementCreationMenuModelPackage)getEPackage(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @deprecated + * @generated + */ + @Deprecated + public static ElementCreationMenuModelPackage getPackage() { + return ElementCreationMenuModelPackage.eINSTANCE; + } + +} // ElementCreationMenuModelFactoryImpl diff --git a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/impl/ElementCreationMenuModelPackageImpl.java b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/impl/ElementCreationMenuModelPackageImpl.java new file mode 100644 index 00000000000..4f66c25e18f --- /dev/null +++ b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/impl/ElementCreationMenuModelPackageImpl.java @@ -0,0 +1,338 @@ +/** + * Copyright (c) 2013 CEA LIST. + * + * 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: + * CEA LIST - Initial API and implementation + * + */ +package org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl; + +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; +import org.eclipse.papyrus.infra.filters.FiltersPackage; +import org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.CreateRelationshipMenu; +import org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.CreationMenu; +import org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.ElementCreationMenuModelFactory; +import org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.ElementCreationMenuModelPackage; +import org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.Folder; +import org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.Menu; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Package</b>. + * <!-- end-user-doc --> + * @generated + */ +public class ElementCreationMenuModelPackageImpl extends EPackageImpl implements ElementCreationMenuModelPackage { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass folderEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass menuEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass creationMenuEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass createRelationshipMenuEClass = 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>Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.ElementCreationMenuModelPackage#eNS_URI + * @see #init() + * @generated + */ + private ElementCreationMenuModelPackageImpl() { + super(eNS_URI, ElementCreationMenuModelFactory.eINSTANCE); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. + * + * <p>This method is used to initialize {@link ElementCreationMenuModelPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * <!-- begin-user-doc --> <!-- + * end-user-doc --> + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static ElementCreationMenuModelPackage init() { + if (isInited) return (ElementCreationMenuModelPackage)EPackage.Registry.INSTANCE.getEPackage(ElementCreationMenuModelPackage.eNS_URI); + + // Obtain or create and register package + ElementCreationMenuModelPackageImpl theElementCreationMenuModelPackage = (ElementCreationMenuModelPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ElementCreationMenuModelPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ElementCreationMenuModelPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + EcorePackage.eINSTANCE.eClass(); + FiltersPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theElementCreationMenuModelPackage.createPackageContents(); + + // Initialize created meta-data + theElementCreationMenuModelPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theElementCreationMenuModelPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(ElementCreationMenuModelPackage.eNS_URI, theElementCreationMenuModelPackage); + return theElementCreationMenuModelPackage; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getFolder() { + return folderEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getFolder_Menu() { + return (EReference)folderEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getMenu() { + return menuEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getMenu_Label() { + return (EAttribute)menuEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getMenu_Icon() { + return (EAttribute)menuEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getMenu_Visible() { + return (EAttribute)menuEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getMenu_Filter() { + return (EReference)menuEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getCreationMenu() { + return creationMenuEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCreationMenu_ElementTypeIdRef() { + return (EAttribute)creationMenuEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCreationMenu_Role() { + return (EAttribute)creationMenuEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getCreationMenu_DisplayAllRoles() { + return (EAttribute)creationMenuEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getCreateRelationshipMenu() { + return createRelationshipMenuEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ElementCreationMenuModelFactory getElementCreationMenuModelFactory() { + return (ElementCreationMenuModelFactory)getEFactoryInstance(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private boolean isCreated = false; + + /** + * 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() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + folderEClass = createEClass(FOLDER); + createEReference(folderEClass, FOLDER__MENU); + + menuEClass = createEClass(MENU); + createEAttribute(menuEClass, MENU__LABEL); + createEAttribute(menuEClass, MENU__ICON); + createEAttribute(menuEClass, MENU__VISIBLE); + createEReference(menuEClass, MENU__FILTER); + + creationMenuEClass = createEClass(CREATION_MENU); + createEAttribute(creationMenuEClass, CREATION_MENU__ELEMENT_TYPE_ID_REF); + createEAttribute(creationMenuEClass, CREATION_MENU__ROLE); + createEAttribute(creationMenuEClass, CREATION_MENU__DISPLAY_ALL_ROLES); + + createRelationshipMenuEClass = createEClass(CREATE_RELATIONSHIP_MENU); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private boolean isInitialized = false; + + /** + * 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() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + FiltersPackage theFiltersPackage = (FiltersPackage)EPackage.Registry.INSTANCE.getEPackage(FiltersPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + folderEClass.getESuperTypes().add(this.getMenu()); + creationMenuEClass.getESuperTypes().add(this.getMenu()); + createRelationshipMenuEClass.getESuperTypes().add(this.getCreationMenu()); + + // Initialize classes, features, and operations; add parameters + initEClass(folderEClass, Folder.class, "Folder", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getFolder_Menu(), this.getMenu(), null, "menu", null, 0, -1, Folder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(menuEClass, Menu.class, "Menu", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getMenu_Label(), theEcorePackage.getEString(), "label", null, 1, 1, Menu.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEAttribute(getMenu_Icon(), theEcorePackage.getEString(), "icon", null, 0, 1, Menu.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEAttribute(getMenu_Visible(), ecorePackage.getEBoolean(), "visible", "true", 0, 1, Menu.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getMenu_Filter(), theFiltersPackage.getFilter(), null, "filter", null, 0, 1, Menu.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(creationMenuEClass, CreationMenu.class, "CreationMenu", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCreationMenu_ElementTypeIdRef(), theEcorePackage.getEString(), "elementTypeIdRef", null, 1, 1, CreationMenu.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEAttribute(getCreationMenu_Role(), theEcorePackage.getEString(), "role", null, 0, 1, CreationMenu.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEAttribute(getCreationMenu_DisplayAllRoles(), theEcorePackage.getEBoolean(), "displayAllRoles", "true", 1, 1, CreationMenu.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + + initEClass(createRelationshipMenuEClass, CreateRelationshipMenu.class, "CreateRelationshipMenu", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + // Create resource + createResource(eNS_URI); + } + +} // ElementCreationMenuModelPackageImpl diff --git a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/impl/FolderImpl.java b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/impl/FolderImpl.java new file mode 100644 index 00000000000..ec01fef8f87 --- /dev/null +++ b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/impl/FolderImpl.java @@ -0,0 +1,156 @@ +/** + * Copyright (c) 2013 CEA LIST. + * + * 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: + * CEA LIST - Initial API and implementation + * + */ +package org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl; + +import java.util.Collection; + +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.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.ElementCreationMenuModelPackage; +import org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.Folder; +import org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.Menu; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Folder</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl.FolderImpl#getMenu <em>Menu</em>}</li> + * </ul> + * + * @generated + */ +public class FolderImpl extends MenuImpl implements Folder { + /** + * The cached value of the '{@link #getMenu() <em>Menu</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getMenu() + * @generated + * @ordered + */ + protected EList<Menu> menu; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected FolderImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ElementCreationMenuModelPackage.Literals.FOLDER; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<Menu> getMenu() { + if (menu == null) { + menu = new EObjectContainmentEList<Menu>(Menu.class, this, ElementCreationMenuModelPackage.FOLDER__MENU); + } + return menu; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ElementCreationMenuModelPackage.FOLDER__MENU: + return ((InternalEList<?>)getMenu()).basicRemove(otherEnd, 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 ElementCreationMenuModelPackage.FOLDER__MENU: + return getMenu(); + } + 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) { + case ElementCreationMenuModelPackage.FOLDER__MENU: + getMenu().clear(); + getMenu().addAll((Collection<? extends Menu>)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ElementCreationMenuModelPackage.FOLDER__MENU: + getMenu().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ElementCreationMenuModelPackage.FOLDER__MENU: + return menu != null && !menu.isEmpty(); + } + return super.eIsSet(featureID); + } + +} // FolderImpl diff --git a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/impl/MenuImpl.java b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/impl/MenuImpl.java new file mode 100644 index 00000000000..42db1f7c0eb --- /dev/null +++ b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/impl/MenuImpl.java @@ -0,0 +1,359 @@ +/** + * Copyright (c) 2013 CEA LIST. + * + * 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: + * CEA LIST - Initial API and implementation + * + */ +package org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl; + +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; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; +import org.eclipse.papyrus.infra.filters.Filter; +import org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.ElementCreationMenuModelPackage; +import org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.Menu; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Menu</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl.MenuImpl#getLabel <em>Label</em>}</li> + * <li>{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl.MenuImpl#getIcon <em>Icon</em>}</li> + * <li>{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl.MenuImpl#isVisible <em>Visible</em>}</li> + * <li>{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.impl.MenuImpl#getFilter <em>Filter</em>}</li> + * </ul> + * + * @generated + */ +public abstract class MenuImpl extends MinimalEObjectImpl.Container implements Menu { + /** + * The default value of the '{@link #getLabel() <em>Label</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLabel() + * @generated + * @ordered + */ + protected static final String LABEL_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLabel() <em>Label</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLabel() + * @generated + * @ordered + */ + protected String label = LABEL_EDEFAULT; + + /** + * The default value of the '{@link #getIcon() <em>Icon</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getIcon() + * @generated + * @ordered + */ + protected static final String ICON_EDEFAULT = null; + + /** + * The cached value of the '{@link #getIcon() <em>Icon</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getIcon() + * @generated + * @ordered + */ + protected String icon = ICON_EDEFAULT; + + /** + * The default value of the '{@link #isVisible() <em>Visible</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isVisible() + * @generated + * @ordered + */ + protected static final boolean VISIBLE_EDEFAULT = true; + + /** + * The cached value of the '{@link #isVisible() <em>Visible</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isVisible() + * @generated + * @ordered + */ + protected boolean visible = VISIBLE_EDEFAULT; + + /** + * The cached value of the '{@link #getFilter() <em>Filter</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getFilter() + * @generated + * @ordered + */ + protected Filter filter; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected MenuImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ElementCreationMenuModelPackage.Literals.MENU; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getLabel() { + return label; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setLabel(String newLabel) { + String oldLabel = label; + label = newLabel; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ElementCreationMenuModelPackage.MENU__LABEL, oldLabel, label)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getIcon() { + return icon; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setIcon(String newIcon) { + String oldIcon = icon; + icon = newIcon; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ElementCreationMenuModelPackage.MENU__ICON, oldIcon, icon)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isVisible() { + return visible; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setVisible(boolean newVisible) { + boolean oldVisible = visible; + visible = newVisible; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ElementCreationMenuModelPackage.MENU__VISIBLE, oldVisible, visible)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Filter getFilter() { + return filter; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetFilter(Filter newFilter, NotificationChain msgs) { + Filter oldFilter = filter; + filter = newFilter; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ElementCreationMenuModelPackage.MENU__FILTER, oldFilter, newFilter); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setFilter(Filter newFilter) { + if (newFilter != filter) { + NotificationChain msgs = null; + if (filter != null) + msgs = ((InternalEObject)filter).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ElementCreationMenuModelPackage.MENU__FILTER, null, msgs); + if (newFilter != null) + msgs = ((InternalEObject)newFilter).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ElementCreationMenuModelPackage.MENU__FILTER, null, msgs); + msgs = basicSetFilter(newFilter, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ElementCreationMenuModelPackage.MENU__FILTER, newFilter, newFilter)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ElementCreationMenuModelPackage.MENU__FILTER: + return basicSetFilter(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 ElementCreationMenuModelPackage.MENU__LABEL: + return getLabel(); + case ElementCreationMenuModelPackage.MENU__ICON: + return getIcon(); + case ElementCreationMenuModelPackage.MENU__VISIBLE: + return isVisible(); + case ElementCreationMenuModelPackage.MENU__FILTER: + return getFilter(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ElementCreationMenuModelPackage.MENU__LABEL: + setLabel((String)newValue); + return; + case ElementCreationMenuModelPackage.MENU__ICON: + setIcon((String)newValue); + return; + case ElementCreationMenuModelPackage.MENU__VISIBLE: + setVisible((Boolean)newValue); + return; + case ElementCreationMenuModelPackage.MENU__FILTER: + setFilter((Filter)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ElementCreationMenuModelPackage.MENU__LABEL: + setLabel(LABEL_EDEFAULT); + return; + case ElementCreationMenuModelPackage.MENU__ICON: + setIcon(ICON_EDEFAULT); + return; + case ElementCreationMenuModelPackage.MENU__VISIBLE: + setVisible(VISIBLE_EDEFAULT); + return; + case ElementCreationMenuModelPackage.MENU__FILTER: + setFilter((Filter)null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ElementCreationMenuModelPackage.MENU__LABEL: + return LABEL_EDEFAULT == null ? label != null : !LABEL_EDEFAULT.equals(label); + case ElementCreationMenuModelPackage.MENU__ICON: + return ICON_EDEFAULT == null ? icon != null : !ICON_EDEFAULT.equals(icon); + case ElementCreationMenuModelPackage.MENU__VISIBLE: + return visible != VISIBLE_EDEFAULT; + case ElementCreationMenuModelPackage.MENU__FILTER: + return filter != null; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (label: "); + result.append(label); + result.append(", icon: "); + result.append(icon); + result.append(", visible: "); + result.append(visible); + result.append(')'); + return result.toString(); + } + +} // MenuImpl diff --git a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/util/ElementCreationMenuModelAdapterFactory.java b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/util/ElementCreationMenuModelAdapterFactory.java new file mode 100644 index 00000000000..a1631710f05 --- /dev/null +++ b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/util/ElementCreationMenuModelAdapterFactory.java @@ -0,0 +1,181 @@ +/** + * Copyright (c) 2013 CEA LIST. + * + * 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: + * CEA LIST - Initial API and implementation + * + */ +package org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.util; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.*; + +/** + * <!-- 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.papyrus.infra.newchild.elementcreationmenumodel.ElementCreationMenuModelPackage + * @generated + */ +public class ElementCreationMenuModelAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static ElementCreationMenuModelPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ElementCreationMenuModelAdapterFactory() { + if (modelPackage == null) { + modelPackage = ElementCreationMenuModelPackage.eINSTANCE; + } + } + + /** + * 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 + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the <code>createXXX</code> methods. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ElementCreationMenuModelSwitch<Adapter> modelSwitch = + new ElementCreationMenuModelSwitch<Adapter>() { + @Override + public Adapter caseFolder(Folder object) { + return createFolderAdapter(); + } + @Override + public Adapter caseMenu(Menu object) { + return createMenuAdapter(); + } + @Override + public Adapter caseCreationMenu(CreationMenu object) { + return createCreationMenuAdapter(); + } + @Override + public Adapter caseCreateRelationshipMenu(CreateRelationshipMenu object) { + return createCreateRelationshipMenuAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * 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>. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.Folder <em>Folder</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.papyrus.infra.newchild.elementcreationmenumodel.Folder + * @generated + */ + public Adapter createFolderAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.Menu <em>Menu</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.papyrus.infra.newchild.elementcreationmenumodel.Menu + * @generated + */ + public Adapter createMenuAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.CreationMenu <em>Creation Menu</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.papyrus.infra.newchild.elementcreationmenumodel.CreationMenu + * @generated + */ + public Adapter createCreationMenuAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.CreateRelationshipMenu <em>Create Relationship Menu</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.papyrus.infra.newchild.elementcreationmenumodel.CreateRelationshipMenu + * @generated + */ + public Adapter createCreateRelationshipMenuAdapter() { + 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 + */ + public Adapter createEObjectAdapter() { + return null; + } + +} // ElementCreationMenuModelAdapterFactory diff --git a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/util/ElementCreationMenuModelResourceFactoryImpl.java b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/util/ElementCreationMenuModelResourceFactoryImpl.java new file mode 100644 index 00000000000..96a82ed16b7 --- /dev/null +++ b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/util/ElementCreationMenuModelResourceFactoryImpl.java @@ -0,0 +1,49 @@ +/** + * Copyright (c) 2013 CEA LIST. + * + * 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: + * CEA LIST - Initial API and implementation + * + */ +package org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.util; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl; + +/** + * <!-- begin-user-doc --> + * The <b>Resource Factory</b> associated with the package. + * <!-- end-user-doc --> + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.util.ElementCreationMenuModelResourceImpl + * @generated + */ +public class ElementCreationMenuModelResourceFactoryImpl extends ResourceFactoryImpl { + /** + * Creates an instance of the resource factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ElementCreationMenuModelResourceFactoryImpl() { + super(); + } + + /** + * Creates an instance of the resource. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Resource createResource(URI uri) { + Resource result = new ElementCreationMenuModelResourceImpl(uri); + return result; + } + +} // ElementCreationMenuModelResourceFactoryImpl diff --git a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/util/ElementCreationMenuModelResourceImpl.java b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/util/ElementCreationMenuModelResourceImpl.java new file mode 100644 index 00000000000..71fa2107a43 --- /dev/null +++ b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/util/ElementCreationMenuModelResourceImpl.java @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2013 CEA LIST. + * + * 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: + * CEA LIST - Initial API and implementation + * + */ +package org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.util; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl; + +/** + * <!-- begin-user-doc --> + * The <b>Resource </b> associated with the package. + * <!-- end-user-doc --> + * @see org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.util.ElementCreationMenuModelResourceFactoryImpl + * @generated + */ +public class ElementCreationMenuModelResourceImpl extends XMIResourceImpl { + /** + * Creates an instance of the resource. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param uri the URI of the new resource. + * @generated + */ + public ElementCreationMenuModelResourceImpl(URI uri) { + super(uri); + } + +} // ElementCreationMenuModelResourceImpl diff --git a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/util/ElementCreationMenuModelSwitch.java b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/util/ElementCreationMenuModelSwitch.java new file mode 100644 index 00000000000..0760ebe29a9 --- /dev/null +++ b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/util/ElementCreationMenuModelSwitch.java @@ -0,0 +1,184 @@ +/** + * Copyright (c) 2013 CEA LIST. + * + * 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: + * CEA LIST - Initial API and implementation + * + */ +package org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.util; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.util.Switch; +import org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.*; + +/** + * <!-- begin-user-doc --> + * The <b>Switch</b> for the model's inheritance hierarchy. + * It supports the call {@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.papyrus.infra.newchild.elementcreationmenumodel.ElementCreationMenuModelPackage + * @generated + */ +public class ElementCreationMenuModelSwitch<T> extends Switch<T> { + /** + * The cached model package + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static ElementCreationMenuModelPackage modelPackage; + + /** + * Creates an instance of the switch. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ElementCreationMenuModelSwitch() { + if (modelPackage == null) { + modelPackage = ElementCreationMenuModelPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * 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 + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case ElementCreationMenuModelPackage.FOLDER: { + Folder folder = (Folder)theEObject; + T result = caseFolder(folder); + if (result == null) result = caseMenu(folder); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ElementCreationMenuModelPackage.MENU: { + Menu menu = (Menu)theEObject; + T result = caseMenu(menu); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ElementCreationMenuModelPackage.CREATION_MENU: { + CreationMenu creationMenu = (CreationMenu)theEObject; + T result = caseCreationMenu(creationMenu); + if (result == null) result = caseMenu(creationMenu); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ElementCreationMenuModelPackage.CREATE_RELATIONSHIP_MENU: { + CreateRelationshipMenu createRelationshipMenu = (CreateRelationshipMenu)theEObject; + T result = caseCreateRelationshipMenu(createRelationshipMenu); + if (result == null) result = caseCreationMenu(createRelationshipMenu); + if (result == null) result = caseMenu(createRelationshipMenu); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Folder</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>Folder</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFolder(Folder object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Menu</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>Menu</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseMenu(Menu object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Creation Menu</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>Creation Menu</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCreationMenu(CreationMenu object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Create Relationship Menu</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>Create Relationship Menu</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCreateRelationshipMenu(CreateRelationshipMenu 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>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} // ElementCreationMenuModelSwitch diff --git a/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/util/ElementCreationMenuModelXMLProcessor.java b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/util/ElementCreationMenuModelXMLProcessor.java new file mode 100644 index 00000000000..5af50b5eb4d --- /dev/null +++ b/plugins/infra/newchild/org.eclipse.papyrus.infra.newchild/src-gen/org/eclipse/papyrus/infra/newchild/elementcreationmenumodel/util/ElementCreationMenuModelXMLProcessor.java @@ -0,0 +1,60 @@ +/** + * Copyright (c) 2013 CEA LIST. + * + * 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: + * CEA LIST - Initial API and implementation + * + */ +package org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.util; + +import java.util.Map; + +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.xmi.util.XMLProcessor; +import org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.ElementCreationMenuModelPackage; + +/** + * This class contains helper methods to serialize and deserialize XML documents + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ +public class ElementCreationMenuModelXMLProcessor extends XMLProcessor { + + /** + * Public constructor to instantiate the helper. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public ElementCreationMenuModelXMLProcessor() { + super((EPackage.Registry.INSTANCE)); + ElementCreationMenuModelPackage.eINSTANCE.eClass(); + } + + /** + * Register for "*" and "xml" file extensions the ElementCreationMenuModelResourceFactoryImpl factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + protected Map<String, Resource.Factory> getRegistrations() { + if (registrations == null) { + super.getRegistrations(); + registrations.put(XML_EXTENSION, new ElementCreationMenuModelResourceFactoryImpl()); + registrations.put(STAR_EXTENSION, new ElementCreationMenuModelResourceFactoryImpl()); + } + return registrations; + } + +} // ElementCreationMenuModelXMLProcessor |