Skip to main content

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: 146
Registered: February 2013
Senior Member
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: 1193
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: Sun May 20 21:49:48 GMT 2018

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

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

Back to the top