Adding combined fragments in UML Designer for Eclipse - eclipse

I'm using the latest version of UML Designer (7.1) for Eclipse. I have to create a Sequence Diagram, but in the palettes there are no combined Fragments. All I have are actors and sync/async messages. In some tutorials I've seen seen palettes with comb. fragments.. But I don't have them. How is it possible?

The combined fragments are not implemented in UML Designer and there is no plan to implement them at the moment.
As UML Designer is based on Eclipse Sirius, it is possible to do it and maybe you saw the same kind of features in another Sirius based modeler.
If you are interested in sponsoring us to implement this feature do not hesitate to comment the existing issue :
https://github.com/ObeoNetwork/UML-Designer/issues/175

Related

How to create the "Use-Case" Diagram by means of EMF

simple question.
Why Eclipse Modelling Framework doesn't support Use-Case diagram ?
There are many diagrams, but no use-case:
also, i study the tutorial at Eclipse Modeling Framework (EMF) - Tutorial and just created a "Ecore Modelling Project". I was not able to create any "Use-case" diagram.
thanks for reply
In general, the goal of EMF is to specify modeling languages, like activity or class diagrams. Editors for the UML language have been implemented based on the capabilities of EMF, such as the Papyrus, MagicDraw or UML Designer tools (but there are others as well). Assuming you are looking for an UML modeler, you should look at the specific Eclipse-based UML tools.
EMF on the other hand provides a few modeling languages that ease the definition of other modeling languages, most notable the ones called 'Ecore' and 'Generator model'.
It is possible to install both EMF and concrete modeling languages in the same Eclipse installation, but they have very different purposes.
I think that your problem is that in your Eclipse you have installed:
Ecore Tools which allows you to create Ecore diagrams
UML Designer which allows you to create UML diagrams
The Activity Explorer you see is provided by UML Designer and so it is there to create UML diagrams only.
I think that you use UML Designer 7.0 and there was an issue with it about the activity explorer which opens even for non UML project. Now this issue is fixed in the 7.1 version of UML Designer.
To find how to create new diagrams with Ecore Tools you can have a look to the documentation.

Switching from Rhapsody to Eclipse (Papyrus) - UML model conversion?

Our team has been using Rhapsody for developing UML models and c++ code for 10+ years, and we would like to switch to Eclipse and use Papyrus for UML modeling.
We have compatibility concerns: would the UML models (all class diagrams, state machines etc) created in Rhapsody be all portable to Papyrus/Eclipse easily? Rhapsody can export UML models into XMI files (UML 2.1, 2.2, 2.3 standards). My questions is: is Papyrus able to reconstruct diagrams from XMI files
If not, are there better alternative UML plugins that work in Eclipse?
The XMI file exported by Rhapsody contains only meta data of the models. Is there a quick way to port the entire project from Rhapsody into Eclipse? Anybody experienced the similar?
Your answers will be much appreciated.
First, I must mention that I am directly involved with Papyrus, especially with the brand new Papyrus for Real Time project, at Eclipse.
First to set expectations... Moving diagrams between modeling tools has always been an exercise in frustration... There have been "standards" over the years (e.g., OMG's XMI-DI), but none seem to have been fully successful and all have necessitated a manual review. Note that I have not tried with the latest version of UML (2.5).
Now the model semantics, however, have a tendency to be more portable, especially with more recent versions of UML. I am not sure which version Rhapsody pretends to support, so it would be difficult to comment further.
With the version of Papyrus that is currently in development (with a scheduled June 2015 release), the notion of "canonical" diagram has been added. This provides for automatic creation and update of some diagrams under certain condition. for example, many behaviour diagrams, such sequence diagrams and some structure diagram, such as composite structure, can be canonical and generated from the semantic model. However, layout would still need to be adjusted. Other diagrams, such as class diagrams, would have to be manually re-created.
As was mentioned in the comment to your question, trying it out would give you the best indication of how much work is involved.
I am interested in this topic and I did a simple research on it: in fact a connector between RSA and Ppayrus is already open source https://www.eclipse.org/forums/index.php/t/835114/ it could be usefull to take a look at it and implement the same for Rhapsody.
I know that the Rhapsody XMI export did not export the graphical elements, you should probably then export them in a serialized format and mapping htem to papyrus diagram element.
other interested work but seems not to be free : modelbus https://www.modelbus.org/en/rhapsody.html which implement connectors with Papyrus EA and Rhapsody : could be also interesting to look at.
I am interested in your feedback if you did not let it down and do achive the mapping :)

