From c38dccba8f35beb39fd4a9f662fa9af00574d5de Mon Sep 17 00:00:00 2001 From: Philippe Herlin Date: Mon, 24 Oct 2005 23:53:51 +0000 Subject: [PATCH] Fix "when enabling PMD, does not ask to rebuild or not the project". git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@3938 51baf565-9d33-0410-a72c-fc3788e3496d --- .../pmd/eclipse/model/ProjectPropertiesModelImpl.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pmd-eclipse/src/net/sourceforge/pmd/eclipse/model/ProjectPropertiesModelImpl.java b/pmd-eclipse/src/net/sourceforge/pmd/eclipse/model/ProjectPropertiesModelImpl.java index 0ae299b19b..7f4ea8d880 100644 --- a/pmd-eclipse/src/net/sourceforge/pmd/eclipse/model/ProjectPropertiesModelImpl.java +++ b/pmd-eclipse/src/net/sourceforge/pmd/eclipse/model/ProjectPropertiesModelImpl.java @@ -74,6 +74,9 @@ import org.eclipse.ui.PlatformUI; * @version $Revision$ * * $Log$ + * Revision 1.11 2005/10/24 23:53:51 phherlin + * Fix "when enabling PMD, does not ask to rebuild or not the project". + * * Revision 1.10 2005/10/24 23:19:58 phherlin * Fix never ending loop issue (finally..) * @@ -173,9 +176,7 @@ public class ProjectPropertiesModelImpl extends AbstractModel implements Project public RuleSet getProjectRuleSet() throws ModelException { log.info("Query the rule set for project " + this.project.getName()); if (!isRuleSetStoredInProject()) { - if (synchronizeRuleSet()) { - sync(); - } + this.needRebuild |= synchronizeRuleSet(); } return this.projectRuleSet; @@ -190,7 +191,7 @@ public class ProjectPropertiesModelImpl extends AbstractModel implements Project throw new ModelException("Setting a project rule set to null"); // TODO NLS } - this.needRebuild = !this.projectRuleSet.getRules().equals(projectRuleSet.getRules()); + this.needRebuild |= !this.projectRuleSet.getRules().equals(projectRuleSet.getRules()); this.projectRuleSet = projectRuleSet; this.needRebuild |= synchronizeRuleSet();