Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Egl and epsilon standalones
Egl and epsilon standalones [message #1063938] Sun, 16 June 2013 07:03 Go to next message
Patricia Fernández is currently offline Patricia Fernández
Messages: 41
Registered: October 2012
Member
Hello,

I modified the org.eclipse.epsilon.examples.standalone / org.eclipse.epsilon.examples.standalone.egl from the repository to use UML instead of Emf models as I need, also changed the imports from emf to uml ones but for some reason I think it keeps using emf instead of uml because when I run it I keep getting this error below. Also, minimal attached.

PS: Sorry for all the posts but it's driving me mad, I didn't think this was so hard to make it work.

Exception in thread "main" Property 'name' not found in object org.eclipse.emf.ecore.xml.type.impl.AnyTypeImpl@18d9850 [eClass: org.eclipse.emf.ecore.impl.EClassImpl@19b5217 [name: Model] [instanceClassName: null] [abstract: false, interface: false]] [mixed: [ecore.xml.type:text=
  , packagedElement=org.eclipse.emf.ecore.xml.type.impl.AnyTypeImpl@3b1d04 [eClass: org.eclipse.emf.ecore.impl.EClassImpl@ee22f7 [name: Class] [instanceClassName: null] [abstract: false, interface: false]] [mixed: [], anyAttribute: [name=Example]], ecore.xml.type:text=
], anyAttribute: null] (C:\Users\Patricia\Documents\UNIVERSIDAD\PFC\Eclipse_1\Minimal\src\ProjectCreation.egl@3:13)
	Cause: Property 'name' not found in object org.eclipse.emf.ecore.xml.type.impl.AnyTypeImpl@18d9850 [eClass: org.eclipse.emf.ecore.impl.EClassImpl@19b5217 [name: Model] [instanceClassName: null] [abstract: false, interface: false]] [mixed: [ecore.xml.type:text=
  , packagedElement=org.eclipse.emf.ecore.xml.type.impl.AnyTypeImpl@3b1d04 [eClass: org.eclipse.emf.ecore.impl.EClassImpl@ee22f7 [name: Class] [instanceClassName: null] [abstract: false, interface: false]] [mixed: [], anyAttribute: [name=Example]], ecore.xml.type:text=
], anyAttribute: null] (C:\Users\Patricia\Documents\UNIVERSIDAD\PFC\Eclipse_1\Minimal\src\ProjectCreation.egl@3:13)
	at org.eclipse.epsilon.egl.internal.EglPreprocessorModule.execute(EglPreprocessorModule.java:96)
	at org.eclipse.epsilon.egl.internal.EglModule.execute(EglModule.java:166)
	at org.eclipse.epsilon.egl.internal.EglModule.execute(EglModule.java:152)
	at org.eclipse.epsilon.egl.EglTemplate.process(EglTemplate.java:68)
	at org.eclipse.epsilon.egl.EglTemplateFactoryModuleAdapter.execute(EglTemplateFactoryModuleAdapter.java:70)
	at EpsilonStandaloneExample.execute(EpsilonStandaloneExample.java:59)
	at EpsilonStandaloneExample.execute(EpsilonStandaloneExample.java:51)
	at EglStandaloneExample.main(EglStandaloneExample.java:19)
Caused by: Property 'name' not found in object org.eclipse.emf.ecore.xml.type.impl.AnyTypeImpl@18d9850 [eClass: org.eclipse.emf.ecore.impl.EClassImpl@19b5217 [name: Model] [instanceClassName: null] [abstract: false, interface: false]] [mixed: [ecore.xml.type:text=
  , packagedElement=org.eclipse.emf.ecore.xml.type.impl.AnyTypeImpl@3b1d04 [eClass: org.eclipse.emf.ecore.impl.EClassImpl@ee22f7 [name: Class] [instanceClassName: null] [abstract: false, interface: false]] [mixed: [], anyAttribute: [name=Example]], ecore.xml.type:text=
], anyAttribute: null] (C:\Users\Patricia\Documents\UNIVERSIDAD\PFC\Eclipse_1\Minimal\src\ProjectCreation.egl@3:13)
	at org.eclipse.epsilon.eol.execute.introspection.java.JavaPropertyGetter.invoke(JavaPropertyGetter.java:48)
	at org.eclipse.epsilon.eol.execute.PointExecutor.execute(PointExecutor.java:70)
	at org.eclipse.epsilon.eol.execute.PointExecutor.execute(PointExecutor.java:44)
	at org.eclipse.epsilon.eol.execute.PointExecutor.execute(PointExecutor.java:90)
	at org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST(ExecutorFactory.java:226)
	at org.eclipse.epsilon.eol.execute.PointExecutor.execute(PointExecutor.java:43)
	at org.eclipse.epsilon.eol.execute.PointExecutor.execute(PointExecutor.java:90)
	at org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST(ExecutorFactory.java:226)
	at org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST(ExecutorFactory.java:196)
	at org.eclipse.epsilon.eol.execute.StatementBlockExecutor.execute(StatementBlockExecutor.java:26)
	at org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST(ExecutorFactory.java:226)
	at org.eclipse.epsilon.eol.EolModule.execute(EolModule.java:43)
	at org.eclipse.epsilon.egl.internal.EglPreprocessorModule.execute(EglPreprocessorModule.java:80)
	... 7 more
  • Attachment: Minimal.jar
    (Size: 5.24KB, Downloaded 29 times)
Re: Egl and epsilon standalones [message #1063940 is a reply to message #1063938] Sun, 16 June 2013 07:15 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris Kolovos
Messages: 804
Registered: July 2009
Senior Member
Hi Patricia,

I'm afraid that the attached archive only contains the compiled version of your code (.class files). Could you please try to export your project using File->Export->General->Archive File instead?

Cheers,
Dimitris
Re: Egl and epsilon standalones [message #1063943 is a reply to message #1063940] Sun, 16 June 2013 08:25 Go to previous messageGo to next message
Patricia Fernández is currently offline Patricia Fernández
Messages: 41
Registered: October 2012
Member
Dimitris Kolovos wrote on Sun, 16 June 2013 07:15
Hi Patricia,

I'm afraid that the attached archive only contains the compiled version of your code (.class files). Could you please try to export your project using File->Export->General->Archive File instead?

Cheers,
Dimitris


Hi Dimitris,

Sorry for that, attached it now.
  • Attachment: Minimal.zip
    (Size: 13.77KB, Downloaded 33 times)
Re: Egl and epsilon standalones [message #1063962 is a reply to message #1063943] Sun, 16 June 2013 17:22 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris Kolovos
Messages: 804
Registered: July 2009
Senior Member
Hi Patricia,

To get rid of this exception I had to do the following:

1) In model.uml, change http://www.eclipse.org/uml2/3.0.0/UML to http://www.eclipse.org/uml2/4.0.0/UML using a text editor

2) Replace the following line

UMLResource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put(UMLResource.FILE_EXTENSION, UMLResource.Factory.INSTANCE);

with

EPackage.Registry.INSTANCE.put(UMLPackage.eINSTANCE.getNsURI(), UMLPackage.eINSTANCE);

3) Uncomment the following line: properties.put(UmlModel.PROPERTY_METAMODEL_URI, metamodel);

It still doesn't work but that's due to unrelated errors in subsequent EGL statements (e.g. Package.add should probably be Package.all instead).

Cheers,
Dimitris
Re: Egl and epsilon standalones [message #1063984 is a reply to message #1063962] Mon, 17 June 2013 02:56 Go to previous messageGo to next message
Patricia Fernández is currently offline Patricia Fernández
Messages: 41
Registered: October 2012
Member
Thank you so much for the help, it finally works Smile
Re: Egl and epsilon standalones [message #1064107 is a reply to message #1063984] Mon, 17 June 2013 12:28 Go to previous messageGo to next message
Patricia Fernández is currently offline Patricia Fernández
Messages: 41
Registered: October 2012
Member
Hi,

Sorry to disturb again... I exported it as runnable jar but when I execute it I get the following error.

Quote:

Exception in thread "main" java.lang.IllegalArgumentException: URI is not hierarchical
at java.io.File.<init>(File.java:363)
at EpsilonStandalone.getFile(EpsilonStandalone.java:85)
at EpsilonStandalone.execute(EpsilonStandalone.java:32)
at EglStandalone.main(EglStandalone.java:15)


Does that mean I have to change the URI lines from the standalone example to make it work? If so, what do I need to put instead?

Thanks in advance.
Cheers.
Re: Egl and epsilon standalones [message #1064189 is a reply to message #1064107] Tue, 18 June 2013 03:23 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris Kolovos
Messages: 804
Registered: July 2009
Senior Member
Hi Patricia,

No worries. The discussion in the following bug report may help.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=404235

Cheers,
Dimitris
Re: Egl and epsilon standalones [message #1064523 is a reply to message #1064189] Wed, 19 June 2013 12:13 Go to previous messageGo to next message
Patricia Fernández is currently offline Patricia Fernández
Messages: 41
Registered: October 2012
Member
Hi Dimitris,

Thanks to your link and some more info I was able to make it work.

Talking about this example:

- When I run the EglStandaloneExample.java as a java application it works as expected.
- However, when I right click the plug-in project and run it as an Eclipse Application, I manage to make it work through the "Generate" menu I added (the window to choose the uml model at least appears) but then I suddenly start getting exceptions which looks like this one (the part that changes from an exception to the other is the url):

Quote:
!MESSAGE Exception encountered whilst trying to retrieve EPackage for nsUri: http:///org/eclipse/datatools/modelbase/dbdefinition/dbdefinition.ecore
!STACK 0
java.lang.OutOfMemoryError: PermGen space
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)

...

Also this one:
Quote:
!MESSAGE Unhandled event loop exception
!STACK 0
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.OutOfMemoryError: PermGen space)


I tried increasing the -XX:MaxPermSize up to 512m, but the exceptions keep happening. Any help on this? Tried writing a post in the PDE section but noone's answered it.

Thanks again.
PS: Minimal and uml model attached if needed.
  • Attachment: example.uml
    (Size: 0.35KB, Downloaded 24 times)
  • Attachment: Minimal.zip
    (Size: 11.95KB, Downloaded 23 times)

[Updated on: Wed, 19 June 2013 12:32]

Report message to a moderator

Re: Egl and epsilon standalones [message #1064566 is a reply to message #1064523] Wed, 19 June 2013 18:48 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris Kolovos
Messages: 804
Registered: July 2009
Senior Member
Hi Patricia,

Unfortunately, I'm not able to reproduce this in my setup (MacOS) as I'm getting an SWT exception. I've had a quick look at your code and it appears that you're using Swing for the UI part. SWT and Swing don't mix very well so I'd suggest considering to implement your generator launcher as a context menu action. See the "Register EPackages" action in [1] for an example of how to do this.

Cheers,
Dimitris
Re: Egl and epsilon standalones [message #1064661 is a reply to message #1064566] Thu, 20 June 2013 09:05 Go to previous messageGo to next message
Patricia Fernández is currently offline Patricia Fernández
Messages: 41
Registered: October 2012
Member
Dimitris Kolovos wrote on Wed, 19 June 2013 18:48
See the "Register EPackages" action in [1] for an example of how to do this.


Hi Dimitris,

Maybe you forgot to add the [1] source info?
Re: Egl and epsilon standalones [message #1064662 is a reply to message #1064661] Thu, 20 June 2013 09:06 Go to previous message
Dimitris Kolovos is currently offline Dimitris Kolovos
Messages: 804
Registered: July 2009
Senior Member
Oops! Done.

[1] https://dev.eclipse.org/svnroot/modeling/org.eclipse.epsilon/trunk/plugins/org.eclipse.epsilon.emf.dt
Previous Topic:Standalone EvlValidator
Next Topic:Lack of clarity on .ecorediag and .ecore synchonisation
Goto Forum:
  


Current Time: Fri Aug 01 22:41:28 EDT 2014

Powered by FUDForum. Page generated in 0.02095 seconds