Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How to use Static fields in MWE2 Files
How to use Static fields in MWE2 Files [message #725925] Fri, 16 September 2011 08:02 Go to next message
AndreasH  is currently offline AndreasH Friend
Messages: 10
Registered: March 2011
Junior Member
Hi,
i have more then 15 MWE2 files which are using the same source path. Something like that:


module test.generator.mwe.vc

var modelPath="D:/sandboxes/xtext2.GenDSL/model"


Workflow {
        component = org.eclipse.xtext.mwe.Reader {
        // lookup all resources on the classpath
        // useJavaClassPath = true

        // or define search scope explicitly
        path = modelPath

        // this class will be generated by the xtext generator
        register = xtext2.GenDSLStandaloneSetup {}
        loadResource = {
            slot = "model"
        }
    }
}



I want do declare the variable "modelPath" with a value from a static Field (its a Class which holds all project pathes). Is it possible to access such fields in the worklow? If yes, please write an example.

Thx Andreas
Re: How to use Static fields in MWE2 Files [message #725962 is a reply to message #725925] Fri, 16 September 2011 09:24 Go to previous message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Andreas,

no, that is not possible.

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

On 16.09.11 10:02, AndreasH wrote:
> Hi,
> i have more then 15 MWE2 files which are using the same source path.
> Something like that:
>
>
>
> module test.generator.mwe.vc
>
> var modelPath="D:/sandboxes/xtext2.GenDSL/model"
>
>
> Workflow {
> component = org.eclipse.xtext.mwe.Reader {
> // lookup all resources on the classpath
> // useJavaClassPath = true
>
> // or define search scope explicitly
> path = modelPath
>
> // this class will be generated by the xtext generator
> register = xtext2.GenDSLStandaloneSetup {}
> loadResource = {
> slot = "model"
> }
> }
> }
>
>
>
> I want do declare the variable "modelPath" with a value from a static
> Field (its a Class which holds all project pathes). Is it possible to
> access such fields in the worklow? If yes, please write an example.
>
> Thx Andreas
Previous Topic:CODE GENERATION WITH XTEXT: Someone please help
Next Topic:Xtext validation with two grammar models
Goto Forum:
  


Current Time: Fri Mar 29 04:50:24 GMT 2024

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

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

Back to the top