homepage › Forums › BridgePoint/xtUML Usage and Training › How to read model from Eclipse builder? › Reply To: How to read model from Eclipse builder?
April 30, 2014 at 4:21 pm #1372
Participant
To get all the root packages you need to use association R1401:
Package_c[] pkgs = Package_c.getManyEP_PKGsOnR1401(system);
To get a system you can do this:
SystemModel_c system = SystemModel_c.SystemModelInstance(Ooaofooa.getDefaultInstance(), new ClassQueryInterface_c() {
@Override
public boolean evaluate(Object candidate) {
return ((SystemModel_c) candidate).getName().equals(projectName);
}
});
Then you can get the root packages from that system.
To get nested packages you do this:
Package_c[] childPkgs = Package_c.getManyEP_PKGsOnR8000(PackageableElement_c.getManyPE_PEsOnR8000(pkg));