[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.technology.gmt.amw] Re: model conforms to metamodel: problem! Help me, please
|
Hello,
this question is more related to the ATL discussion-list (atl_discussion@xxxxxxxxxxxxxxx).
You can try two possible solutions to your problem:
1) the AM3 Ant tasks are not designed to load metamodels (or models) the way you try to
do. These tasks are designed to load models that are going to be transformed (or injected,
extracted, etc.), within the same Ant script.
However, due to the way this task is implemented, it may be possible to do as explained in
a previous post in the ATL list, where you create a root element by hand.
http://tech.groups.yahoo.com/group/atl_discussion/message/1860
> <?xml version=1.0" encoding="UTF-8"?>
> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
> xmlns="uml2"/>
But in this Ecore model, you do not have the root element (for example, "Model"), so the
Sample Editor doesn't propose you to create other elements.
The root element must conform to the metamodel you are trying to load, in your case, UML2.
2) another solution is try to use a set of plugins that with an user interface that helps
to register metamodels and to create models. Instructions on how to download and install
them are found in the post
http://tech.groups.yahoo.com/group/atl_discussion/message/1770.
Regards,
Marcos.
puellula wrote:
Hello. Perhalp I'm not writing in the correct place, but I need help...
please, it's very important for me. Please, if you can, spend some
minutes for help me. Thank you very much!
I have a problem for create a model conform to my metamodel. I'm using
Eclipse 3.1.2 (from ATLBundle-20060501) with Omondo 2.1.0 . I had
created a file LoadMetamodel.xml with Ant Editor:
<project name="LoadMetamodels" default="loadAllMetamodels"> <target
name="loadAllMetamodels">
<am3.loadModel modelHandler="EMF" name="uml2" metamodel="MOF"
path="/UML2.ecore" />
</target> </project>
After this, I run LoadMetamodel.xml with Ant and the result is:
loadAllMetamodels:
[am3.loadModel] Loading of model uml2
BUILD SUCCESSFUL
Therefore, I image it's all ok!
After I had created a ecore file with this:
<?xml version=1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
xmlns="uml2"/>
but when I open this last file with Sample Ecore Model Editor I see that
it's not load my metamodel, because for create my model I see only EMF
object.
Can someone help me?
Thank you very much!
puellula