Skip to content

Java and Eclipse News - Lars Vogel
Syndicate content
Tips around Eclipse and Android programming
Updated: 31 min 22 sec ago

Eclipse Community Awards voting open. Please vote

Thu, 02/02/2012 - 14:02

Just a small reminder, the Eclipse Community Awards is currently open for voting. Please vote: http://eclipse.org/org/press-release/20120130_awardsvote.php

I’m also nominated, as Eclipse Top Newcomer Evangelist :)

flattr this!

Categories: Blogs

Feb 2012 Challenge of the Month – Eclipse 4 Book

Wed, 02/01/2012 - 08:45

Challenge: Eclipse 4

This month challenge will be to get the first version of my Eclipse 4 book out. I’m working on this now for a while and I think I should put a first version out so that people can learn better about the amazing Eclipse 4 platform capabilities.

I’m very busy this month so I hope this works out.

Retroperspective for last month challenge:

Last month I switch completely to Linux / Ubuntu. First of all: Thanks to all for their support to my questions in Twitter and Google.

Ubuntu 11.10 is amazing. Using Linux feels like coming home to me. As a student I used Unix (Solaris) and SUSE Linux a lot. Later at my first job I worked with HP-UX.

Ubuntu gets everything right (for me). The shortcuts are at the right position. It detects my devices without problems and I truely enjoy Unity (after I tweaked it a bit).

It is so nice to be able to run find . -name “*.xml” -print0 | xargs -0 grep -i “stuff I search” and get immediate results. Also using the Git command line feels so better, compared to using it under Windows.

I also also extremely surpised that Ubuntu supported my iPod directly. I just connected it, started Banshee and could maintain my playlists and put music on the iPod. Also the Amazon MP3 store integration is amazing. Much better for me then iTunes on Windows as I buy my stuff at Amazon.

I would like to thank Marcelo Módolo for his tips on Ubuntu. He told me that I can mount FTP accounts in the file explorer. That is a huge time saver for me.

He also gave me a hint to Shutter an awesome screenshot tool. I was kind of afraid that I would miss SnagIt but shutter is even betten IMHO. I was afraid that I would miss SnagIt, but Shutter works even better for me.

Marcelo also gave me a pointer to How to change tooltip background color in Unity to make the Javadoc view in Eclipse readable.

I also had some issues with Ubuntu

I got really frustrated with the Alt+tab key. But after some initial fighting with Alt+tab I learned that if I hold it over an entry with multiple windows (or press the Arrow-Down key) that I can select between multiple windows of the same application.

I also had a problem with the Touchpad. It seems to get activate quite easily. So I wanted to deactivated it but I still wanted to have the Touchpoint avaiable.
Dariusz Luksza
gave me the following working tip via Twitter:

synclient TouchpadOff=1

I later got the tip from Thilo Wetzel and Martin Riedelon G+ that the shortcut Fn + F8 also works.

The other annoying things was that the Shift+CTRL+Up shortcut of Eclipse was caught by the Ubuntu system. This shortcut was not listed in the standard shortcut (how can you make fixed shortcuts?). I found an answer to that on the Ask Ubuntu Website – How to turn off the alt-shift-uparraw key.

Also the fading launcher was annoying at first, but I used ccsm to fix its position. It also took me a while to get used to the menu on the top (like the Mac has it). I’m looking forward to HUD in Ubuntu 12.04.

Summary:

I will not switch back. Ubuntu rocks. And just out of completely in the hope to avoid any: “Try a Mac” comments: I once tried using a Mac for a month and I didn’t like it.

Thanks everyone for there help with using Ubuntu. I can really recommend Ubuntu, it is Linux done right in my opinion.

flattr this!

Categories: Blogs

Eclipse 4 Application Tutorial available (for Eclipse 4.2 M5)

Mon, 01/30/2012 - 07:10

A while ago I published an Eclipse e4 tutorial. Things have been moving quite a bit in Eclipse 4 since then.

I’m pretty excited about the capabilities of Eclipse 4, therefore I re-wrote my tutorial to show the capabilities of Eclipse 4.

This tutorial focuses on the application model and the dependency injection capabilities.

Eclipse 4 Tutorial.

More Eclipse 4 tutorials are available on http://www.vogella.de/eclipse.html in the category Eclipse 4 Development but I have not yet spend sufficient time to polish their content.

I hope you like it. It was a significant amount of work I invested into the description. Please let me know if you find errors.

I also would like to thank Brian de Alwis, Tom Schindl, Remy Suen, Paul Webster, John Arthorne and Eric Moffatt for answering my questions.

flattr this!

Categories: Blogs

The end of Eclipse 3.x

Thu, 01/26/2012 - 06:40

Currently we have in my option the unfortunate situation that Eclipse did fork itself into a 3.x and 4.x stream.

Fortunately this is going to change.

I think it is worth to put emphasis on the statement of Mike Milinkovich.

Quote: As of the Juno release, Eclipse 4 is going to be the base platform for the Eclipse ecosystem. [SNIP] Eclipse 3.8 will also ship as part of the Juno release, but currently there are no 3.x releases planned after that..

I think its great the the platform gets ride of the two code lines.

For users this means that they should give the Eclipse 4.2 milestones a try. For Eclipse projects this means that they should test their plug-ins based on Eclipse 4.2.

For vogella.de this mean that I should update my Eclipse RCP tutorials.

Both should report bugs in case they find issues.

Happy bug hunting!

flattr this!

Categories: Blogs

Android – INSTALL_FAILED_INSUFFICIENT_STORAGE

Mon, 01/23/2012 - 15:21

If you work with the Android Emulator and deploy to it for a while you may receive the following error message in the LogCat View.

Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE

The reason for this is that the emulator default to 64MB for internal storage.

You can override this in the Eclipse launch configuration for your Android application with the additional parameter -partition-size 1024.

Alternative you can add the following line to the “config.ini” file of you AVD definition. This file is stored in the user folder in .android/avd and then under your specific device definition. For example:

hw.lcd.density=160
sdcard.size=200M
skin.name=HVGA
skin.path=platforms/android-15/skins/HVGA
hw.cpu.arch=arm
abi.type=armeabi-v7a
hw.cpu.model=cortex-a8
vm.heapSize=48
snapshot.present=true
hw.ramSize=512
image.sysdir.2=system-images/android-15/armeabi-v7a/
image.sysdir.1=add-ons/addon-google_apis-google_inc_-15/images/armeabi-v7a/
disk.dataPartition.size=1024

I hope this helps. I have also ask the Android development team to increase the default value: Bug report.

flattr this!

Categories: Blogs

Android SQLite and ContentProvider Book available for the Kindle

Wed, 01/18/2012 - 06:10

Today I released my new Android SQLite and ContentProvider book for the Kindle device.

This book demonstrates how you can develop Android applications using the integrated SQLite database. It also demonstrates how to use and create ContentProvider for accessing data. ContentProviders are Java classes which allow to share data between applications. They also provide a structured interface to access data. The tutorials of this book have been developed and tested with Android 4.0.3, API Level 15.

The book assumes that you are already familiar with the Android Development Tools for Eclipse and with creating simple Android applications.

You find the book in all Amazon stores:

Android SQLite and ContentProvider Book in Amazon USA
Android SQLite and ContentProvider Book in Amazon Germany
Android SQLite and ContentProvider Book in Amazon UK
Android SQLite and ContentProvider Book in Amazon France
Android SQLite and ContentProvider Book in Amazon ES
Android SQLite and ContentProvider Book in Amazon IT

Content Description:

The first chapter gives an introduction into SQLite and using SQlite on Android.

The second chapter introduces the main SQLite classes and how to use them. It also gives examples how to create and run queries to your database.

The third chapter contains a tutorial in which you create a new Android project which uses SQLite to store its data. In the tutorial you will use a wrapper class (data access object) which handles the access to the database.

In the fourth chapter we look at ContentProviders. It explains what a ContentProvider is, how you can access existing ones and how to define your own one.

In this chapter you also learn how to define a ContentProviders only visible to your application and learn about threading safety with ContentProvider.

The next chapter is a tutorial which shows how to access an existing ContentProvider. You create an Android application which access the data from the “People” application .

The sixth chapter explains the Loader API which was introduced in Android 3.0. Loader loads the data asynchronously. Activities should use this new API to manage their database connection (Cursor).

The seventh chapter is a tutorial in which you create an application to manage your tasks. You create your own ContentProvider for accessing the SQLite database and use the Loader API for accessing and managing the database Cursor.

Accessing the SQLite database directly on the command line is part of the eighth chapter.

The content of the book is similar to the online version.

I’m again surprised how much work it is to convert my website content into a book format. I hope you like this book.

flattr this!

Categories: Blogs

WindowBuilder with Eclipse 4.2 / 3.8 (Linux)

Sat, 01/14/2012 - 21:18

Currently, if you trying to use WindowBuilder under Linux with Eclipse 3.8 / Eclipse 4.2, it renders incorrectly.

Add the following line to the end of your eclipse.ini file to fix this:

-Dorg.eclipse.swt.internal.gtk.useCairo=false

This is a small bug in SWT and properly will be fixed soon. See Bug Report for details.

flattr this!

Categories: Blogs

Making the Android SDK source code available in Eclipse

Tue, 01/10/2012 - 11:24

As of Android 4.0 the integration of the Android SDK source code is much easier.

You can just download the source code via the Android SDK Manager. The sources are downloaded to the source directory located in “path_to_android_sdk/sources/android-xx”. xx is the api level number (15 for 4.0.3). You can then add the source code as a source attachment to your android.jar.

I included this info in my Android Tutorial.

Thanks to Ed Burnette for pointing that out on Google+.

Kudos also the the ADT team which made this great improvement in development experience.

flattr this!

Categories: Blogs