Eclipse is an IDE for Java developers.

Installation

Eclipse can be found within the Debian repository: aptitude install eclipse But since I often run into trouble with the version from Debian:unstable I recommend to install Eclipse from their website.

Configuration

Editor Style

Changing the editor style is unfortunately not very simple. You need to create your own theme or download an existing theme (e.g. at eclipsecolorthemes.org/). If you just want to have some small changes to the default theme, something like the font size, you may want to modify the theme. The CSS descriptions can be found in $ECLIPSE_HOME/plugins/org.eclipse.platform_4.2.0.v201206081400/css/ . For example to modify the font size of the tabs, having eclipse installed to /opt/eclipse/eclipse-jee-juno-linux-gtk-x86_64/ and using the GTK theme you should update the following part in /opt/eclipse/eclipse-jee-juno-linux-gtk-x86_64/plugins/org.eclipse.platform_4.2.0.v201206081400/css/e4_default_gtk.css :

.MPartStack {
        font-size: 11;
        swt-simple: false;
        swt-mru-visible: false;
}

Source Format

To change the layout of the source files (font size etc.) open Window->Preferences, go to General->Appearance->Colors and Fonts and update for example Java->Java Editor Text Font. The preferred code style (white space, new lines, line breaks etc.) can be changed in Window->Preferences at Java->Code Style->Formatter. Here you can find my favorite Java code style description: eclipse-format.xml

Supp

Change name in newly generated files

If you create a new file eclipse will produce a structure based on a template:

/**
 * 
 */
package de.binfalse.martin;


/**
 * @author martin
 *
 */
public class TestFile
{
	
	/**
	 * @param args
	 */
	public static void main (String[] args)
	{
		// TODO Auto-generated method stub
		
	}
	
}

You are allowed to change these templates in Window->Preferences->Java->Code Style->Code Templates. There you’ll see that your name is read from the variable ${user} . To change you name, just replace this variable with your desired name or, much better, open $ECLIPSE_HOME/eclipse.ini and add another line like the follwing:

-Duser.name=Martin Scharm

Martin Scharm

stuff. just for the records.

Do you like this page?
You can actively support me!

1 comment

Dara | Permalink |

Thank you for this post. I was looking for Eclipse through google when I was bumping your article here. I also ha some trouble with the version from Debian: unstable so I gave your recommendation a try. I have to admit, that there are still some problems, probably because I am not an expert on Java and new to this subject. Still I’m lucky that I have found a way now to change the editor style though they really could have made that easier…

Leave a comment

There are multiple options to leave a comment: