Wednesday, April 18, 2012

Broken Eclipse "External Tools Configuration" after JDK change

After replacing JDK from 1.6 to 1.7 I got a problem with Ant scripts in Eclipse:
"Specified VM install not found: type Standard VM, name jdk1.6.0_21"

Unfortunately, this is all information Eclipse gives, so it took some time to realize that Eclipse uses specific JRE name instead of "Default Workspace JRE" in the "External Tools Configurations" (in contrast with "Run & Debug Configurations").

Solution:
Run menu -> External Tools -> External Tools Configurations -> JRE tab -> [x] Run in the same JRE as the workspace

Thursday, April 12, 2012

Usability problems with Eclipse IDE running on Gnome, Linux

Few tricks to get better experience using Eclipse on Linux with Gnome environment.

Enable icons in menus:
gconftool-2 --type boolean --set /desktop/gnome/interface/menus_have_icons true

Disable Gnome keyboard shortcuts (many of them are conflicting and overriding default Eclipse key bindings):

cd /usr/share/gnome-control-center/keybindings
for entry in $(grep KeyListEntry * |cut -d'/' -f2- |cut -d'"' -f1); do
    echo $entry
    gconftool-2 --type string --set "/$entry" ""done


This might not be enough for some keys, for example F10. You may find more details here.

Restore all default Gnome keyboard shortcuts (based on this post on askubuntu.com):

cd /usr/share/gnome-control-center/keybindings
for entry in $(grep KeyListEntry * |cut -d'/' -f2- |cut -d'"' -f1); do
    echo $entry
    gconftool-2 -u "/$entry"
done

Wednesday, April 11, 2012

Computer science courses from Stanford and Udacity

Recently I've discovered two amazing "free online universities" that give everyone a chance to strengthen computer science skills in such fields as artificial intelligence, machine learning, robotics, natural language processing etc. You may attend the courses at any convenient time and there are lots of interactive quizes all over the way to make you confident about what you've learned.

Coursera - free online courses from Stanford, Berkeley, etc.
Udacity - free original interactive online courses

Setting up an aggregated Eclipse update site for your team with b3 aggregator

b3 Agregator is an Eclipse application used to generate main Eclipse Helios and Eclipse Indigo update sites.
It might be very useful if you need to make an aggregated Eclipse update site with pre-configured set of plugins and categories for your team or just simply want to make Eclipse update sites available behind the corporate firewall.

One of the main requirements behind the b3 aggregator was the generation of validated and consistent update site, that contains only such items that are compatible and could be installed together.

Because the majority of Eclipse plugins are singletons, this means that b3 aggregator will mirror only a one, typically most recent version of a plug-in. In other words, b3 aggregator can't do a "plain mirroring" of all available plug-in versions.

Install b3 Aggregator:
  1. Download Eclipse SDK to the any machine that has Internet access
  2. Install b3 Aggregator Editor by using http://download.eclipse.org/modeling/emft/b3/updates-3.7 as an update site
Create and configure an aggregation:
  1. Create new general Eclipse project
  2. Add new "Repository Aggregation" file
  3. In the Aggregation Editor select Aggregation node and define "Build Root" (location where you want to store resulting update site) and "Label" properties
  4. Using the Aggregation node context menu add new "Validation Set" and call it "Eclipse Core"
  5. Under the "Validation Set" create new "Contribution" and give it the same label "Eclipse core"
  6. For the "Contribution" create new "Mapped Repository" and specify desirable main Eclipse update site location as a URL (i.e. http://download.eclipse.org/releases/indigo)
  7. Under the Aggregation node add one or more "Configurations" or platforms you want to support (i.e. "win32, x86", "linux, gtk, x86_64", etc.)
That's it, now you should be able to build your Eclipse update site!

Optionally, you may also:
  1. Configure one or more "Custom Categories" (i.e. "Recommended software" for your team) under the "Aggregation" node
    • It is necessary to specify a non-empty "Label", "Identifier" and "Description" to avoid error messages in client's Eclipse log. See Bug#362894 for details. 
  2. Repeat steps 4 - 6 for if you want to aggregate and mirror more update sites
    • Don't forget to make additional "Validation Sets" to extend the "Eclipse core", otherwise b3 will complain about missing dependencies 
  3. Define "Valid Configuration Rules" for platform-dependent extensions, like "epp.package.linuxtools"