Develop a GEF4 rcp application - eclipse-rcp

I have been using eclipse GEF 3.x for developing graphical editors. While there are many examples for this framework, GEF4 doesn't seem to have many. Since gef4 is rewritten based on Java fx, putting up more examples will popularize the framework. For instance after doing lot of searching I found out that IVisualPart Is used instead of IEditorPart. Any pointers to a comprehensive example would be helpful

The GEF repository at GitHub contains examples for the individual components, i.a. the "MVC Logo Example" that demonstrates usage of the MVC technology stack that is offered by GEF for the development of graphical applications, and the "Zest Graph Example" that demonstrates usage of the Zest technology stack that is offered by GEF for the development of graph-based graphical applications.
Moreover, you can register for a free GEF tutorial here: https://info.itemis.com/en/gef/tutorials/
The terminology was changed from IEditPart and IEditPolicy to IVisualPart and IPolicy. Moreover, IVisualPart is divided into IContentPart, IFeedbackPart, and IHandlePart. For details, take a look at the documentation in the GitHub Wiki, especially the MVC documentation.

Related

Eclipse 4 RCP (aka E4) documentation

Is there at least anything other than Vogella's tutorials and his book, which is completely based on those tuts? Examples from his repo are often either incomplete/unfinished/won't run and those examples even don't match the book actually..
I'd like to find at least some javadoc for this, because any step to a side and I'm completely lost on how to accomplish different tasks and what functionality is available.
Lars Vogel's Tutorials are the most complete and up-to-date documentation on Eclipse 4 development. Second to this is asking questions in Eclipse 4 Community Forum. Last option is to google for specific technical problems, which will in most cases lead you to blog posts from the same people that are active on the forums. (Mainly single supporters like Lars, some Eclipse devs and the guys from www.eclipsesource.com)
I discourage using the wiki, since much of the information may be outdated and may be more confusing than an actual help. Documentation for JFace and SWT can be reused from Eclipse 3.x since there are few to none changes in Eclipse E4.
E4 is alive and many of its components are now encapsulated in the standard Eclipse Platform. So most of Eclipse 3 docs and books are still relevant, as well as the Eclipse 4 ones.
If you want to understand the theory, you should start searching Eclipse conference slides explaining the Eclipse Platform and plug-ins. Trust me, it might sound old-style, but most of the times I find an EclipseCon Powerpoint or PDF, it is a great presentation, concentrating in 30 minutes the great work of some of the best Eclipse developers. If I had to re-start learning Eclipse, I would start again from some EclipseCon slides talking about Eclipse Plugins and Eclipse E4 Model.
For Eclipse4 or E4, we mean the Eclipse4 Model, which is now part of the Eclipse Platform. The Eclipse IDE itself supports both 3.x and Eclipse4 programming.
If you want to start Eclipse4, you should take a good book or a tutorial and follow it step by step. As an example you have these books:
Eclipse RCP (Rich Client Platform) 2nd edition
Contributing to the Eclipse IDE Project (free ebook)
Eclipse 4 Plug-in Development by Example: Beginner's Guide
Instant Eclipse 4 RCP Development How-to
However, there are a lot of sources of information, as many books, web tutorials and blogs. You can find most of them here:
https://wiki.eclipse.org/Eclipse_Articles,_Tutorials,_Demos,_Books,_and_More
https://wiki.eclipse.org/Eclipse4/Tutorials
http://planeteclipse.org/planet/
In my personal list of who to follow, I could include: Vogella RCP, EclipseSource, Tom Schindl, OpCoach, RCPVision, Kai Toedter, AllBlue, Wim Yongman, and all the E4 Contributors who are writing articles. But it is unfair not to mention all of them.
If you're not satisfied by docs and tutorials, please file a bug to the Eclipse Platform; mention "missing documents to use E4" and specify what you need. The Platform UI team will take care of this, either by linking the existing documentation to the above wiki page or by creating the missing docs.
Note: Several of the developers of the Eclipse E4 and Platform team contributed to the success of the technology by fixing bugs, writing code, documents, tutorials, and opening businesses based on this.
Eclipse committers are writing most of the existing documents, and they usually go to conferences. So, usually, you get their very best at the Eclipse Conferences. If you get their slides, you can get the best of some Eclipse and Java Champions, condensed in 30 slides, or in a video of 30 minutes.
You can start contributing to open source, by following tutorials, like those written by Eclipse Committers, and then you can give back by writing documents to capture your achievements ;)
But, keep in mind that a tutorial is not a book. There is a different process behind. Thankfully those great developers found the time to write code and documentation at the same time.
i was in the same position for my sparetime RCP-Project and was about to give up
since Neon the situation has been improved a lot
my approach
take the tycho-Example from vogella for headless-build
add your custom parts with 'hello world' and play around to learn
for database-access use a declarative Service using jpa
an example will be
http://relations-rcp.sourceforge.net/
for logging and error-view
https://github.com/buchen/portfolio
this project eye-opening!
in general:
search Application.e4xmi in Github by date descending and you will find excelent examples and full working products
Forget about e3 and stick to plain e4. Take Advantage of the latest api's
make a i18n plugin and use
#Inject
#Translation
Messages messages;
use ISideEffect as Binding
for me it becomes fun to code with e4
After almost 2 years there has been no decent response to this question. So i'm considering the Eclipse E4 platform efectively dead, as there are still people voting for this question and can't find an answer.
The only answer I have is - move to the NetBeans Platform. There are similar problems there, but at least people do answer in the mailing list and there are books which are quite more recent and are actually providing working source code! Enve the NetBeans website provides free tutorial on a lot of stuff for free!
I mean it's really hard to believe, but you should try NetBeans platform - it's the only choice.
For anyone who stumbles here looking for an e4 example, here's a simple basic example on using eclipse 4 rcpeclipse 4: rcp getting started
Standard Eclipse documentation for version 4.3 (Kepler) contains javadoc for the most part of e4 project:
http://help.eclipse.org/kepler/topic/org.eclipse.platform.doc.isv/reference/api/overview-summary.html?cp=2_1_0

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.

