IStructuredSelection selection = (IStructuredSelection) _selection;
if (selection != null && !selection.isEmpty()) {
IFile eogenFile = (IFile) selection.getFirstElement();
EOGenerateWorkspaceJob generateJob = new EOGenerateWorkspaceJob(eogenFile);
generateJob.addListener(new MarkerEOGeneratorListener());
generateJob.addListener(new DialogEOGeneratorListener(_workbenchPart.getSite().getShell()));
generateJob.schedule();
}
} catch (Throwable t) {
t.printStackTrace();
MessageDialog.openError(new Shell(), "Generate Failed", t.getMessage());