Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Acceleo and Xtext
Acceleo and Xtext [message #902535] Sat, 18 August 2012 08:44 Go to next message
Andrea Sindico is currently offline Andrea Sindico
Messages: 266
Registered: November 2010
Senior Member

I am in the middle of an ACCELEO Transformation aimed at producing code (i.e. Java) from an input UML model.

Some elements of this UML model (i.e. Activities Opaque actions) contain some text which is conform to an Xtext grammar and I'd like to get the equivalent AST Ecore representation in the ACCELEO transformation.

To this end I have developed a Java class with a method which takes as input a string, containing the DSL excerpt, and produces an ECORE model conform to it (see http://www.eclipse.org/forums/index.php/m/901947/#msg_901947 for further details). I have tested it in a separate Java application and it seems it works properly.

I have therefore written a simple ACCELEO module (i.e. getDSLModel) wrapping that java class and enabling me to get the Ecore model from the DSL textual representation.

Suppose my DSL (and the equivalent ECORE) consist of a root element named DSLModel containing a (0..*) number of DSLStatements (this is a simplification).
When in ACCELEO I invoke the wrapper from a string, containing a correct dsl script, i have noticed it correctly returns a ModelImpl

['statement1;statement2'.getDSLModel()/]

so the Java service and the XText parse is working.

However if I try to get the model statements, i.e.:

['statement1;statement2'.getDSLModel().statements/]

it returns an **"invalid"** string. So I can't use it in a for loop

I have therefore tried to call the eAllContents() ocl service from the model instance i.e.:

['statement1;statement2'.getDSLModel().eAllContents()/]

and it actually returns the list of statements. I do not understand why the features of the Ecore entities returned from the Xtext parser are not working properly.

Any help would be very appreciated! Thank you



here is the Java service which turns a string into a instance of my DSL model (ECORE AST). I have tested it with an independent Java application and it works fine!

     public class GetDSLModel {
	 public DSLModel getDSLModel(String expression){	
		DSLStandaloneSetupGenerated dslsas = new DSLStandaloneSetupGenerated();
		Injector injector = dslsas.createInjectorAndDoEMFRegistration();
		XtextResourceSet resourceSet = injector.getInstance(XtextResourceSet.class);
		resourceSet.addLoadOption(XtextResource.OPTION_RESOLVE_ALL, Boolean.TRUE);
		Resource resource = resourceSet.createResource(URI.createURI("dummy:/example.dsl"));
		InputStream in = new ByteArrayInputStream(expression.getBytes());
		try {
			resource.load(in, resourceSet.getLoadOptions());
			DSLModel model = (DSLModel) resource.getContents().get(0);
			return model;
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;
		
	}
	
    }

Now I need the AST in the main ACCELEO (UML2Text) transformation thus here is the Acceleo wrapper

     [query public getDSLModel(str:String): DSLModel =  (invoke('sfg.baleno.src.mloaders.GetDSLModel','getDSLModel(java.lang.String)',Sequence{str})).oclAsType(DSLModel)/]


here is what I get if run it

input: ['statement1;statement2'.getDSLModel()/]
output: mypackage.dsl.impl.DSLModelImpl@a1c7a

input: ['statement1;statement2'.getDSLModel().statements/] (Syntactically VALID)
output: invalid

input: ['statement1;statement2'.getDSLModel().eAllContents()/]
output: mypackage.dsl.impl.DSLStatement@e53202 (......

Some hours later

In the Java Class of the main ACCELEO module I have added the following lines
     @Override
     public void initialize(EObject element, File folder, java.util.List<? extends Object> arguments) throws IOException {    preInitialize();
        super.initialize(element, folder, arguments);
    }
    @Override
    public void initialize(URI modelURI, File folder, java.util.List<?> arguments) throws IOException {
        preInitialize();
        super.initialize(modelURI, folder, arguments);
    }
    
    protected void preInitialize() {
       DSLStandaloneSetup.doSetup();
    }

and
      @Override
     public void registerPackages(ResourceSet resourceSet) {
        super.registerPackages(resourceSet);
       if (!isInWorkspace(org.eclipse.uml2.uml.UMLPackage.class)) {
             resourceSet.getPackageRegistry().put(org.eclipse.uml2.uml.UMLPackage.eINSTANCE.getNsURI(), org.eclipse.uml2.uml.UMLPackage.eINSTANCE);
        }
        if (!isInWorkspace(mypackages.DSLPackage.class)) {
            resourceSet.getPackageRegistry().put(mypackages.DSLPackage.eINSTANCE.getNsURI(), mypackages.DSLPackage.eINSTANCE);
         }
       EcoreUtil.resolveAll(resourceSet);
    }

but it still behaves the same.
Is there anyone who managed to use Xtext with Acceleo this way?



Follow me on Twitter @andreasindico

Re: Acceleo and Xtext [message #902536 is a reply to message #902535] Sat, 18 August 2012 08:49 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6315
Registered: July 2009
Senior Member
Hi,

have no idea what your workflow is. is this code targetted to be run from within eclipse (command/action/...)
or standalone. (since i do not know acceleco that much i cannot answer this)

calling the standalonesetup in an non osgi env is a bad idea.

what is the error message you get... what does debugging say...

~Christian
Re: Acceleo and Xtext [message #902537 is a reply to message #902536] Sat, 18 August 2012 09:15 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6315
Registered: July 2009
Senior Member
Hi,

i just gave it a standalone try (using the uml example)

    @Override
    public void registerPackages(ResourceSet resourceSet) {
        super.registerPackages(resourceSet);
        if (!isInWorkspace(org.eclipse.uml2.uml.UMLPackage.class)) {
            resourceSet.getPackageRegistry().put(org.eclipse.uml2.uml.UMLPackage.eINSTANCE.getNsURI(), org.eclipse.uml2.uml.UMLPackage.eINSTANCE);
        }
        MyDslStandaloneSetup.doSetup();
    }


package org.eclipse.acceleo.examples.uml2java.files;

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;

import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.xtext.example.mydsl1.myDsl.DSLModel;

public class GetDSLModel {
	 public DSLModel getDSLModel(String expression){	
		ResourceSet resourceSet = new ResourceSetImpl();
		Resource resource = resourceSet.createResource(URI.createURI("dummy:/example.mydsl1"));
		InputStream in = new ByteArrayInputStream(expression.getBytes());
		try {
			resource.load(in, resourceSet.getLoadOptions());
			DSLModel model = (DSLModel) resource.getContents().get(0);
			return model;
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;
		
	}
	
    }


and it works like a charm
Re: Acceleo and Xtext [message #902541 is a reply to message #902535] Sat, 18 August 2012 09:49 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4046
Registered: July 2009
Senior Member
Hi

You have been asking this question for some time on the M2T mailing
list, which is where it belongs.

However you just provide us parts of your program without any indication
how you invoke them.

The more partial information you provide the less attractive it is to
try to help you.

As Christian demonstrated, the basic functionality work fine, so
somewhere you are doing something odd, and you have not told us about it.

If you want help, you need to help yourself, by helping us. Provide a
simple zipped project and launch configuration that demonstrates the
problem. Do not provide snippets that require us to spend time
mis-re-developing what you have failed to provide.

Regards

Ed Willink


On 18/08/2012 09:44, Andrea Sindico wrote:
> I am in the middle of an ACCELEO Transformation aimed at producing
> code (i.e. Java) from an input UML model.
> Some elements of this UML model (i.e. Activities Opaque actions)
> contain some text which is conform to an Xtext grammar and I'd like to
> get the equivalent AST Ecore representation in the ACCELEO
> transformation.
> To this end I have developed a Java class with a method which takes as
> input a string, containing the DSL excerpt, and produces an ECORE
> model conform to it (see
> http://www.eclipse.org/forums/index.php/m/901947/#msg_901947 for
> further details). I have tested it in a separate Java application and
> it seems it works properly.
>
> I have therefore written a simple ACCELEO module (i.e. getDSLModel)
> wrapping that java class and enabling me to get the Ecore model from
> the DSL textual representation.
>
> Suppose my DSL (and the equivalent ECORE) consist of a root element
> named DSLModel containing a (0..*) number of DSLStatements (this is a
> simplification). When in ACCELEO I invoke the wrapper from a string,
> containing a correct dsl script, i have noticed it correctly returns a
> ModelImpl
> ['statement1;statement2'.getDSLModel()/]
>
> so the Java service and the XText parse is working.
> However if I try to get the model statements, i.e.:
>
> ['statement1;statement2'.getDSLModel().statements/]
>
> it returns an **"invalid"** string. So I can't use it in a for loop
>
> I have therefore tried to call the eAllContents() ocl service from the
> model instance i.e.:
>
> ['statement1;statement2'.getDSLModel().eAllContents()/]
>
> and it actually returns the list of statements. I do not understand
> why the features of the Ecore entities returned from the Xtext parser
> are not working properly.
> Any help would be very appreciated! Thank you
>
>
>
> here is the Java service which turns a string into a instance of my
> DSL model (ECORE AST). I have tested it with an independent Java
> application and it works fine!
>
>
> public class GetDSLModel {
> public DSLModel getDSLModel(String expression){
> DSLStandaloneSetupGenerated dslsas = new
> DSLStandaloneSetupGenerated();
> Injector injector = dslsas.createInjectorAndDoEMFRegistration();
> XtextResourceSet resourceSet =
> injector.getInstance(XtextResourceSet.class);
> resourceSet.addLoadOption(XtextResource.OPTION_RESOLVE_ALL,
> Boolean.TRUE);
> Resource resource =
> resourceSet.createResource(URI.createURI("dummy:/example.dsl"));
> InputStream in = new ByteArrayInputStream(expression.getBytes());
> try {
> resource.load(in, resourceSet.getLoadOptions());
> DSLModel model = (DSLModel) resource.getContents().get(0);
> return model;
> } catch (IOException e) {
> // TODO Auto-generated catch block
> e.printStackTrace();
> }
> return null;
>
> }
>
> }
>
> Now I need the AST in the main ACCELEO (UML2Text) transformation thus
> here is the Acceleo wrapper
>
>
> [query public getDSLModel(str:String): DSLModel =
> (invoke('sfg.baleno.src.mloaders.GetDSLModel','getDSLModel(java.lang.String)',Sequence{str})).oclAsType(DSLModel)/]
>
>
> here is what I get if run it
> input: ['statement1;statement2'.getDSLModel()/]
> output: mailto:mypackage.dsl.impl.DSLModelImpl@a1c7a
>
> input: ['statement1;statement2'.getDSLModel().statements/]
> (Syntactically VALID)
> output: invalid
>
> input: ['statement1;statement2'.getDSLModel().eAllContents()/]
> output: mailto:mypackage.dsl.impl.DSLStatement@e53202 (......
>
> Some hours later
>
> In the Java Class of the main ACCELEO module I have added the
> following lines
>
> @Override
> public void initialize(EObject element, File folder,
> java.util.List<? extends Object> arguments) throws IOException {
> preInitialize();
> super.initialize(element, folder, arguments);
> }
> @Override
> public void initialize(URI modelURI, File folder, java.util.List<?>
> arguments) throws IOException {
> preInitialize();
> super.initialize(modelURI, folder, arguments);
> }
> protected void preInitialize() {
> DSLStandaloneSetup.doSetup();
> }
>
> and
>
> @Override
> public void registerPackages(ResourceSet resourceSet) {
> super.registerPackages(resourceSet);
> if (!isInWorkspace(org.eclipse.uml2.uml.UMLPackage.class)) {
> resourceSet.getPackageRegistry().put(org.eclipse.uml2.uml.UMLPackage.eINSTANCE.getNsURI(),
> org.eclipse.uml2.uml.UMLPackage.eINSTANCE);
> }
> if (!isInWorkspace(mypackages.DSLPackage.class)) {
> resourceSet.getPackageRegistry().put(mypackages.DSLPackage.eINSTANCE.getNsURI(),
> mypackages.DSLPackage.eINSTANCE);
> }
> EcoreUtil.resolveAll(resourceSet);
> }
>
> but it still behaves the same.
> Is there anyone who managed to use Xtext with Acceleo this way?
>
>
Re: Acceleo and Xtext [message #902544 is a reply to message #902541] Sat, 18 August 2012 10:35 Go to previous messageGo to next message
Andrea Sindico is currently offline Andrea Sindico
Messages: 266
Registered: November 2010
Senior Member

Hi Ed, yes I have asked the same question in the M2T forum as well. However as the topic both concerns Acceleo and XText I thought it was a good idea to ask it in the Xtext forum too. I didn't think it was impolite. Is it? If so I do apologize.
Christian I really appreciate your help, unfortunately I guess the problem is in the interaction between Acceleo and Xtext so the best thing to do is indeed to provide you a zipped project showing it, as suggested by Ed.

Thank you


Follow me on Twitter @andreasindico

[Updated on: Sat, 18 August 2012 11:06]

Report message to a moderator

Re: Acceleo and Xtext [message #902561 is a reply to message #902535] Sat, 18 August 2012 13:00 Go to previous messageGo to next message
Andrea Sindico is currently offline Andrea Sindico
Messages: 266
Registered: November 2010
Senior Member

Ok I have just finished to create an independent workspace with a simple Acceleo and Xtext project reproducing exactly the same problem. It is about 19MB zipped. How do you want me to share it with you?



Follow me on Twitter @andreasindico

Re: Acceleo and Xtext [message #902564 is a reply to message #902561] Sat, 18 August 2012 13:21 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6315
Registered: July 2009
Senior Member
19 MB i dont believe it
using the export archive file wizard my example is 200kb

~Christian
Re: Acceleo and Xtext [message #902567 is a reply to message #902564] Sat, 18 August 2012 13:29 Go to previous messageGo to next message
Andrea Sindico is currently offline Andrea Sindico
Messages: 266
Registered: November 2010
Senior Member

sorry I forgot the dot Smile it is about 1.9 MB but it is the whole workspace encompassing the four Xtext projects plus the Acceleo one. Anyway How may I share it with you? is it ok by email?

Follow me on Twitter @andreasindico

Re: Acceleo and Xtext [message #902577 is a reply to message #902567] Sat, 18 August 2012 14:52 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4046
Registered: July 2009
Senior Member
Hi

DropBox is really useful for non-trivial files. But 1.9MB seems a little
large. Have you tried to reduce it to a simple example?

Regards

Ed Willink


On 18/08/2012 14:29, Andrea Sindico wrote:
> sorry I forgot the dot :) it is about 1.9 MB but it is the whole
> workspace encompassing the four Xtext projects plus the Acceleo one.
> Anyway How may I share it with you? is it ok by email?
Re: Acceleo and Xtext [message #902584 is a reply to message #902535] Sat, 18 August 2012 16:26 Go to previous messageGo to next message
Andrea Sindico is currently offline Andrea Sindico
Messages: 266
Registered: November 2010
Senior Member

I have put it in my google drive (5 free GB) and made it public, much easier.

here is the link to it

https://docs.google.com/open?id=0B2_ovo8IiZaZSGFLQlltVGYzbTA

once on the page you should fine on the top left corner the file menu. There you can downlode the zip file.

You find a README inside the Acceleo project.

Thank you very much for your help



Follow me on Twitter @andreasindico

Re: Acceleo and Xtext [message #902585 is a reply to message #902584] Sat, 18 August 2012 16:41 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6315
Registered: July 2009
Senior Member
Hi,

Running the Generate.java gives me the output that i expect.
the cleaner solution is to change registerPackages as i posted before and do not call it from the utility java class.
maybe something is broken with your installation.

~Christian
Re: Acceleo and Xtext [message #902587 is a reply to message #902585] Sat, 18 August 2012 17:02 Go to previous messageGo to next message
Andrea Sindico is currently offline Andrea Sindico
Messages: 266
Registered: November 2010
Senior Member

Do you mean it works?
Here is the text it produces if I run it
UML
test1: Class1

DSL
test1: org.xtext.example.mydsl.myDsl.impl.ModelImpl@1ae6ee8
test2: invalid


I get no errors just some warnings like

Discouraged access: The type IPartialContentAssistParser is not accessible due to restriction on required library ../eclipse-juno/plugins/org.eclipse.xtext.ui.codetemplates.ui_2.3.0.v201206120633.jar PartialMyDslContentAssistParser.java /org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr line 10 Java Problem

and

Description Resource Path Location Type
Discouraged access: The type IPartialContentAssistParser is not accessible due to restriction on required library ../eclipse-juno/plugins/org.eclipse.xtext.ui.codetemplates.ui_2.3.0.v201206120633.jar PartialMyDslContentAssistParser.java /org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr line 18 Java Problem


Follow me on Twitter @andreasindico

Re: Acceleo and Xtext [message #902589 is a reply to message #902587] Sat, 18 August 2012 17:28 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6315
Registered: July 2009
Senior Member
Nope

i get

UML
test1: Class1

DSL
test1: org.xtext.example.mydsl.myDsl.impl.ModelImpl@598fffdd
test2: org.xtext.example.mydsl.myDsl.impl.GreetingImpl@2f0dd706 (name: tester)
tester
Re: Acceleo and Xtext [message #902592 is a reply to message #902589] Sat, 18 August 2012 18:12 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4046
Registered: July 2009
Senior Member
Hi

Christian is probably running on Juno or even Kepler ~M1. What are you
running?

Regards

Ed Willink

On 18/08/2012 18:28, Christian Dietrich wrote:
> Nope
>
> i get
>
>
> UML
> test1: Class1
>
> DSL
> test1: org.xtext.example.mydsl.myDsl.impl.ModelImpl@598fffdd
> test2: org.xtext.example.mydsl.myDsl.impl.GreetingImpl@2f0dd706 (name:
> tester)
> tester
>
Re: Acceleo and Xtext [message #902593 is a reply to message #902592] Sat, 18 August 2012 18:21 Go to previous messageGo to next message
Andrea Sindico is currently offline Andrea Sindico
Messages: 266
Registered: November 2010
Senior Member

Eclipse Modeling Tools
Version: Juno Release
Build id: 20120620-1657

and

java version "1.7.0_02"
Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
Java HotSpot(TM) Server VM (build 22.0-b10, mixed mode)


Follow me on Twitter @andreasindico

Re: Acceleo and Xtext [message #902595 is a reply to message #902593] Sat, 18 August 2012 18:24 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6315
Registered: July 2009
Senior Member
I use Eclipse Juno (Xtext Distro from eclipse.org/Xtext + Acceleo via update site)
Re: Acceleo and Xtext [message #902596 is a reply to message #902595] Sat, 18 August 2012 18:28 Go to previous messageGo to next message
Andrea Sindico is currently offline Andrea Sindico
Messages: 266
Registered: November 2010
Senior Member

I have downloaded all the modeling components from the "Help->Installing Modeling Components" menu (XText 2.3.0 Acceleo 3.3.0)




Follow me on Twitter @andreasindico

[Updated on: Sat, 18 August 2012 18:29]

Report message to a moderator

Re: Acceleo and Xtext [message #902597 is a reply to message #902596] Sat, 18 August 2012 18:50 Go to previous messageGo to next message
Andrea Sindico is currently offline Andrea Sindico
Messages: 266
Registered: November 2010
Senior Member

I have fixed all the warnings. The only two remaining are those previously posted:
i.e.
Discouraged access: The type IPartialContentAssistParser is not accessible due to restriction on required library ../eclipse-juno/plugins/org.eclipse.xtext.ui.codetemplates.ui_2.3.0.v201206120633.jar PartialMyDslContentAssistParser.java /org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr line 10 Java Problem

Sad


Follow me on Twitter @andreasindico

Re: Acceleo and Xtext [message #902601 is a reply to message #902597] Sat, 18 August 2012 19:19 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4046
Registered: July 2009
Senior Member
Hi

Your README doesn't specify the kind of launch. The default locks my
machine up as usual. The Java Application launch gives the same results
as Christian.

If you use the Common tab on a launch configuration, you can save it in
your project and render README instructions obsolete.

I notice that you have a UML 4.0.0 model but a UML 3.0.0 transformation,
which works for me and Christian but might fail if you have an old
version of MDT/UML2 lying around.

Regards

Ed Willink



On 18/08/2012 19:50, Andrea Sindico wrote:
> I have fixed all the warnings. The only two remaining are those
> previously posted: i.e.
> Discouraged access: The type IPartialContentAssistParser is not
> accessible due to restriction on required library
> ../eclipse-juno/plugins/org.eclipse.xtext.ui.codetemplates.ui_2.3.0.v201206120633.jar
> PartialMyDslContentAssistParser.java
> /org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr
> line 10 Java Problem
>
> :(
Re: Acceleo and Xtext [message #902604 is a reply to message #902601] Sat, 18 August 2012 19:25 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4046
Registered: July 2009
Senior Member
Hi

Another hazard is that you use Model without qualification when Model
exists in more than one input meta-model.

I think you should be getting an unambiguous editor ambiguity diagnostic
rather than a perhaps indeterminate run-time anomally.

Regards

Ed Willink

On 18/08/2012 20:19, Ed Willink wrote:
> Hi
>
> Your README doesn't specify the kind of launch. The default locks my
> machine up as usual. The Java Application launch gives the same
> results as Christian.
>
> If you use the Common tab on a launch configuration, you can save it
> in your project and render README instructions obsolete.
>
> I notice that you have a UML 4.0.0 model but a UML 3.0.0
> transformation, which works for me and Christian but might fail if you
> have an old version of MDT/UML2 lying around.
>
> Regards
>
> Ed Willink
>
>
>
> On 18/08/2012 19:50, Andrea Sindico wrote:
>> I have fixed all the warnings. The only two remaining are those
>> previously posted: i.e.
>> Discouraged access: The type IPartialContentAssistParser is not
>> accessible due to restriction on required library
>> ../eclipse-juno/plugins/org.eclipse.xtext.ui.codetemplates.ui_2.3.0.v201206120633.jar
>> PartialMyDslContentAssistParser.java
>> /org.xtext.example.mydsl.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr
>> line 10 Java Problem
>>
>> :(
>
Re: Acceleo and Xtext [message #902607 is a reply to message #902604] Sat, 18 August 2012 21:58 Go to previous messageGo to next message
Andrea Sindico is currently offline Andrea Sindico
Messages: 266
Registered: November 2010
Senior Member

Hi Ed, I have created an Acceleo configuration as specified in the README. To run it i right click on the template, Run As->Run Configurations then I choose the acceleo one.
Unfortunately the model qualification is not the problem, in the more complex project I am working on (which shows the same behavior), I have a DSL with a root element called in a different way.
I am going to check the UML meta-model.


Follow me on Twitter @andreasindico

Re: Acceleo and Xtext [message #902608 is a reply to message #902607] Sat, 18 August 2012 22:24 Go to previous messageGo to next message
Andrea Sindico is currently offline Andrea Sindico
Messages: 266
Registered: November 2010
Senior Member

Ed actually, or at least it seems to me that, both the model and the transformation use the same meta-model (http://www.eclipse.org/uml2/4.0.0/UML).
Here https://docs.google.com/open?id=0B2_ovo8IiZaZaXdNdFdPMTI4Yjg you find the new zipped workspace. It contains a launchMe.launch configuration.



Follow me on Twitter @andreasindico

Re: Acceleo and Xtext [message #902656 is a reply to message #902535] Sun, 19 August 2012 05:30 Go to previous messageGo to next message
Andrea Sindico is currently offline Andrea Sindico
Messages: 266
Registered: November 2010
Senior Member

Hi Ed and Christian,
I have tried, as you suggested, to run the acceleo transformation as a Java application and it works. I guess thus that if you try to run it as an acceleo application (see the latest link with the launch configuration file) you will get the same problem I am experiencing.


Follow me on Twitter @andreasindico

Re: Acceleo and Xtext [message #902657 is a reply to message #902535] Sun, 19 August 2012 05:32 Go to previous messageGo to next message
Andrea Sindico is currently offline Andrea Sindico
Messages: 266
Registered: November 2010
Senior Member

No Message Body

Follow me on Twitter @andreasindico

Re: Acceleo and Xtext [message #902658 is a reply to message #902608] Sun, 19 August 2012 05:38 Go to previous messageGo to next message
Andrea Sindico is currently offline Andrea Sindico
Messages: 266
Registered: November 2010
Senior Member

(sorry for multiple post the forum didn't seem to work properly this early morning)

Follow me on Twitter @andreasindico

[Updated on: Sun, 19 August 2012 06:06]

Report message to a moderator

Re: Acceleo and Xtext [message #902667 is a reply to message #902658] Sun, 19 August 2012 10:19 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6315
Registered: July 2009
Senior Member
org.xtext.example.mydsl.myDsl.impl.ModelImpl cannot be cast to org.xtext.example.mydsl.myDsl.Model

=> looks like destroyed registries or a classloader problem
once again this is then an acceleo question
Re: Acceleo and Xtext [message #902668 is a reply to message #902667] Sun, 19 August 2012 10:34 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6315
Registered: July 2009
Senior Member
If i call the MydslStandaloneSetup.doSetup from the registerpackages the exception vanishes.
but i still dont get a result.
Re: Acceleo and Xtext [message #902684 is a reply to message #902668] Sun, 19 August 2012 14:52 Go to previous message
Andrea Sindico is currently offline Andrea Sindico
Messages: 266
Registered: November 2010
Senior Member

are we saying there is a bug?

Follow me on Twitter @andreasindico

Previous Topic:handle editor crashes on opening
Next Topic:configuring log4j
Goto Forum:
  


Current Time: Wed Sep 24 00:37:12 GMT 2014

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

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