Get Current Tree Selection

The current selection can be injected into the handler execute method:

public void execute(@Named(IServiceConstants.ACTIVE_SELECTION) TreeSelection selection) {
    ...
}