Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

RSA Tips and Tricks

Introduction

This is a guide for illustrating how to utilize the more advance features of RSA within the Eclipse environment for modeling with Java. This is also a general FAQ for some trouble shooting.


I can't see my models?!?!

Make sure you are in the modeling perspective.


How to add ArrayList to an attribute

Here is a step by step guide to setting up an ArayList in RSA.


  • In the modeling perspective, goto the diagram of choice and select the appropriate class.
  • Select the attribute. If the attribute is on an operation, select the operation and access the properties tab. There, access the parameter within the Parameters tab and Right-Click to "Select in Project Explorer".
  • In the Properties window, goto the General Tab. Select the Multiplicity of * and make sure the type is enabled correctly.
  • Within the same properties window, select the Stereotypes tab.
  • Select "Apply Stereotypes..."
  • Check JavaCollection (or JavaArray if you want a standard array).
  • Scroll down the Stereotypes window, and a new property pops up in the second table.
  • Select the VALUE of the collectionType, and change java.util.Collection to java.util.ArrayList

Save, transform, ????, Profit!


Hints on documentation with RSA and JavaDoc

If transformed correctly, RSA will generate the required JavaDoc that can be utilized within the Eclipse IDE. This includes the not only documentation on the methods, but the passed arguments and returned values. In order to document attributes on the model, you can either select them within the Properties by right clicking the attrbute on the operations tab and hitting "Select in Project Explorer" or by viewing the project explorer and selecting the operation under the class file.


Hints on transformation

Before a transformation, make sure to keep up all the files you will select to transform open in your viewer. If an operation was changed in the model, or if the begin/end tags were deleted in the methods of the code, you could lose hours worth of work! Also, when possible try to spot-transform (transform one class, instead of running the transformation across all classes). This will keep the appropriate authors and not flag every file within a plugin/bundle to have to be committed again.

Back to the top