Eclipse on Ubuntu: Rectangles instead of Strings and some Java methods and classes

after upgrading from Ubuntu 9.04. to 11.04 (new installation), I have weird problems with the Eclipse editor.

With the Eclipse PyDev plugin, whenever I typ single quoted strings like ‘bla’, they appear as rectangles (both the quotes as well as the string).

First I thought this was a problem with the PyDev plugin, but it also happens with Java and Scala Plugins. With Java, it happens, for example, when typing

System.out.println(“bla”)

and then “out” is shown as rectangles only.
Weird is that for about half a second I see “System.out.println” and then the editor changes it to System.[][][].println (not really [] (here I used two brackets), it is shown as rectangles).

This is very weird. I’ve never had this before with any Ubuntu, Java or Eclipse version.

Currently, I use:
Ubuntu 11.04.
Eclipse 3.6
Java 1.6.0_25

The latest plugins for Python (2.1) and Scala (beta 5) where used.

Eclipse and Ubuntu Terminal is set to UTF-8.

The problem also happens when using KDE instead of Gnome.

I doubt is has anything to do with Java as I use the same versions on older Ubuntu installations (10.04, 9.10, etc) at work. It does not happen with Netbeans.
But I saw once error dialog message from the Update Manager where there were some rectangles in the error widget. Maybe this is the same problem

Any ideas what could be wrong here and how to fix this? Eclipse is unusable but I need this for work and also for Scala and Python (the Eclipse plugins for those are very good now).

Claus

Answer

Figured it out. It was a font problem. When I change Eclipse to use the system font settings in the Java editor, it works. Somehow the required font was installed by ubuntu.

Attribution
Source : Link , Question Author : Claus Hausberger , Answer Author : Claus Hausberger

Leave a Comment