Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Accessing global constant data
Accessing global constant data [message #1064598] Thu, 20 June 2013 08:02 Go to next message
chris yo is currently offline chris yoFriend
Messages: 47
Registered: February 2013
How can I access a global constant data from another class?

class Form {
val FORM_NAME = "form101"

class FormGen {
 def void processForm()
   // need to get the FORM_NAME here.

Any idea how to get this FORM_NAME? I have tried FormGen::FORM_NAME, but it does not seem to work. Do I need to import FormGen?
Re: Accessing global constant data [message #1064608 is a reply to message #1064598] Thu, 20 June 2013 08:40 Go to previous message
Alexander Nittka is currently offline Alexander NittkaFriend
Messages: 1184
Registered: July 2009
Senior Member

FORM_NAME is neither static nor public .

val public static FORM_NAME=...

Note that there is a "Generated Code"-View for simple access to the compiled java code. This would have told you, why FORM_NAME was not visible.


Need training, onsite consulting or any other kind of help for Xtext?
Go visit or send a mail to

[Updated on: Thu, 20 June 2013 08:42]

Report message to a moderator

Previous Topic:Xtext starts the generator of the inherited plugin.
Next Topic:Xtext runtime tries to access internet at application startup
Goto Forum:

Current Time: Thu Nov 26 19:43:22 GMT 2015

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

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