If you have many eclipse installations (with different features/plugins) and you want to have such installations in several computers (possibly with different operating systems or with different architectures), then being able to install eclipse features from the command line might be quite helpful (at least, it is for me
What you need to do is to run eclipse from the command line (if you’re using Windows, you need to run eclipsec.exe, note the final ‘c’, instead of eclipse.exe), with these parameters
./eclipse \ -clean -purgeHistory \ -application org.eclipse.equinox.p2.director \ -noSplash \ -repository <repo1>,<repo2>,<repo3> \ -installIUs <feature1>,<feature2>,<feature3>,...
Where the repo URLs are just the same as the ones you use as update sites or p2 repositories when installing a feature in Eclipse (you may want to always put the eclipse distribution main update site, e.g., http://download.eclipse.org/releases/juno), while the feature IDs are the actual identifiers of features you want to install; knowing the correct feature ID might not be immediate to discover, if you’re only used to the names you see in the update manager.
For instance, say that you want to install Xtext SDK, from the site http://download.eclipse.org/modeling/tmf/xtext/updates/composite/releases/ , then in Eclipse you would do something like in the following screenshot
but instead of “Xtext SDK“, in the command line, you should specify org.eclipse.xtext.sdk.feature.group. While in this case it was easy to infer the feature ID, but… at least for me, it was not immediate to know that “Eclipse Java EE Developer Tools” feature is indeed org.eclipse.jst.enterprise_ui.feature.feature.group !!!
Fortunately, you can get to know that by clicking that “More…” link in the above screenshot, which leads you an information dialog where you can easily find the identifier of the selected feature:
Of course you can also have the list of all the contents of an update site, by using the option -list:
./eclipse \ -clean -purgeHistory \ -application org.eclipse.equinox.p2.director \ -noSplash \ -repository <repo1> -list
For instance, this is the command line I use to install in the Xtext eclipse distribution (http://www.eclipse.org/Xtext/download.html) additional stuff like the Xpand SDK, some Mylyn connectors, SwtBot and EMF CDO:
./eclipse \ -clean -purgeHistory \ -application org.eclipse.equinox.p2.director \ -noSplash \ -repository \ http://download.eclipse.org/modeling/tmf/xtext/updates/composite/releases/,\ http://download.eclipse.org/releases/juno,\ http://download.eclipse.org/technology/swtbot/helios/dev-build/update-site,\ http://update.atlassian.com/atlassian-eclipse-plugin/e3.8 \ -installIUs \ org.eclipse.xpand.sdk.feature.group,\ org.eclipse.swtbot.eclipse.feature.group,\ org.eclipse.swtbot.eclipse.test.junit4.feature.group,\ org.eclipse.swtbot.feature.group,\ org.eclipse.swtbot.forms.feature.group,\ org.eclipse.swtbot.ide.feature.group,\ org.eclipse.egit.mylyn.feature.group,\ org.eclipse.mylyn.bugzilla_feature.feature.group,\ org.eclipse.mylyn.builds.feature.group,\ org.eclipse.mylyn.context_feature.feature.group,\ org.eclipse.mylyn.discovery.feature.group,\ org.eclipse.mylyn.gerrit.feature.feature.group,\ org.eclipse.mylyn.git.feature.group,\ org.eclipse.mylyn.github.feature.feature.group,\ org.eclipse.mylyn.hudson.feature.group,\ org.eclipse.mylyn.ide_feature.feature.group,\ org.eclipse.mylyn.java_feature.feature.group,\ org.eclipse.mylyn.monitor.feature.group,\ org.eclipse.mylyn.pde_feature.feature.group,\ org.eclipse.mylyn.tasks.ide.feature.group,\ org.eclipse.mylyn.team_feature.feature.group,\ org.eclipse.mylyn.trac_feature.feature.group,\ org.eclipse.mylyn.wikitext_feature.feature.group,\ org.eclipse.mylyn_feature.feature.group,\ org.eclipse.emf.cdo.sdk.feature.group,\ org.eclipse.emf.query.sdk.feature.group,\ com.atlassian.connector.eclipse.jira.feature.group \ -vmargs -Declipse.p2.mirrors=true -Djava.net.preferIPv4Stack=true
The final -vmargs are just some additional arguments which you may want to skip.
Hope this helps