Reply To: How to read model from Eclipse builder?

homepage Forums BridgePoint/xtUML Usage and Training How to read model from Eclipse builder? Reply To: How to read model from Eclipse builder?

#1372
Travis London
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));