diff options
author | Florian Noyrit | 2016-01-17 18:43:28 +0000 |
---|---|---|
committer | Florian Noyrit | 2016-01-17 18:43:28 +0000 |
commit | 10d6d4fdc7acd34b16ac72365d3b911c5d70c499 (patch) | |
tree | 87800de023b6328bc9e380942cdf6c28b86bbc8b /plugins/infra | |
parent | 47dd8f8ebd64192956b097cb70f783d7446138ab (diff) | |
parent | ee643f15fbc35c66669deb860b1c86e025a9f177 (diff) | |
download | org.eclipse.papyrus-10d6d4fdc7acd34b16ac72365d3b911c5d70c499.tar.gz org.eclipse.papyrus-10d6d4fdc7acd34b16ac72365d3b911c5d70c499.tar.xz org.eclipse.papyrus-10d6d4fdc7acd34b16ac72365d3b911c5d70c499.zip |
Merge branch 'committers/fnoyrit/viewpoints'
Diffstat (limited to 'plugins/infra')
12 files changed, 418 insertions, 10 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF index 2086f868ede..b5f3900696f 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF @@ -35,9 +35,11 @@ Export-Package: org.eclipse.papyrus.infra.gmfdiag.common, org.eclipse.papyrus.infra.gmfdiag.common.strategy,
org.eclipse.papyrus.infra.gmfdiag.common.strategy.copy,
org.eclipse.papyrus.infra.gmfdiag.common.strategy.paste,
+ org.eclipse.papyrus.infra.gmfdiag.common.structure,
org.eclipse.papyrus.infra.gmfdiag.common.sync,
org.eclipse.papyrus.infra.gmfdiag.common.types,
org.eclipse.papyrus.infra.gmfdiag.common.undocontext,
+ org.eclipse.papyrus.infra.gmfdiag.common.updater,
org.eclipse.papyrus.infra.gmfdiag.common.utils
Require-Bundle: org.eclipse.emf.edit.ui;bundle-version="2.5.0",
org.eclipse.emf.ecore.edit;bundle-version="2.5.0",
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/AbstractDiagramDragDropEditPolicy.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/AbstractDiagramDragDropEditPolicy.java index 2bd7f0ec822..3c1e9f4299f 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/AbstractDiagramDragDropEditPolicy.java +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/AbstractDiagramDragDropEditPolicy.java @@ -21,18 +21,18 @@ import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DiagramDragDropEditPolicy public abstract class AbstractDiagramDragDropEditPolicy extends DiagramDragDropEditPolicy { /** The specific drop. */ - private Set<Integer> specificDrop = null; + private Set<String> specificDrop = null; /** * The list of visualID that the policy manages. */ - protected abstract Set<Integer> getDroppableElementVisualId(); + protected abstract Set<String> getDroppableElementVisualId(); /** * Gets elements visual id that can be dropped in the diagram */ - protected Set<Integer> getSpecificDrop() { + protected Set<String> getSpecificDrop() { if (specificDrop == null) { specificDrop = getDroppableElementVisualId(); } diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/AbstractShowHideRelatedLinkEditPolicy.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/AbstractShowHideRelatedLinkEditPolicy.java index 6134959c976..7c8e9257c23 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/AbstractShowHideRelatedLinkEditPolicy.java +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/AbstractShowHideRelatedLinkEditPolicy.java @@ -54,14 +54,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType; import org.eclipse.gmf.runtime.emf.type.core.IHintedType; import org.eclipse.gmf.runtime.notation.Diagram; import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater; -import org.eclipse.gmf.tooling.runtime.update.UpdaterLinkDescriptor; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.jface.viewers.Viewer; import org.eclipse.papyrus.infra.core.services.ServiceException; import org.eclipse.papyrus.infra.gmfdiag.common.Activator; import org.eclipse.papyrus.infra.gmfdiag.common.commands.requests.ShowHideRelatedLinkRequest; +import org.eclipse.papyrus.infra.gmfdiag.common.updater.DiagramUpdater; +import org.eclipse.papyrus.infra.gmfdiag.common.updater.UpdaterLinkDescriptor; import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil; import org.eclipse.papyrus.infra.gmfdiag.common.utils.Domain2Notation; import org.eclipse.papyrus.infra.gmfdiag.common.utils.ServiceUtilsForEditPart; diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/IDiagramInformationProviderEditPolicy.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/IDiagramInformationProviderEditPolicy.java index 0a06a71e371..a2be732de04 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/IDiagramInformationProviderEditPolicy.java +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/IDiagramInformationProviderEditPolicy.java @@ -13,8 +13,8 @@ *****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.common.editpolicies;
-import org.eclipse.gmf.tooling.runtime.structure.DiagramStructure;
-import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater;
+import org.eclipse.papyrus.infra.gmfdiag.common.structure.DiagramStructure;
+import org.eclipse.papyrus.infra.gmfdiag.common.updater.DiagramUpdater;
/**
*
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/DefaultEditPartProvider.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/DefaultEditPartProvider.java new file mode 100644 index 00000000000..407402a3522 --- /dev/null +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/DefaultEditPartProvider.java @@ -0,0 +1,120 @@ +/***************************************************************************** + * Copyright (c) 2015 CEA LIST 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: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.infra.gmfdiag.common.providers; + +import java.lang.ref.WeakReference; + +import org.eclipse.gef.EditPart; +import org.eclipse.gef.EditPartFactory; +import org.eclipse.gmf.runtime.common.core.service.IOperation; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.services.editpart.AbstractEditPartProvider; +import org.eclipse.gmf.runtime.diagram.ui.services.editpart.CreateGraphicEditPartOperation; +import org.eclipse.gmf.runtime.diagram.ui.services.editpart.IEditPartOperation; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.infra.gmfdiag.common.structure.DiagramStructure; + +/** + * @since 3.1 + */ +public class DefaultEditPartProvider extends AbstractEditPartProvider { + + private EditPartFactory factory; + + private boolean allowCaching; + + private WeakReference<IGraphicalEditPart> cachedPart; + + private WeakReference<View> cachedView; + + private final DiagramStructure diagramStructure; + + private final String expectedModelId; + + public DefaultEditPartProvider(EditPartFactory factory, DiagramStructure diagramStructure, String expectedModelId) { + this.diagramStructure = diagramStructure; + this.expectedModelId = expectedModelId; + + setFactory(factory); + setAllowCaching(true); + } + + public final EditPartFactory getFactory() { + return factory; + } + + protected void setFactory(EditPartFactory factory) { + this.factory = factory; + } + + public final boolean isAllowCaching() { + return allowCaching; + } + + protected synchronized void setAllowCaching(boolean allowCaching) { + this.allowCaching = allowCaching; + if (!allowCaching) { + cachedPart = null; + cachedView = null; + } + } + + protected IGraphicalEditPart createEditPart(View view) { + EditPart part = factory.createEditPart(null, view); + if (part instanceof IGraphicalEditPart) { + return (IGraphicalEditPart) part; + } + return null; + } + + protected IGraphicalEditPart getCachedPart(View view) { + if (cachedView != null && cachedView.get() == view) { + return (IGraphicalEditPart) cachedPart.get(); + } + return null; + } + + public synchronized IGraphicalEditPart createGraphicEditPart(View view) { + if (isAllowCaching()) { + IGraphicalEditPart part = getCachedPart(view); + cachedPart = null; + cachedView = null; + if (part != null) { + return part; + } + } + return createEditPart(view); + } + + public synchronized boolean provides(IOperation operation) { + if (operation instanceof CreateGraphicEditPartOperation) { + View view = ((IEditPartOperation) operation).getView(); + if (!expectedModelId.equals(diagramStructure.getModelID(view))) { + return false; + } + if (isAllowCaching() && getCachedPart(view) != null) { + return true; + } + IGraphicalEditPart part = createEditPart(view); + if (part != null) { + if (isAllowCaching()) { + cachedPart = new WeakReference<IGraphicalEditPart>(part); + cachedView = new WeakReference<View>(view); + } + return true; + } + } + return false; + } +} diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/DefaultElementTypeIconProvider.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/DefaultElementTypeIconProvider.java new file mode 100644 index 00000000000..07ca9ee4c53 --- /dev/null +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/DefaultElementTypeIconProvider.java @@ -0,0 +1,57 @@ +/***************************************************************************** + * Copyright (c) 2015 CEA LIST 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: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.infra.gmfdiag.common.providers; + +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.emf.ecore.ENamedElement; +import org.eclipse.gmf.runtime.common.core.service.AbstractProvider; +import org.eclipse.gmf.runtime.common.core.service.IOperation; +import org.eclipse.gmf.runtime.common.ui.services.icon.GetIconOperation; +import org.eclipse.gmf.runtime.common.ui.services.icon.IIconProvider; +import org.eclipse.gmf.tooling.runtime.providers.DiagramElementTypeImages; +import org.eclipse.swt.graphics.Image; + +/** + * + * @author melaasar + * + */ +public class DefaultElementTypeIconProvider extends AbstractProvider implements IIconProvider { + + private final DiagramElementTypes myElementTypes; + + public DefaultElementTypeIconProvider(DiagramElementTypes elementTypes) { + myElementTypes = elementTypes; + } + + public final DiagramElementTypes getElementTypes() { + return myElementTypes; + } + + public final DiagramElementTypeImages getElementTypeImages() { + return myElementTypes.getElementTypeImages(); + } + + public Image getIcon(IAdaptable hint, int flags) { + ENamedElement definingElement = getElementTypes().getDefiningNamedElement(hint); + return definingElement == null ? null : getElementTypeImages().getImage(definingElement); + } + + public boolean provides(IOperation operation) { + if (operation instanceof GetIconOperation) { + return ((GetIconOperation) operation).execute(this) != null; + } + return false; + } +} diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/DiagramElementTypes.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/DiagramElementTypes.java new file mode 100644 index 00000000000..ddc76db1130 --- /dev/null +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/DiagramElementTypes.java @@ -0,0 +1,48 @@ +/***************************************************************************** + * Copyright (c) 2015 CEA LIST 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: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.infra.gmfdiag.common.providers; + +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.ecore.ENamedElement; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.tooling.runtime.providers.DiagramElementTypeImages; + +/** + * @author melaasar + * + */ +public abstract class DiagramElementTypes { + + private DiagramElementTypeImages myImages; + + public DiagramElementTypes(AdapterFactory adapterFactory) { + this(new DiagramElementTypeImages(adapterFactory)); + } + + public DiagramElementTypes(DiagramElementTypeImages images) { + myImages = images; + } + + public abstract IElementType getElementTypeForVisualId(String visualID); + + public abstract boolean isKnownElementType(IElementType elementType); + + public abstract ENamedElement getDefiningNamedElement(IAdaptable elementTypeAdapter); + + public DiagramElementTypeImages getElementTypeImages() { + return myImages; + } + +}
\ No newline at end of file diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/reconciler/ReconcilerForCompartment.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/reconciler/ReconcilerForCompartment.java index 6d80476649d..5ef21dedca5 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/reconciler/ReconcilerForCompartment.java +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/reconciler/ReconcilerForCompartment.java @@ -72,7 +72,7 @@ abstract public class ReconcilerForCompartment extends DiagramReconciler { * * @return the compartments visual id */ - abstract public List<Integer> getCompartmentsVisualID(); + abstract public List<String> getCompartmentsVisualID(); /** @@ -189,8 +189,8 @@ abstract public class ReconcilerForCompartment extends DiagramReconciler { */ protected boolean isCompartment(View view) { boolean value = false; - for (Integer compartment : getCompartmentsVisualID()) { - value = Integer.toString(compartment).equals(((View) view).getType()); + for (String compartment : getCompartmentsVisualID()) { + value = compartment.equals(((View) view).getType()); if (value == true) break; } diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/structure/DiagramStructure.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/structure/DiagramStructure.java new file mode 100644 index 00000000000..9c72abf1845 --- /dev/null +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/structure/DiagramStructure.java @@ -0,0 +1,33 @@ +/***************************************************************************** + * Copyright (c) 2015 CEA LIST 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: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.infra.gmfdiag.common.structure; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.gmf.runtime.notation.View; + +public abstract class DiagramStructure { + + public abstract String getVisualID(View view); + + public abstract String getModelID(View view); + + public abstract String getNodeVisualID(View containerView, EObject domainElement); + + public abstract boolean checkNodeVisualID(View containerView, EObject domainElement, String candidate); + + public abstract boolean isCompartmentVisualID(String visualID); + + public abstract boolean isSemanticLeafVisualID(String visualID); + +} diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/updater/DiagramUpdater.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/updater/DiagramUpdater.java new file mode 100644 index 00000000000..4cd6fe9317c --- /dev/null +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/updater/DiagramUpdater.java @@ -0,0 +1,32 @@ +/***************************************************************************** + * Copyright (c) 2015 CEA LIST 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: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.infra.gmfdiag.common.updater; + +import java.util.List; + +import org.eclipse.gmf.runtime.notation.View; + +/** + * @since 3.0 + */ +public interface DiagramUpdater { + + public List<? extends UpdaterNodeDescriptor> getSemanticChildren(View view); + + public List<? extends UpdaterLinkDescriptor> getContainedLinks(View view); + + public List<? extends UpdaterLinkDescriptor> getIncomingLinks(View view); + + public List<? extends UpdaterLinkDescriptor> getOutgoingLinks(View view); +} diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/updater/UpdaterLinkDescriptor.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/updater/UpdaterLinkDescriptor.java new file mode 100644 index 00000000000..690bd973cca --- /dev/null +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/updater/UpdaterLinkDescriptor.java @@ -0,0 +1,76 @@ +/***************************************************************************** + * Copyright (c) 2015 CEA LIST 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: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.infra.gmfdiag.common.updater; + +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter; +import org.eclipse.gmf.runtime.emf.type.core.IElementType; + +/** + * @since 3.0 + */ +public class UpdaterLinkDescriptor extends UpdaterNodeDescriptor { + + private EObject mySource; + + private EObject myDestination; + + private IAdaptable mySemanticAdapter; + + private UpdaterLinkDescriptor(EObject source, EObject destination, EObject linkElement, String linkVID) { + super(linkElement, linkVID); + mySource = source; + myDestination = destination; + } + + public UpdaterLinkDescriptor(EObject source, EObject destination, final IElementType elementType, String linkVID) { + this(source, destination, (EObject) null, linkVID); + mySemanticAdapter = new IAdaptable() { + + public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) { + if (IElementType.class.equals(adapter)) { + return elementType; + } + return null; + } + }; + } + + public UpdaterLinkDescriptor(EObject source, EObject destination, EObject linkElement, final IElementType elementType, String linkVID) { + this(source, destination, linkElement, linkVID); + mySemanticAdapter = new EObjectAdapter(linkElement) { + + public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) { + if (IElementType.class.equals(adapter)) { + return elementType; + } + return super.getAdapter(adapter); + } + }; + } + + public EObject getSource() { + return mySource; + } + + public EObject getDestination() { + return myDestination; + } + + public IAdaptable getSemanticAdapter() { + return mySemanticAdapter; + } + +} diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/updater/UpdaterNodeDescriptor.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/updater/UpdaterNodeDescriptor.java new file mode 100644 index 00000000000..dc5ac858865 --- /dev/null +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/updater/UpdaterNodeDescriptor.java @@ -0,0 +1,40 @@ +/***************************************************************************** + * Copyright (c) 2015 CEA LIST 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: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.infra.gmfdiag.common.updater; + +import org.eclipse.emf.ecore.EObject; + +/** + * @since 3.0 + */ +public class UpdaterNodeDescriptor { + + private final EObject myModelElement; + + private final String myVisualID; + + public UpdaterNodeDescriptor(EObject modelElement, String visualID) { + myModelElement = modelElement; + myVisualID = visualID; + } + + public EObject getModelElement() { + return myModelElement; + } + + public String getVisualID() { + return myVisualID; + } + +} |