Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtend2 working with org.eclipse.xtend.XtendComponent(trying to use the MWE to generate code)
Xtend2 working with org.eclipse.xtend.XtendComponent [message #759574] Tue, 29 November 2011 08:55 Go to next message
Martin   is currently offline Martin Friend
Messages: 3
Registered: November 2011
Junior Member
Hi all,

I tried using the new Xtend2 functionality with the Modeling Workflow Engine, in particular the org.eclipse.xtend.XtendComponent.

Below is a snippet from my workflow code.
var emitter = "de::fzi::mam::dsl::Emitter::generateDomainObjects(MobileApp)"

Workflow {
  (...)
  component = org.eclipse.xtend.XtendComponent {
    metaModel = org.eclipse.xtend.typesystem.emf.EmfMetaModel {
      metaModelFile = "..."		
    }
    invoke = "${emitter}"
       	
    outputSlot = "..."
  }
}

Now, I get a miraculous RuntimeException when using the invoke method of the XtendComponent:

Caused by: java.lang.RuntimeException: 
[ERROR]: Property 'invoke' not specified properly. AbstractExtension file 'de::fzi::mam::dsl::Emitter' not found.(Element: -UNKNOWN-; Reported by: -UNKNOWN-)


The funny thing is: when I rename my .xtend file to some .ext file, I get further to a
68   [main] ERROR    org.eclipse.xtend.XtendComponent  - Error in Component  of type org.eclipse.xtend.XtendComponent: 
	EvaluationException : Couldn't find type or property 'MobileApp'
	nofile[22,9] on line 1 'MobileApp'


No my question is: does the org.eclipse.xtend.XtendComponent work with .xtend files at all?

Best,
-Martin
Re: Xtend2 working with org.eclipse.xtend.XtendComponent [message #759576 is a reply to message #759574] Tue, 29 November 2011 08:58 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13416
Registered: July 2009
Senior Member
Hi,

there is a general misunderstanding,
Xtend2 has nothing to do with Xtend(1) => you cannot use XtendComponent.

you have to write a own workflow component / let your xtend class implement IWorkflowComponent

~Christian


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtend2 working with org.eclipse.xtend.XtendComponent [message #759577 is a reply to message #759576] Tue, 29 November 2011 09:00 Go to previous messageGo to next message
Martin   is currently offline Martin Friend
Messages: 3
Registered: November 2011
Junior Member
Hi Christian,

thanks for the quick reply. So there is no pre-specified way to handle Xtend2 within the Workflow Engine?

-Martin
Re: Xtend2 working with org.eclipse.xtend.XtendComponent [message #759588 is a reply to message #759577] Tue, 29 November 2011 09:44 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13416
Registered: July 2009
Senior Member
There is no generic way besides the generator component but it will
take you only 5 mins to write a own component for that


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtend2 working with org.eclipse.xtend.XtendComponent [message #759599 is a reply to message #759588] Tue, 29 November 2011 10:18 Go to previous message
Martin   is currently offline Martin Friend
Messages: 3
Registered: November 2011
Junior Member
Okay, thanks. I just thought it might help to ask before doing that Wink
-Martin
Previous Topic:Autocompletion doesn't work in Xtend editor
Next Topic:RCP product for Xtext
Goto Forum:
  


Current Time: Wed Apr 01 02:45:58 GMT 2020

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

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

Back to the top