Community
Participate
Working Groups
There's an api to create a dependency (createDependency), but since Usage is it's own type, this isn't sufficient.
Steve, I agree that a more convenient API should be provided, in the meantime, you can try something like the following to create your USAGE. Usage usage = (Usage) package_.createPackagedElement( null, UMLPackage.Literals.USAGE); usage.getClients().add(namedElement); usage.getSuppliers().add(supplier); or use the factory methods to create your usage.
I would propose adding the following.. NamedElement#createUsage(NamedElement supplier) NamedElement already has getters for dependencies ... ie. getDependency(String ...) etc.
sounds adequate to me...
Created attachment 61883 [details] updated API added new createUsage() function to NamedElement
The changes have been committed to CVS.
The changes are available in build I200703301423.
Move to verified as per bug 206558.