Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Generating Static Objects(Generating Static Objects)
Generating Static Objects [message #970796] Sun, 04 November 2012 09:54 Go to next message
Dana Klein is currently offline Dana KleinFriend
Messages: 63
Registered: October 2012
Member
Hi,

continue to the example of generating a field such as:
def handle (EClass c) {
val attr = EcoreFactory::eINSTANCE.createEAttribute
attr.name = "test"
attr.EType = EcorePackage::eINSTANCE.EString
c.EStructuralFeatures += attr
}

can I generate it as a static field? how to do so?

thanks in advance,
Re: Generating Static Objects [message #972301 is a reply to message #970796] Mon, 05 November 2012 14:12 Go to previous messageGo to next message
Jan Koehnlein is currently offline Jan KoehnleinFriend
Messages: 657
Registered: July 2009
Senior Member
No, Ecore does not support static fields.

Am 04.11.12 10:54, schrieb Dana Klein:
> Hi,
>
> continue to the example of generating a field such as:
> def handle (EClass c) {
> val attr = EcoreFactory::eINSTANCE.createEAttribute
> attr.name = "test"
> attr.EType = EcorePackage::eINSTANCE.EString
> c.EStructuralFeatures += attr
> }
>
> can I generate it as a static field? how to do so?
>
> thanks in advance,
>


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Re: Generating Static Objects [message #972307 is a reply to message #972301] Mon, 05 November 2012 14:21 Go to previous message
Dana Klein is currently offline Dana KleinFriend
Messages: 63
Registered: October 2012
Member
OK, Thanks!
Previous Topic:Exclude files from indexing
Next Topic:Dealing with custom implementation of Ecore beans
Goto Forum:
  


Current Time: Tue Nov 25 00:50:23 GMT 2014

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

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