Search in sources :

Example 1 with BuildProjectCommand

use of net.sourceforge.pmd.eclipse.runtime.cmd.BuildProjectCommand in project pmd-eclipse-plugin by pmd.

the class PMDPropertyPageController method rebuildProject.

/**
 * Perform a full rebuild of the project
 *
 * @param monitor
 *            a progress monitor
 */
private void rebuildProject() {
    boolean rebuild = MessageDialog.openQuestion(shell, getMessage(StringKeys.QUESTION_TITLE), getMessage(StringKeys.QUESTION_REBUILD_PROJECT));
    if (rebuild) {
        LOG.info("Full rebuild of the project " + project.getName());
        try {
            final BuildProjectCommand cmd = new BuildProjectCommand();
            cmd.setProject(project);
            cmd.setUserInitiated(true);
            cmd.performExecute();
        } catch (CommandException e) {
            PMDPlugin.getDefault().showError(e.getMessage(), e);
        }
    }
}
Also used : CommandException(name.herlin.command.CommandException) BuildProjectCommand(net.sourceforge.pmd.eclipse.runtime.cmd.BuildProjectCommand)

Aggregations

CommandException (name.herlin.command.CommandException)1 BuildProjectCommand (net.sourceforge.pmd.eclipse.runtime.cmd.BuildProjectCommand)1