Skip to main content
Jump to: navigation, search


< SWTBot
Revision as of 10:05, 9 June 2010 by (Talk | contribs) (Installing/Updating on the command line)

Update Sites
Mailing List
Open Bugzilla tickets
Open Gerrit reviews
Browse Source
Continuous Integration

Some snippets for working with SWTBot

Installing/Updating on the command line

Here is a little bash script to help manage SWTBot's version on the command line. Useful for managing an Eclipse installation used for Continuous Integration. It is by no means perfect and you will need to set the proper version for the equinox launcher and the swtbot repository (ganymede, galileo or helios). Feel free to modify to fit your needs­.

# ganymede, galileo or helios
# Uninstall the feature.
$ECLIPSE_DIR/eclipse -nosplash -consoleLog \
 -application org.eclipse.equinox.p2.director \
 -uninstallIU, \
# (Re)Install the feature. This is how you update in the p2 world.
$ECLIPSE_DIR/eclipse -nosplash -consoleLog \
 -application org.eclipse.equinox.p2.director \
 -repository$REPOSITORY_VERSION/dev-build/update-site/ \
 -installIU, \

Note: apparently the application p2.director doesn't exist in eclipse 3.4. The alternative/equivalent is, but this is an undocumented feature. Another workaround would be to use an eclipse 3.5 to manage an eclipse 3.4, which sounds like the way to go (it's even documented: All you need to do is add -destination eclipse/3.4/path -profile PROFILE when installing, where PROFILE is defined by the property eclipse.p2.profile in the config.ini (configuration/config.ini) of the destination.

Switch perspective

This allows you to switch perspectives in eclipse from within the Window>Open Perspective>Other... menu.

// Change the perspective via the Open Perspective dialog"Window").menu("Open Perspective").menu("Other...").click();
SWTBotShell openPerspectiveShell ="Open Perspective");
// select the dialog

Back to the top