Type in Ecore not found [message #1749231] |
Sat, 03 December 2016 13:47  |
Eclipse User |
|
|
|
Hi,
I have a couple of questions regarding the definition and registration of ecore models.
Q1. In the example metamodels, there exist two files for each type of metamodel. One with the '.emf' extension and the other one with the '.ecore' extension (i.e., Graph.emf and Graph.ecore). Seems like both of them are equivalent. I am wondering, for defining my own metamodel, will I also have to create both types of files? Or, creating just '.ecore' file is enough?
Q2. I created a simple ecore file by following the tutorial on http://eclipsesource.com/blogs/tutorials/emf-tutorial.
Please find the attached screenshot of the ecore file. I registered this file and also specify it in the list of metamodels for target specification while creating the '.launch' file. Unfortunately, after running the following ETL code, the console output says "Type B1 not found". What am I doing wrong here?
ETL Code:
rule basic
transform source:UML_Input!Model
to target:B1{
target.name=source.name;
}
|
|
|
|
|
|
Re: Type in Ecore not found [message #1749271 is a reply to message #1749257] |
Sun, 04 December 2016 23:51   |
Eclipse User |
|
|
|
Dimitris Kolovos wrote on Sun, 04 December 2016 16:19Hi,
As long as your model is named B1 in the model configuration dialog of your run configuration this should work fine. If it doesn't, could you please put together a minimal example [1] we can use to reproduce this?
Cheers,
Dimitris
[1] https://www.eclipse.org/epsilon/doc/articles/minimal-examples/
Hi Dimitris,
Thanks for pointing out the problem. The model was not named B1 in the model configuration window previously and I think that's what caused the problem.
However, I am still having issue in launching this transformation . Now, I am getting a Java runtime null-pointer exception. Please find attached screenshots. As you will see, for making it simple, I used the 'tree.model' from epsilon example directory as the input and B1.ecore as the metamodel of the output. Am I doing anything wrong?
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.29585 seconds