IProject _project = _file.getProject();
final String project = _project.getName();
IXtextDocument _document = xbaseEditor.getDocument();
final IUnitOfWork<LaunchConfigurationInfo, XtextResource> _function = new IUnitOfWork<LaunchConfigurationInfo, XtextResource>() {
public LaunchConfigurationInfo exec(final XtextResource it) throws Exception {
LaunchConfigurationInfo _xblockexpression = null;
{
EList<EObject> _contents = it.getContents();
Iterable<JvmDeclaredType> _filter = Iterables.<JvmDeclaredType>filter(_contents, JvmDeclaredType.class);
final JvmDeclaredType file = IterableExtensions.<JvmDeclaredType>head(_filter);
String _identifier = null;
if (file!=null) {
_identifier=file.getIdentifier();
}
String _findTask = BuildDSLLaunchShortcut.this.findTask(it, offset);
_xblockexpression = new LaunchConfigurationInfo(project, _identifier, _findTask);
}
return _xblockexpression;
}
};
final LaunchConfigurationInfo info = _document.<LaunchConfigurationInfo>readOnly(_function);
this.launch(mode, info);
return;
}
}
MessageDialog.openError(null, "Wrong editor kind.", "");