Author Archive

Eclipse //TODO in generated coding – Is this useful?

Friday, November 18th, 2011

I just returned from Devoxx, a really nice conference. I had a lot of fun and learned a lot.

I also had the oppertunity to talk one influential developer, who shall remain unnamed.

He told me why he prefers IntelliJ over Eclipse. Very interesting and I will open Bugreports for most of his points in the future.

One thing he mentioned was that the //TODOS in the generated code are annoying. I personally agree. I have configured my Eclipse code templates to have no comments included.

Which makes me wonder, does anyone likes these //TODO comments in the generated code? If the majority thinks they are not useful I think we should open a bug report to JDT and ask them to change the templates.

Please let me know via comments what you think.

Distributed Version Control with Git available for the Kindle

Tuesday, November 15th, 2011

Today I released my first book for the Kindle platform: Distributed Version Control with Git.



Git is popular, especially in my main focus areas, Eclipse and Android.

Since a while I’m working in converting my tutorials into offline versions. The Git tutorial is the first one because it has no images. To my surprise it was still a huge amount of work. I hope the second book will be easier, as I learned a lot about epub, mobipocket, design, DocBook, XSLT transformations, Apache Ant, Inkscape and other tools.

You find the Git Book in all Amazon Stores:

Git Book in Amazon Germany
Git Book in Amazon UK
Git Book in Amazon France
Git Book in Amazon USA

Just to set the right expectations, the Distributed Version Control with Git has the same content related material as the online version. I hope that having this material also available for the Kindle is helpful. Is also allows you to read the online version before deciding if you want to get the book offline.

A big thanks goes to Alex Blewitt for writing the foreword and for providing feedback. I would especially thank Jennifer Nerlich de Vogel for their intensive spell checking exercises. Wolfgang Schell who is a power Kindle user gave important feedback for improving the structure of the book to optimize it for the Kindle.

I also got many suggestions or corrections from my readers and other people involved with Git and would I would like to express my deepest gratitude to their contribution including Robert Konigsberg, Elke Schaper, Appaholics, Michael Wiedmann, Joshy Cyriac, Peter Kahle, Jon Svede, Henning Hoefer, Matthias Sohn, Chris Aniszczyk, Stefan Lay, Edwin Kempin, Sasa Zivkov, David Carver.

Also a big thank you to Ralf Ebert who seeded the idea to publish on the Kindle platform.

Now I’m hoping for positve reviews at Amazon. :-)

Eclipse – Setting the default perspective via config.ini

Wednesday, November 2nd, 2011

A quick tip for the Eclipse IDE (and also useful for Eclipse RCP). You can use the “config.ini” (in your Eclipse installation folder) to define a perspective.

For example the following in config.ini will set the default perspective to the resource perspective.

-perspective
org.eclipse.ui.resourcePerspective

Make sure to add this before the JVM options.

For find the perspective ID you can use the Plugin menu spy.

You find all possible startup parameters listed The Eclipse runtime options

Hope this helps.

Challenge of the month and retroperspective – Getting offline

Tuesday, November 1st, 2011

This challenge of this month will be a publish something for the Kindle on Amazon.com. I played with the thought and the technology to convert tutorials from vogella.de into E-books for a while now and I think I should give it a try. I hope that by having my tutorials available offline for the Kindle that this will help people in getting their work done. I also believe that this might result in a better quality in my tutorials as they now available to a wider audience.

Last month challenge was a good preparation for this. I actually did a lot of spelling and error corrections for my site. Several people did also proof-read my stuff and gave valuable input. I’m aware that this need to continue but I think I had a good start.

Eclipse RCP updates with p2 got sooo much easier

Thursday, October 20th, 2011

Eclipse 3.7 introduced a new feature “org.eclipse.equinox.p2.rcp.feature” which makes updating an RCP application super easy.

Have a look at Eclipse RCP updates with p2 where I describe a very basis setup which should get you started.

I hope this helps.

vogella.de has a new logo

Monday, October 17th, 2011

I was trying to find a good logo for vogella.de for some time now. I started with some abstract figures but I think this is currently a bit overused as I see this a lot in current webpages.

I wanted to have something which represents the quest for knowledge and high moral values. Also fighting evil things would be a fitting scheme.

I believe a journey is something which represents this very well. Also I thought a wanderer would be a good representation. Also we know the quote that any sufficiently advanced technology is indistinguishable from magic.

Great programmers are still called wizards. Like in good old Unix times.

