Showing posts with label Eclipse. Show all posts
Showing posts with label Eclipse. Show all posts

Wednesday, November 27, 2013

Show custom workspace title for each workspace in eclipse


        Most of the developers may works on more than one eclipse at same time, one might be with new version of project and another with older version to compare. Or some of us may working with more than one module or project at the time in different workspace or different eclipse. When we want to switch the working eclipse window/eclipse from one to another we might get confuse and it may kills our time to find correct one. Some time when you copy the code from one window to another you may copy wrong and it will end up with critical issue.

To avoid this confusion we may do following settings in eclipse regards of workspace.
  1. Show the workspace location in title-bar
  2. Add custom title for each workspace, this is very useful because given title displays starts of title and easy when switch by alt+tabbing

Show the workspace location in title bar

This can be achieve by two ways.

1) Add “-showlocation"  (without the quotes) in the shortcut used to launch Eclipse



2) Add "-showlocation"  (without the quotes) eclipse.ini file located inside the eclipse folder



After you follow above step , title-bar will be like below.


Add custom title for each workspace

To get custom title you can specify a name under Window > Preferences > General > Workspace


After add the custom title , title-bar and alt+tablling will be like below





Tuesday, September 10, 2013

How to change the appearance of Eclipse in Linux

Default fonts size of Eclipse editor , Tab , Menu and other text comes with large. To changes the appearance

1. To change the tab spaces and hight

 ECLIPSE_HOME/plugins/org.eclipse.platform_4.2.0.v201206081400/css/e4_default_gtk.css

.MPartStack {         font-size: 9;         font-family: "Droid Sans";         swt-simple: false;         swt-mru-visible: false; }


2. To change Editor text size and style

Eclipse -> Preference






3. To change Windows , Menu and other negotiations

Somewhere on your home directory, create a gtkrc file (like: ~/.gtkrc-eclipse) with following content:

style "eclipse" {         font_name="Sans Condensed 8"         GtkButton::default_border={0,0,0,0}         GtkButton::default_outside_border={0,0,0,0}         GtkButtonBox::child_min_width=0         GtkButtonBox::child_min_heigth=0         GtkButtonBox::child_internal_pad_x=0         GtkButtonBox::child_internal_pad_y=0         GtkMenuItem::horizontal-padding=0         GtkToolbar::internal-padding=0         GtkToolbar::space-size=0         GtkOptionMenu::indicator_size=0         GtkOptionMenu::indicator_spacing=0         GtkPaned::handle_size=0         GtkRange::trough_border=0         GtkRange::stepper_spacing=0         GtkScale::value_spacing=0         GtkScrolledWindow::scrollbar_spacing=0         GtkExpander::expander-size=0         GtkExpander::expander_spacing=0         GtkTreeView::vertical-separator=0         GtkTreeView::horizontal-separator=0         GtkTreeView::expander-size=0         GtkTreeView::fixed-height-mode=TRUE         GtkWidget::focus_padding=0 } class "GtkWidget" style "eclipse"
Finally, to launch eclipse, use following command line:
GTK2_RC_FILES=/usr/share/themes/Clearlooks/gtk-2.0/gtkrc:/home/user/.gtkrc-eclipse '/opt/eclipse-3.3/eclipse'


or, for a desktop icon:
env GTK2_RC_FILES=/usr/share/themes/Clearlooks/gtk-2.0/gtkrc:/home/user/.gtkrc-eclipse '/opt/eclipse-3.3/eclipse'
Ref : http://techtavern.wordpress.com/2008/09/24/smaller-font-sizes-for-eclipse-on-linux/
http://hwellmann.blogspot.sg/2012/06/fixing-editor-tab-fonts-in-eclipse-juno.html

Thursday, October 29, 2009

Create an executable JAR file using eclipse


  1. Right click on your project
  2. Select export from the context menu


3. Select the Runnable JAR file
4.Provide the destination path and launch configuration as mail class of the programme