Replies: 18 comments
-
Hi. Looks to me like you forgot to register your metamodel on startup. This can be done by simply calling |
Beta Was this translation helpful? Give feedback.
-
[simongraband] Ah yes, i missed that, however after adding it i still get the same error. |
Beta Was this translation helpful? Give feedback.
-
[simongraband] Do you have another idea what might be wrong here? |
Beta Was this translation helpful? Give feedback.
-
Looks to me like your empty.cmmn file is wrong. |
Beta Was this translation helpful? Give feedback.
-
In general I would recommend to also check the model resource (.ecore, .genmodel) in. Otherwise it's hard to verify if your metamodel is correct. |
Beta Was this translation helpful? Give feedback.
-
[simongraband] I pushed my model resource to https://github.com/simongraband/cmmn-editor/tree/master/server/src/main/resources. |
Beta Was this translation helpful? Give feedback.
-
[simongraband] Ok, i think i might have a wrong understanding of |
Beta Was this translation helpful? Give feedback.
-
[simongraband] But i need a |
Beta Was this translation helpful? Give feedback.
-
Right. You need an element that serves as root container. Maybe the Ecore Metamodel is not the best example for this. Let's have a look at the enotation.ecore: |
Beta Was this translation helpful? Give feedback.
-
The Diagram element serves as root container in this case. And the corresponding empty file would look something like this: |
Beta Was this translation helpful? Give feedback.
-
<enotation:Diagram xmi:version='2.0' xmlns:xmi='http://www.omg.org/XMI' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' |
Beta Was this translation helpful? Give feedback.
-
I'm not familar with CMMN but you probably need something similar here. An element that maintains a set of 'CMMNElements' |
Beta Was this translation helpful? Give feedback.
-
[simongraband] I updated this and now i can load up the .cmm File with One explanation i might have is that i need to update the enotation model to handle CMMNElements instead of EcoreElements. However i am not quite sure if this is needed at all, since CMMNElements inherit from Ecore. So do i need to update my enotation model and could this be the reason for the elements not showing up? Or could there be another reason that causes this? |
Beta Was this translation helpful? Give feedback.
-
[simongraband] (My current state is on Github) |
Beta Was this translation helpful? Give feedback.
-
[simongraband] I think i figured out why the nodes are not drawn, however i am still not sure if i need to change the enotation model. |
Beta Was this translation helpful? Give feedback.
-
I don't think it's necessary to change the enotation model. It's using a generic (uri-based) approach and should work for all ecore-based models. I quickly tested your current state and it looks to me like you are missing some (re)bindings in |
Beta Was this translation helpful? Give feedback.
-
[Leo Knoll] I added a root container to my metamodel and now everything works, I was also confused by the EPackage and ECorePackage, thank you :-) |
Beta Was this translation helpful? Give feedback.
-
Hey,
I am trying to add a custom metamodel to the glsp server. As a blueprint i am using the ecore-glsp project.
I created a metamodel for the CMMN language and added the code to existing Ecore Server, where i updated everything to use the CMMN metamodel instead of the Ecore dependencies.
Now i am having trouble generating a file header, similar to the Ecore one, which allows me to open the file and then work with the CMMN metamodel.
The header for the Ecore files looks like this:
So to my understanding the only two parts that would point to a metamodel are
ecore:EPackage
andxmlns:ecore='http://www.eclipse.org/emf/2002/Ecore'
, however i am unsure to what i need to change them to. For the first part i choose to rename it tocmmn:MetamodelPackage
withMetamodelPackage
being the name of the class that does the same as the EPackage. However if i try to open the file with the following header i get the following error:Which i think is strange, since EPackage is also a interface, therefore i think it cannot find the
MetamodelPackage
. Do i need to do a additional step in order to register the metamodel?For reference here is my current state: https://github.com/simongraband/cmmn-editor
thanks in advance
original thread by simongraband
Beta Was this translation helpful? Give feedback.
All reactions