And here we go:

I obviously did not create the artwork myself but the first time in my life I hired a designer. I did though
made the first outline and asked him to change his drafts a few times. So I feel like I had a big influence in greating my own logo.

I really like it, I feel it represents me and my webpage well.

Let me know your opinion.

[Update] New Logo

Running Eclipse RCP applications in the e4 compatiblity layer

Tuesday, October 11th, 2011

Eclipse 4.x allow to run Eclipse RCP applications and Eclipse plug-ins which are created based on Eclipse 3.x.

This is valuable as it allows you to reuse your existing code base and evaluate advantages as the live model and CSS based styling. Unfortunately concepts like dependency for views do not work with the compatibility layer.

To run your Eclipse 3.x RCP application on e4 you only have to add a few plug-ins to your product.

org.eclipse.e4.ui.workbench.addons.swt
org.eclipse.equinox.ds
org.eclipse.equinox.event
org.eclipse.equinox.util
org.eclipse.platform
org.eclipse.ui.forms
org.eclipse.ui.intro

After this change you should be able to start your existing application based on e4.

Related bugs:

Quick access should not be hard-coded
[Compatibility] All views now have view menus
Compatibility Layer – Getting services via getViewSite().getServices()
Compatibility Layer – Using @Inject in plugin.xml based contribution

I hope this help. I also updated my Eclipse 4.2 Tutorial.

How to fix your perspective in Eclipse RCP (and potentially a bug…)

Tuesday, October 4th, 2011

A common requirement for Eclipse RCP applications is that the perspective should be fixed so that the user cannot change the layout, e.g. layout parts cannot be moved or zoomed, and the initial set of views cannot be closed.

According to the Javadoc this behavior should happen if the perspective is set to fixed. There seems to be bug in the implementation or in the Javadoc as the position in Perspective.java is important. The following works:


public void createInitialLayout(IPageLayout layout) {
	layout.setEditorAreaVisible(true);
        layout.setFixed(true);
	layout.addView("de.vogella.rcp.fixedperspective.view",
				IPageLayout.LEFT, 0.5f, layout.getEditorArea());
	layout.addView("de.vogella.rcp.fixedperspective.view2",
				IPageLayout.RIGHT, 0.5f, layout.getEditorArea());

}

The following does not fix the perspective:

public void createInitialLayout(IPageLayout layout) {
        layout.setEditorAreaVisible(false);
        // does not work
	layout.addView("de.vogella.rcp.fixedperspective.view",
				IPageLayout.LEFT, 0.5f, layout.getEditorArea());
	layout.addView("de.vogella.rcp.fixedperspective.view2",
				IPageLayout.RIGHT, 0.5f, layout.getEditorArea());
	layout.setFixed(true);
}

Does anyone know if that is a bug or a feature?

Another question which sometimes comes up is how to fix a specific view which is added via the Perspective.java. This is possible by getting IViewLayout from the layout.

public void createInitialLayout(IPageLayout layout) {
		layout.addView("com.example.view.view", IPageLayout.LEFT, 0.95f, layout.getEditorArea());
		IViewLayout viewLayout = layout.getViewLayout("com.example.view.view");
		viewLayout.setCloseable(false);
		viewLayout.setMoveable(false);
		layout.setEditorAreaVisible(true);
	}

Msisepllnig – October Challenge of the month and retropective

Saturday, October 1st, 2011

This month challenge is to proof-read my tutorial. I will try to find typos and correct them as fast as possible. My main focus for this will be on my Eclipse and Android tutorials.

Last months challenge was a tremendous success. I lost more then three kilograms of weight (which is good) without any other change but not drinking any sweetened drinks. I guess I keep this habit for a while. :-)

Feature Request #1 – Syntax Highlighting finally done

Friday, September 23rd, 2011

I receive requently of requests for help, for new tutorials and for certain features on my website.

The one request I constantly receive since approx. 4 years is that my tutorial should use syntax highlighting for the code.

I finally took the time to implement this. This was quite time consuming as I build most articles from Docbook sources and I hadn’t touched my build process in the last 3 years. So I had to re-learn what I did a few years ago and change it so that I get syntax highlighting. I also took the time to clean everything a bit up so hopeful future changes will be simpler.

I hope you like the result, I also tried to improve the look with improved stylesheets.

Here is an example from the: Eclipse RCP tutorial and here is an example for the Android Tutorial.

Let me know what you think.


Switch to our mobile site