I am working on RCP application for editing dsl files.
For now I managed to create two editors using Xtext 2.5 that works fine in Eclipse (validation, cross references, etc.). Also there is e4 based RCP application skeleton with custom navigation tree (files are loaded from remote server not from local workspace).
Now I have to integrate those both of them. Unfortunately I didn't find any up to date tutorials about this topic that works for my case.
Here are links that I tried:
This blog post describes integration for Eclipse 3.x
This one about e4 but version of Xtext is less than 2.5
Here is a lot of information about RCP but I didn't found anything about plugins integration with RCP.
There is similar question but it is not clear for me how to use obtained editor or how to get resourceProvider instance.
Does anyone have a reference to the relevant tutorial or sample?
According to Eclipse bug 401309 and various comments in the Eclipse forums XText editors are not compatible with a pure e4 RCP because they rely on lots of code from the 3.x compatibility layer.
You can still create an Eclipse 3.x style RCP, as described in your second reference.
I have added a comment to Bug 401309 where I describe how to make it work.
Related
I'm new to RCP development and stumbling around one problem. I created an e4 example Application with an Application.e4xmi. I now want to use some external editor. I got the sources from a github repo (https://github.com/franca/franca). This repo contains some xtext generated Editors which I want to integrate into my new e4 Application. Now I'm not really sure if I should use the feature, only the DSL parts or also the UI parts as plugins and what's the best way of integrating the editors. I also recognized that there seem to be some compatibility issues with the e3 and the e4 parts but I can't really find a proper solution to work around.
I already imported serveral plugins from this repo into my workspace and tried to link them to my e4 application. I also tried the import plugin from jar which didn't work any better. It also won't work with the Feature.
I'm sorry for this question but within 2 days of looking around the internet I couldn't find a solution how to setup my project right. Although I found some indicators for the compatibility problems like the shared element id org.eclipse.ui.editorss I didn't really understand what to do neither did it work like shown in these tutorials. Thanks for help.
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
I am trying to integrate a Project Explorer view into an RCP e4 application I am working on.
Unfortunately, the information I found online in SO and elsewhere do not provide much information on how to achieve this.
It seems that e4 does not fully support the Project Explorer view (and similar other views) yet, hence the need to provide some kind of compatibility with RCP 3.x.
Does anyone know how to achieve this? Any help is appreciated.
UPDATE:
Grep's comments below are correct, i.e., at the moment developing a native e4 RCP is not available. Hence you need to start with an 3.x RCP and make it e4 aware.
For anyone interested the following links provide excellent answers to these issues.
SO - How to use Eclipse 3.x views in E4?
Tutorial on developing eclipse rcp e4 with 3.x views like project explorer, properties
I am interested in writing an eclipse plugin.
After reading various tutorials around the internet and working through some simple plugin examples, I am quite confused as to how you are supposed to use the new dependency injection/services style of programming I have read about in various places as one of the primary features of eclipse 4.
http://wiki.eclipse.org/Eclipse4/FAQ#For_Adopters_.28Plug-In_Developers.29
The tutorials I've seen, and the eclipse wizard-generated plugins themselves, all use the "old" style of programming using extension points and referencing things using the singleton pattern. Apparently, this style is supported using a compatibility layer.
The information on 3.x style plugin development seems perfectly reasonable and workable to me, but it sounds bad that it is only supported using a "compatibility layer." Is this a style of programming that is going to be phased out/deprecated for Eclipse development?
Where can I find a guide on writing a plugin that uses the new, preferred style? And why do the eclipse plugin wizards themselves not even use this style, if it has been the preferred development model since eclipse 4 was originally released?! Everything I have found about writing eclipse 4 style programs focuses on standalone rcp "applications", not actual plugins to eclipse IDE.
Here are some tutorials I found which use what I understand to be the old style of plugin:
http://www.eclipsepluginsite.com/
http://www.ibm.com/developerworks/opensource/library/os-ecplug/
http://www.vogella.com/tutorials/EclipsePlugIn/article.html
Can someone explain to me clearly what the current status of the eclipse 4 programming model for plugin development is? And if you could point me to some documentation of it that would be great as well.
Thanks!
It will be very long time before the compatibility layer goes as a huge amount of code depends on it.
You can only really use e4 if you are developing a new RCP and don't need any of the existing 3.x style plugins. e4 development is perfectly practical for new apps that don't use compatibility layer plugins - I have several such apps.
An e4 app can use extension points from core plugins which are not part of the compatibility layer. e4 applications make more use of direct injection and the application model which replace some of the old extension points.
For a plugin to an existing RCP (such as Eclipse itself) the 3.x style is required, although
Eclipse Luna provides some support for using e4 style views in a 3.x application.
I apologise for the very amateur question about E4 but I am a bit confused about a couple of things about RCP development using the new Eclipse 4 framework. I read in this tutorial that one can no longer use any default commands the way we could in 3.x especially for common things like Save, Save As... in the File menu. It says that in E4 we have to write our own commands. The reason I am confused is because the thing I liked about Eclipse previously is that a lot of things are already implemented and we can just extend that to our own needs. But it feels like now everything must be written from scratch.
That led me to considering reusing the command code already written for Eclipse Juno. I had the Live Editor open so I could see the list of commands etc but I don't really see any Handlers implemented for any of them. Then I used the Spy on Eclipse Juno and checked out some of the menu items and they all seem to point to Actions. That really confused me as I thought Juno was based on E4.
I could be completely wrong so I am sorry for asking such a silly question. I only just started using E4 and need to decide whether one of fairly young Eclipse 3.x projects should be migrated to 4.x.
AfaIk, in Juno the compatibility layer translates the 3.x based implementation of the IDE into E4 concepts. This is also the reason why the reusable commands are not yet available.
If you have an 3.x based RCP it should also run using the compatibility layer (and you can reuse the commands mentioned in your question) if no incompatible APIs have been used.
Here is more information (also a tutorial from Lars Vogel): http://www.vogella.com/articles/Eclipse4CompatibilityLayer/article.html