Adding workflow in Eclipse RCP - eclipse-rcp

I want to add workflow in my eclipse rcp. Please provide me some guidlines.
I tried few plugins, but they were not what I was looking for.

What you want to essentially do is create an Eclipse modeling project. The way it works is by creating your own EMF models. All your tree nodes with their attributes are "modelled" in EMF.
Then you can convert this model to an GEF/Draw2d Diagram using something called GMF(Graphical Modeling Framework).
EMF :
http://www.eclipse.org/modeling/emf/
GMF :
The GMF Tooling project provides a model-driven approach to generating graphical editors in Eclipse.
http://www.eclipse.org/modeling/gmp/?project=gmf-tooling
Tutorial : I would suggest looking at the following tutorial to get a feel of the whole thing.
http://www.ibm.com/developerworks/opensource/library/os-ecl-gmf/

Related

Eclipse e4 migrating 3.x plugin to 4.x?

I have been working with Eclipse RCP for over a week now, and I've now been given an Eclipse plugin written in 3.x, which I need to migrate to 4.x. I'm using a book called Eclipse 4 RCP by Lars Vogel which has a small section on this, but I can't for the life of me figure out what I'm to do.
I'm trying to do this throught the use of the compatiblity layer. It mentions to add a couple of features for this (org.eclipse.rcp, org.eclipse.emf.ecore, org.eclipse.emf.common) and your ready to go, but I don't exactly know what I'm to do here. Like do I add these to the existing product file of the 3.x plugin I've been given, or do I create a separate e4 project and point to that. Many of the tutorials I read are a bit vague with the details and its a shame there's no proper step by step guide for beginners with this. Any help would be great.
Probably, you should be creating a separate e4 plug-in project for this. And where you have to configure your extensions/extension points in e4 ways.
Basically, like creating a new project.
If you want to migrate your Eclipse 3.x RCP application to the Eclipse 4 programming model, you can't directly reuse existing plugin.xml based user interface components, e.g. Views or Editors based on the definition in plugin.xml .
Components based on the plugin.xml file must be adjusted to avoid inheritance of Eclipse classes and to use the programming model based on #Inject . They also must be contributed to the application model.
Components which are not directly based on the plugin.xml file must be adjusted if they use Eclipse 3.x singletons, as for example Platform or PlatformUI , to access Eclipse API
you may want to take a look at this page: https://www.eclipse.org/community/eclipse_newsletter/2013/february/article3.php

How to create Class Diagram in Eclipse?

I just wanted to create the class diagram of my project in Eclipse.The project is already implemented,suggest me any tool that sketch the Diagram of this project in Eclipse.
Take a look at Model Development Tools (MDT).
For reverse engineering, you can use JUPE.
ObjectAid generates classes diagram when you are simply drag and dropping classes from Project manager to the diagram.
UMLGraph creates class/activities diagrams automatically from the code and append them to javadocs.
As far as I know, both work for Java. I don't know if they support other languages.
Papyrus is the very powerful tool for hand creation of any UML and other diagrams

GEF - How to open GEF application on ViewPart application

I am newbe in GEF development.
I had created one GEF application using Draw2D apis.
Application contains Two tree viewers. I need to draw connection to connect children of these trees. I also want to keep control on these connection so that I can able to delete them. I need to draw 1-1 and N-1 kind of connections.
I need to embed this application within an RCP application which I already have and want to show it as a view within my specific Perspective.
Additionally, I have my own data model.
I want to know that to convert my model to GEF understandable model format what changes do I need to make with my model.
What you want to essentially do is create an Eclipse modeling project. The way it works is by creating your own EMF models. All your tree nodes with their attributes are "modelled" in EMF.
Then you can convert this model to an GEF/Draw2d Diagram using something called GMF(Graphical Modeling Framework).
EMF :
The EMF project is a modeling framework and code generation facility
for building tools and other applications based on a structured data
model. From a model specification described in XMI, EMF provides tools
and runtime support to produce a set of Java classes for the model,
along with a set of adapter classes that enable viewing and
command-based editing of the model, and a basic editor.
http://www.eclipse.org/modeling/emf/
GMF :
The GMF Tooling project provides a model-driven approach to generating
graphical editors in Eclipse.
http://www.eclipse.org/modeling/gmp/?project=gmf-tooling
Tutorial :
I would suggest looking at the following tutorial to get a feel of the whole thing.
http://www.ibm.com/developerworks/opensource/library/os-ecl-gmf/

integrate an UML modeling Tool in my plugin?

I'm developing a plugin eclipse that generates code from a UML diagram. I want to integrate the tool making these UML diagrams in my plugin. I explain : I want to have a button or a menu that contains " create a new UML diagram". By clicking on it, the tool's editor ( papyrus for example ) shows up so I can create my diagram.
Is it possible ? I admit I am new in developing plugins. And if it is, how ?
Thank you for your help
Yes, this should be straightforward. You can use an Eclipse model-to-text templating technology like M2T-JET to easily generate the file containing the new model and to easily generate code from that model. Once the model file is created and populated with initial content, use the IDE class to open the default editor on the file.

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