How to Use Predefined UModel Elements
UModel defines several important elements as "predefined". This includes several internal elements (Root, Component View and Unknown Externals package) as well as the elements of all profiles installed with UModel (e.g. the C#, VB and Java profile).
Predefined elements can be uniquely identified by using ENUMUMLPredefinedElement, which allows direct and easy access to these elements for several functionalities, for example:
•Find a predefined element:
// get the CSharp profile
•Apply a predefined stereotype:
// set the CSharp 'delegate' stereotype
•Check if a predefined stereotype is applied:
// check if package is a CSharp - namespace (if 'namespace' stereotype is applied)
•Set the tagged value of a predefined tag definition:
// set attribute-section "STAThread"