A sample gwt project using requestFactory, activites and places

Links to any sample gwt project using requestFactory, activites and places?
Thank you.
I found this post from David Chandler very helpful. It discusses a sample project (source code here) using Request Factory, Objectify and Activities and Places.
The project is also discussed in this Google I/O talk. The difference from the original project is that in the talk they use GWTP for the MVP part. You should check out GWTP also as it really simplifies developing with MVP.
My experience with the roo plugin for GWT and GAE wasn't very good. It wasn't very mature when I looked at it (around March 2011), but maybe things have changed since then. For example you had to compile from trunk, as the latest stable version had some bugs, and even then a many to many relation between entities wasn't supported. Documentation was kind of scarce also.
The MobileWebApp sample from the GWT SDK ?
http://code.google.com/p/google-web-toolkit/source/browse/tags/2.4.0/samples/mobilewebapp/

Learning Eclipse RCP and SWT/JFace

I am new to to Eclipse RCP and SWT/JFace. I intend to purchase the Second Edition of the well known Eclipse Rich Client Platform book by Jeff McAffer, Jean-Michel Lemieux, Chris Aniszczyk. I wish to know from people who have read any of the editions of the book whether the book serves as a good introduction to both the topics (RCP and SWT/JFace)? Or would I need separate reading material for SWT/JFace?
I read the first edition of the book in 2007 when I started a project with Eclipse RCP development.
It was a really useful introduction on how to build RCP applications and what concepts are used by Eclipse.
Two other books that I read later are good follow-ups when you finished that book:
Eclipse plug-ins by Eric Clayberg & Dan Rubel
Contributing to Eclipse: Principles, Patterns, and Plug-Ins by Erich Gamma & Kent Beck
Although the second one is a bit dated, the concepts explained are still the same in the heart of Eclipse.
Another thing I did to learn more Eclipse RCP/JFace/SWT was to look at the source code of two great open-source projects built on Eclipse:
RSSOwl
MP3M by Kai Tödter
MP3M is especially interesting since the author tries to keep it up to date with the changes that newer Eclipse versions bring to the platform.

How can I draw diagrams using Google Web Toolkit?

I am considering solutions for drawing diagrams using Google Web Toolkit (GWT).
Up until now I have found only the gwt-diagrams project but it seems abandoned.
Are there any suggestions about diagramming with GWT?
I'm also looking into this, for drawing family trees. I'm currently prototyping with gwt-graphics, which looks to be actively developed and is nearing version 1.0.
There is also the Raphael javascript library, and a couple of thorough blog posts about wrapping GWT around them here and here. The guys in the first article actually released their code for as raphaelgwt.
I can't comment on any of the raphael stuff yet since I haven't used it, I just found this in my own research for drawing components.
You can use draw2d and gef(eclipse Graphical Editing Framework) to develop your GWT Diagram App Now.
look at this: http://code.google.com/p/trufun-webrcp/
the GWT framework with completely open source based on html5 technology, is used to transplant eclipse RCP to GWT WEB.
I would use Google Chart Tools: http://code.google.com/apis/charttools/
I am actually working on a GWT library to draw diagrams and add widgets on the connections. Here is the project site http://code.google.com/p/gwt-links, you'll find a demo site and a video demonstration.