Iterate over a JFace selection in a for each loop
Just a tiny JFace helper for today: I added SelectionUtils to rcputils. You can use this to iterate over an ISelection using a for each loop:
ISelection selection = someViewer.getSelection();
for (SomeObject obj : SelectionUtils.getIterable(selection, SomeObject.class)) {
// ...
}