Skip to main content



      Home
Home » Modeling » Ecore Tools » recusive subproperties
recusive subproperties [message #1802270] Tue, 05 February 2019 11:23
Eclipse UserFriend
As you can see, the metamodel has a Test, which has properties. These can also have subproperties.

index.php/fa/34815/0/

I want now to code a method, which gives back the properties as well as all other subproperties. Here is the naive approach without recursion. Please help me.

public EList<TestProperty> getProperties() {
if (properties == null) {
properties = new EObjectContainmentEList<TestProperty>(TestProperty.class, this,
Iec62264Package.TEST__PROPERTIES);
}
for (TestProperty property : properties) {
properties.add(property.getSubProperties());
}
return properties;
}
Previous Topic:EPackage registration not deployed in any feature (and improvements)
Next Topic:Download site for latest build
Goto Forum:
  


Current Time: Tue Jul 08 05:19:17 EDT 2025

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

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

Back to the top