1

Here is a simple task for you who know the org.eclispe.uml2 API:

I'd like to add an org.eclipse.uml2.uml.InstanceSpecification to an org.eclipse.uml2.uml.Package, but how is that done?

Package package = model.createNestedPackage("MyInstancePackage");       
InstanceSpecification is = UMLFactory.eINSTANCE.createInstanceSpecification();
// package.someMethod(is) <--- ???

Thanks a lot!

1 Answers1

2

This was really easy as expected:

package.getPackagedElements().add(is); 
Wookai
  • 20,883
  • 16
  • 73
  • 86