use of net.sourceforge.pmd.eclipse.runtime.properties.PropertiesException in project pmd-eclipse-plugin by pmd.
the class ProjectPropertiesImpl method setRuleSetFile.
/**
* @see net.sourceforge.pmd.eclipse.runtime.properties.IProjectProperties#setRuleSetFile(String)
*/
public void setRuleSetFile(String ruleSetFile) throws PropertiesException {
LOG.debug("Set rule set file for project " + project.getName() + ": " + ruleSetFile);
needRebuild |= this.ruleSetFile == null || !this.ruleSetFile.equals(ruleSetFile);
this.ruleSetFile = ruleSetFile;
if (ruleSetStoredInProject) {
if (!isRuleSetFileExist()) {
// TODO: NLS
throw new PropertiesException("The project ruleset file cannot be found for project " + project.getName());
}
File f = getResolvedRuleSetFile();
if (f != null) {
projectRuleFileLastModified = f.lastModified();
}
}
}
use of net.sourceforge.pmd.eclipse.runtime.properties.PropertiesException in project pmd-eclipse-plugin by pmd.
the class ProjectPropertiesImpl method setProjectRuleSet.
/**
* @see net.sourceforge.pmd.eclipse.runtime.properties.IProjectProperties#setProjectRuleSet(net.sourceforge.pmd.RuleSet)
*/
public void setProjectRuleSet(final RuleSet projectRuleSet) throws PropertiesException {
LOG.debug("Set a rule set for project " + this.project.getName());
if (projectRuleSet == null) {
// TODO: NLS
throw new PropertiesException("Setting a project rule set to null");
}
this.needRebuild |= !this.projectRuleSet.getRules().equals(projectRuleSet.getRules());
this.projectRuleSet = projectRuleSet;
if (this.ruleSetStoredInProject) {
File f = getResolvedRuleSetFile();
if (f != null) {
projectRuleFileLastModified = f.lastModified();
}
}
}
Aggregations