Documentation is... not the strongest aspect of the Papyrus project... but here is the official documentation page.
On DICE, from the Applications menu, pick Programming, then the latest available Eclipse Modeling (4.8, as I type). (There may be some automatic updating involved: this is normal, and should only happen this first time. Accept defaults.) From the menu, choose Help, then Install new software. Using Add, add the appropriate (to your Eclipse version) Papyrus Release Update Site which you can copy from the Papyrus site here. (That site talks about Help then Install modeling component, but that's outdated.) Select just the Papyrus option, ignoring the Releng and other options - some of those options lead to flakier software that will give you install problems, though feel free to experiment later. Wait while it installs the software - this will take a while. Eventually it will ask you whether you want to restart Eclipse; do so. You should now see that you have a New Papyrus Project option on the front page.
Take your time! You want to not only get to the right model in the end, but understand what you did in the tool to get there, so that you can do it again easily. Feel free to explore, too.
We're going to work with the Paleo example: you may like to have the draft UML class diagram we came up with last week in front of you.
Tip: If you get "A property with invalid text string found", delete the property in the Model Explorer and start again; enter the information about the property in the Properties window, not by typing into the diagram.
Tip: the Model Explorer is often the most useful view. If you lose it, you can reopen it from the top menu, Window then Show View then Model Explorer. (If you don't see Model Explorer under that menu, pick Other and then search.)
Next, suppose our conceptual class diagram is going to be used to support the development of a system in which the user, who is thinking of a food, will be asked questions in the appropriate sequence and finally told whether their food accords to the diet or not. For example, given the original paleo diagram, if the user is thinking of a fish, they will first be asked "Did it have a face?", they will answer Yes, and the system will tell them "It's paleo".
Add operations to the conceptual class diagram (as simply as possible: don't concern yourself with the user interface, just with the logic) to support this.
Add corresponding methods to your Java classes.
Develop a sequence diagram to show the scenario mentioned above, where the user is thinking of a fish. Go on to think about more extended scenarios. Update your Java code to be consistent with the behaviour you show.
Remark: there's a Youtube video on sequence diagrams in Papyrus which you may find useful if you have trouble driving Papyrus... however, it's doing sequence diagrams in a particular kind of robustness analysis which I don't really recommend and it has a number of issues like talking about messages passing between "classes" when it means "objects", so be careful!
To start with, model a simple process. Create an initial node. (Note that initial notes, final nodes, fork and join bars etc. are all under the same submenu in the palette, because they are all technically pseudostates: you may need to click on the small triangle to the left.) Then, using opaque actions, create actions for consult marketing, write book, write app, profit, and finally, a final node. Join these up in sequence using control flow edges.
Next, add some parallelism and some choice. Someone points out that the book and the app can both be written at the same time, and suggests that under certain circumstances it might be good to consult a nutrition expert as well as marketing. Revise your model to show appropriate parallelism and choice going on. Check that you understand the differences between decision, merge, fork and join nodes.
Remark: there's a youtube tutorial for activity diagrams in Papyrus. I didn't make it compulsory viewing because it's rather slow, but if you get stuck it might be useful! The other videos in the series are also worth considering (though they assume a particular development approach, and the way they use the term "robustness analysis" is a bit different from the way we use it in the course).
perdita@inf.ed.ac.uk
)
Informatics Forum, 10 Crichton Street, Edinburgh, EH8 9AB, Scotland, UK
Tel: +44 131 651 5661, Fax: +44 131 651 1426, E-mail: school-office@inf.ed.ac.uk Please contact our webadmin with any comments or corrections. Logging and Cookies Unless explicitly stated otherwise, all material is copyright © The University of Edinburgh |