diff options
author | Florian Pirchner | 2014-08-19 17:05:05 +0000 |
---|---|---|
committer | Florian Pirchner | 2014-08-19 17:05:05 +0000 |
commit | 148988d614a9799d21a54983ea575c68d63ddc37 (patch) | |
tree | 9767b8990c89a22be4f7349471ea65e700cf916b | |
parent | 0b4e02bda5786b7026910561a63cd319750293ac (diff) | |
download | org.eclipse.emf.ecp.other-uimodel.tar.gz org.eclipse.emf.ecp.other-uimodel.tar.xz org.eclipse.emf.ecp.other-uimodel.zip |
Added dialogs and did some refactoring for it.uimodel
26 files changed, 1962 insertions, 63 deletions
diff --git a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.editparts.emf/src/org/eclipse/emf/ecp/ecview/common/editpart/emf/DialogEditpart.java b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.editparts.emf/src/org/eclipse/emf/ecp/ecview/common/editpart/emf/DialogEditpart.java index a8dae4db..98a68731 100644 --- a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.editparts.emf/src/org/eclipse/emf/ecp/ecview/common/editpart/emf/DialogEditpart.java +++ b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.editparts.emf/src/org/eclipse/emf/ecp/ecview/common/editpart/emf/DialogEditpart.java @@ -14,6 +14,7 @@ import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecp.ecview.common.editpart.IDialogEditpart; import org.eclipse.emf.ecp.ecview.common.editpart.IEmbeddableEditpart; import org.eclipse.emf.ecp.ecview.common.editpart.IViewEditpart; +import org.eclipse.emf.ecp.ecview.common.editpart.binding.IBindableEndpointEditpart; import org.eclipse.emf.ecp.ecview.common.model.core.CoreModelFactory; import org.eclipse.emf.ecp.ecview.common.model.core.CoreModelPackage; import org.eclipse.emf.ecp.ecview.common.model.core.YDialog; @@ -72,6 +73,7 @@ public class DialogEditpart extends ElementEditpart<YDialog> implements public <A extends IDialogPresentation<?>> A getPresentation() { if (presentation == null) { presentation = createPresenter(); + presentation.setContent(getContent()); } return (A) presentation; } @@ -109,7 +111,7 @@ public class DialogEditpart extends ElementEditpart<YDialog> implements @Override public void requestRender() { if (getParent() != null) { - getParent().openDialog(this); + getParent().openDialog(this, null); } else { unrender(); } @@ -269,4 +271,10 @@ public class DialogEditpart extends ElementEditpart<YDialog> implements this.content = content; } + @Override + public void setInputDataBindingEndpoint( + IBindableEndpointEditpart bindingEndpoint) { + IDialogPresentation<?> presentation = getPresentation(); + presentation.setInputDataBindingEndpoint(bindingEndpoint); + } } diff --git a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.editparts.emf/src/org/eclipse/emf/ecp/ecview/common/editpart/emf/EditpartManager.java b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.editparts.emf/src/org/eclipse/emf/ecp/ecview/common/editpart/emf/EditpartManager.java index 5f6eb874..d0835095 100644 --- a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.editparts.emf/src/org/eclipse/emf/ecp/ecview/common/editpart/emf/EditpartManager.java +++ b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.editparts.emf/src/org/eclipse/emf/ecp/ecview/common/editpart/emf/EditpartManager.java @@ -27,6 +27,7 @@ import org.eclipse.emf.ecp.ecview.common.editpart.IEmbeddableSelectionEndpointEd import org.eclipse.emf.ecp.ecview.common.editpart.IEmbeddableValueBindingEndpointEditpart; import org.eclipse.emf.ecp.ecview.common.editpart.IFieldEditpart; import org.eclipse.emf.ecp.ecview.common.editpart.ILayoutEditpart; +import org.eclipse.emf.ecp.ecview.common.editpart.IOpenDialogCommandEditpart; import org.eclipse.emf.ecp.ecview.common.editpart.IViewEditpart; import org.eclipse.emf.ecp.ecview.common.editpart.IViewSetEditpart; import org.eclipse.emf.ecp.ecview.common.editpart.binding.IBeanValueBindingEndpointEditpart; @@ -77,6 +78,7 @@ import org.eclipse.emf.ecp.ecview.common.model.core.YEmbeddableSelectionEndpoint import org.eclipse.emf.ecp.ecview.common.model.core.YEmbeddableValueEndpoint; import org.eclipse.emf.ecp.ecview.common.model.core.YField; import org.eclipse.emf.ecp.ecview.common.model.core.YLayout; +import org.eclipse.emf.ecp.ecview.common.model.core.YOpenDialogCommand; import org.eclipse.emf.ecp.ecview.common.model.core.YView; import org.eclipse.emf.ecp.ecview.common.model.core.YViewSet; import org.eclipse.emf.ecp.ecview.common.model.validation.ValidationPackage; @@ -189,6 +191,9 @@ public class EditpartManager extends AbstractEditpartManager { result = createNewInstance(CommandSetEditpart.class); } else if (editPartClazz.isAssignableFrom(IDialogEditpart.class)) { result = createNewInstance(DialogEditpart.class); + } else if (editPartClazz + .isAssignableFrom(IOpenDialogCommandEditpart.class)) { + result = createNewInstance(OpenDialogCommandEditpart.class); } if (result != null) { @@ -265,6 +270,8 @@ public class EditpartManager extends AbstractEditpartManager { result = createNewInstance(CommandSetEditpart.class); } else if (yElement instanceof YDialog) { result = createNewInstance(DialogEditpart.class); + } else if (yElement instanceof YOpenDialogCommand) { + result = createNewInstance(OpenDialogCommandEditpart.class); } if (result != null) { diff --git a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.editparts.emf/src/org/eclipse/emf/ecp/ecview/common/editpart/emf/OpenDialogCommandEditpart.java b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.editparts.emf/src/org/eclipse/emf/ecp/ecview/common/editpart/emf/OpenDialogCommandEditpart.java new file mode 100644 index 00000000..de8f13c6 --- /dev/null +++ b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.editparts.emf/src/org/eclipse/emf/ecp/ecview/common/editpart/emf/OpenDialogCommandEditpart.java @@ -0,0 +1,96 @@ +/** + * Copyright (c) 2012 Lunifera GmbH (Austria) and others. + * 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: + * Florian Pirchner - initial API and implementation + */ +package org.eclipse.emf.ecp.ecview.common.editpart.emf; + +import org.eclipse.core.databinding.Binding; +import org.eclipse.core.databinding.UpdateValueStrategy; +import org.eclipse.core.databinding.beans.PojoObservables; +import org.eclipse.core.databinding.observable.value.IObservableValue; +import org.eclipse.emf.ecp.ecview.common.binding.IECViewBindingManager; +import org.eclipse.emf.ecp.ecview.common.editpart.IDialogEditpart; +import org.eclipse.emf.ecp.ecview.common.editpart.IOpenDialogCommandEditpart; +import org.eclipse.emf.ecp.ecview.common.editpart.binding.IBindableEndpointEditpart; +import org.eclipse.emf.ecp.ecview.common.editpart.binding.IBindableValueEndpointEditpart; +import org.eclipse.emf.ecp.ecview.common.model.core.CoreModelFactory; +import org.eclipse.emf.ecp.ecview.common.model.core.YOpenDialogCommand; + +/** + * The implementation of the IOpenDialogCommandEditpart. + */ +public class OpenDialogCommandEditpart extends + CommandEditpart<YOpenDialogCommand> implements + IOpenDialogCommandEditpart { + + private Binding binding; + private boolean activated; + + @Override + protected YOpenDialogCommand createModel() { + return (YOpenDialogCommand) CoreModelFactory.eINSTANCE + .createYOpenDialogCommand(); + } + + @Override + public void activate() { + // bind the values + IECViewBindingManager bindingManager = getView().getContext() + .getService(IECViewBindingManager.class.getName()); + + // Bind the trigger + IBindableValueEndpointEditpart modelValueEditpart = (IBindableValueEndpointEditpart) getEditpart(getModel() + .createTriggerDialogEndpoint()); + IObservableValue modelObservable = modelValueEditpart.getObservable(); + IObservableValue targetObservable = PojoObservables.observeValue(this, + "trigger"); + binding = bindingManager.bindValue(targetObservable, modelObservable, + new UpdateValueStrategy(UpdateValueStrategy.POLICY_NEVER), + new UpdateValueStrategy(UpdateValueStrategy.POLICY_UPDATE)); + activated = true; + } + + /** + * Setting a value will trigger the command execution. + * + * @param value + */ + public void setTrigger(Object value) { + // execute the command + if (activated && value != null) { + execute(); + } + } + + /** + * {@inheritDoc} + */ + @Override + protected void internalDispose() { + try { + if (binding != null) { + binding.dispose(); + binding = null; + } + } finally { + super.internalDispose(); + } + } + + @Override + public void execute() { + checkDisposed(); + + YOpenDialogCommand model = getModel(); + IDialogEditpart dialogEditpart = getEditpart(model.getDialog()); + IBindableEndpointEditpart bindableEndpoint = getEditpart(model + .createTriggerDialogEndpoint()); + getView().openDialog(dialogEditpart, bindableEndpoint); + } +} diff --git a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.editparts.emf/src/org/eclipse/emf/ecp/ecview/common/editpart/emf/ViewEditpart.java b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.editparts.emf/src/org/eclipse/emf/ecp/ecview/common/editpart/emf/ViewEditpart.java index a4a6d16a..6b332379 100644 --- a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.editparts.emf/src/org/eclipse/emf/ecp/ecview/common/editpart/emf/ViewEditpart.java +++ b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.editparts.emf/src/org/eclipse/emf/ecp/ecview/common/editpart/emf/ViewEditpart.java @@ -29,6 +29,7 @@ import org.eclipse.emf.ecp.ecview.common.editpart.IElementEditpart; import org.eclipse.emf.ecp.ecview.common.editpart.IEmbeddableEditpart; import org.eclipse.emf.ecp.ecview.common.editpart.IViewEditpart; import org.eclipse.emf.ecp.ecview.common.editpart.IViewSetEditpart; +import org.eclipse.emf.ecp.ecview.common.editpart.binding.IBindableEndpointEditpart; import org.eclipse.emf.ecp.ecview.common.editpart.binding.IBindingEditpart; import org.eclipse.emf.ecp.ecview.common.editpart.binding.IBindingSetEditpart; import org.eclipse.emf.ecp.ecview.common.model.binding.YBindingSet; @@ -723,8 +724,8 @@ public class ViewEditpart<M extends YView> extends ElementEditpart<M> implements } @Override - public void openDialog(IDialogEditpart dialogEditpart) { - if (dialogEditpart != null) { + public void openDialog(IDialogEditpart dialogEditpart, IBindableEndpointEditpart inputData) { + if (dialogEditpart == null) { return; } @@ -733,12 +734,12 @@ public class ViewEditpart<M extends YView> extends ElementEditpart<M> implements } openDialogs.add(dialogEditpart); - getPresentation().openDialog(dialogEditpart); + getPresentation().openDialog(dialogEditpart, inputData); } @Override public void closeDialog(IDialogEditpart dialogEditpart) { - if (dialogEditpart != null) { + if (dialogEditpart == null) { return; } diff --git a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/model/core.ecore b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/model/core.ecore index 0090cf55..8c9b6290 100644 --- a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/model/core.ecore +++ b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/model/core.ecore @@ -36,6 +36,8 @@ eType="#//YBeanSlot" containment="true"/> <eStructuralFeatures xsi:type="ecore:EReference" name="commandSet" eType="#//YCommandSet" containment="true"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="dialogs" upperBound="-1" + eType="#//YDialog" containment="true"/> </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="YViewSet" eSuperTypes="#//YElement"> <eStructuralFeatures xsi:type="ecore:EReference" name="views" upperBound="-1" @@ -61,13 +63,23 @@ <eStructuralFeatures xsi:type="ecore:EReference" name="orphanDatadescriptions" upperBound="-1" eType="ecore:EClass datatypes.ecore#//YDatadescription" containment="true"/> </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="YDialog" eSuperTypes="#//YElement #//YValueBindable"> + <eClassifiers xsi:type="ecore:EClass" name="YDialog" eSuperTypes="#//YElement #//YValueBindable #//YCssAble"> <eStructuralFeatures xsi:type="ecore:EReference" name="content" eType="#//YEmbeddable" containment="true"/> <eStructuralFeatures xsi:type="ecore:EAttribute" name="modal" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/> <eStructuralFeatures xsi:type="ecore:EAttribute" name="resizeable" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/> <eStructuralFeatures xsi:type="ecore:EAttribute" name="draggable" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/> <eStructuralFeatures xsi:type="ecore:EAttribute" name="closable" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="type"> + <eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaClass"> + <eTypeArguments/> + </eGenericType> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="emfNsURI" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="typeQualifiedName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="datadescription" eType="ecore:EClass datatypes.ecore#//YDatadescription" + containment="true"/> </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="YCssAble" abstract="true" interface="true"> <eStructuralFeatures xsi:type="ecore:EAttribute" name="cssClass" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> @@ -217,4 +229,10 @@ <eStructuralFeatures xsi:type="ecore:EReference" name="commands" upperBound="-1" eType="#//YCommand" containment="true"/> </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="YOpenDialogCommand" eSuperTypes="#//YCommand"> + <eOperations name="getView" eType="#//YView"/> + <eOperations name="createTriggerDialogEndpoint" eType="ecore:EClass binding.ecore#//YECViewModelValueBindingEndpoint"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="dialog" eType="#//YDialog"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="trigger" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/> + </eClassifiers> </ecore:EPackage> diff --git a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/CoreModelFactory.java b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/CoreModelFactory.java index cc962a5b..a0869b87 100644 --- a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/CoreModelFactory.java +++ b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/CoreModelFactory.java @@ -183,6 +183,15 @@ public interface CoreModelFactory extends EFactory { YCommandSet createYCommandSet(); /** + * Returns a new object of class '<em>YOpen Dialog Command</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>YOpen Dialog Command</em>'. + * @generated + */ + YOpenDialogCommand createYOpenDialogCommand(); + + /** * Returns the package supported by this factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> diff --git a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/CoreModelPackage.java b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/CoreModelPackage.java index 2ec82d09..2904fb18 100644 --- a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/CoreModelPackage.java +++ b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/CoreModelPackage.java @@ -586,13 +586,22 @@ public interface CoreModelPackage extends EPackage { int YVIEW__COMMAND_SET = YELEMENT_FEATURE_COUNT + 9; /** + * The feature id for the '<em><b>Dialogs</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int YVIEW__DIALOGS = YELEMENT_FEATURE_COUNT + 10; + + /** * The number of structural features of the '<em>YView</em>' class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int YVIEW_FEATURE_COUNT = YELEMENT_FEATURE_COUNT + 10; + int YVIEW_FEATURE_COUNT = YELEMENT_FEATURE_COUNT + 11; /** * The meta object id for the '{@link org.eclipse.emf.ecp.ecview.common.model.core.impl.YViewSetImpl <em>YView Set</em>}' class. @@ -852,13 +861,31 @@ public interface CoreModelPackage extends EPackage { int YDIALOG__VALUE_BINDING_ENDPOINT = YELEMENT_FEATURE_COUNT + 0; /** + * The feature id for the '<em><b>Css Class</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int YDIALOG__CSS_CLASS = YELEMENT_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Css ID</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int YDIALOG__CSS_ID = YELEMENT_FEATURE_COUNT + 2; + + /** * The feature id for the '<em><b>Content</b></em>' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int YDIALOG__CONTENT = YELEMENT_FEATURE_COUNT + 1; + int YDIALOG__CONTENT = YELEMENT_FEATURE_COUNT + 3; /** * The feature id for the '<em><b>Modal</b></em>' attribute. @@ -867,7 +894,7 @@ public interface CoreModelPackage extends EPackage { * @generated * @ordered */ - int YDIALOG__MODAL = YELEMENT_FEATURE_COUNT + 2; + int YDIALOG__MODAL = YELEMENT_FEATURE_COUNT + 4; /** * The feature id for the '<em><b>Resizeable</b></em>' attribute. @@ -876,7 +903,7 @@ public interface CoreModelPackage extends EPackage { * @generated * @ordered */ - int YDIALOG__RESIZEABLE = YELEMENT_FEATURE_COUNT + 3; + int YDIALOG__RESIZEABLE = YELEMENT_FEATURE_COUNT + 5; /** * The feature id for the '<em><b>Draggable</b></em>' attribute. @@ -885,7 +912,7 @@ public interface CoreModelPackage extends EPackage { * @generated * @ordered */ - int YDIALOG__DRAGGABLE = YELEMENT_FEATURE_COUNT + 4; + int YDIALOG__DRAGGABLE = YELEMENT_FEATURE_COUNT + 6; /** * The feature id for the '<em><b>Closable</b></em>' attribute. @@ -894,7 +921,52 @@ public interface CoreModelPackage extends EPackage { * @generated * @ordered */ - int YDIALOG__CLOSABLE = YELEMENT_FEATURE_COUNT + 5; + int YDIALOG__CLOSABLE = YELEMENT_FEATURE_COUNT + 7; + + /** + * The feature id for the '<em><b>Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int YDIALOG__VALUE = YELEMENT_FEATURE_COUNT + 8; + + /** + * The feature id for the '<em><b>Type</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int YDIALOG__TYPE = YELEMENT_FEATURE_COUNT + 9; + + /** + * The feature id for the '<em><b>Emf Ns URI</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int YDIALOG__EMF_NS_URI = YELEMENT_FEATURE_COUNT + 10; + + /** + * The feature id for the '<em><b>Type Qualified Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int YDIALOG__TYPE_QUALIFIED_NAME = YELEMENT_FEATURE_COUNT + 11; + + /** + * The feature id for the '<em><b>Datadescription</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int YDIALOG__DATADESCRIPTION = YELEMENT_FEATURE_COUNT + 12; /** * The number of structural features of the '<em>YDialog</em>' class. @@ -903,7 +975,7 @@ public interface CoreModelPackage extends EPackage { * @generated * @ordered */ - int YDIALOG_FEATURE_COUNT = YELEMENT_FEATURE_COUNT + 6; + int YDIALOG_FEATURE_COUNT = YELEMENT_FEATURE_COUNT + 13; /** * The feature id for the '<em><b>Css Class</b></em>' attribute. @@ -1949,6 +2021,61 @@ public interface CoreModelPackage extends EPackage { int YCOMMAND_SET_FEATURE_COUNT = YELEMENT_FEATURE_COUNT + 1; /** + * The meta object id for the '{@link org.eclipse.emf.ecp.ecview.common.model.core.impl.YOpenDialogCommandImpl <em>YOpen Dialog Command</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.emf.ecp.ecview.common.model.core.impl.YOpenDialogCommandImpl + * @see org.eclipse.emf.ecp.ecview.common.model.core.impl.CoreModelPackageImpl#getYOpenDialogCommand() + * @generated + */ + int YOPEN_DIALOG_COMMAND = 36; + + /** + * The feature id for the '<em><b>Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int YOPEN_DIALOG_COMMAND__ID = YCOMMAND__ID; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int YOPEN_DIALOG_COMMAND__NAME = YCOMMAND__NAME; + + /** + * The feature id for the '<em><b>Dialog</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int YOPEN_DIALOG_COMMAND__DIALOG = YCOMMAND_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Trigger</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int YOPEN_DIALOG_COMMAND__TRIGGER = YCOMMAND_FEATURE_COUNT + 1; + + /** + * The number of structural features of the '<em>YOpen Dialog Command</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int YOPEN_DIALOG_COMMAND_FEATURE_COUNT = YCOMMAND_FEATURE_COUNT + 2; + + /** * The meta object id for the '{@link org.eclipse.emf.ecp.ecview.common.model.core.YUnit <em>YUnit</em>}' enum. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -1956,7 +2083,7 @@ public interface CoreModelPackage extends EPackage { * @see org.eclipse.emf.ecp.ecview.common.model.core.impl.CoreModelPackageImpl#getYUnit() * @generated */ - int YUNIT = 36; + int YUNIT = 37; /** * The meta object id for the '<em>YURI</em>' data type. @@ -1966,7 +2093,7 @@ public interface CoreModelPackage extends EPackage { * @see org.eclipse.emf.ecp.ecview.common.model.core.impl.CoreModelPackageImpl#getYURI() * @generated */ - int YURI = 37; + int YURI = 38; /** @@ -1977,7 +2104,7 @@ public interface CoreModelPackage extends EPackage { * @see org.eclipse.emf.ecp.ecview.common.model.core.impl.CoreModelPackageImpl#getYValueChangeListener() * @generated */ - int YVALUE_CHANGE_LISTENER = 38; + int YVALUE_CHANGE_LISTENER = 39; /** @@ -2142,6 +2269,17 @@ public interface CoreModelPackage extends EPackage { EReference getYView_CommandSet(); /** + * Returns the meta object for the containment reference list '{@link org.eclipse.emf.ecp.ecview.common.model.core.YView#getDialogs <em>Dialogs</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Dialogs</em>'. + * @see org.eclipse.emf.ecp.ecview.common.model.core.YView#getDialogs() + * @see #getYView() + * @generated + */ + EReference getYView_Dialogs(); + + /** * Returns the meta object for class '{@link org.eclipse.emf.ecp.ecview.common.model.core.YViewSet <em>YView Set</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -2314,6 +2452,61 @@ public interface CoreModelPackage extends EPackage { EAttribute getYDialog_Closable(); /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.ecp.ecview.common.model.core.YDialog#getValue <em>Value</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Value</em>'. + * @see org.eclipse.emf.ecp.ecview.common.model.core.YDialog#getValue() + * @see #getYDialog() + * @generated + */ + EAttribute getYDialog_Value(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.ecp.ecview.common.model.core.YDialog#getType <em>Type</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Type</em>'. + * @see org.eclipse.emf.ecp.ecview.common.model.core.YDialog#getType() + * @see #getYDialog() + * @generated + */ + EAttribute getYDialog_Type(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.ecp.ecview.common.model.core.YDialog#getEmfNsURI <em>Emf Ns URI</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Emf Ns URI</em>'. + * @see org.eclipse.emf.ecp.ecview.common.model.core.YDialog#getEmfNsURI() + * @see #getYDialog() + * @generated + */ + EAttribute getYDialog_EmfNsURI(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.ecp.ecview.common.model.core.YDialog#getTypeQualifiedName <em>Type Qualified Name</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Type Qualified Name</em>'. + * @see org.eclipse.emf.ecp.ecview.common.model.core.YDialog#getTypeQualifiedName() + * @see #getYDialog() + * @generated + */ + EAttribute getYDialog_TypeQualifiedName(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.emf.ecp.ecview.common.model.core.YDialog#getDatadescription <em>Datadescription</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference '<em>Datadescription</em>'. + * @see org.eclipse.emf.ecp.ecview.common.model.core.YDialog#getDatadescription() + * @see #getYDialog() + * @generated + */ + EReference getYDialog_Datadescription(); + + /** * Returns the meta object for class '{@link org.eclipse.emf.ecp.ecview.common.model.core.YCssAble <em>YCss Able</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -2979,6 +3172,38 @@ public interface CoreModelPackage extends EPackage { EReference getYCommandSet_Commands(); /** + * Returns the meta object for class '{@link org.eclipse.emf.ecp.ecview.common.model.core.YOpenDialogCommand <em>YOpen Dialog Command</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>YOpen Dialog Command</em>'. + * @see org.eclipse.emf.ecp.ecview.common.model.core.YOpenDialogCommand + * @generated + */ + EClass getYOpenDialogCommand(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.emf.ecp.ecview.common.model.core.YOpenDialogCommand#getDialog <em>Dialog</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference '<em>Dialog</em>'. + * @see org.eclipse.emf.ecp.ecview.common.model.core.YOpenDialogCommand#getDialog() + * @see #getYOpenDialogCommand() + * @generated + */ + EReference getYOpenDialogCommand_Dialog(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.ecp.ecview.common.model.core.YOpenDialogCommand#getTrigger <em>Trigger</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Trigger</em>'. + * @see org.eclipse.emf.ecp.ecview.common.model.core.YOpenDialogCommand#getTrigger() + * @see #getYOpenDialogCommand() + * @generated + */ + EAttribute getYOpenDialogCommand_Trigger(); + + /** * Returns the meta object for enum '{@link org.eclipse.emf.ecp.ecview.common.model.core.YUnit <em>YUnit</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -3161,6 +3386,14 @@ public interface CoreModelPackage extends EPackage { EReference YVIEW__COMMAND_SET = eINSTANCE.getYView_CommandSet(); /** + * The meta object literal for the '<em><b>Dialogs</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference YVIEW__DIALOGS = eINSTANCE.getYView_Dialogs(); + + /** * The meta object literal for the '{@link org.eclipse.emf.ecp.ecview.common.model.core.impl.YViewSetImpl <em>YView Set</em>}' class. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -3297,6 +3530,46 @@ public interface CoreModelPackage extends EPackage { EAttribute YDIALOG__CLOSABLE = eINSTANCE.getYDialog_Closable(); /** + * The meta object literal for the '<em><b>Value</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute YDIALOG__VALUE = eINSTANCE.getYDialog_Value(); + + /** + * The meta object literal for the '<em><b>Type</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute YDIALOG__TYPE = eINSTANCE.getYDialog_Type(); + + /** + * The meta object literal for the '<em><b>Emf Ns URI</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute YDIALOG__EMF_NS_URI = eINSTANCE.getYDialog_EmfNsURI(); + + /** + * The meta object literal for the '<em><b>Type Qualified Name</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute YDIALOG__TYPE_QUALIFIED_NAME = eINSTANCE.getYDialog_TypeQualifiedName(); + + /** + * The meta object literal for the '<em><b>Datadescription</b></em>' containment reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference YDIALOG__DATADESCRIPTION = eINSTANCE.getYDialog_Datadescription(); + + /** * The meta object literal for the '{@link org.eclipse.emf.ecp.ecview.common.model.core.YCssAble <em>YCss Able</em>}' class. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -3857,6 +4130,32 @@ public interface CoreModelPackage extends EPackage { EReference YCOMMAND_SET__COMMANDS = eINSTANCE.getYCommandSet_Commands(); /** + * The meta object literal for the '{@link org.eclipse.emf.ecp.ecview.common.model.core.impl.YOpenDialogCommandImpl <em>YOpen Dialog Command</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.emf.ecp.ecview.common.model.core.impl.YOpenDialogCommandImpl + * @see org.eclipse.emf.ecp.ecview.common.model.core.impl.CoreModelPackageImpl#getYOpenDialogCommand() + * @generated + */ + EClass YOPEN_DIALOG_COMMAND = eINSTANCE.getYOpenDialogCommand(); + + /** + * The meta object literal for the '<em><b>Dialog</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference YOPEN_DIALOG_COMMAND__DIALOG = eINSTANCE.getYOpenDialogCommand_Dialog(); + + /** + * The meta object literal for the '<em><b>Trigger</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute YOPEN_DIALOG_COMMAND__TRIGGER = eINSTANCE.getYOpenDialogCommand_Trigger(); + + /** * The meta object literal for the '{@link org.eclipse.emf.ecp.ecview.common.model.core.YUnit <em>YUnit</em>}' enum. * <!-- begin-user-doc --> * <!-- end-user-doc --> diff --git a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/YDialog.java b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/YDialog.java index 21c27c9a..07f43245 100644 --- a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/YDialog.java +++ b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/YDialog.java @@ -2,6 +2,8 @@ */ package org.eclipse.emf.ecp.ecview.common.model.core; +import org.eclipse.emf.ecp.ecview.common.model.datatypes.YDatadescription; + /** * <!-- begin-user-doc --> A representation of the model object ' * <em><b>YDialog</b></em>'. <!-- end-user-doc --> @@ -9,11 +11,28 @@ package org.eclipse.emf.ecp.ecview.common.model.core; * <p> * The following features are supported: * <ul> - * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.YDialog#getContent <em>Content</em>}</li> - * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.YDialog#isModal <em>Modal</em>}</li> - * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.YDialog#isResizeable <em>Resizeable</em>}</li> - * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.YDialog#isDraggable <em>Draggable</em>}</li> - * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.YDialog#isClosable <em>Closable</em>}</li> + * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.YDialog#getContent + * <em>Content</em>}</li> + * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.YDialog#isModal <em> + * Modal</em>}</li> + * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.YDialog#isResizeable + * <em>Resizeable</em>}</li> + * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.YDialog#isDraggable + * <em>Draggable</em>}</li> + * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.YDialog#isClosable + * <em>Closable</em>}</li> + * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.YDialog#getValue <em> + * Value</em>}</li> + * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.YDialog#getType <em> + * Type</em>}</li> + * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.YDialog#getEmfNsURI + * <em>Emf Ns URI</em>}</li> + * <li> + * {@link org.eclipse.emf.ecp.ecview.common.model.core.YDialog#getTypeQualifiedName + * <em>Type Qualified Name</em>}</li> + * <li> + * {@link org.eclipse.emf.ecp.ecview.common.model.core.YDialog#getDatadescription + * <em>Datadescription</em>}</li> * </ul> * </p> * @@ -21,16 +40,17 @@ package org.eclipse.emf.ecp.ecview.common.model.core; * @model * @generated */ -public interface YDialog extends YElement, YValueBindable { +public interface YDialog extends YElement, YValueBindable, YCssAble { /** * Returns the value of the '<em><b>Content</b></em>' containment reference. * <!-- begin-user-doc --> * <p> - * If the meaning of the '<em>Content</em>' containment reference isn't clear, - * there really should be more of a description here... + * If the meaning of the '<em>Content</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>Content</em>' containment reference. * @see #setContent(YEmbeddable) * @see org.eclipse.emf.ecp.ecview.common.model.core.CoreModelPackage#getYDialog_Content() @@ -40,23 +60,27 @@ public interface YDialog extends YElement, YValueBindable { YEmbeddable getContent(); /** - * Sets the value of the '{@link org.eclipse.emf.ecp.ecview.common.model.core.YDialog#getContent <em>Content</em>}' containment reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Content</em>' containment reference. + * Sets the value of the ' + * {@link org.eclipse.emf.ecp.ecview.common.model.core.YDialog#getContent + * <em>Content</em>}' containment reference. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @param value + * the new value of the '<em>Content</em>' containment reference. * @see #getContent() * @generated */ void setContent(YEmbeddable value); /** - * Returns the value of the '<em><b>Modal</b></em>' attribute. - * <!-- begin-user-doc --> + * Returns the value of the '<em><b>Modal</b></em>' attribute. <!-- + * begin-user-doc --> * <p> - * If the meaning of the '<em>Modal</em>' attribute isn't clear, - * there really should be more of a description here... + * If the meaning of the '<em>Modal</em>' attribute isn't clear, there + * really should be more of a description here... * </p> * <!-- end-user-doc --> + * * @return the value of the '<em>Modal</em>' attribute. * @see #setModal(boolean) * @see org.eclipse.emf.ecp.ecview.common.model.core.CoreModelPackage#getYDialog_Modal() @@ -66,23 +90,26 @@ public interface YDialog extends YElement, YValueBindable { boolean isModal(); /** - * Sets the value of the '{@link org.eclipse.emf.ecp.ecview.common.model.core.YDialog#isModal <em>Modal</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Modal</em>' attribute. + * Sets the value of the ' + * {@link org.eclipse.emf.ecp.ecview.common.model.core.YDialog#isModal + * <em>Modal</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Modal</em>' attribute. * @see #isModal() * @generated */ void setModal(boolean value); /** - * Returns the value of the '<em><b>Resizeable</b></em>' attribute. - * <!-- begin-user-doc --> + * Returns the value of the '<em><b>Resizeable</b></em>' attribute. <!-- + * begin-user-doc --> * <p> - * If the meaning of the '<em>Resizeable</em>' attribute isn't clear, - * there really should be more of a description here... + * If the meaning of the '<em>Resizeable</em>' attribute isn't clear, there + * really should be more of a description here... * </p> * <!-- end-user-doc --> + * * @return the value of the '<em>Resizeable</em>' attribute. * @see #setResizeable(boolean) * @see org.eclipse.emf.ecp.ecview.common.model.core.CoreModelPackage#getYDialog_Resizeable() @@ -92,23 +119,27 @@ public interface YDialog extends YElement, YValueBindable { boolean isResizeable(); /** - * Sets the value of the '{@link org.eclipse.emf.ecp.ecview.common.model.core.YDialog#isResizeable <em>Resizeable</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Resizeable</em>' attribute. + * Sets the value of the ' + * {@link org.eclipse.emf.ecp.ecview.common.model.core.YDialog#isResizeable + * <em>Resizeable</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @param value + * the new value of the '<em>Resizeable</em>' attribute. * @see #isResizeable() * @generated */ void setResizeable(boolean value); /** - * Returns the value of the '<em><b>Draggable</b></em>' attribute. - * <!-- begin-user-doc --> + * Returns the value of the '<em><b>Draggable</b></em>' attribute. <!-- + * begin-user-doc --> * <p> - * If the meaning of the '<em>Draggable</em>' attribute isn't clear, - * there really should be more of a description here... + * If the meaning of the '<em>Draggable</em>' attribute isn't clear, there + * really should be more of a description here... * </p> * <!-- end-user-doc --> + * * @return the value of the '<em>Draggable</em>' attribute. * @see #setDraggable(boolean) * @see org.eclipse.emf.ecp.ecview.common.model.core.CoreModelPackage#getYDialog_Draggable() @@ -118,23 +149,27 @@ public interface YDialog extends YElement, YValueBindable { boolean isDraggable(); /** - * Sets the value of the '{@link org.eclipse.emf.ecp.ecview.common.model.core.YDialog#isDraggable <em>Draggable</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Draggable</em>' attribute. + * Sets the value of the ' + * {@link org.eclipse.emf.ecp.ecview.common.model.core.YDialog#isDraggable + * <em>Draggable</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @param value + * the new value of the '<em>Draggable</em>' attribute. * @see #isDraggable() * @generated */ void setDraggable(boolean value); /** - * Returns the value of the '<em><b>Closable</b></em>' attribute. - * <!-- begin-user-doc --> + * Returns the value of the '<em><b>Closable</b></em>' attribute. <!-- + * begin-user-doc --> * <p> - * If the meaning of the '<em>Closable</em>' attribute isn't clear, - * there really should be more of a description here... + * If the meaning of the '<em>Closable</em>' attribute isn't clear, there + * really should be more of a description here... * </p> * <!-- end-user-doc --> + * * @return the value of the '<em>Closable</em>' attribute. * @see #setClosable(boolean) * @see org.eclipse.emf.ecp.ecview.common.model.core.CoreModelPackage#getYDialog_Closable() @@ -144,20 +179,187 @@ public interface YDialog extends YElement, YValueBindable { boolean isClosable(); /** - * Sets the value of the '{@link org.eclipse.emf.ecp.ecview.common.model.core.YDialog#isClosable <em>Closable</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Closable</em>' attribute. + * Sets the value of the ' + * {@link org.eclipse.emf.ecp.ecview.common.model.core.YDialog#isClosable + * <em>Closable</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @param value + * the new value of the '<em>Closable</em>' attribute. * @see #isClosable() * @generated */ void setClosable(boolean value); /** + * Returns the value of the '<em><b>Value</b></em>' attribute. <!-- + * begin-user-doc --> + * <p> + * If the meaning of the '<em>Value</em>' attribute isn't clear, there + * really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Value</em>' attribute. + * @see #setValue(Object) + * @see org.eclipse.emf.ecp.ecview.common.model.core.CoreModelPackage#getYDialog_Value() + * @model + * @generated + */ + Object getValue(); + + /** + * Sets the value of the ' + * {@link org.eclipse.emf.ecp.ecview.common.model.core.YDialog#getValue + * <em>Value</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Value</em>' attribute. + * @see #getValue() + * @generated + */ + void setValue(Object value); + + /** + * Returns the value of the '<em><b>Type</b></em>' attribute. <!-- + * begin-user-doc --> + * <p> + * If the meaning of the '<em>Type</em>' attribute isn't clear, there really + * should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Type</em>' attribute. + * @see #setType(Class) + * @see org.eclipse.emf.ecp.ecview.common.model.core.CoreModelPackage#getYDialog_Type() + * @model + * @generated + */ + Class<?> getType(); + + /** + * Sets the value of the ' + * {@link org.eclipse.emf.ecp.ecview.common.model.core.YDialog#getType + * <em>Type</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Type</em>' attribute. + * @see #getType() + * @generated + */ + void setType(Class<?> value); + + /** + * Returns the value of the '<em><b>Emf Ns URI</b></em>' attribute. <!-- + * begin-user-doc --> + * <p> + * If the meaning of the '<em>Emf Ns URI</em>' attribute isn't clear, there + * really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Emf Ns URI</em>' attribute. + * @see #setEmfNsURI(String) + * @see org.eclipse.emf.ecp.ecview.common.model.core.CoreModelPackage#getYDialog_EmfNsURI() + * @model + * @generated + */ + String getEmfNsURI(); + + /** + * Sets the value of the ' + * {@link org.eclipse.emf.ecp.ecview.common.model.core.YDialog#getEmfNsURI + * <em>Emf Ns URI</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @param value + * the new value of the '<em>Emf Ns URI</em>' attribute. + * @see #getEmfNsURI() + * @generated + */ + void setEmfNsURI(String value); + + /** + * Returns the value of the '<em><b>Type Qualified Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Type Qualified Name</em>' attribute isn't + * clear, there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Type Qualified Name</em>' attribute. + * @see #setTypeQualifiedName(String) + * @see org.eclipse.emf.ecp.ecview.common.model.core.CoreModelPackage#getYDialog_TypeQualifiedName() + * @model + * @generated + */ + String getTypeQualifiedName(); + + /** + * Sets the value of the ' + * {@link org.eclipse.emf.ecp.ecview.common.model.core.YDialog#getTypeQualifiedName + * <em>Type Qualified Name</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @param value + * the new value of the '<em>Type Qualified Name</em>' attribute. + * @see #getTypeQualifiedName() + * @generated + */ + void setTypeQualifiedName(String value); + + /** + * Returns the value of the '<em><b>Datadescription</b></em>' containment + * reference. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Datadescription</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>Datadescription</em>' containment + * reference. + * @see #setDatadescription(YDatadescription) + * @see org.eclipse.emf.ecp.ecview.common.model.core.CoreModelPackage#getYDialog_Datadescription() + * @model containment="true" resolveProxies="true" + * @generated + */ + YDatadescription getDatadescription(); + + /** + * Sets the value of the ' + * {@link org.eclipse.emf.ecp.ecview.common.model.core.YDialog#getDatadescription + * <em>Datadescription</em>}' containment reference. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Datadescription</em>' containment + * reference. + * @see #getDatadescription() + * @generated + */ + void setDatadescription(YDatadescription value); + + /** * Returns the view this dialog is registered at. * * @return */ YView getView(); + /** + * Sets the label by creating a new datadescription. + * + * @param label + */ + public void setLabel(String label); + + /** + * Sets the label i18nKey by creating a new datadescription. + * + * @param label + */ + public void setLabelI18nKey(String i18nKey); + } // YDialog diff --git a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/YOpenDialogCommand.java b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/YOpenDialogCommand.java new file mode 100644 index 00000000..faeedb79 --- /dev/null +++ b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/YOpenDialogCommand.java @@ -0,0 +1,94 @@ +/** + */ +package org.eclipse.emf.ecp.ecview.common.model.core; + +import org.eclipse.emf.ecp.ecview.common.model.binding.YECViewModelValueBindingEndpoint; + + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>YOpen Dialog Command</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.YOpenDialogCommand#getDialog <em>Dialog</em>}</li> + * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.YOpenDialogCommand#getTrigger <em>Trigger</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.emf.ecp.ecview.common.model.core.CoreModelPackage#getYOpenDialogCommand() + * @model + * @generated + */ +public interface YOpenDialogCommand extends YCommand { + /** + * Returns the value of the '<em><b>Dialog</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Dialog</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Dialog</em>' reference. + * @see #setDialog(YDialog) + * @see org.eclipse.emf.ecp.ecview.common.model.core.CoreModelPackage#getYOpenDialogCommand_Dialog() + * @model + * @generated + */ + YDialog getDialog(); + + /** + * Sets the value of the '{@link org.eclipse.emf.ecp.ecview.common.model.core.YOpenDialogCommand#getDialog <em>Dialog</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Dialog</em>' reference. + * @see #getDialog() + * @generated + */ + void setDialog(YDialog value); + + /** + * Returns the value of the '<em><b>Trigger</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Trigger</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Trigger</em>' attribute. + * @see #setTrigger(Object) + * @see org.eclipse.emf.ecp.ecview.common.model.core.CoreModelPackage#getYOpenDialogCommand_Trigger() + * @model + * @generated + */ + Object getTrigger(); + + /** + * Sets the value of the '{@link org.eclipse.emf.ecp.ecview.common.model.core.YOpenDialogCommand#getTrigger <em>Trigger</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Trigger</em>' attribute. + * @see #getTrigger() + * @generated + */ + void setTrigger(Object value); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @model kind="operation" + * @generated + */ + YView getView(); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @model + * @generated + */ + YECViewModelValueBindingEndpoint createTriggerDialogEndpoint(); + +} // YOpenDialogCommand diff --git a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/YView.java b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/YView.java index 411cb931..30b621dc 100644 --- a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/YView.java +++ b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/YView.java @@ -26,6 +26,7 @@ import org.eclipse.emf.ecp.ecview.common.model.binding.YBindingSet; * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.YView#getBindingSet <em>Binding Set</em>}</li> * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.YView#getBeanSlots <em>Bean Slots</em>}</li> * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.YView#getCommandSet <em>Command Set</em>}</li> + * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.YView#getDialogs <em>Dialogs</em>}</li> * </ul> * </p> * @@ -163,6 +164,22 @@ public interface YView extends YElement, YCssAble, YMarginable, void setCommandSet(YCommandSet value); /** + * Returns the value of the '<em><b>Dialogs</b></em>' containment reference list. + * The list contents are of type {@link org.eclipse.emf.ecp.ecview.common.model.core.YDialog}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Dialogs</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>Dialogs</em>' containment reference list. + * @see org.eclipse.emf.ecp.ecview.common.model.core.CoreModelPackage#getYView_Dialogs() + * @model containment="true" resolveProxies="true" + * @generated + */ + EList<YDialog> getDialogs(); + + /** * <!-- begin-user-doc --> <!-- end-user-doc --> * @model kind="operation" * @generated diff --git a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/impl/CoreModelFactoryImpl.java b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/impl/CoreModelFactoryImpl.java index 872b81d7..2887b1ac 100644 --- a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/impl/CoreModelFactoryImpl.java +++ b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/impl/CoreModelFactoryImpl.java @@ -91,6 +91,7 @@ public class CoreModelFactoryImpl extends EFactoryImpl implements CoreModelFacto case CoreModelPackage.YACTIVATED_ENDPOINT: return createYActivatedEndpoint(); case CoreModelPackage.YDT_WRAPPER: return createYDtWrapper(); case CoreModelPackage.YCOMMAND_SET: return createYCommandSet(); + case CoreModelPackage.YOPEN_DIALOG_COMMAND: return createYOpenDialogCommand(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } @@ -309,6 +310,16 @@ public class CoreModelFactoryImpl extends EFactoryImpl implements CoreModelFacto * <!-- end-user-doc --> * @generated */ + public YOpenDialogCommand createYOpenDialogCommand() { + YOpenDialogCommandImpl yOpenDialogCommand = new YOpenDialogCommandImpl(); + return yOpenDialogCommand; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public YUnit createYUnitFromString(EDataType eDataType, String initialValue) { YUnit result = YUnit.get(initialValue); if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); diff --git a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/impl/CoreModelPackageImpl.java b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/impl/CoreModelPackageImpl.java index 3cd02374..85f23dee 100644 --- a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/impl/CoreModelPackageImpl.java +++ b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/impl/CoreModelPackageImpl.java @@ -45,6 +45,7 @@ import org.eclipse.emf.ecp.ecview.common.model.core.YHeightable; import org.eclipse.emf.ecp.ecview.common.model.core.YLayout; import org.eclipse.emf.ecp.ecview.common.model.core.YMarginable; import org.eclipse.emf.ecp.ecview.common.model.core.YMultiSelectionBindable; +import org.eclipse.emf.ecp.ecview.common.model.core.YOpenDialogCommand; import org.eclipse.emf.ecp.ecview.common.model.core.YSelectionBindable; import org.eclipse.emf.ecp.ecview.common.model.core.YSpacingable; import org.eclipse.emf.ecp.ecview.common.model.core.YUnit; @@ -326,6 +327,13 @@ public class CoreModelPackageImpl extends EPackageImpl implements CoreModelPacka * <!-- end-user-doc --> * @generated */ + private EClass yOpenDialogCommandEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ private EEnum yUnitEEnum = null; /** @@ -557,6 +565,15 @@ public class CoreModelPackageImpl extends EPackageImpl implements CoreModelPacka * <!-- end-user-doc --> * @generated */ + public EReference getYView_Dialogs() { + return (EReference)yViewEClass.getEStructuralFeatures().get(6); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public EClass getYViewSet() { return yViewSetEClass; } @@ -701,6 +718,51 @@ public class CoreModelPackageImpl extends EPackageImpl implements CoreModelPacka * <!-- end-user-doc --> * @generated */ + public EAttribute getYDialog_Value() { + return (EAttribute)yDialogEClass.getEStructuralFeatures().get(5); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getYDialog_Type() { + return (EAttribute)yDialogEClass.getEStructuralFeatures().get(6); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getYDialog_EmfNsURI() { + return (EAttribute)yDialogEClass.getEStructuralFeatures().get(7); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getYDialog_TypeQualifiedName() { + return (EAttribute)yDialogEClass.getEStructuralFeatures().get(8); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getYDialog_Datadescription() { + return (EReference)yDialogEClass.getEStructuralFeatures().get(9); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public EClass getYCssAble() { return yCssAbleEClass; } @@ -1268,6 +1330,33 @@ public class CoreModelPackageImpl extends EPackageImpl implements CoreModelPacka * <!-- end-user-doc --> * @generated */ + public EClass getYOpenDialogCommand() { + return yOpenDialogCommandEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getYOpenDialogCommand_Dialog() { + return (EReference)yOpenDialogCommandEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getYOpenDialogCommand_Trigger() { + return (EAttribute)yOpenDialogCommandEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public EEnum getYUnit() { return yUnitEEnum; } @@ -1336,6 +1425,7 @@ public class CoreModelPackageImpl extends EPackageImpl implements CoreModelPacka createEReference(yViewEClass, YVIEW__BINDING_SET); createEReference(yViewEClass, YVIEW__BEAN_SLOTS); createEReference(yViewEClass, YVIEW__COMMAND_SET); + createEReference(yViewEClass, YVIEW__DIALOGS); yViewSetEClass = createEClass(YVIEW_SET); createEReference(yViewSetEClass, YVIEW_SET__VIEWS); @@ -1356,6 +1446,11 @@ public class CoreModelPackageImpl extends EPackageImpl implements CoreModelPacka createEAttribute(yDialogEClass, YDIALOG__RESIZEABLE); createEAttribute(yDialogEClass, YDIALOG__DRAGGABLE); createEAttribute(yDialogEClass, YDIALOG__CLOSABLE); + createEAttribute(yDialogEClass, YDIALOG__VALUE); + createEAttribute(yDialogEClass, YDIALOG__TYPE); + createEAttribute(yDialogEClass, YDIALOG__EMF_NS_URI); + createEAttribute(yDialogEClass, YDIALOG__TYPE_QUALIFIED_NAME); + createEReference(yDialogEClass, YDIALOG__DATADESCRIPTION); yCssAbleEClass = createEClass(YCSS_ABLE); createEAttribute(yCssAbleEClass, YCSS_ABLE__CSS_CLASS); @@ -1448,6 +1543,10 @@ public class CoreModelPackageImpl extends EPackageImpl implements CoreModelPacka yCommandSetEClass = createEClass(YCOMMAND_SET); createEReference(yCommandSetEClass, YCOMMAND_SET__COMMANDS); + yOpenDialogCommandEClass = createEClass(YOPEN_DIALOG_COMMAND); + createEReference(yOpenDialogCommandEClass, YOPEN_DIALOG_COMMAND__DIALOG); + createEAttribute(yOpenDialogCommandEClass, YOPEN_DIALOG_COMMAND__TRIGGER); + // Create enums yUnitEEnum = createEEnum(YUNIT); @@ -1506,6 +1605,7 @@ public class CoreModelPackageImpl extends EPackageImpl implements CoreModelPacka yEmbeddableEClass.getESuperTypes().add(this.getYVisibilityProcessable()); yDialogEClass.getESuperTypes().add(this.getYElement()); yDialogEClass.getESuperTypes().add(this.getYValueBindable()); + yDialogEClass.getESuperTypes().add(this.getYCssAble()); yActivateableEClass.getESuperTypes().add(this.getYBindable()); yActionEClass.getESuperTypes().add(this.getYEmbeddable()); yActionEClass.getESuperTypes().add(this.getYEnable()); @@ -1529,6 +1629,7 @@ public class CoreModelPackageImpl extends EPackageImpl implements CoreModelPacka yDtWrapperEClass.getESuperTypes().add(theDatatypesPackage.getYDatatype()); yCommandEClass.getESuperTypes().add(this.getYElement()); yCommandSetEClass.getESuperTypes().add(this.getYElement()); + yOpenDialogCommandEClass.getESuperTypes().add(this.getYCommand()); // Initialize classes and features; add operations and parameters initEClass(yElementEClass, YElement.class, "YElement", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); @@ -1557,6 +1658,7 @@ public class CoreModelPackageImpl extends EPackageImpl implements CoreModelPacka initEReference(getYView_BindingSet(), theBindingPackage.getYBindingSet(), null, "bindingSet", null, 0, 1, YView.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getYView_BeanSlots(), this.getYBeanSlot(), null, "beanSlots", null, 0, -1, YView.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getYView_CommandSet(), this.getYCommandSet(), null, "commandSet", null, 0, 1, YView.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getYView_Dialogs(), this.getYDialog(), null, "dialogs", null, 0, -1, YView.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); addEOperation(yViewEClass, theBindingPackage.getYBindingSet(), "getOrCreateBindingSet", 0, 1, IS_UNIQUE, IS_ORDERED); @@ -1586,6 +1688,14 @@ public class CoreModelPackageImpl extends EPackageImpl implements CoreModelPacka initEAttribute(getYDialog_Resizeable(), ecorePackage.getEBoolean(), "resizeable", null, 0, 1, YDialog.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getYDialog_Draggable(), ecorePackage.getEBoolean(), "draggable", null, 0, 1, YDialog.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getYDialog_Closable(), ecorePackage.getEBoolean(), "closable", null, 0, 1, YDialog.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getYDialog_Value(), ecorePackage.getEJavaObject(), "value", null, 0, 1, YDialog.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + g1 = createEGenericType(ecorePackage.getEJavaClass()); + g2 = createEGenericType(); + g1.getETypeArguments().add(g2); + initEAttribute(getYDialog_Type(), g1, "type", null, 0, 1, YDialog.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getYDialog_EmfNsURI(), ecorePackage.getEString(), "emfNsURI", null, 0, 1, YDialog.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getYDialog_TypeQualifiedName(), ecorePackage.getEString(), "typeQualifiedName", null, 0, 1, YDialog.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getYDialog_Datadescription(), theDatatypesPackage.getYDatadescription(), null, "datadescription", null, 0, 1, YDialog.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(yCssAbleEClass, YCssAble.class, "YCssAble", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getYCssAble_CssClass(), ecorePackage.getEString(), "cssClass", null, 0, 1, YCssAble.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); @@ -1701,6 +1811,14 @@ public class CoreModelPackageImpl extends EPackageImpl implements CoreModelPacka op = addEOperation(yCommandSetEClass, null, "removeCommand", 0, 1, IS_UNIQUE, IS_ORDERED); addEParameter(op, this.getYCommand(), "command", 1, 1, IS_UNIQUE, IS_ORDERED); + initEClass(yOpenDialogCommandEClass, YOpenDialogCommand.class, "YOpenDialogCommand", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getYOpenDialogCommand_Dialog(), this.getYDialog(), null, "dialog", null, 0, 1, YOpenDialogCommand.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getYOpenDialogCommand_Trigger(), ecorePackage.getEJavaObject(), "trigger", null, 0, 1, YOpenDialogCommand.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + addEOperation(yOpenDialogCommandEClass, this.getYView(), "getView", 0, 1, IS_UNIQUE, IS_ORDERED); + + addEOperation(yOpenDialogCommandEClass, theBindingPackage.getYECViewModelValueBindingEndpoint(), "createTriggerDialogEndpoint", 0, 1, IS_UNIQUE, IS_ORDERED); + // Initialize enums and add enum literals initEEnum(yUnitEEnum, YUnit.class, "YUnit"); addEEnumLiteral(yUnitEEnum, YUnit.PIXEL); diff --git a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/impl/YDialogImpl.java b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/impl/YDialogImpl.java index ddb47b5e..d3d347db 100644 --- a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/impl/YDialogImpl.java +++ b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/impl/YDialogImpl.java @@ -11,12 +11,15 @@ import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; import org.eclipse.emf.ecp.ecview.common.model.core.CoreModelPackage; import org.eclipse.emf.ecp.ecview.common.model.core.YBindable; +import org.eclipse.emf.ecp.ecview.common.model.core.YCssAble; import org.eclipse.emf.ecp.ecview.common.model.core.YDialog; import org.eclipse.emf.ecp.ecview.common.model.core.YEmbeddable; import org.eclipse.emf.ecp.ecview.common.model.core.YEmbeddableValueEndpoint; import org.eclipse.emf.ecp.ecview.common.model.core.YLayout; import org.eclipse.emf.ecp.ecview.common.model.core.YValueBindable; import org.eclipse.emf.ecp.ecview.common.model.core.YView; +import org.eclipse.emf.ecp.ecview.common.model.datatypes.DatatypesFactory; +import org.eclipse.emf.ecp.ecview.common.model.datatypes.YDatadescription; /** * <!-- begin-user-doc --> An implementation of the model object ' @@ -27,11 +30,18 @@ import org.eclipse.emf.ecp.ecview.common.model.core.YView; * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.impl.YDialogImpl#getId <em>Id</em>}</li> * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.impl.YDialogImpl#getName <em>Name</em>}</li> * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.impl.YDialogImpl#getValueBindingEndpoint <em>Value Binding Endpoint</em>}</li> + * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.impl.YDialogImpl#getCssClass <em>Css Class</em>}</li> + * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.impl.YDialogImpl#getCssID <em>Css ID</em>}</li> * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.impl.YDialogImpl#getContent <em>Content</em>}</li> * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.impl.YDialogImpl#isModal <em>Modal</em>}</li> * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.impl.YDialogImpl#isResizeable <em>Resizeable</em>}</li> * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.impl.YDialogImpl#isDraggable <em>Draggable</em>}</li> * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.impl.YDialogImpl#isClosable <em>Closable</em>}</li> + * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.impl.YDialogImpl#getValue <em>Value</em>}</li> + * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.impl.YDialogImpl#getType <em>Type</em>}</li> + * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.impl.YDialogImpl#getEmfNsURI <em>Emf Ns URI</em>}</li> + * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.impl.YDialogImpl#getTypeQualifiedName <em>Type Qualified Name</em>}</li> + * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.impl.YDialogImpl#getDatadescription <em>Datadescription</em>}</li> * </ul> * </p> * @@ -88,6 +98,46 @@ public class YDialogImpl extends MinimalEObjectImpl.Container implements protected YEmbeddableValueEndpoint valueBindingEndpoint; /** + * The default value of the '{@link #getCssClass() <em>Css Class</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getCssClass() + * @generated + * @ordered + */ + protected static final String CSS_CLASS_EDEFAULT = null; + + /** + * The cached value of the '{@link #getCssClass() <em>Css Class</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getCssClass() + * @generated + * @ordered + */ + protected String cssClass = CSS_CLASS_EDEFAULT; + + /** + * The default value of the '{@link #getCssID() <em>Css ID</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getCssID() + * @generated + * @ordered + */ + protected static final String CSS_ID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getCssID() <em>Css ID</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getCssID() + * @generated + * @ordered + */ + protected String cssID = CSS_ID_EDEFAULT; + + /** * The cached value of the '{@link #getContent() <em>Content</em>}' containment reference. * <!-- begin-user-doc --> <!-- end-user-doc --> * @see #getContent() @@ -177,6 +227,86 @@ public class YDialogImpl extends MinimalEObjectImpl.Container implements protected boolean closable = CLOSABLE_EDEFAULT; /** + * The default value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected static final Object VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected Object value = VALUE_EDEFAULT; + + /** + * The cached value of the '{@link #getType() <em>Type</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getType() + * @generated + * @ordered + */ + protected Class<?> type; + + /** + * The default value of the '{@link #getEmfNsURI() <em>Emf Ns URI</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getEmfNsURI() + * @generated + * @ordered + */ + protected static final String EMF_NS_URI_EDEFAULT = null; + + /** + * The cached value of the '{@link #getEmfNsURI() <em>Emf Ns URI</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getEmfNsURI() + * @generated + * @ordered + */ + protected String emfNsURI = EMF_NS_URI_EDEFAULT; + + /** + * The default value of the '{@link #getTypeQualifiedName() <em>Type Qualified Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getTypeQualifiedName() + * @generated + * @ordered + */ + protected static final String TYPE_QUALIFIED_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getTypeQualifiedName() <em>Type Qualified Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getTypeQualifiedName() + * @generated + * @ordered + */ + protected String typeQualifiedName = TYPE_QUALIFIED_NAME_EDEFAULT; + + /** + * The cached value of the '{@link #getDatadescription() <em>Datadescription</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDatadescription() + * @generated + * @ordered + */ + protected YDatadescription datadescription; + + /** * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ @@ -291,6 +421,48 @@ public class YDialogImpl extends MinimalEObjectImpl.Container implements } /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getCssClass() { + return cssClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setCssClass(String newCssClass) { + String oldCssClass = cssClass; + cssClass = newCssClass; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CoreModelPackage.YDIALOG__CSS_CLASS, oldCssClass, cssClass)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getCssID() { + return cssID; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setCssID(String newCssID) { + String oldCssID = cssID; + cssID = newCssID; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CoreModelPackage.YDIALOG__CSS_ID, oldCssID, cssID)); + } + + /** * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ @@ -438,6 +610,156 @@ public class YDialogImpl extends MinimalEObjectImpl.Container implements } /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Object getValue() { + return value; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setValue(Object newValue) { + Object oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CoreModelPackage.YDIALOG__VALUE, oldValue, value)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Class<?> getType() { + return type; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setType(Class<?> newType) { + Class<?> oldType = type; + type = newType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CoreModelPackage.YDIALOG__TYPE, oldType, type)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getEmfNsURI() { + return emfNsURI; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setEmfNsURI(String newEmfNsURI) { + String oldEmfNsURI = emfNsURI; + emfNsURI = newEmfNsURI; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CoreModelPackage.YDIALOG__EMF_NS_URI, oldEmfNsURI, emfNsURI)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getTypeQualifiedName() { + return typeQualifiedName; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setTypeQualifiedName(String newTypeQualifiedName) { + String oldTypeQualifiedName = typeQualifiedName; + typeQualifiedName = newTypeQualifiedName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CoreModelPackage.YDIALOG__TYPE_QUALIFIED_NAME, oldTypeQualifiedName, typeQualifiedName)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public YDatadescription getDatadescription() { + if (datadescription != null && datadescription.eIsProxy()) { + InternalEObject oldDatadescription = (InternalEObject)datadescription; + datadescription = (YDatadescription)eResolveProxy(oldDatadescription); + if (datadescription != oldDatadescription) { + InternalEObject newDatadescription = (InternalEObject)datadescription; + NotificationChain msgs = oldDatadescription.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CoreModelPackage.YDIALOG__DATADESCRIPTION, null, null); + if (newDatadescription.eInternalContainer() == null) { + msgs = newDatadescription.eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CoreModelPackage.YDIALOG__DATADESCRIPTION, null, msgs); + } + if (msgs != null) msgs.dispatch(); + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, CoreModelPackage.YDIALOG__DATADESCRIPTION, oldDatadescription, datadescription)); + } + } + return datadescription; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public YDatadescription basicGetDatadescription() { + return datadescription; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetDatadescription(YDatadescription newDatadescription, NotificationChain msgs) { + YDatadescription oldDatadescription = datadescription; + datadescription = newDatadescription; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CoreModelPackage.YDIALOG__DATADESCRIPTION, oldDatadescription, newDatadescription); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setDatadescription(YDatadescription newDatadescription) { + if (newDatadescription != datadescription) { + NotificationChain msgs = null; + if (datadescription != null) + msgs = ((InternalEObject)datadescription).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CoreModelPackage.YDIALOG__DATADESCRIPTION, null, msgs); + if (newDatadescription != null) + msgs = ((InternalEObject)newDatadescription).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CoreModelPackage.YDIALOG__DATADESCRIPTION, null, msgs); + msgs = basicSetDatadescription(newDatadescription, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CoreModelPackage.YDIALOG__DATADESCRIPTION, newDatadescription, newDatadescription)); + } + + /** * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ @@ -475,6 +797,8 @@ public class YDialogImpl extends MinimalEObjectImpl.Container implements return basicSetValueBindingEndpoint(null, msgs); case CoreModelPackage.YDIALOG__CONTENT: return basicSetContent(null, msgs); + case CoreModelPackage.YDIALOG__DATADESCRIPTION: + return basicSetDatadescription(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } @@ -493,6 +817,10 @@ public class YDialogImpl extends MinimalEObjectImpl.Container implements case CoreModelPackage.YDIALOG__VALUE_BINDING_ENDPOINT: if (resolve) return getValueBindingEndpoint(); return basicGetValueBindingEndpoint(); + case CoreModelPackage.YDIALOG__CSS_CLASS: + return getCssClass(); + case CoreModelPackage.YDIALOG__CSS_ID: + return getCssID(); case CoreModelPackage.YDIALOG__CONTENT: if (resolve) return getContent(); return basicGetContent(); @@ -504,6 +832,17 @@ public class YDialogImpl extends MinimalEObjectImpl.Container implements return isDraggable(); case CoreModelPackage.YDIALOG__CLOSABLE: return isClosable(); + case CoreModelPackage.YDIALOG__VALUE: + return getValue(); + case CoreModelPackage.YDIALOG__TYPE: + return getType(); + case CoreModelPackage.YDIALOG__EMF_NS_URI: + return getEmfNsURI(); + case CoreModelPackage.YDIALOG__TYPE_QUALIFIED_NAME: + return getTypeQualifiedName(); + case CoreModelPackage.YDIALOG__DATADESCRIPTION: + if (resolve) return getDatadescription(); + return basicGetDatadescription(); } return super.eGet(featureID, resolve, coreType); } @@ -524,6 +863,12 @@ public class YDialogImpl extends MinimalEObjectImpl.Container implements case CoreModelPackage.YDIALOG__VALUE_BINDING_ENDPOINT: setValueBindingEndpoint((YEmbeddableValueEndpoint)newValue); return; + case CoreModelPackage.YDIALOG__CSS_CLASS: + setCssClass((String)newValue); + return; + case CoreModelPackage.YDIALOG__CSS_ID: + setCssID((String)newValue); + return; case CoreModelPackage.YDIALOG__CONTENT: setContent((YEmbeddable)newValue); return; @@ -539,6 +884,21 @@ public class YDialogImpl extends MinimalEObjectImpl.Container implements case CoreModelPackage.YDIALOG__CLOSABLE: setClosable((Boolean)newValue); return; + case CoreModelPackage.YDIALOG__VALUE: + setValue(newValue); + return; + case CoreModelPackage.YDIALOG__TYPE: + setType((Class<?>)newValue); + return; + case CoreModelPackage.YDIALOG__EMF_NS_URI: + setEmfNsURI((String)newValue); + return; + case CoreModelPackage.YDIALOG__TYPE_QUALIFIED_NAME: + setTypeQualifiedName((String)newValue); + return; + case CoreModelPackage.YDIALOG__DATADESCRIPTION: + setDatadescription((YDatadescription)newValue); + return; } super.eSet(featureID, newValue); } @@ -559,6 +919,12 @@ public class YDialogImpl extends MinimalEObjectImpl.Container implements case CoreModelPackage.YDIALOG__VALUE_BINDING_ENDPOINT: setValueBindingEndpoint((YEmbeddableValueEndpoint)null); return; + case CoreModelPackage.YDIALOG__CSS_CLASS: + setCssClass(CSS_CLASS_EDEFAULT); + return; + case CoreModelPackage.YDIALOG__CSS_ID: + setCssID(CSS_ID_EDEFAULT); + return; case CoreModelPackage.YDIALOG__CONTENT: setContent((YEmbeddable)null); return; @@ -574,6 +940,21 @@ public class YDialogImpl extends MinimalEObjectImpl.Container implements case CoreModelPackage.YDIALOG__CLOSABLE: setClosable(CLOSABLE_EDEFAULT); return; + case CoreModelPackage.YDIALOG__VALUE: + setValue(VALUE_EDEFAULT); + return; + case CoreModelPackage.YDIALOG__TYPE: + setType((Class<?>)null); + return; + case CoreModelPackage.YDIALOG__EMF_NS_URI: + setEmfNsURI(EMF_NS_URI_EDEFAULT); + return; + case CoreModelPackage.YDIALOG__TYPE_QUALIFIED_NAME: + setTypeQualifiedName(TYPE_QUALIFIED_NAME_EDEFAULT); + return; + case CoreModelPackage.YDIALOG__DATADESCRIPTION: + setDatadescription((YDatadescription)null); + return; } super.eUnset(featureID); } @@ -591,6 +972,10 @@ public class YDialogImpl extends MinimalEObjectImpl.Container implements return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); case CoreModelPackage.YDIALOG__VALUE_BINDING_ENDPOINT: return valueBindingEndpoint != null; + case CoreModelPackage.YDIALOG__CSS_CLASS: + return CSS_CLASS_EDEFAULT == null ? cssClass != null : !CSS_CLASS_EDEFAULT.equals(cssClass); + case CoreModelPackage.YDIALOG__CSS_ID: + return CSS_ID_EDEFAULT == null ? cssID != null : !CSS_ID_EDEFAULT.equals(cssID); case CoreModelPackage.YDIALOG__CONTENT: return content != null; case CoreModelPackage.YDIALOG__MODAL: @@ -601,6 +986,16 @@ public class YDialogImpl extends MinimalEObjectImpl.Container implements return draggable != DRAGGABLE_EDEFAULT; case CoreModelPackage.YDIALOG__CLOSABLE: return closable != CLOSABLE_EDEFAULT; + case CoreModelPackage.YDIALOG__VALUE: + return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); + case CoreModelPackage.YDIALOG__TYPE: + return type != null; + case CoreModelPackage.YDIALOG__EMF_NS_URI: + return EMF_NS_URI_EDEFAULT == null ? emfNsURI != null : !EMF_NS_URI_EDEFAULT.equals(emfNsURI); + case CoreModelPackage.YDIALOG__TYPE_QUALIFIED_NAME: + return TYPE_QUALIFIED_NAME_EDEFAULT == null ? typeQualifiedName != null : !TYPE_QUALIFIED_NAME_EDEFAULT.equals(typeQualifiedName); + case CoreModelPackage.YDIALOG__DATADESCRIPTION: + return datadescription != null; } return super.eIsSet(featureID); } @@ -622,6 +1017,13 @@ public class YDialogImpl extends MinimalEObjectImpl.Container implements default: return -1; } } + if (baseClass == YCssAble.class) { + switch (derivedFeatureID) { + case CoreModelPackage.YDIALOG__CSS_CLASS: return CoreModelPackage.YCSS_ABLE__CSS_CLASS; + case CoreModelPackage.YDIALOG__CSS_ID: return CoreModelPackage.YCSS_ABLE__CSS_ID; + default: return -1; + } + } return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); } @@ -642,6 +1044,13 @@ public class YDialogImpl extends MinimalEObjectImpl.Container implements default: return -1; } } + if (baseClass == YCssAble.class) { + switch (baseFeatureID) { + case CoreModelPackage.YCSS_ABLE__CSS_CLASS: return CoreModelPackage.YDIALOG__CSS_CLASS; + case CoreModelPackage.YCSS_ABLE__CSS_ID: return CoreModelPackage.YDIALOG__CSS_ID; + default: return -1; + } + } return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); } @@ -658,6 +1067,10 @@ public class YDialogImpl extends MinimalEObjectImpl.Container implements result.append(id); result.append(", name: "); result.append(name); + result.append(", cssClass: "); + result.append(cssClass); + result.append(", cssID: "); + result.append(cssID); result.append(", modal: "); result.append(modal); result.append(", resizeable: "); @@ -666,6 +1079,14 @@ public class YDialogImpl extends MinimalEObjectImpl.Container implements result.append(draggable); result.append(", closable: "); result.append(closable); + result.append(", value: "); + result.append(value); + result.append(", type: "); + result.append(type); + result.append(", emfNsURI: "); + result.append(emfNsURI); + result.append(", typeQualifiedName: "); + result.append(typeQualifiedName); result.append(')'); return result.toString(); } @@ -688,5 +1109,47 @@ public class YDialogImpl extends MinimalEObjectImpl.Container implements return findViewGeneric(parent); } } + + /** + * Sets the label by creating a new datadescription. + * + * @param label + */ + public void setLabel(String label) { + YDatadescription ds = getDatadescription(); + if (ds == null) { + setDatadescription(createDatadescription(label)); + } else { + ds.setLabel(label); + } + } + + /** + * Sets the label i18nKey by creating a new datadescription. + * + * @param label + */ + public void setLabelI18nKey(String i18nKey) { + YDatadescription ds = getDatadescription(); + if (ds == null) { + setDatadescription(createDatadescriptionForI18n(i18nKey)); + } else { + ds.setLabelI18nKey(i18nKey); + } + } + + protected YDatadescription createDatadescription(String label) { + YDatadescription dsc = DatatypesFactory.eINSTANCE + .createYDatadescription(); + dsc.setLabel(label); + return dsc; + } + + protected YDatadescription createDatadescriptionForI18n(String i18nKey) { + YDatadescription dsc = DatatypesFactory.eINSTANCE + .createYDatadescription(); + dsc.setLabelI18nKey(i18nKey); + return dsc; + } } // YDialogImpl diff --git a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/impl/YOpenDialogCommandImpl.java b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/impl/YOpenDialogCommandImpl.java new file mode 100644 index 00000000..7e5f469a --- /dev/null +++ b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/impl/YOpenDialogCommandImpl.java @@ -0,0 +1,384 @@ +/** + */ +package org.eclipse.emf.ecp.ecview.common.model.core.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; +import org.eclipse.emf.ecp.ecview.common.model.binding.BindingFactory; +import org.eclipse.emf.ecp.ecview.common.model.binding.YECViewModelValueBindingEndpoint; +import org.eclipse.emf.ecp.ecview.common.model.core.CoreModelPackage; +import org.eclipse.emf.ecp.ecview.common.model.core.YDialog; +import org.eclipse.emf.ecp.ecview.common.model.core.YLayout; +import org.eclipse.emf.ecp.ecview.common.model.core.YOpenDialogCommand; +import org.eclipse.emf.ecp.ecview.common.model.core.YView; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>YOpen Dialog Command</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.impl.YOpenDialogCommandImpl#getId <em>Id</em>}</li> + * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.impl.YOpenDialogCommandImpl#getName <em>Name</em>}</li> + * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.impl.YOpenDialogCommandImpl#getDialog <em>Dialog</em>}</li> + * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.impl.YOpenDialogCommandImpl#getTrigger <em>Trigger</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class YOpenDialogCommandImpl extends MinimalEObjectImpl.Container implements YOpenDialogCommand { + /** + * The default value of the '{@link #getId() <em>Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getId() + * @generated + * @ordered + */ + protected static final String ID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getId() <em>Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getId() + * @generated + * @ordered + */ + protected String id = ID_EDEFAULT; + + /** + * The default value of the '{@link #getName() <em>Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() <em>Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * The cached value of the '{@link #getDialog() <em>Dialog</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDialog() + * @generated + * @ordered + */ + protected YDialog dialog; + + /** + * The default value of the '{@link #getTrigger() <em>Trigger</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getTrigger() + * @generated + * @ordered + */ + protected static final Object TRIGGER_EDEFAULT = null; + + /** + * The cached value of the '{@link #getTrigger() <em>Trigger</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getTrigger() + * @generated + * @ordered + */ + protected Object trigger = TRIGGER_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected YOpenDialogCommandImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return CoreModelPackage.Literals.YOPEN_DIALOG_COMMAND; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getId() { + return id; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setId(String newId) { + String oldId = id; + id = newId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CoreModelPackage.YOPEN_DIALOG_COMMAND__ID, oldId, id)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getName() { + return name; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CoreModelPackage.YOPEN_DIALOG_COMMAND__NAME, oldName, name)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public YDialog getDialog() { + if (dialog != null && dialog.eIsProxy()) { + InternalEObject oldDialog = (InternalEObject)dialog; + dialog = (YDialog)eResolveProxy(oldDialog); + if (dialog != oldDialog) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, CoreModelPackage.YOPEN_DIALOG_COMMAND__DIALOG, oldDialog, dialog)); + } + } + return dialog; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public YDialog basicGetDialog() { + return dialog; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setDialog(YDialog newDialog) { + YDialog oldDialog = dialog; + dialog = newDialog; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CoreModelPackage.YOPEN_DIALOG_COMMAND__DIALOG, oldDialog, dialog)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Object getTrigger() { + return trigger; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setTrigger(Object newTrigger) { + Object oldTrigger = trigger; + trigger = newTrigger; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CoreModelPackage.YOPEN_DIALOG_COMMAND__TRIGGER, oldTrigger, trigger)); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public YView getViewGen() { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + public YView getView() { + return findViewGeneric(eContainer()); + } + + protected YView findViewGeneric(EObject container) { + if (container == null) { + return null; + } + if (container instanceof YView) { + return (YView) container; + } else if (container instanceof YLayout) { + return ((YLayout) container).getView(); + } else { + EObject parent = container.eContainer(); + return findViewGeneric(parent); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public YECViewModelValueBindingEndpoint createTriggerDialogEndpointGen() { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + public YECViewModelValueBindingEndpoint createTriggerDialogEndpoint() { + YECViewModelValueBindingEndpoint endpoint = BindingFactory.eINSTANCE + .createYECViewModelValueBindingEndpoint(); + endpoint.setElement(this); + endpoint.getFeatures() + .add((EStructuralFeature) CoreModelPackage.Literals.YOPEN_DIALOG_COMMAND__TRIGGER); + return endpoint; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CoreModelPackage.YOPEN_DIALOG_COMMAND__ID: + return getId(); + case CoreModelPackage.YOPEN_DIALOG_COMMAND__NAME: + return getName(); + case CoreModelPackage.YOPEN_DIALOG_COMMAND__DIALOG: + if (resolve) return getDialog(); + return basicGetDialog(); + case CoreModelPackage.YOPEN_DIALOG_COMMAND__TRIGGER: + return getTrigger(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CoreModelPackage.YOPEN_DIALOG_COMMAND__ID: + setId((String)newValue); + return; + case CoreModelPackage.YOPEN_DIALOG_COMMAND__NAME: + setName((String)newValue); + return; + case CoreModelPackage.YOPEN_DIALOG_COMMAND__DIALOG: + setDialog((YDialog)newValue); + return; + case CoreModelPackage.YOPEN_DIALOG_COMMAND__TRIGGER: + setTrigger(newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CoreModelPackage.YOPEN_DIALOG_COMMAND__ID: + setId(ID_EDEFAULT); + return; + case CoreModelPackage.YOPEN_DIALOG_COMMAND__NAME: + setName(NAME_EDEFAULT); + return; + case CoreModelPackage.YOPEN_DIALOG_COMMAND__DIALOG: + setDialog((YDialog)null); + return; + case CoreModelPackage.YOPEN_DIALOG_COMMAND__TRIGGER: + setTrigger(TRIGGER_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CoreModelPackage.YOPEN_DIALOG_COMMAND__ID: + return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id); + case CoreModelPackage.YOPEN_DIALOG_COMMAND__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case CoreModelPackage.YOPEN_DIALOG_COMMAND__DIALOG: + return dialog != null; + case CoreModelPackage.YOPEN_DIALOG_COMMAND__TRIGGER: + return TRIGGER_EDEFAULT == null ? trigger != null : !TRIGGER_EDEFAULT.equals(trigger); + } + 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(" (id: "); + result.append(id); + result.append(", name: "); + result.append(name); + result.append(", trigger: "); + result.append(trigger); + result.append(')'); + return result.toString(); + } + +} //YOpenDialogCommandImpl diff --git a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/impl/YViewImpl.java b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/impl/YViewImpl.java index 6d624460..e0c1b475 100644 --- a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/impl/YViewImpl.java +++ b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/impl/YViewImpl.java @@ -27,6 +27,7 @@ import org.eclipse.emf.ecp.ecview.common.model.core.CoreModelPackage; import org.eclipse.emf.ecp.ecview.common.model.core.YBeanSlot; import org.eclipse.emf.ecp.ecview.common.model.core.YCommandSet; import org.eclipse.emf.ecp.ecview.common.model.core.YCssAble; +import org.eclipse.emf.ecp.ecview.common.model.core.YDialog; import org.eclipse.emf.ecp.ecview.common.model.core.YEmbeddable; import org.eclipse.emf.ecp.ecview.common.model.core.YMarginable; import org.eclipse.emf.ecp.ecview.common.model.core.YView; @@ -53,6 +54,7 @@ import org.eclipse.emf.ecp.ecview.common.model.visibility.YVisibilityProcessor; * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.impl.YViewImpl#getBindingSet <em>Binding Set</em>}</li> * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.impl.YViewImpl#getBeanSlots <em>Bean Slots</em>}</li> * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.impl.YViewImpl#getCommandSet <em>Command Set</em>}</li> + * <li>{@link org.eclipse.emf.ecp.ecview.common.model.core.impl.YViewImpl#getDialogs <em>Dialogs</em>}</li> * </ul> * </p> * @@ -227,6 +229,16 @@ public class YViewImpl extends MinimalEObjectImpl.Container implements YView { protected YCommandSet commandSet; /** + * The cached value of the '{@link #getDialogs() <em>Dialogs</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDialogs() + * @generated + * @ordered + */ + protected EList<YDialog> dialogs; + + /** * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ @@ -551,6 +563,18 @@ public class YViewImpl extends MinimalEObjectImpl.Container implements YView { } /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<YDialog> getDialogs() { + if (dialogs == null) { + dialogs = new EObjectContainmentEList.Resolving<YDialog>(YDialog.class, this, CoreModelPackage.YVIEW__DIALOGS); + } + return dialogs; + } + + /** * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ @@ -784,6 +808,8 @@ public class YViewImpl extends MinimalEObjectImpl.Container implements YView { return ((InternalEList<?>)getBeanSlots()).basicRemove(otherEnd, msgs); case CoreModelPackage.YVIEW__COMMAND_SET: return basicSetCommandSet(null, msgs); + case CoreModelPackage.YVIEW__DIALOGS: + return ((InternalEList<?>)getDialogs()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } @@ -824,6 +850,8 @@ public class YViewImpl extends MinimalEObjectImpl.Container implements YView { case CoreModelPackage.YVIEW__COMMAND_SET: if (resolve) return getCommandSet(); return basicGetCommandSet(); + case CoreModelPackage.YVIEW__DIALOGS: + return getDialogs(); } return super.eGet(featureID, resolve, coreType); } @@ -873,6 +901,10 @@ public class YViewImpl extends MinimalEObjectImpl.Container implements YView { case CoreModelPackage.YVIEW__COMMAND_SET: setCommandSet((YCommandSet)newValue); return; + case CoreModelPackage.YVIEW__DIALOGS: + getDialogs().clear(); + getDialogs().addAll((Collection<? extends YDialog>)newValue); + return; } super.eSet(featureID, newValue); } @@ -920,6 +952,9 @@ public class YViewImpl extends MinimalEObjectImpl.Container implements YView { case CoreModelPackage.YVIEW__COMMAND_SET: setCommandSet((YCommandSet)null); return; + case CoreModelPackage.YVIEW__DIALOGS: + getDialogs().clear(); + return; } super.eUnset(featureID); } @@ -955,6 +990,8 @@ public class YViewImpl extends MinimalEObjectImpl.Container implements YView { return beanSlots != null && !beanSlots.isEmpty(); case CoreModelPackage.YVIEW__COMMAND_SET: return commandSet != null; + case CoreModelPackage.YVIEW__DIALOGS: + return dialogs != null && !dialogs.isEmpty(); } return super.eIsSet(featureID); } diff --git a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/util/CoreModelAdapterFactory.java b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/util/CoreModelAdapterFactory.java index cb0e777d..b595db33 100644 --- a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/util/CoreModelAdapterFactory.java +++ b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/util/CoreModelAdapterFactory.java @@ -256,6 +256,10 @@ public class CoreModelAdapterFactory extends AdapterFactoryImpl { return createYCommandSetAdapter(); } @Override + public Adapter caseYOpenDialogCommand(YOpenDialogCommand object) { + return createYOpenDialogCommandAdapter(); + } + @Override public Adapter caseYBindingEndpoint(YBindingEndpoint object) { return createYBindingEndpointAdapter(); } @@ -800,6 +804,20 @@ public class CoreModelAdapterFactory extends AdapterFactoryImpl { } /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.ecview.common.model.core.YOpenDialogCommand <em>YOpen Dialog Command</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.emf.ecp.ecview.common.model.core.YOpenDialogCommand + * @generated + */ + public Adapter createYOpenDialogCommandAdapter() { + return null; + } + + /** * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.ecview.common.model.binding.YBindingEndpoint <em>YBinding Endpoint</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; diff --git a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/util/CoreModelSwitch.java b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/util/CoreModelSwitch.java index b7fdf350..3969a673 100644 --- a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/util/CoreModelSwitch.java +++ b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/util/CoreModelSwitch.java @@ -180,6 +180,7 @@ public class CoreModelSwitch<T> extends Switch<T> { T result = caseYDialog(yDialog); if (result == null) result = caseYElement(yDialog); if (result == null) result = caseYValueBindable(yDialog); + if (result == null) result = caseYCssAble(yDialog); if (result == null) result = caseYBindable(yDialog); if (result == null) result = defaultCase(theEObject); return result; @@ -397,6 +398,14 @@ public class CoreModelSwitch<T> extends Switch<T> { if (result == null) result = defaultCase(theEObject); return result; } + case CoreModelPackage.YOPEN_DIALOG_COMMAND: { + YOpenDialogCommand yOpenDialogCommand = (YOpenDialogCommand)theEObject; + T result = caseYOpenDialogCommand(yOpenDialogCommand); + if (result == null) result = caseYCommand(yOpenDialogCommand); + if (result == null) result = caseYElement(yOpenDialogCommand); + if (result == null) result = defaultCase(theEObject); + return result; + } default: return defaultCase(theEObject); } } @@ -942,6 +951,21 @@ public class CoreModelSwitch<T> extends Switch<T> { } /** + * Returns the result of interpreting the object as an instance of '<em>YOpen Dialog Command</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>YOpen Dialog Command</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseYOpenDialogCommand(YOpenDialogCommand object) { + return null; + } + + /** * Returns the result of interpreting the object as an instance of '<em>YBinding Endpoint</em>'. * <!-- begin-user-doc --> * This implementation returns null; diff --git a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/validation/YDialogValidator.java b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/validation/YDialogValidator.java index 7211e712..2be25bb5 100644 --- a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/validation/YDialogValidator.java +++ b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/validation/YDialogValidator.java @@ -5,6 +5,7 @@ package org.eclipse.emf.ecp.ecview.common.model.core.validation; import org.eclipse.emf.ecp.ecview.common.model.core.YEmbeddable; +import org.eclipse.emf.ecp.ecview.common.model.datatypes.YDatadescription; /** @@ -26,4 +27,14 @@ public interface YDialogValidator { boolean validateClosable(boolean value); + boolean validateValue(Object value); + + boolean validateType(Class<?> value); + + boolean validateEmfNsURI(String value); + + boolean validateTypeQualifiedName(String value); + + boolean validateDatadescription(YDatadescription value); + } diff --git a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/validation/YOpenDialogCommandValidator.java b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/validation/YOpenDialogCommandValidator.java new file mode 100644 index 00000000..7f246484 --- /dev/null +++ b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/validation/YOpenDialogCommandValidator.java @@ -0,0 +1,21 @@ +/** + * + * $Id$ + */ +package org.eclipse.emf.ecp.ecview.common.model.core.validation; + +import org.eclipse.emf.ecp.ecview.common.model.core.YDialog; + +/** + * A sample validator interface for {@link org.eclipse.emf.ecp.ecview.common.model.core.YOpenDialogCommand}. + * This doesn't really do anything, and it's not a real EMF artifact. + * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. + * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. + */ +public interface YOpenDialogCommandValidator { + boolean validate(); + + boolean validateDialog(YDialog value); + + boolean validateTrigger(Object value); +} diff --git a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/validation/YViewValidator.java b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/validation/YViewValidator.java index 9dfb26df..03920631 100644 --- a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/validation/YViewValidator.java +++ b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/src/org/eclipse/emf/ecp/ecview/common/model/core/validation/YViewValidator.java @@ -10,6 +10,7 @@ import org.eclipse.emf.ecp.ecview.common.model.binding.YBindingSet; import org.eclipse.emf.ecp.ecview.common.model.core.YBeanSlot; import org.eclipse.emf.ecp.ecview.common.model.core.YCommandSet; +import org.eclipse.emf.ecp.ecview.common.model.core.YDialog; import org.eclipse.emf.ecp.ecview.common.model.core.YEmbeddable; import org.eclipse.emf.ecp.ecview.common.model.core.YViewSet; import org.eclipse.emf.ecp.ecview.common.model.datatypes.YDatadescription; @@ -32,6 +33,8 @@ public interface YViewValidator { boolean validateCommandSet(YCommandSet value); + boolean validateDialogs(EList<YDialog> value); + boolean validateCommandSet(EList<YCommandSet> value); boolean validateOrphanDatatypes(EList<YDatatype> value); diff --git a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/text/description.txt b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/text/description.txt index 3ebd6626..cce9df52 100644 --- a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/text/description.txt +++ b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common.model/text/description.txt @@ -106,6 +106,7 @@ Package core <http://eclipse.org/emf/ecp/ecview/core/view> Reference bindingSet : YBindingSet Reference beanSlots : YBeanSlot<<0..*>> Reference commandSet : YCommandSet + Reference dialogs : YDialog<<0..*>> Operation getOrCreateBindingSet() : YBindingSet Class YViewSet -> YElement @@ -123,12 +124,17 @@ Package core <http://eclipse.org/emf/ecp/ecview/core/view> Operation getParent() : YLayout Operation getView() : YView - Class YDialog -> YElement, YValueBindable + Class YDialog -> YElement, YValueBindable, YCssAble Reference content : YEmbeddable Attribute modal : EBoolean Attribute resizeable : EBoolean Attribute draggable : EBoolean Attribute closable : EBoolean + Attribute value : EJavaObject + Attribute type : EJavaClass + Attribute emfNsURI : EString + Attribute typeQualifiedName : EString + Reference datadescription : YDatadescription Class YCssAble Attribute cssClass : EString @@ -230,6 +236,12 @@ Package core <http://eclipse.org/emf/ecp/ecview/core/view> Operation addCommand(YCommand<<1..1>>) : void Operation removeCommand(YCommand<<1..1>>) : void + Class YOpenDialogCommand -> YCommand + Reference dialog : YDialog + Attribute trigger : EJavaObject + Operation getView() : YView + Operation createTriggerDialogEndpoint() : YECViewModelValueBindingEndpoint + Enum YUnit Literal Pixel = 0 Literal Em = 1 diff --git a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common/src/org/eclipse/emf/ecp/ecview/common/editpart/IDialogEditpart.java b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common/src/org/eclipse/emf/ecp/ecview/common/editpart/IDialogEditpart.java index edf8d890..5ef92589 100644 --- a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common/src/org/eclipse/emf/ecp/ecview/common/editpart/IDialogEditpart.java +++ b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common/src/org/eclipse/emf/ecp/ecview/common/editpart/IDialogEditpart.java @@ -10,6 +10,7 @@ */ package org.eclipse.emf.ecp.ecview.common.editpart; +import org.eclipse.emf.ecp.ecview.common.editpart.binding.IBindableEndpointEditpart; import org.eclipse.emf.ecp.ecview.common.presentation.IDialogPresentation; import org.eclipse.emf.ecp.ecview.common.presentation.IWidgetPresentation; @@ -98,4 +99,13 @@ public interface IDialogEditpart extends IElementEditpart, IEmbeddableParent { */ void requestDispose(); + /** + * Sets the input data binding endpoint. + * + * @param inputData + * this object contains information about the input data of the + * target navigation page. + */ + void setInputDataBindingEndpoint(IBindableEndpointEditpart inputData); + } diff --git a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common/src/org/eclipse/emf/ecp/ecview/common/editpart/IOpenDialogCommandEditpart.java b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common/src/org/eclipse/emf/ecp/ecview/common/editpart/IOpenDialogCommandEditpart.java new file mode 100644 index 00000000..ff857c92 --- /dev/null +++ b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common/src/org/eclipse/emf/ecp/ecview/common/editpart/IOpenDialogCommandEditpart.java @@ -0,0 +1,16 @@ +/** + * Copyright (c) 2012 Lunifera GmbH (Austria) and others. + * 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: + * Florian Pirchner - initial API and implementation + */ +package org.eclipse.emf.ecp.ecview.common.editpart; + +public interface IOpenDialogCommandEditpart extends ICommandEditpart { + + +} diff --git a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common/src/org/eclipse/emf/ecp/ecview/common/editpart/IViewEditpart.java b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common/src/org/eclipse/emf/ecp/ecview/common/editpart/IViewEditpart.java index 6636e85f..a37792d3 100644 --- a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common/src/org/eclipse/emf/ecp/ecview/common/editpart/IViewEditpart.java +++ b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common/src/org/eclipse/emf/ecp/ecview/common/editpart/IViewEditpart.java @@ -16,6 +16,7 @@ import java.util.concurrent.Future; import org.eclipse.emf.ecp.ecview.common.context.ContextException; import org.eclipse.emf.ecp.ecview.common.context.IConfiguration; import org.eclipse.emf.ecp.ecview.common.context.IViewContext; +import org.eclipse.emf.ecp.ecview.common.editpart.binding.IBindableEndpointEditpart; import org.eclipse.emf.ecp.ecview.common.editpart.binding.IBindingSetEditpart; import org.eclipse.emf.ecp.ecview.common.presentation.IViewPresentation; import org.eclipse.emf.ecp.ecview.common.services.IUiKitBasedService; @@ -169,8 +170,10 @@ public interface IViewEditpart extends IElementEditpart, IEmbeddableParent { * Opens the dialog. * * @param dialogEditpart + * @param inputData this object contains information about the input data of the + * target navigation page. */ - void openDialog(IDialogEditpart dialogEditpart); + void openDialog(IDialogEditpart dialogEditpart, IBindableEndpointEditpart inputData); /** * Closes the dialog. diff --git a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common/src/org/eclipse/emf/ecp/ecview/common/presentation/IDialogPresentation.java b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common/src/org/eclipse/emf/ecp/ecview/common/presentation/IDialogPresentation.java index 32eeb0d0..945a86e6 100644 --- a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common/src/org/eclipse/emf/ecp/ecview/common/presentation/IDialogPresentation.java +++ b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common/src/org/eclipse/emf/ecp/ecview/common/presentation/IDialogPresentation.java @@ -11,6 +11,7 @@ package org.eclipse.emf.ecp.ecview.common.presentation; import org.eclipse.emf.ecp.ecview.common.editpart.IEmbeddableEditpart; +import org.eclipse.emf.ecp.ecview.common.editpart.binding.IBindableEndpointEditpart; /** * Needs to render a dialog. @@ -19,6 +20,19 @@ import org.eclipse.emf.ecp.ecview.common.editpart.IEmbeddableEditpart; */ public interface IDialogPresentation<C> extends IWidgetPresentation<C> { + /** + * Sets the content of the dialog. + * + * @param child + */ void setContent(IEmbeddableEditpart child); + /** + * Sets the input data. The binding endpoint contains information about the + * data that should be bound to the dialog. + * + * @param bindingEndpoint + */ + void setInputDataBindingEndpoint(IBindableEndpointEditpart bindingEndpoint); + } diff --git a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common/src/org/eclipse/emf/ecp/ecview/common/presentation/IViewPresentation.java b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common/src/org/eclipse/emf/ecp/ecview/common/presentation/IViewPresentation.java index 5683d8e1..c327f9ce 100644 --- a/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common/src/org/eclipse/emf/ecp/ecview/common/presentation/IViewPresentation.java +++ b/org.eclipse.emf.ecp.ecview.parent/org.eclipse.emf.ecp.ecview.common/src/org/eclipse/emf/ecp/ecview/common/presentation/IViewPresentation.java @@ -15,6 +15,7 @@ import java.util.concurrent.Future; import org.eclipse.emf.ecp.ecview.common.editpart.IDialogEditpart; import org.eclipse.emf.ecp.ecview.common.editpart.IEmbeddableEditpart; +import org.eclipse.emf.ecp.ecview.common.editpart.binding.IBindableEndpointEditpart; import org.eclipse.emf.ecp.ecview.common.services.IUiKitBasedService; /** @@ -78,8 +79,10 @@ public interface IViewPresentation<C> extends IWidgetPresentation<C> { * Opens the dialog. * * @param dialogEditpart + * @param inputData this object contains information about the input data of the + * target navigation page. */ - void openDialog(IDialogEditpart dialogEditpart); + void openDialog(IDialogEditpart dialogEditpart, IBindableEndpointEditpart inputData); /** * Closes the dialog. |