I have designed a class (in UML) which should implement the System.IDisposable interface. How do I do it so that when generating code it get's recognized properly and withou having to draw my own "System" package with some "IDisposable" interface in it?
Thanks for your help! Cheers, David
I discovered to do it as follows:
The clean (slightly overkill) variant:
The smart way (if you know in which namespace the desired element is placed and how it "looks" like):
Say if you want to add an attribute to a class that should be of IDisposable, you can select the attribute's property "Type" (Properties window) to be Modelling::System::IDisposable.
In term of "Generating code" I found it clever to place all of my own modelled classes into a package so that it becomes separated from the packages like System. Then you can simply (instead of right clicking on white ground and selecting "Generate code" in order to generate code for all artefacts) right click on your package and select "Generate code" and it will generate code just for your package and not the System stuff (dummies). It becomes valid either way if you have the namespaces set nicely in your model like described in this post.