if (!(element instanceof IProject)) {
return;
}
final IProject project = (IProject) element;
final IKarafProject karafProject = (IKarafProject) project.getAdapter(IKarafProject.class);
final IEditorInput editorInput = new KarafPlatformEditorInput(karafProject);
try {
final IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
page.openEditor(editorInput, KarafPlatformEditorPart.ID);
} catch (final PartInitException e) {
KarafWorkbenchActivator.getLogger().error("Unable to open editor for " + karafProject.getName(), e);
}
}
});
}