blob: 32b0b1af51167bbe3b50f6f3bb284b7eeae50f97 [file] [log] [blame]
/*****************************************************************************
* Copyright (c) 2016 CEA LIST.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
*****************************************************************************/
import org.eclipse.papyrus.interoperability.rpy.blackboxes.VersioningBlackboxes;
modeltype umlrpy "strict" uses 'http://www.eclipse.org/Papyrus/UMLRpy/1.0.0';
modeltype ecore "strict" uses 'http://www.eclipse.org/emf/2002/Ecore';
/**
* This file provides useful method for Rpy elements
*/
library RpyToPapyrusUtils;
/**
*
* This helper create an EAnnotation from the IProject to know that it comes from a Rpy Model, and save as details these informations:
* <ul>
* <li>Rpy project name</li>
* <li>Rpy version</li>
* <li>Papyrus Rpy import bundle version</li>
* </ul>
*/
helper rpymetamodel::IProject::createEAnnotationForVersioning():ecore::EAnnotation{
var versionning:EAnnotation:=object EAnnotation{
source:=getEAnnotationSourceNameForVersioning();
details+= object EStringToStringMapEntry{
key:=getKeyForRpyModelName();
value:=self.name;
};
details+= object EStringToStringMapEntry{
key:=getKeyForRpyVersion();
value:=self.version;
};
details+= object EStringToStringMapEntry{
key:=getKeyForPapyrusImportBundleVersion();
value:=getImportBundleRpyVersion();
};
};
return versionning;
}