TDA593 /
TDA593
This is the wiki for the course Model-Driven Software Development 2014/15
Feel free to post questions and exchange information regarding the lecture content, the project, or technical information on the use of Papyrus! However, do not post any complete solutions to your assignments.
- (GL) Cleaned up wiki from last year.
- Is this where we are supposed to ask questions?
- Yes, you can ask here. I (Grischa) am looking in here frequently and can answer questions. Other students are of course invited as well to answer them...
Course Content:
Project Assignments:
Papyrus/Technical issues:
- In the sequence diagrams, shouldn't we have synchronous calls (perhaps with a return), rather than asynchronous calls? (There are only asynchronous calls available in the course plugin right now.) To be able to return something to the actor after it has made an asynchronous call to the system, the actor needs to provide operations (e.g. receiveAnswer()), but won't this become weird when we generate code?
- Yes, I noticed that I removed them. The actual reason is not to forbid you to use them, but because they're rather inconvenient to use in Papyrus. Additionally, as far as I've seen it, they also provide return operations on the reply arrows. I can enable them again in the plugin, but not before tonight or tomorrow.
- Done, the plugin now supports Sync messages!
- How do you get code generation up and running without installing the EMF Eclipse bundle? I would like to keep my Eclipse installation, but I can't seem to get it working properly. When I try creating a EMF Generator Model -> choose name, on the next screen there is no "UML Model" to select from. I have installed the latest EMF SDK from the Eclipse update site (as a plugin), but it still doesn't appear. What else do I need?
- I don't have a straightforward answer to this, as it's hard to tell which plugins you're missing. Downloading and installing Eclipse Modeling and Papyrus will take you less time than it takes me to find out what's missing in your system...
- How do you model Java generics in Papyrus for the class diagram?
- Generics are not straightforward in UML (partly because they have to be general, not only apply to Java). This should work: Under your class that should be generic, you add a child "Redefineable Template Signature". Under that one, you create a Classifier Template Parameter. Finally, under that one you create a Class with the template name (e.g. E). In the properties of the Classifier Template Parameter, define Parametered Element as your Class (E). That does the trick for me at least.
- Follow-up to the question above: how do you implement an interface with parameterized types? For example:
Class1 implements Interface1<Object, Integer>
. Also how do you specify which "parameterized types" to use when for example returning a Map from a function? (using the EMap object)
Example:
Map<Room, Integer> getMap() { };
- The first part of the question (Class implementing paramterized Interface) works exactly the same way as before. I don't see any problems there...For the method, this is getting into the depths of UML templates now. The abstract answer is that you create a so-called TemplateBinding. Here are the details if you want to know them: http://www.eclipse.org/modeling/mdt/uml2/docs/articles/Defining_Generics_with_UML_Templates/article.html
Other: