public Object execute(ExecutionEvent event) throws ExecutionException {
XtextEditor activeEditor = (XtextEditor) HandlerUtil.getActiveEditor(event);
final IXtextDocument document = activeEditor.getDocument();
final int offset = ((StyledText) activeEditor.getAdapter(Control.class)).getCaretOffset();
document.readOnly(new UnitOfWork<Object>() {
<BUG>public Object exec(XtextResource resource) throws Exception {

AbstractNode node = ParseTreeUtil.getCurrentOrFollowingNodeByOffset(resource
.getParseResult().getRootNode(), offset);
List<EObject> crossLinkedEObject = findCrossLinkedEObject(node);
if (crossLinkedEObject.isEmpty())
return null;
URI uri = EcoreUtil.getURI(crossLinkedEObject.get(0));
new OpenDeclarationAction(uri, locationProvider).run();</BUG>
return null;

public Object execute(ExecutionEvent event) throws ExecutionException {
XtextEditor activeEditor = (XtextEditor) HandlerUtil.getActiveEditor(event);
final IXtextDocument document = activeEditor.getDocument();
final int offset = ((StyledText) activeEditor.getAdapter(Control.class)).getCaretOffset();
document.readOnly(new UnitOfWork<Object>() {
public Void exec(XtextResource resource) throws Exception {
OpenDeclarationAction action = helper.getOpenDeclarationAction(resource, offset);
action.run();
return null;
