Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [Epsilon] Standalone(Invoking Epsilon from java)
[Epsilon] Standalone [message #665490] Thu, 14 April 2011 19:19 Go to next message
Horacio Hoyos is currently offline Horacio HoyosFriend
Messages: 165
Registered: October 2009
Senior Member

Hello,

I downloaded the standalone example form the repository in order ti make my own implementation. I was creating a new class using the EpsilonStandaloneExample as a base/example. However, when I create a new calss and start to add the code, I get the following error in various lines, for example in:

module = createModule();
module.parse(getFile(getSource()));


The Error:

Access restriction: The method parse(File) from the type IModule is not accessible due to restriction on required library C:\Users\asistente\eclipse\hiles3.6\plugins\org.eclipse.epsilon.commons_0.9.0.201011251259\org.eclipse.epsilon.commons.jar


How can avoid this error from poping? I am missing some license information or similar in order to be able to inlcude epsilon classes in my own java project?

Thanks in advance,

Horacio
Re: [Epsilon] Standalone [message #665715 is a reply to message #665490] Fri, 15 April 2011 15:14 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 1230
Registered: July 2009
Senior Member
Hi Horacio,

Is it a runtime exception you're getting? Which version of Epsilon are you using?

Cheers,
Dimitris
Re: [Epsilon] Standalone [message #665829 is a reply to message #665715] Sat, 16 April 2011 16:33 Go to previous messageGo to next message
Horacio Hoyos is currently offline Horacio HoyosFriend
Messages: 165
Registered: October 2009
Senior Member

Hi Dimitris,

It is not a runtime exception, is an error that shows in the editor while writing the code (compilation error). I have the latest version of the plugin in the stable update site and using Eclipse 3.6 (Helios).

Regards,

Horacio
Re: [Epsilon] Standalone [message #665832 is a reply to message #665829] Sat, 16 April 2011 18:49 Go to previous messageGo to next message
Horacio Hoyos is currently offline Horacio HoyosFriend
Messages: 165
Registered: October 2009
Senior Member

Hello,

I have been looking further into this and I think I have work it out. Disregard my old post plz (i.i. before editing)!

Regards,

Horacio

[Updated on: Sat, 16 April 2011 19:15]

Report message to a moderator

Re: [Epsilon] Standalone [message #665838 is a reply to message #665490] Sat, 16 April 2011 21:10 Go to previous message
Horacio Hoyos is currently offline Horacio HoyosFriend
Messages: 165
Registered: October 2009
Senior Member

Here are my findings on how I resolve it, though I don't know if this is a good solution.

I decided to take a look at the Build Path and Manifest f the EpsilonStandAloneProject. The Build Path showed me that there where some differences in the plugins imported (my project had more of the epsilon plugins). So I went and take a look at the manifest and found that as I wrote the code and solved the missing imports, the eclipse jars where added as "Imports" (single jars, not plugins):
Import-Package: org.eclipse.epsilon.commons.parse,
 org.eclipse.epsilon.commons.parse.problem,
 org.eclipse.epsilon.commons.util,
 org.eclipse.epsilon.emc.emf,
 org.eclipse.epsilon.eol,
 org.eclipse.epsilon.eol.exceptions,
 org.eclipse.epsilon.eol.exceptions.models,
 org.eclipse.epsilon.eol.execute.context,
 org.eclipse.epsilon.eol.models


However, in the EpsilonStandalone example Manifest, the plugins where added as "required bundles":

Require-Bundle: org.eclipse.epsilon.eol.engine,
 org.eclipse.epsilon.emc.emf,
 org.eclipse.epsilon.ecl.engine,
 org.eclipse.epsilon.egl.engine,
 org.eclipse.epsilon.eml.engine,
 org.eclipse.epsilon.erl.engine,
 org.eclipse.epsilon.etl.engine,
 org.eclipse.epsilon.evl.engine,
 org.eclipse.epsilon.ewl.engine,
 org.eclipse.uml2.uml


I changed my Manifest to the Epsilon example form and the error was gone.

I am not an eclipse plugins expert and really don't get the difference between the two methods, but google-ing for the error someone suggested a double import could be causing a version discrepancy, or an attempt to modify a core java functionality. I guess the Required-Bundle approach resolves better the dependencies and prevents this error form poping.

Regards,

Horacio
Previous Topic:[ETL] Exception met in applying stereotype
Next Topic:[Epsilon] Standalone: execution details
Goto Forum:
  


Current Time: Thu Aug 25 06:26:53 GMT 2016

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

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