We have developed an eclipse rcp application using 3.5 and are trying to move it to 4.2.1.
It is a simple RCP application with a view. On doing the basics and launching it I found that the setShellStyle(SWT.MIN) is not working anymore. Since it was a single view application, it didnt require re-sizing, hence we had disabled re-sizing using this API.
But with the new Eclipse (Eclipse 4.2.1), the re-size/maximize button is enabled even when this method is called. I have verified that other APIs called from here work (other than this I used setShowStatusLine(false) and setShowCoolBar(false).
Is this a known problem with Eclipse 4 or whether there is a different API to get this functionality working with this.
I appreciate any kind of help I can get here.?
Related
We have old RCP application written in eclipse 3.x, it has one perspective and 6 views in it (these are added using extensions). I have given a task to enhance its functionality. After going through the requirements, we decided to create multi-perspective RCP eclipse 4.x. application. In which we use old application perspective as it is and we create new perspective for the new requirement. I am java developer, not much know about the eclipse 3.x & 4.x. But since one week read lot of material on net, learnt and confused. Following link and sample code is working to use - 3.x views in 4.x RCP application, but my code is not working with this approach (i tried to add only 3.x views with CompatibilityView to newly created perspective of 4.x application model using e4xmi).
https://dirksmetric.wordpress.com/2012/08/01/tutorial-eclipse-rcp-e4-with-3-x-views-like-project-explorer-properties-etc/
Can any one please help me with step by step approach on how to use RCP eclipse 3.X perspective (without code migration) in eclipse 4.X RCP application? it will be great help. Thanks in advance.
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
As I have done the following tutorials:
http://www.vogella.com/tutorials/EclipseRCP/article.html
http://www.vogella.com/tutorials/EclipseJFaceTable/article.html
http://www.vogella.com/tutorials/EclipseJFaceTableAdvanced/article.html
I wanted to combine the JFace table viewer (plugin from 2nd and 3rd tutorial) and the ToDo application from the first tutorial. In the JFace table example(s) there is a View extended from a ViewPart. In this the call:
getSite().setSelectionProvider(view)
inside the createPartControl method is fine and works.
But when I do the same in the other tutorial it does not work, I get a NullPointerException. The first article creates a plugin and then transform it using features and products into an Eclipse 4 application. So the classes in the application are not derived from a 'Part'. They are referenced using the application model and only use the annotation #PostConstruct.
Why is it that I get this NullPointerException?
And really, how can I get the SelectionProvider service linked to the Workbench?
I also tried to use PlatformUI.getWorkbench() but it says that the workbench does not yet exist.
Any help highly appreciated.
Thanks.
Eclipse 4 (e4) applications are completely different from traditional Eclipse 3.x style applications.
In an e4 application you cannot use a lot of things that are used in a Eclipse 3.x application - so you need to check which style the example you are using is based on. The e4 application has access to a lot of new features that are not available in a 3.x application.
In an e4 application you inject the ESelectionService to get and set the current selection.
I'm working on a product which is an RCP application based on Eclipse 3.x api. Now we are trying to move it to Eclipse 4.x. We are using some internal classes in our code. I've already read the tutorial provided by Vogella about migrating to Eclipse 4.x from 3.x, but I'm still not getting how to start.
We want to take advantage of the new Eclipse features, my main question is that we have good number of views, layouts in our old code, so what should be the approach I should follow. Also is there a way to create an application model from my older application using 3.x API.
I'm stuck and not getting how to proceed.
this really depends what you are trying to do. Do you just want to update your IDE? Or should the project be based on the e4 platform.
I recently updated a project from 3.x to the new IDE. This works very good, the compatibility layer does a good job and you are able to run the application with minimal changes. However if you do this, you cannot use the benefits of the e4 platform.
If you want to move your application to e4, thats more work to do. Mostly you will not want to touch all the old code, so there is a possiblity to have 3.x and e4 plugins run together in your application. Thats done with the e4 bridge and wrapper classes for old code. Most of the IDE views and editor are also still based on 3.x, so if you use them, the e4 bridge is also a good way to incorporate them.
Some information can be found here:
http://tomsondev.bestsolution.at/2011/06/10/how-to-apply-the-e4-programming-model-to-3-x/
http://eclipsesource.com/blogs/2012/06/18/migrating-from-eclipse-3-x-to-eclipse-4-e4/
Andy
I've read both the tutorial.But I am stucked and got too much confused as to where to start from. Basically 3 features are there
1. css styling of widgets(which i understood and did a bit of it)
2. to introduce dependency injection in my code
3. to put the application model
What approach I should follow?
This document helped me in deciding which strategy to adopt. http://www.eclipse.org/forums/index.php/fa/17403/ for migration.Indicates clearly which strategy you should adopt based on your existing code structure.Hope it helps
I am currently trying to modify the behavior of an existing open-source plug-in for Eclipse.
I'm trying to understand how the plugin works. To do so, I opened it in "Debug" mode as an Eclipse application and I am testing it out after having inserted many breakpoints.
However, sine Eclipse plugins do not have a Main method, it's still really difficult for me to keep track of everything that is going on. The calls seem to jump arbitrarily (which I quickly realized was happening through all the interfaces and superclasses the plugin is inheriting) and I can't see exactly what's doing what.
What is the proper (read: BEST) way to debug a program with no Main method? How can I test, tweak, and explore and program - in this case a plugin - whose modus operandi I'm uncertain of?
You need to run your plugin in a runtime workbench. This (simplistically) starts a new instance of Eclipse with all existing plugins installed, plus the plugin you want to debug. Make sure that you have the PDE tools installed in your Eclipse instance and then in the debug configurations area, double-click on Eclipse Application to generate a default runtime workbench launch config.
I'd also recommend that you read up on PDE (plugin development environment), and you can get an overview here: http://wiki.eclipse.org/PDE/FAQ. And you can read up on plugins in general here: http://eclipsepluginsite.com/. There are many tutorials and lots of information all over the web. So, google is your friend.
Along with using breakpoints in Debug method you can even try printing stack trace using Thread.currentThread().getStackTrace() method to know the starting point of a Thread.