Egl and epsilon standalones [message #1063938] |
Sun, 16 June 2013 11:03 |
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 183 times)
|
|
|
Re: Egl and epsilon standalones [message #1063940 is a reply to message #1063938] |
Sun, 16 June 2013 11: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
|
|
|
|
Re: Egl and epsilon standalones [message #1063962 is a reply to message #1063943] |
Sun, 16 June 2013 21:22 |
|
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 #1064566 is a reply to message #1064523] |
Wed, 19 June 2013 22:48 |
|
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
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03184 seconds