use of net.sf.eclipsecs.core.builder.CheckstyleBuilder in project eclipse-cs by checkstyle.
the class RunCheckstyleOnFilesJob method runInWorkspace.
/**
* {@inheritDoc}
*/
@Override
public final IStatus runInWorkspace(final IProgressMonitor monitor) throws CoreException {
try {
Map<IProject, List<IFile>> projectFilesMap = getFilesSortedToProject(mFilesToCheck);
for (Map.Entry<IProject, List<IFile>> entry : projectFilesMap.entrySet()) {
IProject project = entry.getKey();
List<IFile> files = entry.getValue();
IProjectConfiguration checkConfig = ProjectConfigurationFactory.getConfiguration(project);
filter(files, checkConfig);
CheckstyleBuilder builder = new CheckstyleBuilder();
builder.handleBuildSelection(files, checkConfig, monitor, project, IncrementalProjectBuilder.INCREMENTAL_BUILD);
}
} catch (CheckstylePluginException e) {
Status status = new Status(IStatus.ERROR, CheckstylePlugin.PLUGIN_ID, IStatus.ERROR, e.getLocalizedMessage(), e);
throw new CoreException(status);
}
return Status.OK_STATUS;
}
Aggregations