use of net.sourceforge.pmd.eclipse.runtime.cmd.RenderReportsCmd in project pmd-eclipse-plugin by pmd.
the class GenerateReportAction method run.
/**
* @see org.eclipse.ui.IActionDelegate#run(IAction)
*/
public final void run(final IAction action) {
LOG.info("Generation Report action requested");
final ISelection sel = targetSelection();
if (sel instanceof IStructuredSelection) {
try {
IProject project = getProject((IStructuredSelection) sel);
if (project != null) {
if (!checkRenderers()) {
return;
}
RenderReportsCmd cmd = new RenderReportsCmd();
cmd.setProject(project);
cmd.setUserInitiated(true);
registerRenderers(cmd);
cmd.performExecute();
}
} catch (CommandException e) {
showErrorById(StringKeys.ERROR_PMD_EXCEPTION, e);
}
}
}
Aggregations