UML Modeler public API

The UML Modeler component supports UML model content that is rooted in Packages that are not Models. Any assumption that the root element is a Model is now invalid.

As evident in a sweep of the UML Modeler code, this assumption is fairly pervasive. The nesting of Models in packages is not supported. The assumption that a Model has no owner is valid, although is encouraged not make this assumption. The UML Modeler application [programming interface (API) is modified to manage the manifestations of this assumption. For components that use UML Modeler resources, the following common patterns appear:

References to Model metaclass and the related API:

Action Filters in plug-in.xml:

Miscellaneous:

com.ibm.xtools.modeler.ui.UMLModeler.saveResourceAs(Resource, String, int) method

WORK IN PROGRESS_ DRAFT The example given in this RFE (com.ibm.xtools.modeler.ui.UMLModeler.saveResourceAs(Resource, String, int)) is a private static method. Private methods are not documented since clients are not be able to access this API call.

Issues:
  • 1. What does saveResourceAs really do?
  • 2. Are there any overloaded calls for saveResourceAs?
  • 3. If so, what are they?
  • 5. How are Resource, String and int used in accomplishing the call?
  • 6. What are the legal/required values for the parameters?
  • 7. What exceptions are thrown when an error occurs?
There are hundreds maybe thousands of api methods unique to Eclipse and RSA, which are not documented at this time within RSA. This makes the writing of pluglets & plugins to extend RSA considerably more laborious than it needs to be. The developer is left with choosing likely candidates for accomplishing the task and with trial and error testing when completing the required arguments. In other languages such as C++, C#, VB and Java there is considerably more and possibly example code documentation easily viewed and available for copy & paste to ease the effort required in development. Such an enhancement would considerably improve the attractiveness of RSA and its extensibility.
Yes it's true that every pluglet api call specific to RSA/RSM is documented as a syntactical expression shown in content assist as they mentioned. When the api has arguments the content assist provides no help indicating what the allowed values are or examples showing how to use the specific api call. I'm disappointed that the developers took the example literally instead of understanding and addressing the intent of the request, they could have sent me an email or called to get clarification if they were interested in promoting better customer relationships. Here's a better example (which is public) to send back to them:
  • Lines of Code: UMLModeler m;m.saveProfileAs(arg0, arg1);
  • Help as it appears in content assist: void com.ibm.xtools.modeler.ui.UMLModeler.saveProfileAs(Profile arg0, String arg1)

Observation: There is no way to directly bring up information about the method within RSA. Pressing F3 or F4 brings up virtually useless declaration information contained within the tabbed page. If you bring up "/Help/Help Contents" and search for "saveProfileAs" the help system returns "Nothing Found". If you know to search for "UMLModeler" and click on the "com.ibm.xtools.modeler.ui" entry in the list you then get a browse-able help page. Pressing Shift-F2 appears to be intended to provide the capability that I'm looking for however I'm unaware of any javadocs provided with RSA that can be accessed via the Shift-F2 function key. If you know how to use the key stroke pair with the distributed RSA files, please call and guide me through the setup.

The class UMLModeler contains the saveModelResourceAs(Element model, String file) and saveProfileAs(Profile profile, String file) methods.

The saveModelResourceAs(Element model, String file) method saves the model specified by a root model element to the location specified by file. The saveProfileAs(Profile profile, String file) saves the profile specified by profile to the location specified by file.

Related information
UMLModeler class
UML Modeler API reference
UML API Javadoc
EMF API Javadoc