Magicdraw plugin for Eclipse - eclipse

I want to create a sequence diagram for some Java code, using Magicdraw. I have Magicdraw Enterprise version installed.
Is there a plug-in I can install, in Eclipse, which can generate a sequence diagram from the code?

Magicdraw Enterprise has this out of the box - there is no need for Eclipse.
I don't have the tool available at the moment, but I will try to explain from memory.
You need to create a Code Engineering Set for Java.
Configure it using the tab named "Select from disk" (or something similar), and select your Java file from disk.
It should detect the class and its content and create a Code Engineering Set.
Unfold the Code Engineering Set, and your class underneath it. Nested under the class will be the different methods (here, I can't remember if it is in the right pane of the configuration menu or, after you close it, in the containment tree).
Now, if you right click on the method, you should have an option to generate the method implementation as a sequence diagram.
I hope this approximate explanation helps. If you need something more step-by-step (for instance, I assumed you know what a Code Engeneering Set is), feel free to ask.

Did you try this yet? http://jdocs.nomagic.com/190/index.html?overview-summary.html (Class: ModelElementsManager --> CreateDiagram()
Magicdraw offers a java API. It is possible to create a sequence diagram programmatically.
You might need to follow these instructions before developing: https://docs.nomagic.com/display/MD185/Development+in+Eclipse
I hope, I was able to help.

Related

ObjectAid equivalent in IntelliJ

Is there anything equivalent to ObjectAid's Eclipse plugin in IntelliJ?
Note - my source code is so big if i install Code Iris, IntelliJ is crashing.
And I do not want to create class diagram of each and every class in my project, i want to select which class should be included, which is special about ObjectAid.
Here is PlantUml for jetBeains ides, here is reference page
PlantUML
No, Plant UML doesn't do any code selection or auto-generation of UML code.... Intellij unfortunately is a little behind in this dept, although I love the IDE.
I have experienced nothing but frustration with this topic.
I use the Ultimate edition, and the diagrams on this are great except it wont make a simple association, unless you start deleting lines, and then it wants to change your code!
Visual-paradigm is a joke, and the implementation into the IDE ise so unintuitive (like most coded uml addons).
Unfortunately your best bet is to use UMLET (free) and just do your own.... the amount of time you will waste looking, you will be able to draw your own!

Mapping between resource file and model object in Eclipse plugin app

Please anyone help me understand and use IDE.openEditor(IWorkbenchPage, IFile).
I have a resource file (xml format), it contains my model objects. I'm writing a wizard to create it, save it into workspace, view it inside a tree view (I use CommonNavigator) and open it in an editor. I need to know the control flow of this all. How to map between resource file and model objects, how the navigator can show that objects and how to open editor that associated with my resource file.
I'm sorry, I'm a newbie in Eclipse field. I know I need too much, but please give me at least an idea.
Thanks a lot.
A great character once said... "You have much to learn young padawan".
Here's a great place to start your journey though the basics of Eclipse plug-in / RCP development...
http://www.vogella.com/eclipse.html
If you really want to get down and dirty into the bowels of Eclipse, you can use Eclipse itself to teach you the dirty details about what's really going on.
Figure out how to view Eclipse source code inside of Eclipse.
Set break points at interesting points in Eclipse source code that you want to know more about.
Use the 'Eclipse Application' run configuration to run an instance of Eclipse from within your main Eclipse.
Use your newly launched Eclipse to preform the tasks you want to mimic and hopefully, you'll hit one of your break points and see how the Eclipse developers did what you want to do.

netbeans 6.1 - reverse engineer java source code to UML class diagrams

i was using netbeans 7.1.2 and it didn't have any UML plug in capabilities and now i have had to resort to netbeans 6.1 and i already have two classes from which i would like to create UML Class diagrams but the reverse engineering option yields no results. I cannot generate any class diagrams. Does anyone know how to utilize the UML plug in to reverse engineer source code and create class diagrams.
This isn't possible anymore I think, I looked for it as well and found nothing but that was a year ago. Something might have happened since.
Check out EIDOS_UML, it's a community effort to recreate the UML capabilities I think, don't know the current status of it.
I hope you have followed the procedure correctly to generate the class diagram:
Right Click the Project (or select the specific packages or java files you want) then select Reverse Engineer option in the right click menu, this will generate model based on the selection. This is a necessary step before creating diagrams.
Then browse the model and select the package (or all the classes) for which you want Class Diagram, right click and select Create Diagram from Selected Elements...
Select diagram type (in this case "Class Diagram"), give a name and click finish.
I have tested it in both Netbeans 6.1 and 6.5, and it works fine.
Hope this solves your problem.

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 :-)

UML tool for reverse engineering an eclipse project

I am currently working on a project in Eclipse but the problem is that this project is very big (a lot of codes, classes, packages, etc) and undocumented. Since, the project is written in Java, my idea was to make a reverse enineering of the project to see his architecture in UML. Do you know an eclipse plugin who can complete this task very easily? Thanks for your answer !!
I think MoDisco is what you are looking for ( here for a short intro)
It seems that the question is dealing with Eclipse plugin therefore Modisco and StartUML are not a possible choice because they are either not a graphical class diagram viewwer or an Eclipse plugin.
The tools that I have evaluated and selected are:
Topcased can reverse a project and gives an UML view. The reverse is good even if not recursive. I mean that you can detect only object having their own information such as class, interface, package, method and attributes but you can not detect calls between classes because this require a recursive reverse.
eUML will give you a visual class diagrams and the possibility to navigate but no model only EMF tags inserted inside your own code. I like the visual representation of the class diagram but having EMF tags in my code is too intrusive !!
You can try RSA which is a pretty good reverse having a real UML model but you will also get EMF tag in your code
The best for me and with no doubt is EclipseUML Omondo with no tag in the code and a high quality UML model but it is really too expensive !!
I'd advise StarUML or StavrUML, the unofficial fork. It reverse engineers code compliant with Java versions before 1.6 or something. Yes, the project was abandoned years ago, but the UML editor remains incredibly strong and powerful.
However, I'd avoid using reverse engineering a UML diagram. You'll probably get an unreadable mess out if it. Just get stuck in and make it manually :)
I'm sure you can find a suitable tool for your needs if you check these.