Decorator-related bugfixes
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@7121 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
@ -10,7 +10,7 @@ v4.0.0 - xxx 2010?
|
||||
. Allows users to group/edit rules by multiple criteria
|
||||
. New ability to enable/disable rules without removing them
|
||||
. larger editors for the various fields
|
||||
. new rule creation wizard supports new non-Java languages
|
||||
. support for non-Java languages
|
||||
. group editing of filter exclusion rules
|
||||
. highlighting of non-default property values
|
||||
. Color-tagged expressions in shown in rule table
|
||||
|
@ -406,6 +406,9 @@ public class PMDPlugin extends AbstractUIPlugin {
|
||||
|
||||
public void changedFiles(Collection<IFile> changedFiles) {
|
||||
|
||||
RuleLabelDecorator rld = ruleLabelDecorator();
|
||||
if (rld == null) return;
|
||||
|
||||
Collection<IResource> withParents = new HashSet<IResource>(changedFiles.size() * 2);
|
||||
withParents.addAll(changedFiles);
|
||||
for (IFile file : changedFiles) {
|
||||
@ -416,12 +419,8 @@ public class PMDPlugin extends AbstractUIPlugin {
|
||||
}
|
||||
}
|
||||
|
||||
changed( withParents );
|
||||
rld.changed( withParents );
|
||||
}
|
||||
|
||||
public void changed(Collection<IResource> changedResources) {
|
||||
ruleLabelDecorator().changed(changedResources);
|
||||
}
|
||||
|
||||
private void addFilesTo(IResource resource, Collection<IResource> allKids) {
|
||||
|
||||
|
@ -11,6 +11,7 @@ import net.sourceforge.pmd.eclipse.plugin.PriorityDescriptor;
|
||||
import net.sourceforge.pmd.eclipse.plugin.UISettings;
|
||||
import net.sourceforge.pmd.eclipse.runtime.builder.MarkerUtil;
|
||||
import net.sourceforge.pmd.eclipse.runtime.preferences.IPreferences;
|
||||
import net.sourceforge.pmd.eclipse.ui.RuleLabelDecorator;
|
||||
import net.sourceforge.pmd.eclipse.ui.Shape;
|
||||
import net.sourceforge.pmd.eclipse.ui.ShapePicker;
|
||||
import net.sourceforge.pmd.eclipse.ui.model.RootRecord;
|
||||
@ -645,7 +646,8 @@ public class GeneralPreferencesPage extends PreferencePage implements IWorkbench
|
||||
UISettings.reloadPriorities();
|
||||
|
||||
// ensure that the decorator gets these new images...
|
||||
PMDPlugin.getDefault().ruleLabelDecorator().reloadDecorators();
|
||||
RuleLabelDecorator decorator = PMDPlugin.getDefault().ruleLabelDecorator();
|
||||
if (decorator != null) decorator.reloadDecorators();
|
||||
|
||||
RootRecord root = new RootRecord(ResourcesPlugin.getWorkspace().getRoot());
|
||||
Set<IFile> files = MarkerUtil.allMarkedFiles(root);
|
||||
|
Reference in New Issue
Block a user