Archive for the ‘Eclipse’ Category

Eclipse e4 @ Java Forum Stuttgart – Impressions

Friday, July 16th, 2010

I had the pleasure to present Eclipse e4 on the Java Forum Stuttgart on the 1 of July. It was really nice to have lots of people showing interest.


I also quite happy that the audience gave good feedback regarding the session. The e4 talk was ranked within the top 10 presentations (rank 6).

Thanks everybody to attending the talk and giving such a good feedback.

 

Shiny new world? – new Eclipse 4.0 Splash

Wednesday, July 14th, 2010

Susan F. McCourt created a new splash screen for Eclipse 4.0 via Bug report.

I quite happy to see this change, after almost a decade of watching the old one it is refreshing to see something new.

What do you think about this new splash?

 

NPE in e4 – ds missing in action

Monday, July 12th, 2010

I saw this question asked several times, therefore I think a short blog entry might help in solving a common e4 launch problem.

If you run e4 you need to include the declaritive service implementation into your launch config. If you don’t you currently receive the following NPE:


java.lang.NullPointerException
	at org.eclipse.e4.ui.internal.workbench.E4CommandProcessor.processCommands(E4CommandProcessor.java:52)

If you face such an error, make sure org.eclipse.equinox.ds and org.eclipse.equinox.util are included in the launch config.

I hope that at some point a better error message will be issued. Please see Bug 318821 for details.

 

Reading resources from a Eclipse plugin

Tuesday, July 6th, 2010

Frequenty you want to store static files in your bundle and load them from your bundle. For this you can use the following code, of course replace the bundle id with your version:


Bundle bundle = Platform.getBundle("de.vogella.example.readfile");
URL fileURL = bundle.getEntry("files/test.txt");
File file = null;
try {
	file = new File(FileLocator.resolve(fileURL).toURI());
} catch (URISyntaxException e1) {
	e1.printStackTrace();
} catch (IOException e1) {
	e1.printStackTrace();
}

Alternatively you can also use URL directly. I have to thank Paul Webster for this tip.


URL url;
try {
        url = new URL("platform:/plugin/de.vogella.rcp.plugin.filereader/files/test.txt");
	InputStream inputStream = url.openConnection().getInputStream();
	BufferedReader in = new BufferedReader(new InputStreamReader(inputStream));
	String inputLine;

	while ((inputLine = in.readLine()) != null) {
		System.out.println(inputLine);
	}

	in.close();

} catch (IOException e) {
	e.printStackTrace();
}

I believe the second option is the better one, as you avoid a dependency to the class Platform.

 

Eclipse e4 Presentation @ Java Forum Stuttgart

Tuesday, June 29th, 2010

If you are joining the Java Forum Stuttgart on the 01. July, I will be talking about Eclipse e4. While the slides will be in English my talk will be in German.

Hope to see you there.

 

The next e4 killer feature? JDT on the move

Monday, June 21st, 2010

Some people say that the Eclipse support for alternative JVM based languages is not best in class. Therefore I think it is great news that Olivier Thomann from the JDT team indicated that might open up JDT to better support Java like languages.

I think this would be great and definitely a mayor step for the Eclipse IDE. As far as I understood the Scala IDE and the Groovy support could be heavily improved if the JDT could allow these environments to leverage the JDT infrastructure.

I believe these are great news for the interested people and the Eclipse ecosystem.

 

Eclipse RCP Tutorial updated to Helios

Monday, June 21st, 2010

I’m happy to announce that I updated the Eclipse RCP Tutorial to Helios. Looking at the revision history I was (again) surprised that I maintain this tutorial since Sep. 2007.

This time I made a full cycle; I tried not only to adjust the tutorial to the minor UI changes in Eclipse Helios but also to re-structure the tutorial and the text to improve it’s readability. I added more pictures which hopefully make the Plugin concept easier to understand.

Please note that the URL has changed to http://www.vogella.de/articles/EclipseRCP/article.html so in case you have saved this link I encourage you to update this to the new URL. But URL forwarding is setup so don’t worry to much.

I hope this tutorial continue to help new RCP developers to find their way into the fascinating world of plugin and RCP development.

Have fun hacking Eclipse RCP! :-)

 

Eclipse 3.6 styling with CSS and the ThemeManager

Tuesday, June 15th, 2010

Tom Schindl and Kai Tödter already blogged about the new Eclipse e4 ThemeManager. If you want to use the Eclipse ThemeManager and CSS Styling in Eclipse 3.6 you find an adjusted example “org.eclipse.e4.ui.examples.css.rcp” in the e4 repository. This example demonstrates the usage of the ThemeManager and Theme switching during runtime in Eclipse 3.6.

This is the colorful example. In case you are impressed with the design I would like to mention that I designed it myself. ;-)

For the German Eclipse fans their will be an article in an upcoming Eclipse Magazin describing in detail how to set this up.

 

Eclipse Democamp Mannheim – Impressions

Friday, June 11th, 2010

Yesterday we had the Eclipse Democamp Mannheim organized by the JUG Mannheim.

Despite having a temperature of more then 30 Celsius approx. 60 people showed up and enjoyed the talks about RAP, EGit, Eclipse Memory Analyser, redView, UML Lab, Eclipse e4 and Usus (a code checker tool). We also had several visitors which traveled quite a bit (for example from Dortmund, Saarbruecken and Kassel) to join the event.

Here a very photos about the event.

The room was packed.

Benjamin Muskalla about the news in Eclipse 3.6 RAP.

Jens Baumgart demonstrating EGit.

Markus Kohler showing Eclipse MAT:

Ekkehard Gentz delivering an overview of redView:

Manuel Bork with the UML Labs tools.

Nicole Rauch and Marc Philipp presenting their code checker tool USUS.

I demonstrated Eclipse e4 but have no photos to prove that. ;-)

Many thanks to the presenters Benjamin Muskalla, Jens Baumgart, Markus Kohler, Ekkehard Gentz, Manuel Bork and Nicole Rauch and Marc Philipp and to everyone who joined the event.

In case you joined the event, please leave a comment letting us know what you think about the first JUG Mannheim Eclipse Democamp.

 

Eclipse projects – The nature of things

Tuesday, June 8th, 2010

Did you ever wounder what defines if a project is “pure” Java project or a Plugin project?

Have a look at the “.project” file. This file contains the description of your project. It contains a XML tag “natures” where the nature of the project is described. A plugin project has the nature “org.eclipse.pde.PluginNature” and a java project has the nature “org.eclipse.jdt.core.javanature”.

These tags will also steer some behavior of the development environment, e.g. a project with PluginNature will update the java class path if you change the dependency information in a plugin project. For example if you add the “org.eclipse.pde.PluginNature” to an existing Java project you get the PDE menu for your project.