Recent Post

Categories

Archives

Cow Computing

10 Jan 16

Some Useful HotKey for Eclipse

If you develop heavily on Java, Eclipse definitely should be your primary programming tool (other than Text Editor).
To be more effective in coding, one must master the tools he/she uses. In terms of Eclipse, hotkey is one of the chapter which should be learnt. After sometimes, the hotkey usage will eventually speed up your coding.

Below are some common ones:

Ctrl + Shift + P // Go to the corresponding ending brace
Ctrl + Q // Go back to last edited location
Alt + Left/Right Arrow // Go to previous or next editor
Ctrl + I // Format code
Ctrl + 1 // Generate try/catch or do/if/while/for
Ctrl + / // Comment/Uncomment
F3 // Find Method
Ctrl + L // Go to line
Ctrl + Space // Toggle code assist
Ctrl + Shift + Space // Toggle arguments hints

09 Dec 15

Solution: Eclipse Mouse Click Problem in Ubuntu 9.10

Recently, i have my Ubuntu VM upgraded from 9.04 to 9.10 aka Karmic. And when i tried to develop program using eclipse, i found out that, sometimes, in certain dialog boxes, “next” or “ok” button didn’t give any response. Initially, i thought it’s my VM’s problem, but when i repeated it with my desktop, the same thing happened. After googling abit, it was found that the problem was due the the recent change in GTK with 9.10.

To get around the problem, the simplest thing to do is to “Tab” and “Enter”. It was so annoying…

Luckily, there’s a trouble-free solution to it. You might try to set the environmental variable “GDK_NATIVE_WINDOWS” to true before executing the eclipse. To make thing simpler, here’s a eclipse.sh that you might want to use for starting eclipse.

#eclipse.sh
#!/bin/sh
export GDK_NATIVE_WINDOWS=true
<path to eclipse folder>/eclipse

Do change the <path to eclipse folder> to your eclipse’s current location. chmod it to 777 and run it with ./eclipse.sh