Search in sources :

Example 6 with IPreferences

use of net.sourceforge.pmd.eclipse.runtime.preferences.IPreferences in project pmd-eclipse-plugin by pmd.

the class PriorityDescriptorCache method hasChanges.

public boolean hasChanges() {
    IPreferences preferences = preferencesManager().reloadPreferences();
    for (RulePriority rp : UISettings.currentPriorities(true)) {
        PriorityDescriptor newOne = uiDescriptorsByPriority.get(rp);
        PriorityDescriptor currentOne = preferences.getPriorityDescriptor(rp);
        if (newOne.equals(currentOne)) {
            continue;
        }
        return true;
    }
    return false;
}
Also used : IPreferences(net.sourceforge.pmd.eclipse.runtime.preferences.IPreferences) RulePriority(net.sourceforge.pmd.RulePriority)

Aggregations

IPreferences (net.sourceforge.pmd.eclipse.runtime.preferences.IPreferences)6 ArrayList (java.util.ArrayList)2 RulePriority (net.sourceforge.pmd.RulePriority)2 IPreferencesManager (net.sourceforge.pmd.eclipse.runtime.preferences.IPreferencesManager)2 HashMap (java.util.HashMap)1 Map (java.util.Map)1 Rule (net.sourceforge.pmd.Rule)1 RuleSet (net.sourceforge.pmd.RuleSet)1 Renderer (net.sourceforge.pmd.renderers.Renderer)1 IProject (org.eclipse.core.resources.IProject)1 IResourceChangeEvent (org.eclipse.core.resources.IResourceChangeEvent)1 IResourceChangeListener (org.eclipse.core.resources.IResourceChangeListener)1 ISchedulingRule (org.eclipse.core.runtime.jobs.ISchedulingRule)1 MultiRule (org.eclipse.core.runtime.jobs.MultiRule)1 Test (org.junit.Test)1