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.


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

Report message to a moderator

Previous Topic:Cyclic resolution of lazy links
Next Topic:Scope for EObject with Qualified Name
Goto Forum:

Current Time: Wed Apr 26 16:05:56 GMT 2017

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

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