Hello guys I'd like to know if someone cold help me. My problem is the following: I need to extending the KDM, I mean to create a profile. I know that it is possible in the KDM just by extending the ExtendedValue and creating some TagDefinition. However, I don't know how to do that in the MoDisco. Has someone the doubt ?
Please if you know how to extend the KDM please let me know, I'll be so grateful.
looking at the OMF KDM specfication, here is the way i would extend and use KDM metamodel :
- create some model which conforms to kdm metamodel ("http://www.eclipse.org/MoDisco/kdm/kdm" uri) with the "sample ecore reflective model editor"
- in the model, create the Stereotype instances, then the TagDefinition instances (profile definition)
- in another model which will use the extension, i would reference both kdm metamodel and the "profile kdm model" created. Then i can attach the created "Stereotype" instance to any element ("stereotype" link). And then i can attach some new "TaggedValue" or "TaggedRef" instances to the element. "TaggedValue" or "TaggedRef" instances will be attached to the existing "TagDefinition" instance.
Hello Fabien Giquel, thank you, I was trying to create an EMF project making what you have suggested but I didn't have success. I have made the following: File--> New --> Other--> Eclipse Modeling Framework --> EMF Project, thus, I gave a name to the project in the wizard model import I picked out Ecore Model, afterwards I fill the textfield model URI with ""http://www.eclipse.org/MoDisco/kdm/kdm" and I clicked in Load. In the textfield "Generator model file name" shows kdm.genmodel. However, the wizard don't let me go ahead.
Do you know why? Please help me, thanks Fabien Giquel
You do not have to create an EMF Project. My idea was about having some empty initialized myKdmModel.xmi file that you edit with "Sample Ecore Reflective Editor". But I see it is not so simple. The problem is that MoDisco does not provide the emf "kdm.editor" component (see EMF tutorials)
So one way is to initialize the myKdmModel.xmi from some Java program which would create and fill some org.eclipse.emf.ecore.resource.Resource instance, with instances conforming to "http://www.eclipse.org/MoDisco/kdm/kdm".
I was looking for at the internet and I found out a tutorial, which teach how to extend EMF model. Thus, whether someone is having the same problem please send me an private message... I tried to put the link inhere but I couldn't.
I think that in such tutorial the guy is explaining the same thing that Fabien told me...