When I called the ActionCommands.COMPARE_WITH_INDEX_ACTION from the staging view I found that it would not use my supplied context instead getEvaluationContext() would be called, convertSelection would then return <empty selection> instead of the selection in my supplied context.

The framework class Command in executeWithChecks calls setEnabled(event.getApplicationContext()) (e.g. the supplied context) and then isEnabled() which without this change uses a different context.

This is my first foray into eclipse RCP and its a big learning curve so I may have missed something completely.  This change 'makes it work for me' though...