diff --git a/config/checkstyle-checks.xml b/config/checkstyle-checks.xml index f2ffadf96..e0255f019 100644 --- a/config/checkstyle-checks.xml +++ b/config/checkstyle-checks.xml @@ -576,6 +576,7 @@ + diff --git a/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/preferences/CheckstylePreferencePage.java b/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/preferences/CheckstylePreferencePage.java index 8cb0db8b7..83cf7c5d2 100644 --- a/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/preferences/CheckstylePreferencePage.java +++ b/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/preferences/CheckstylePreferencePage.java @@ -281,10 +281,7 @@ private Composite createGeneralContents(Composite parent) { mIncludeRuleNamesButton.setSelection( CheckstylePluginPrefs.getBoolean(CheckstylePluginPrefs.PREF_INCLUDE_RULE_NAMES)); - Label lblRebuildNote = new Label(includeRuleNamesComposite, SWT.NULL); - lblRebuildNote.setImage(CheckstyleUIPluginImages.HELP_ICON.getImage()); - lblRebuildNote.setToolTipText(Messages.CheckstylePreferencePage_txtSuggestRebuild); - SWTUtil.addTooltipOnPressSupport(lblRebuildNote); + addRebuildNoteLabel(includeRuleNamesComposite); // // Create the "Include rule name" check box. @@ -300,10 +297,7 @@ private Composite createGeneralContents(Composite parent) { mIncludeModuleIdButton.setSelection( CheckstylePluginPrefs.getBoolean(CheckstylePluginPrefs.PREF_INCLUDE_MODULE_IDS)); - lblRebuildNote = new Label(includeModuleIdComposite, SWT.NULL); - lblRebuildNote.setImage(CheckstyleUIPluginImages.HELP_ICON.getImage()); - lblRebuildNote.setToolTipText(Messages.CheckstylePreferencePage_txtSuggestRebuild); - SWTUtil.addTooltipOnPressSupport(lblRebuildNote); + addRebuildNoteLabel(includeModuleIdComposite); // // Create the "limit markers" check box and text field combination @@ -329,10 +323,7 @@ private Composite createGeneralContents(Composite parent) { gridData.widthHint = 30; mTxtMarkerLimit.setLayoutData(gridData); - lblRebuildNote = new Label(limitMarkersComposite, SWT.NULL); - lblRebuildNote.setImage(CheckstyleUIPluginImages.HELP_ICON.getImage()); - lblRebuildNote.setToolTipText(Messages.CheckstylePreferencePage_txtSuggestRebuild); - SWTUtil.addTooltipOnPressSupport(lblRebuildNote); + addRebuildNoteLabel(limitMarkersComposite); // // Create the "Run Checkstyle in background on full builds" check box. @@ -350,6 +341,13 @@ private Composite createGeneralContents(Composite parent) { return generalComposite; } + private void addRebuildNoteLabel(Composite parent) { + Label lblRebuildNote = new Label(parent, SWT.NULL); + lblRebuildNote.setImage(CheckstyleUIPluginImages.HELP_ICON.getImage()); + lblRebuildNote.setToolTipText(Messages.CheckstylePreferencePage_txtSuggestRebuild); + SWTUtil.addTooltipOnPressSupport(lblRebuildNote); + } + /** * Creates the content regarding the management of check configurations. *