Eclipse modeling

I search for tool that can generate code from UML diagram for Eclipse. The tool should generate code from UML diagram, reverse engeneering to see code changes, and merge option to prevent the deletion of the file for any change.
Is there tool that do that, or is it too much to ask?
If you like Eclipse based tools, I could recommend the free Uml to Java generator from Obeo, which may be downloaded from the Marketplace:
Help -> Eclipse Marketplace...
However, I think that it doesn´t completely fit your needs, since I believe that it doesn´t provide reverse engineering facilities. Also note that they use Acceleo for code generation, which is the reference OMG specification implementation.

Xtext and GMF integration

First of all, I have seen many links on stackoverflow of integrating XText with GMF.
The most consistent tutorial I've seen so far was: http://www.eclipse.org/forums/index.php/mv/msg/472225/1036564/#msg_1036564
..But not even generate a textual editor in the final step (only GMF editor).
I also saw the documentation, but I can not understand what they suggest in this link: http://www.eclipse.org/Xtext/documentation.html#gmf_integration
So I wonder if anyone knows how to integrate effectively the GMF with Xtext with an existing ecore! Use the XText 2.0.4.
Thank you!
Depending on how fixed you are on using GMF, you may want to look at Graphiti (built on GEF).
Graphiti is an Eclipse-based graphics framework that enables rapid development of state-of-the-art diagram editors for domain models. Graphiti can use EMF-based domain models very easily but can deal with any Java-based objects on the domain side as well.
There is an Eclipse Labs project for creation of Graphiti editors using an XText DSL, called Spray.
This project aims to provide one or more Domain Specific Languages (DSL) to describe Visual DSL Editors against the Graphiti runtime, and provide code generation to create the boilerplate code for realizing the implementation against the Graphiti framework. Potentially the Spray DSL can be used to generate code for other frameworks as well.
You can import your DSL ecore model into Spray, and using references to your DSL's types create a graphical editor with relatively little boilerplate. The presentation at CodeGen 2012 (SprayCodeGeneration2012.pdf on the Google Code link above) highlights some of Spray's features.

How to generate code by Papyrus on Eclipse?

I install Papyrus at here. So how to generate code using Papyrus ?
To generate the java code from UML you can follow the below steps.
New Project->EMF Project Press Next
give the project name
In Model Importer page select UML model and press Next
Select UML model which is created by using Papyrus.Press next
In Package selection page select all the root packages
click finish, it will generate genmodel.
Use the genmodel to generate Java code.
I hope this information helps.
In order to generate any text artifacts from UML models in the Eclipse Modelling Environment (i.e. Papyrus, TopCased, etc.) you should use Acceleo which is an eclipse implementation of the MOF models to text transformation language, the OMG standard language for models to text transformations.
It is a very well made technology but it could take some time to become familiar with it especially if you do not know MOF and the Model Driven Architecture.
QVT is another OMG language but its aim is models to models transformations (not models to text). It is therefore not the right answer to your question.
These can help you.
Papyrus Tutorials
Papyrus is an Eclipse lugin for modeling, you need to use additional Eclipse plugin to do model transformations. In the other answer you can find link to tutorials. First of them indicates you should use QVTo.
Resources:
http://wiki.eclipse.org/M2M/Operational_QVT_Language_%28QVTO%29
http://www.eclipse.org/m2m/qvto/doc
http://www.eclipse.org/modeling/m2m/downloads/index.php?project=qvtoml
To generate code from a UML diagram created with Papyrus must create a run configuration for Papyrus.
More information and a demo video at the following links.
http://www.papyrusuml.org/scripts/home/publigen/content/templates/show.asp?P=140&L=EN
http://www.papyrusuml.org/home/liblocal/docs/Documentation/Java-Code-Gen/Papyrus-GenJava-GenerateCode.swf
You need to install Papyrus Java Classes Generator.
Help --> install new software
work with : http://download.eclipse.org/modeling/mdt/papyrus/updates/releases/mars
Check group items by category
Check show only the latest version of available software
Check Papyrus Java
Next --> accept terms and conditions
finish
Now, in your model.di : right click on your class --> Java --> Generate java code.
And you're done !
It doesn't work with Java because even if you get a code from a class diagram then this code is so dirty that it is totally unusable.
It seems that this tool has been written by modelers who have never done any java codding :-)