Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Externalize workflow settings in xtext 1.0
Externalize workflow settings in xtext 1.0 [message #554536] Mon, 23 August 2010 13:51 Go to next message
Heiko Tappe is currently offline Heiko TappeFriend
Messages: 18
Registered: March 2010
Junior Member
In xtext 0.7.2 I used to have a properties file to externalize some settings into a separate file.
I could refer to the settings via

<workflow>
	<property name="propsfile" value="workflow/DslToCode.properties"/>
	<property file="${propsfile}"/>
...


What would be the easiest/best way to do something similar in xtext 1.0?

--Heiko

[Updated on: Mon, 23 August 2010 13:51]

Report message to a moderator

Re: Externalize workflow settings in xtext 1.0 [message #554550 is a reply to message #554536] Mon, 23 August 2010 14:05 Go to previous messageGo to next message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1823
Registered: July 2009
Senior Member
You should write an MWE2 workflow which just defines the properties (you
prevously had in the properties file) and calls the main mwe2 component.

Something like this:

module Caller
@my.MainModule {
property1 = "foo bar"
property2 = true
property3 = ComplexStuff { foo="bar"}
}


Am 8/23/10 3:51 PM, schrieb Heiko Tappe:
> In xtext 0.7.2 I used to have a properties file to externalize some
> settings into a separate file.
> I could refer to the settings via
>
> <workflow>
> <property name="propsfile"
> value="workflow/KomalogDslToCode.properties"/>
> <property file="${propsfile}"/>
> ..
>
> What would be the easiest/best way to do something similar in xtext 1.0?
>
> --Heiko


--
--
Need professional support for Xtext or other Eclipse Modeling technologies?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : http://blog.efftinge.de
Re: Externalize workflow settings in xtext 1.0 [message #554560 is a reply to message #554550] Mon, 23 August 2010 14:29 Go to previous messageGo to next message
Heiko Tappe is currently offline Heiko TappeFriend
Messages: 18
Registered: March 2010
Junior Member
Strange... that works.
That's exactly what I tried to do in the first place. But I missed to actually run it because the Eclipse MWE2 Editor showed errors:

"couldn't resolve reference to ..." the model to be called.

Is that a known behaviour or even a bug?

--Heiko
Re: Externalize workflow settings in xtext 1.0 [message #554583 is a reply to message #554560] Mon, 23 August 2010 15:23 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Heiko,

the reference to the model should be resolved without an error marker in
the editor. Do you get any content proposals after the @ ? Is your
main-workflow located in another plug-in? Does it export the package
that contains the workflow?

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 23.08.10 16:29, schrieb Heiko Tappe:
> Strange... that works.
> That's exactly what I tried to do in the first place. But I missed to
> actually run it because the Eclipse MWE2 Editor showed errors:
>
> "couldn't resolve reference to ..." the model to be called.
>
> Is that a known behaviour or even a bug?
>
> --Heiko
Re: Externalize workflow settings in xtext 1.0 [message #554767 is a reply to message #554583] Tue, 24 August 2010 11:29 Go to previous message
Heiko Tappe is currently offline Heiko TappeFriend
Messages: 18
Registered: March 2010
Junior Member
Hmm... today everything seems to be just fine. Maybe Eclipse was a little bit confused yesterday Wink

But another (hopefully last) problem arises when I try to follow Karsten Thoms approach to build xtext projects via Maven Tycho (http:// kthoms.wordpress.com/2010/08/18/building-xtext-projects-with -maven-tycho/). I keep getting this error:

[main] ERROR o.e.e.m.launch.runtime.Mwe2Launcher - Problems instantiating module Caller: Cannot resolve proxy: file:/C:/javaee_helios/test/trunk/net.transdata.test.codegen.generator/src/main/resources/workflow/testDslToCode.mwe2#xtextLink_:://@root/@assignment.1/@value::http://www.eclipse.org/xtext/common/mwe2/Mwe2½Referrable½0::/1
java.lang.RuntimeException: Problems instantiating module Caller: Cannot resolve proxy: file:/C:/javaee_helios/test/trunk/net.transdata.test.codegen.generator/src/main/resources/workflow/testDslToCode.mwe2#xtextLink_:://@root/@assignment.1/@value::http://www.eclipse.org/xtext/common/mwe2/Mwe2½Referrable½0::/1


Obviously the called module cannot be found. Running it from within Eclipse is no problem. Any idea?

--Heiko
Previous Topic:Run Xtext generator from buckminster: Problems with initial setup and after grammar changes
Next Topic:conflict between 'literals' and qualifiednames
Goto Forum:
  


Current Time: Fri Mar 29 00:32:24 GMT 2024

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

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

Back to the top