Search in sources :

Example 21 with CommandException

use of name.herlin.command.CommandException 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)21 CoreException (org.eclipse.core.runtime.CoreException)11 PropertiesException (net.sourceforge.pmd.eclipse.runtime.properties.PropertiesException)5 IFile (org.eclipse.core.resources.IFile)4 RuleSet (net.sourceforge.pmd.RuleSet)3 ReviewCodeCmd (net.sourceforge.pmd.eclipse.runtime.cmd.ReviewCodeCmd)3 IProjectProperties (net.sourceforge.pmd.eclipse.runtime.properties.IProjectProperties)3 IProject (org.eclipse.core.resources.IProject)3 IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)3 File (java.io.File)2 IFolder (org.eclipse.core.resources.IFolder)2 IResource (org.eclipse.core.resources.IResource)2 ByteArrayInputStream (java.io.ByteArrayInputStream)1 IOException (java.io.IOException)1 InputStream (java.io.InputStream)1 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 Map (java.util.Map)1 Timer (name.herlin.command.Timer)1