Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » EOL Show user messages / modeler
EOL Show user messages / modeler [message #899908] Thu, 02 August 2012 19:07 Go to next message
Eva Gómez is currently offline Eva GómezFriend
Messages: 2
Registered: August 2012
Junior Member
I'm a student of software engineering and I'm doing my final project I have built an eol program to transverse models.
I need to show users messages in the model view I had downloaded the example show in this link

because I think this example do what I need, but it not running It´s says:

"to run the example you need to go through the following steps:

1. register any .ecore metamodels in the org.eclipse.epsilon.examples.standalone project
2. right click the .launch file in the org.eclipse.epsilon.examples.standalone project
3. select Run as... and click the first item in the menu that pops up"

but I can´t find the .launch file that explain in the second step.

I tried to fix the problem using EuGenia and generate the model but when I do that I obtaind more and more errors.

I need this example to run because I must to obtain a context menu in a model and run an .eol program that transverse this model.

someone can help me?

Thank you
Re: EOL Show user messages / modeler [message #899915 is a reply to message #899908] Thu, 02 August 2012 20:11 Go to previous messageGo to next message
Horacio Hoyos is currently offline Horacio HoyosFriend
Messages: 195
Registered: October 2009
Location: UK
Senior Member

Hi Eva,

If I understand correctly you will need two things:
1. A menu entry to invoke your eol program
2. The epsilon standalone version, or call the epsilon task from java (run an Ant file)

1. I would start off by creating a new Plugin project. In the wizard choose the plugin template that "adds components to the UI", so that the correct dependencies are loaded. You should read about creating menus and commands, but in short you need to add "extension points" to your plugin. I like to edit the plugin.xml file my self, but you can also do it from the extensions tab of the plugin manifest view. At the end you should have something in the lines of:
	<extension point="org.eclipse.ui.menus">
                style="push" >
	<extension point="org.eclipse.ui.commands">
	<extension point="org.eclipse.ui.handlers">

In the org.eclipse.ui.handlers extension point you define the class that handles the command. For this you should create a Java class that extends AbstractHandler and implements iHandler:
public class myMenuHandler extends AbstractHandler implements IHandler {

	/* (non-Javadoc)
	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
	public Object execute(ExecutionEvent event) throws ExecutionException {
		/* Insert your handling code here */
		return this;

Your handling code should first retrieve the current editor file (your model) and then invocation of the eol file.

2. For the eol invocation choose what works best for you. When it says "register your "ecore metamodel", you should right click over your ecore metamodel and then click on the "Register EPackages" option. Then in your handling code you need to invoke the epsilon standalone class and pass it the path to the model you retrieved previously. If you decide to invoke the Ant (execute the launch file) you should add some code that does that and that passes the model info to the Ant environment.

I know it is a lot of information and that I am letting some details out, but the idea is that you get the general idea. If you have further specific questions keep posting them here.


Horacio Hoyos Rodriguez
Epsilon Committer
Research Assistant
University Of York
Re: EOL Show user messages / modeler [message #915674 is a reply to message #899915] Mon, 17 September 2012 18:21 Go to previous message
Eva Gómez is currently offline Eva GómezFriend
Messages: 2
Registered: August 2012
Junior Member
Thank you for the faster answer, i´m sorry because i didn´t have been time to try your recomendations.
I will try to check your recomendation on this week.
Previous Topic:hutn file
Next Topic:EGL-EGL model transformations using ETL?
Goto Forum:

Current Time: Tue May 22 06:38:44 GMT 2018

Powered by FUDForum. Page generated in 0.01704 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top