Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Ecore Tools » recusive subproperties
recusive subproperties [message #1802270] Tue, 05 February 2019 16:23
Bushra Harraq is currently offline Bushra HarraqFriend
Messages: 5
Registered: February 2019
Junior Member
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: Fri Sep 25 01:38:54 GMT 2020

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

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

Back to the top