IStructuredSelection iss = (IStructuredSelection)selection;
if (iss.getFirstElement() instanceof JcrNode) {
final JcrNode node = (JcrNode)iss.getFirstElement();
final IFile file = node.getFileForEditor();
if (file!=null) {
actionBars.setGlobalActionHandler(ICommonActionConstants.OPEN, new OpenFileAction(getActivePage()) {
@Override
public void run() {
try {
IDE.openEditor(getActivePage(), file, true);
} catch (PartInitException e) {