misc
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@7128 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
@ -173,6 +173,25 @@ public class GeneralPreferencesPage extends PreferencePage implements IWorkbench
|
||||
return group;
|
||||
}
|
||||
|
||||
private Link createPreferenceLink(Composite parent, String label, final String prefPageId) {
|
||||
|
||||
Link link = new Link(parent, SWT.None);
|
||||
link.setText(label);
|
||||
link.addSelectionListener (new SelectionAdapter () {
|
||||
public void widgetSelected(SelectionEvent se) {
|
||||
PreferenceDialog pref = PreferencesUtil.createPreferenceDialogOn(
|
||||
getShell(), prefPageId,
|
||||
new String[] {}, null
|
||||
);
|
||||
if (pref != null) {
|
||||
pref.open();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return link;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the group of priority preferences
|
||||
* @param parent the parent composite
|
||||
@ -184,19 +203,10 @@ public class GeneralPreferencesPage extends PreferencePage implements IWorkbench
|
||||
group.setText(getMessage(StringKeys.MSGKEY_PREF_GENERAL_GROUP_PRIORITIES));
|
||||
group.setLayout(new GridLayout(1, false));
|
||||
|
||||
Link link = new Link(group, SWT.None);
|
||||
link.setText("PMD folder annotations can be enabled on the <A>label decorations</A> page");
|
||||
link.addSelectionListener (new SelectionAdapter () {
|
||||
public void widgetSelected(SelectionEvent se) {
|
||||
PreferenceDialog pref = PreferencesUtil.createPreferenceDialogOn(
|
||||
getShell(), "org.eclipse.ui.preferencePages.Decorators",
|
||||
new String[] {}, null
|
||||
);
|
||||
if (pref != null) {
|
||||
pref.open();
|
||||
}
|
||||
}
|
||||
});
|
||||
createPreferenceLink(group,
|
||||
"PMD folder annotations can be enabled on the <A>label decorations</A> page",
|
||||
"org.eclipse.ui.preferencePages.Decorators"
|
||||
);
|
||||
|
||||
IStructuredContentProvider contentProvider = new IStructuredContentProvider() {
|
||||
public void dispose() { }
|
||||
|
@ -141,7 +141,7 @@ public class RuleSelection implements RuleCollection {
|
||||
private static void useDefaultValues(Rule rule) {
|
||||
|
||||
for (Map.Entry<PropertyDescriptor<?>, Object> entry : Configuration.filteredPropertiesOf(rule).entrySet()) {
|
||||
rule.useDefaultValueFor(entry.getKey());
|
||||
//rule.useDefaultValueFor(entry.getKey());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@ import org.eclipse.swt.graphics.Image;
|
||||
*/
|
||||
public class PriorityColumnDescriptor extends AbstractColumnDescriptor {
|
||||
|
||||
private PriorityFieldAccessor<?> accessor;
|
||||
private final PriorityFieldAccessor<?> accessor;
|
||||
|
||||
public PriorityColumnDescriptor(String theId, String labelKey, int theAlignment, int theWidth, boolean resizableFlag, PriorityFieldAccessor<?> theAccessor) {
|
||||
super(theId, labelKey, theAlignment, theWidth, resizableFlag, null);
|
||||
|
Reference in New Issue
Block a user