0

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,

Dana Klein
  • 159
  • 1
  • 12

1 Answers1

0

Ecore differs from Java's object model, and unfortunately, EAttributes can't be static like fields in Java can.

thSoft
  • 21,755
  • 5
  • 88
  • 103