Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Running the EGL example
Running the EGL example [message #557672] Wed, 08 September 2010 09:39 Go to next message
Andreas is currently offline Andreas
Messages: 33
Registered: September 2010
Location: Germany
Member
Hi,

I have some problems to run the EGL Example (org.eclipse.epsilon.examples.egldoc.zip).

I just downloaded the zip file and imported it into a Java Project within Eclipse. But now I have some trouble to solve the import problems.
I added some libraries like
org.eclipse.epsilon.eol.engine.jar
org.eclipse.epsilon.egl.engine.jar
org.eclipse.epsilon.commons.jar
to the build path and changed the imports in the java classes from org.epsilon to org.eclipse.epsilon.
But there is a problem I cannot resolve. In the class EglDocFacade.java (line 69 and 70) I get the following error message
The method getScope() is undefined for the type IEglContext

Have there been any major changes on the interfaces in the last time?
Or do I have to import other libraries to run the example?

Thanks,
Andreas
Re: Running the EGL example [message #557678 is a reply to message #557672] Wed, 08 September 2010 09:43 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Andreas,

It appears that we'll need to update this example as there have been a
few changes in the EGL API since we first wrote it. We'll have a look at
this and get back to you.

Cheers,
Dimitris

Andreas wrote:
> Hi,
>
> I have some problems to run the EGL Example
> (org.eclipse.epsilon.examples.egldoc.zip).
>
> I just downloaded the zip file and imported it into a Java Project
> within Eclipse. But now I have some trouble to solve the import problems.
> I added some libraries like
> org.eclipse.epsilon.eol.engine.jar
> org.eclipse.epsilon.egl.engine.jar
> org.eclipse.epsilon.commons.jar
> to the build path and changed the imports in the java classes from
> org.epsilon to org.eclipse.epsilon.
> But there is a problem I cannot resolve. In the class EglDocFacade.java
> (line 69 and 70) I get the following error message
> The method getScope() is undefined for the type IEglContext
>
> Have there been any major changes on the interfaces in the last time?
> Or do I have to import other libraries to run the example?
>
> Thanks,
> Andreas
>
Re: Running the EGL example [message #557711 is a reply to message #557678] Wed, 08 September 2010 11:13 Go to previous messageGo to next message
Louis Rose is currently offline Louis Rose
Messages: 439
Registered: July 2009
Location: York, United Kingdom
Senior Member
Hi Andreas,

I've updated the EGLDoc example to work with the latest version of EGL. Would you try downloading the current version?

http://www.eclipse.org/gmt/epsilon/examples/getit.php?exampl e=org.eclipse.epsilon.examples.egldoc

To launch the example, run the EglDoc.launch file in the example directory. This should produce an output directory containing documentation for the example/Families.ecore metamodel.

I'll update the JAR, DOC and PDF files tomorrow.

Cheers,
Louis.
Re: Running the EGL example [message #557778 is a reply to message #557711] Wed, 08 September 2010 17:28 Go to previous messageGo to next message
Andreas is currently offline Andreas
Messages: 33
Registered: September 2010
Location: Germany
Member
Hi Louis,

thank you for the quick response.

I downloaded the example and now it works fine.

Thanks again,

Andreas
Re: Running the EGL example [message #557836 is a reply to message #557778] Thu, 09 September 2010 03:15 Go to previous messageGo to next message
Louis Rose is currently offline Louis Rose
Messages: 439
Registered: July 2009
Location: York, United Kingdom
Senior Member
Hi Andreas,

You're welcome. Do let us know if you have any further problems or questions.

Cheers,
Louis.
Re: Running the EGL example [message #557901 is a reply to message #557836] Thu, 09 September 2010 07:43 Go to previous messageGo to next message
Andreas is currently offline Andreas
Messages: 33
Registered: September 2010
Location: Germany
Member
Hi Louis,

yeah maybe you can help me again.

What do I want to generate with EGL?
I have a trace model (XMI file), which is based on a meta model (ECore file).
Now I want to generate a report based on the data in the trace model. So far I think that should be possible with EGL.
I studied your example a little bit and now I'm trying to implement a small prototype.
My only problem at the moment is, that I have no idea how I can access the data from the trace model in the template files.

Maybe you can give me a hint?

Thanks,
Andreas
Re: Running the EGL example [message #557938 is a reply to message #557901] Thu, 09 September 2010 10:03 Go to previous messageGo to next message
Andreas is currently offline Andreas
Messages: 33
Registered: September 2010
Location: Germany
Member
... in the meanwhile I moved a step forward.

I made a mistake by the instantiation of the class EmfModel for the trace model. I had set the property READONLOAD to false.
Now I'm able to access the trace model, but only on the meta level (via the allInstances() method).

Is there a possibility to access the correct data from the trace model within my EGL templates?
Can I cast objects in EGL templates?

Thanks,
Andreas
Re: Running the EGL example [message #557941 is a reply to message #557938] Thu, 09 September 2010 10:13 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Andreas,

It would probably help if you could provide some more information on
this (metamodels, sample models, what you're trying to generate etc.).

Cheers,
Dimitris

Andreas wrote:
> .. in the meanwhile I moved a step forward.
> I made a mistake by the instantiation of the class EmfModel for the
> trace model. I had set the property READONLOAD to false. Now I'm able to
> access the trace model, but only on the meta level (via the
> allInstances() method).
> Is there a possibility to access the correct data from the trace model
> within my EGL templates? Can I cast objects in EGL templates?
> Thanks,
> Andreas
Re: Running the EGL example [message #558392 is a reply to message #557941] Sun, 12 September 2010 04:11 Go to previous messageGo to next message
Andreas is currently offline Andreas
Messages: 33
Registered: September 2010
Location: Germany
Member
Hi Dimitris,

sure I can provide you some more information.

I have a trace model (xmi file) with was generated during a model to model transformation. Now I want to generate something like a coverage report from that trace model. So I want to read the trace model, calculate some things and then generate a HTML report from this information.
But at the moment, I'm not able to access the concrete data within the trace model. I only can access the meta model level.

How the meta model of the trace model looks like, you can see here:
http://img225.imageshack.us/img225/1724/tracemodel.png

A small version of a concrete trace model could look like this:
http://img843.imageshack.us/img843/5540/tracemodelexamle.png

Till now I haven't found a way to access the attributes like id, name, modelID, ...

I also already sent you my sample project on your GMail account. I hope you received it.

Thanks,

Andreas


Re: Running the EGL example [message #558502 is a reply to message #558392] Mon, 13 September 2010 05:31 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Andreas,

I've received your email but haven't had a chance to look at it yet.
I'll hopefully do so and get back to you later on today.

Cheers,
Dimitris

Andreas wrote:
> Hi Dimitris,
>
> sure I can provide you some more information.
> I have a trace model (xmi file) with was generated during a model to
> model transformation. Now I want to generate something like a coverage
> report from that trace model. So I want to read the trace model,
> calculate some things and then generate a HTML report from this
> information. But at the moment, I'm not able to access the concrete data
> within the trace model. I only can access the meta model level.
> How the meta model of the trace model looks like, you can see here:
>
>
> A small version of a concrete trace model could look like this:
>
>
> Till now I haven't found a way to access the attributes like id, name,
> modelID, ...
>
> I also already sent you my sample project on your GMail account. I hope
> you received it.
> Thanks,
>
> Andreas
>
>
>
Re: Running the EGL example [message #558540 is a reply to message #558502] Mon, 13 September 2010 08:31 Go to previous messageGo to next message
Andreas is currently offline Andreas
Messages: 33
Registered: September 2010
Location: Germany
Member
Thanks to Dimitris I'm now able to access the attributes, ...

If you know how it's really easy:

for (l in TraceLink.all) {
out.println(l.id + "<br><br>");
}

Thanks again.

Andreas
Re: Running the EGL example [message #558989 is a reply to message #558540] Wed, 15 September 2010 05:05 Go to previous messageGo to next message
Andreas is currently offline Andreas
Messages: 33
Registered: September 2010
Location: Germany
Member
Hi Dimitris,

now I have another problem.
The solution above for accessing the attributes works fine as long as I only have one model.
If I try to load an additional model in my program, I only can access the data the way above for the model which I loaded first. For the second model I get the following exception:

Exception in thread "main" Type 'Package' not found (...)
at org.eclipse.epsilon.egl.internal.EglPreprocessorModule.execu te(EglPreprocessorModule.java:64)
at org.eclipse.epsilon.egl.internal.EglModule.execute(EglModule .java:143)
at org.eclipse.epsilon.egl.internal.EglModule.execute(EglModule .java:153)
at org.eclipse.epsilon.egl.EglTemplate.process(EglTemplate.java :69)
at org.epsilon.egl.doc.EglDocFacade.generate(EglDocFacade.java: 90)
at org.epsilon.egl.doc.EglDoc.main(EglDoc.java:26)

Is it not possible to use several input models with EGL? Or do I have to consider something special?

Kind regards,

Andreas

Re: Running the EGL example [message #559363 is a reply to message #558989] Thu, 16 September 2010 09:17 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Andreas,

When you have more than one models in your Epsilon programs you should
use the ModelName!ClassName syntax to distinguish between meta-classes
in your models.

Cheers,
Dimitris

On 15/09/2010 11:05, Andreas wrote:
> Hi Dimitris,
>
> now I have another problem.
> The solution above for accessing the attributes works fine as long as I
> only have one model. If I try to load an additional model in my program,
> I only can access the data the way above for the model which I loaded
> first. For the second model I get the following exception:
>
> Exception in thread "main" Type 'Package' not found (...)
> at org.eclipse.epsilon.egl.internal.EglPreprocessorModule.execu
> te(EglPreprocessorModule.java:64)
> at org.eclipse.epsilon.egl.internal.EglModule.execute(EglModule .java:143)
> at org.eclipse.epsilon.egl.internal.EglModule.execute(EglModule .java:153)
> at org.eclipse.epsilon.egl.EglTemplate.process(EglTemplate.java :69)
> at org.epsilon.egl.doc.EglDocFacade.generate(EglDocFacade.java: 90)
> at org.epsilon.egl.doc.EglDoc.main(EglDoc.java:26)
>
> Is it not possible to use several input models with EGL? Or do I have to
> consider something special?
>
> Kind regards,
>
> Andreas
>
Re: Running the EGL example [message #559403 is a reply to message #559363] Thu, 16 September 2010 10:28 Go to previous message
Andreas is currently offline Andreas
Messages: 33
Registered: September 2010
Location: Germany
Member
Hi Dimitris.

yeah ok, that seems to be obvious.

Thank you.

Kind regards,

Andreas
Re: Running the EGL example [message #593547 is a reply to message #557678] Wed, 08 September 2010 11:13 Go to previous message
Louis Rose is currently offline Louis Rose
Messages: 439
Registered: July 2009
Location: York, United Kingdom
Senior Member
Hi Andreas,

I've updated the EGLDoc example to work with the latest version of EGL. Would you try downloading the current version?

http://www.eclipse.org/gmt/epsilon/examples/getit.php?exampl e=org.eclipse.epsilon.examples.egldoc

To launch the example, run the EglDoc.launch file in the example directory. This should produce an output directory containing documentation for the example/Families.ecore metamodel.

I'll update the JAR, DOC and PDF files tomorrow.

Cheers,
Louis.
Re: Running the EGL example [message #593581 is a reply to message #593547] Wed, 08 September 2010 17:28 Go to previous message
Andreas is currently offline Andreas
Messages: 33
Registered: September 2010
Location: Germany
Member
Hi Louis,

thank you for the quick response.

I downloaded the example and now it works fine.

Thanks again,

Andreas
Re: Running the EGL example [message #593593 is a reply to message #593581] Thu, 09 September 2010 03:15 Go to previous message
Louis Rose is currently offline Louis Rose
Messages: 439
Registered: July 2009
Location: York, United Kingdom
Senior Member
Hi Andreas,

You're welcome. Do let us know if you have any further problems or questions.

Cheers,
Louis.
Re: Running the EGL example [message #593605 is a reply to message #593593] Thu, 09 September 2010 07:43 Go to previous message
Andreas is currently offline Andreas
Messages: 33
Registered: September 2010
Location: Germany
Member
Hi Louis,

yeah maybe you can help me again.

What do I want to generate with EGL?
I have a trace model (XMI file), which is based on a meta model (ECore file).
Now I want to generate a report based on the data in the trace model. So far I think that should be possible with EGL.
I studied your example a little bit and now I'm trying to implement a small prototype.
My only problem at the moment is, that I have no idea how I can access the data from the trace model in the template files.

Maybe you can give me a hint?

Thanks,
Andreas
Re: Running the EGL example [message #593615 is a reply to message #557901] Thu, 09 September 2010 10:03 Go to previous message
Andreas is currently offline Andreas
Messages: 33
Registered: September 2010
Location: Germany
Member
... in the meanwhile I moved a step forward.

I made a mistake by the instantiation of the class EmfModel for the trace model. I had set the property READONLOAD to false.
Now I'm able to access the trace model, but only on the meta level (via the allInstances() method).

Is there a possibility to access the correct data from the trace model within my EGL templates?
Can I cast objects in EGL templates?

Thanks,
Andreas
Re: Running the EGL example [message #593626 is a reply to message #593615] Thu, 09 September 2010 10:13 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Andreas,

It would probably help if you could provide some more information on
this (metamodels, sample models, what you're trying to generate etc.).

Cheers,
Dimitris

Andreas wrote:
> .. in the meanwhile I moved a step forward.
> I made a mistake by the instantiation of the class EmfModel for the
> trace model. I had set the property READONLOAD to false. Now I'm able to
> access the trace model, but only on the meta level (via the
> allInstances() method).
> Is there a possibility to access the correct data from the trace model
> within my EGL templates? Can I cast objects in EGL templates?
> Thanks,
> Andreas
Re: Running the EGL example [message #593634 is a reply to message #557941] Sun, 12 September 2010 04:11 Go to previous message
Andreas is currently offline Andreas
Messages: 33
Registered: September 2010
Location: Germany
Member
Hi Dimitris,

sure I can provide you some more information.

I have a trace model (xmi file) with was generated during a model to model transformation. Now I want to generate something like a coverage report from that trace model. So I want to read the trace model, calculate some things and then generate a HTML report from this information.
But at the moment, I'm not able to access the concrete data within the trace model. I only can access the meta model level.

How the meta model of the trace model looks like, you can see here:


A small version of a concrete trace model could look like this:


Till now I haven't found a way to access the attributes like id, name, modelID, ...

I also already sent you my sample project on your GMail account. I hope you received it.

Thanks,

Andreas
Re: Running the EGL example [message #593660 is a reply to message #593634] Mon, 13 September 2010 05:31 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Andreas,

I've received your email but haven't had a chance to look at it yet.
I'll hopefully do so and get back to you later on today.

Cheers,
Dimitris

Andreas wrote:
> Hi Dimitris,
>
> sure I can provide you some more information.
> I have a trace model (xmi file) with was generated during a model to
> model transformation. Now I want to generate something like a coverage
> report from that trace model. So I want to read the trace model,
> calculate some things and then generate a HTML report from this
> information. But at the moment, I'm not able to access the concrete data
> within the trace model. I only can access the meta model level.
> How the meta model of the trace model looks like, you can see here:
>
>
> A small version of a concrete trace model could look like this:
>
>
> Till now I haven't found a way to access the attributes like id, name,
> modelID, ...
>
> I also already sent you my sample project on your GMail account. I hope
> you received it.
> Thanks,
>
> Andreas
>
>
>
Re: Running the EGL example [message #593779 is a reply to message #558502] Mon, 13 September 2010 08:31 Go to previous message
Andreas is currently offline Andreas
Messages: 33
Registered: September 2010
Location: Germany
Member
Thanks to Dimitris I'm now able to access the attributes, ...

If you know how it's really easy:

for (l in TraceLink.all) {
out.println(l.id + "<br><br>");
}

Thanks again.

Andreas
Re: Running the EGL example [message #593889 is a reply to message #558540] Wed, 15 September 2010 05:05 Go to previous message
Andreas is currently offline Andreas
Messages: 33
Registered: September 2010
Location: Germany
Member
Hi Dimitris,

now I have another problem.
The solution above for accessing the attributes works fine as long as I only have one model.
If I try to load an additional model in my program, I only can access the data the way above for the model which I loaded first. For the second model I get the following exception:

Exception in thread "main" Type 'Package' not found (...)
at org.eclipse.epsilon.egl.internal.EglPreprocessorModule.execu te(EglPreprocessorModule.java:64)
at org.eclipse.epsilon.egl.internal.EglModule.execute(EglModule .java:143)
at org.eclipse.epsilon.egl.internal.EglModule.execute(EglModule .java:153)
at org.eclipse.epsilon.egl.EglTemplate.process(EglTemplate.java :69)
at org.epsilon.egl.doc.EglDocFacade.generate(EglDocFacade.java: 90)
at org.epsilon.egl.doc.EglDoc.main(EglDoc.java:26)

Is it not possible to use several input models with EGL? Or do I have to consider something special?

Kind regards,

Andreas
Re: Running the EGL example [message #593895 is a reply to message #593889] Thu, 16 September 2010 09:17 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Andreas,

When you have more than one models in your Epsilon programs you should
use the ModelName!ClassName syntax to distinguish between meta-classes
in your models.

Cheers,
Dimitris

On 15/09/2010 11:05, Andreas wrote:
> Hi Dimitris,
>
> now I have another problem.
> The solution above for accessing the attributes works fine as long as I
> only have one model. If I try to load an additional model in my program,
> I only can access the data the way above for the model which I loaded
> first. For the second model I get the following exception:
>
> Exception in thread "main" Type 'Package' not found (...)
> at org.eclipse.epsilon.egl.internal.EglPreprocessorModule.execu
> te(EglPreprocessorModule.java:64)
> at org.eclipse.epsilon.egl.internal.EglModule.execute(EglModule .java:143)
> at org.eclipse.epsilon.egl.internal.EglModule.execute(EglModule .java:153)
> at org.eclipse.epsilon.egl.EglTemplate.process(EglTemplate.java :69)
> at org.epsilon.egl.doc.EglDocFacade.generate(EglDocFacade.java: 90)
> at org.epsilon.egl.doc.EglDoc.main(EglDoc.java:26)
>
> Is it not possible to use several input models with EGL? Or do I have to
> consider something special?
>
> Kind regards,
>
> Andreas
>
Re: Running the EGL example [message #593902 is a reply to message #559363] Thu, 16 September 2010 10:28 Go to previous message
Andreas is currently offline Andreas
Messages: 33
Registered: September 2010
Location: Germany
Member
Hi Dimitris.

yeah ok, that seems to be obvious.

Thank you.

Kind regards,

Andreas
Previous Topic:Error when adding a model to a newly created launch configuration for an evl file
Next Topic:Loading models into IModel objects
Goto Forum:
  


Current Time: Thu Aug 28 01:23:01 EDT 2014

Powered by FUDForum. Page generated in 0.32212 seconds