From 326f501362f90bd849837149228c158400ba3dd8 Mon Sep 17 00:00:00 2001 From: Calixte Bonsart Date: Fri, 5 Jun 2026 13:42:27 +0200 Subject: [PATCH] Issue #451: add DeclarationOrder to checkstyle config --- config/checkstyle-checks.xml | 1 + .../src/net/sf/eclipsecs/core/Messages.java | 22 ++++++++---------- .../src/net/sf/eclipsecs/ui/Messages.java | 23 +++++++++---------- .../sf/eclipsecs/ui/quickfixes/Messages.java | 22 +++++++++--------- .../ui/quickfixes/modifier/Messages.java | 21 ++++++++--------- .../net/sf/eclipsecs/ui/stats/Messages.java | 22 ++++++++---------- 6 files changed, 53 insertions(+), 58 deletions(-) diff --git a/config/checkstyle-checks.xml b/config/checkstyle-checks.xml index 57e3d1032..35ca7b521 100644 --- a/config/checkstyle-checks.xml +++ b/config/checkstyle-checks.xml @@ -365,6 +365,7 @@ + diff --git a/net.sf.eclipsecs.core/src/net/sf/eclipsecs/core/Messages.java b/net.sf.eclipsecs.core/src/net/sf/eclipsecs/core/Messages.java index f288f5c28..89704564a 100644 --- a/net.sf.eclipsecs.core/src/net/sf/eclipsecs/core/Messages.java +++ b/net.sf.eclipsecs.core/src/net/sf/eclipsecs/core/Messages.java @@ -27,17 +27,6 @@ * */ public final class Messages extends NLS { - // CHECKSTYLE:OFF - - private static final String BUNDLE_NAME = "net.sf.eclipsecs.core.messages"; //$NON-NLS-1$ - - static { - // initialize resource bundle - NLS.initializeMessages(BUNDLE_NAME, Messages.class); - } - - private Messages() { - } public static String Auditor_msgCheckingConfig; @@ -113,5 +102,14 @@ private Messages() { public static String TransformFormatterRulesJob_name; - // CHECKSTYLE:ON + private static final String BUNDLE_NAME = "net.sf.eclipsecs.core.messages"; //$NON-NLS-1$ + + static { + // initialize resource bundle + NLS.initializeMessages(BUNDLE_NAME, Messages.class); + } + + private Messages() { + } + } diff --git a/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/Messages.java b/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/Messages.java index 0ca5ccbdc..4e2523c86 100644 --- a/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/Messages.java +++ b/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/Messages.java @@ -28,14 +28,6 @@ * */ public final class Messages extends NLS { - // CHECKSTYLE:OFF - - private static final String BUNDLE_NAME = "net.sf.eclipsecs.ui.messages"; //$NON-NLS-1$ - - static { - // initialize resource bundle - NLS.initializeMessages(BUNDLE_NAME, Messages.class); - } public static String ActivateProjectsPrintAction_msgActivateSelectedProjects; @@ -387,9 +379,6 @@ public final class Messages extends NLS { public static String SimpleFileSetsEditor_titleSimpleConfig; - private Messages() { - } - public static String FileSetEditDialog_msgBuildTestResults; public static String RemoteConfigurationEditor_titleAdvancedOptions; @@ -501,5 +490,15 @@ private Messages() { public static String MarkerPropertyPage_Description; public static String MarkerPropertyPage_Id; - // CHECKSTYLE:ON + + private static final String BUNDLE_NAME = "net.sf.eclipsecs.ui.messages"; //$NON-NLS-1$ + + static { + // initialize resource bundle + NLS.initializeMessages(BUNDLE_NAME, Messages.class); + } + + private Messages() { + } + } diff --git a/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/quickfixes/Messages.java b/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/quickfixes/Messages.java index 21c78e9bd..4e11275a4 100644 --- a/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/quickfixes/Messages.java +++ b/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/quickfixes/Messages.java @@ -20,19 +20,9 @@ package net.sf.eclipsecs.ui.quickfixes; -//CHECKSTYLE:OFF import org.eclipse.osgi.util.NLS; public final class Messages extends NLS { - private static final String BUNDLE_NAME = "net.sf.eclipsecs.ui.quickfixes.messages"; //$NON-NLS-1$ - - private Messages() { - } - - static { - // initialize resource bundle - NLS.initializeMessages(BUNDLE_NAME, Messages.class); - } public static String ModifierOrderQuickfix_description; @@ -111,5 +101,15 @@ private Messages() { public static String NeedBracesQuickfix_description; public static String NeedBracesQuickfix_label; + + private static final String BUNDLE_NAME = "net.sf.eclipsecs.ui.quickfixes.messages"; //$NON-NLS-1$ + + static { + // initialize resource bundle + NLS.initializeMessages(BUNDLE_NAME, Messages.class); + } + + private Messages() { + } + } -// CHECKSTYLE:ON diff --git a/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/quickfixes/modifier/Messages.java b/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/quickfixes/modifier/Messages.java index fee49a9e0..9fe78220b 100644 --- a/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/quickfixes/modifier/Messages.java +++ b/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/quickfixes/modifier/Messages.java @@ -20,19 +20,9 @@ package net.sf.eclipsecs.ui.quickfixes.modifier; -//CHECKSTYLE:OFF import org.eclipse.osgi.util.NLS; public final class Messages extends NLS { - private static final String BUNDLE_NAME = "net.sf.eclipsecs.ui.quickfixes.modifier.messages"; //$NON-NLS-1$ - - private Messages() { - } - - static { - // initialize resource bundle - NLS.initializeMessages(BUNDLE_NAME, Messages.class); - } public static String ModifierOrderQuickfix_description; @@ -41,5 +31,14 @@ private Messages() { public static String RedundantModifierQuickfix_description; public static String RedundantModifierQuickfix_label; + + private static final String BUNDLE_NAME = "net.sf.eclipsecs.ui.quickfixes.modifier.messages"; //$NON-NLS-1$ + + static { + // initialize resource bundle + NLS.initializeMessages(BUNDLE_NAME, Messages.class); + } + + private Messages() { + } } -// CHECKSTYLE:ON diff --git a/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/stats/Messages.java b/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/stats/Messages.java index 3d88bb453..e44d37885 100644 --- a/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/stats/Messages.java +++ b/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/stats/Messages.java @@ -27,17 +27,6 @@ * */ public final class Messages extends NLS { - // CHECKSTYLE:OFF - - private static final String BUNDLE_NAME = "net.sf.eclipsecs.ui.stats.messages"; //$NON-NLS-1$ - - private Messages() { - } - - static { - // initialize resource bundle - NLS.initializeMessages(BUNDLE_NAME, Messages.class); - } public static String PreferencePage_displayJavadocErrors; @@ -153,5 +142,14 @@ private Messages() { public static String CheckstyleMarkerFilterDialog_msgEditRegex; - // CHECKSTYLE:ON + private static final String BUNDLE_NAME = "net.sf.eclipsecs.ui.stats.messages"; //$NON-NLS-1$ + + static { + // initialize resource bundle + NLS.initializeMessages(BUNDLE_NAME, Messages.class); + } + + private Messages() { + } + }