Author Archive
Eclipse 4.0 Application Platform – Tutorial Updated
Thursday, July 29th, 2010As you know the Eclipse 4.0 SDK is out.
It also appears in discussions that some people don’t think Eclipse e4 is a good idea.
Other people seem to like it.
To help you to decide yourself I updated my Eclipse e4 Tutorial to Eclipse 4.0 Application Platform – Tutorial.
Together with Tom Schindls Tutorial you should be able to have a good start with Eclipse 4.0 SDK.
Please remember that the target of the core e4 Project is to improve the programming model of Eclipse and to provide an improved way of influencing the UI. The standard plugins are still the same and behave the same way.
My Tutorial also needs improvements, unfortunately it is not as far and deep as I like, but I hope that is will give you a good start. If you find issues, problems with my tutorial please let me know. The “more to come” section of my tutorial lists my future plans.
Speak like a native – How to use native code (Windows DLL) in OSGi
Tuesday, July 27th, 2010As you know the OSGi Framework enforces strong modularity. This also applies to native library code, e.g. a Windows DLL.
To make your DLL available in the context of OSGi you have to use the Bundle-NativeCode section in MANIFEST.MF.
For example if your DLL is called “sapjco3.dll” and is in the main path of you bundle you can use.
Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Jco Bundle-SymbolicName: com.sap.conn.jco Bundle-Version: 1.0.0 Bundle-ClassPath: sapjco3.jar Bundle-NativeCode: /sapjco3.dll; osname=win32; processor=x86 Export-Package: com.sap.conn.jco,
Many thanks to Matthias Heinrich for the tip.
Eclipse e4 git mirror
Tuesday, July 20th, 2010After some time and effort mainly by Denis Roy and Bernhard Merkle the e4 git mirrors are working.
You find the e4 repos listed Eclipes Git overview.
EGit is also kind enough to be able to import all the projects from the different levels of the projects.
So give it a try via EGit and check out the e4 source code, e.g. the e4 UI projects via git://dev.eclipse.org/org.eclipse.e4/org.eclipse.e4.ui.git or if you want to use http via http://dev.eclipse.org/git/org.eclipse.e4/org.eclipse.e4.ui.git.
Eclipse e4 @ Java Forum Stuttgart – Impressions
Friday, July 16th, 2010I 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, 2010Susan 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, 2010I 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.
All the postal codes you ever wanted
Friday, July 9th, 2010If you looking for a list of cities and postal codes for certain countries have a look at http://www.geonames.org/. They also allow to download lists of postal codes.
Thanks to Andrea Antonello for the tip via Twitter.
Reading resources from a Eclipse plugin
Tuesday, July 6th, 2010Frequenty 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.
July Challenge and Retrospective – Tux Time
Saturday, July 3rd, 2010This month my challenge will be to use Ubuntu on my new home machine “Angelus”. I have been a heavy Linux user in the past, but evil corporations
have forced me to use Windows over the last years.
While vogella.de runs on Ubuntu the server and does not require frequent changes and therefore my Linux bash skills are getting a bit rusty. I also want to make use of find, grep, awk and the like and cywin it just not the same thing.
Also all the cool things (Git, compile OpenJDK, compile Android, …) runs easily on Ubuntu. So lets see if I manage to go back to the real thing.
Retrospective:
Regarding my last months challenge Updating Tutorial to Eclipse 3.6 I think I did pretty good. I updated around 10 tutorials (I believe). There are still lots of tutorial which requires updates, I hope that I will find time in the future to do so.







