diff --git a/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/builder/tests/ApiTestingEnvironment.java b/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/builder/tests/ApiTestingEnvironment.java index ea921d02c6..8694441a47 100644 --- a/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/builder/tests/ApiTestingEnvironment.java +++ b/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/builder/tests/ApiTestingEnvironment.java @@ -75,9 +75,9 @@ public class ApiTestingEnvironment extends TestingEnvironment { * Modified files for each build so that we can undo the changes * incrementally rather than recreating the workspace for each test. */ - private List fAdded = new ArrayList<>(); - private List fChanged = new ArrayList<>(); - private List fRemoved = new ArrayList<>(); + private final List fAdded = new ArrayList<>(); + private final List fChanged = new ArrayList<>(); + private final List fRemoved = new ArrayList<>(); public ApiTestingEnvironment() throws Exception { super(); diff --git a/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/builder/tests/usage/UnusedApiProblemFilterTests.java b/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/builder/tests/usage/UnusedApiProblemFilterTests.java index 1619bb6420..d4d584f4e7 100644 --- a/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/builder/tests/usage/UnusedApiProblemFilterTests.java +++ b/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/builder/tests/usage/UnusedApiProblemFilterTests.java @@ -41,8 +41,8 @@ public class UnusedApiProblemFilterTests extends UsageTest { private static final String BEFORE = "before"; //$NON-NLS-1$ private static final String AFTER = "after"; //$NON-NLS-1$ - private IPath fRootPath = super.getTestSourcePath().append("filters"); //$NON-NLS-1$ - private IPath fFiltersPath = IPath.fromOSString("/usagetests/.settings/.api_filters"); //$NON-NLS-1$ + private final IPath fRootPath = super.getTestSourcePath().append("filters"); //$NON-NLS-1$ + private final IPath fFiltersPath = IPath.fromOSString("/usagetests/.settings/.api_filters"); //$NON-NLS-1$ public UnusedApiProblemFilterTests(String name) { super(name); diff --git a/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/model/tests/ApiDescriptionTests.java b/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/model/tests/ApiDescriptionTests.java index 2c3ff64748..8a31d2c225 100644 --- a/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/model/tests/ApiDescriptionTests.java +++ b/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/model/tests/ApiDescriptionTests.java @@ -57,7 +57,7 @@ */ public class ApiDescriptionTests { - private IApiDescription fManifest = buildManifest(); + private final IApiDescription fManifest = buildManifest(); /** * Wraps an element with its API description diff --git a/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/util/tests/ApiBaselineManagerTests.java b/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/util/tests/ApiBaselineManagerTests.java index bc3c1ce9dd..9aabd14557 100644 --- a/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/util/tests/ApiBaselineManagerTests.java +++ b/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/util/tests/ApiBaselineManagerTests.java @@ -178,9 +178,9 @@ private void updateTag(BodyDeclaration body) { } } - private IPath SRC_LOC = TestSuiteHelper.getPluginDirectoryPath().append("test-source").append("a").append("b").append("c"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ - private IPath PLUGIN_LOC = TestSuiteHelper.getPluginDirectoryPath().append("test-plugins"); //$NON-NLS-1$ - private IApiBaselineManager fPMmanager = ApiPlugin.getDefault().getApiBaselineManager(); + private final IPath SRC_LOC = TestSuiteHelper.getPluginDirectoryPath().append("test-source").append("a").append("b").append("c"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + private final IPath PLUGIN_LOC = TestSuiteHelper.getPluginDirectoryPath().append("test-plugins"); //$NON-NLS-1$ + private final IApiBaselineManager fPMmanager = ApiPlugin.getDefault().getApiBaselineManager(); private final String TESTING_PACKAGE = "a.b.c"; //$NON-NLS-1$ /** diff --git a/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/util/tests/HeadlessApiBaselineManagerTests.java b/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/util/tests/HeadlessApiBaselineManagerTests.java index 8565671b95..e9142fc0b0 100644 --- a/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/util/tests/HeadlessApiBaselineManagerTests.java +++ b/apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/util/tests/HeadlessApiBaselineManagerTests.java @@ -34,7 +34,7 @@ */ public class HeadlessApiBaselineManagerTests extends AbstractApiTest { - private ApiBaselineManager fManager = ApiBaselineManager.getManager(); + private final ApiBaselineManager fManager = ApiBaselineManager.getManager(); @Override @After diff --git a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/ApiUIPlugin.java b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/ApiUIPlugin.java index 65fa711eca..4874ce1307 100644 --- a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/ApiUIPlugin.java +++ b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/ApiUIPlugin.java @@ -235,7 +235,7 @@ public static IStatus newErrorStatus(String message, Throwable exception) { return Status.error(message, exception); } - private ISessionListener sessionListener = new ISessionListener() { + private final ISessionListener sessionListener = new ISessionListener() { @Override public void sessionAdded(ISession addedSession) { Display.getDefault().asyncExec(() -> showAPIToolingView()); diff --git a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/CompositeApiImageDescriptor.java b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/CompositeApiImageDescriptor.java index 09d304a471..035ce32cd2 100644 --- a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/CompositeApiImageDescriptor.java +++ b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/CompositeApiImageDescriptor.java @@ -31,7 +31,7 @@ public class CompositeApiImageDescriptor extends CompositeImageDescriptor { public static final int WARNING = 0x0002; private Image fOriginalImage = null; - private int fFlags; + private final int fFlags; private Point fSize; /** diff --git a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/actions/CollapseAllAction.java b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/actions/CollapseAllAction.java index 75f6b1b5fa..15a5f6dcc0 100644 --- a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/actions/CollapseAllAction.java +++ b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/actions/CollapseAllAction.java @@ -24,7 +24,7 @@ */ public class CollapseAllAction extends Action { - private TreeViewer fViewer; + private final TreeViewer fViewer; public CollapseAllAction(TreeViewer viewer) { setText(ActionMessages.CollapseAllAction_label); diff --git a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/actions/ExpandAllAction.java b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/actions/ExpandAllAction.java index 5293841815..a1b440cf54 100644 --- a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/actions/ExpandAllAction.java +++ b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/actions/ExpandAllAction.java @@ -24,7 +24,7 @@ */ public class ExpandAllAction extends Action { - private TreeViewer fViewer; + private final TreeViewer fViewer; public ExpandAllAction(TreeViewer viewer) { setText(ActionMessages.ExpandAllAction_label); diff --git a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/actions/ExportDialog.java b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/actions/ExportDialog.java index 820d630d98..39b80da768 100644 --- a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/actions/ExportDialog.java +++ b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/actions/ExportDialog.java @@ -53,12 +53,12 @@ public class ExportDialog extends Dialog { /** * The title of the dialog. */ - private String title; + private final String title; /** * The message to display, or null if none. */ - private String message; + private final String message; /** * The input value; the empty string by default. @@ -68,7 +68,7 @@ public class ExportDialog extends Dialog { /** * The input validator, or null if none. */ - private IInputValidator validator; + private final IInputValidator validator; /** * Ok button widget. diff --git a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/actions/NavigateAction.java b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/actions/NavigateAction.java index 8b6f823655..901e81ac6c 100644 --- a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/actions/NavigateAction.java +++ b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/actions/NavigateAction.java @@ -28,8 +28,8 @@ */ public class NavigateAction extends Action { private final boolean next; - private IViewSite site; - private TreeViewer viewer; + private final IViewSite site; + private final TreeViewer viewer; public NavigateAction(APIToolingView view, boolean next) { this.site = view.getViewSite(); diff --git a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/actions/TreeViewerNavigator.java b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/actions/TreeViewerNavigator.java index f2186bb2b5..775735c363 100644 --- a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/actions/TreeViewerNavigator.java +++ b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/actions/TreeViewerNavigator.java @@ -24,7 +24,7 @@ * Navigation in the tree viewer. */ class TreeViewerNavigator { - private TreeViewer fViewer; + private final TreeViewer fViewer; public TreeViewerNavigator(TreeViewer viewer) { fViewer = viewer; diff --git a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/ApiMarkerResolutionGenerator.java b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/ApiMarkerResolutionGenerator.java index 7423744a0a..7360be5037 100644 --- a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/ApiMarkerResolutionGenerator.java +++ b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/ApiMarkerResolutionGenerator.java @@ -47,7 +47,7 @@ public class ApiMarkerResolutionGenerator implements IMarkerResolutionGenerator2 */ private final IMarkerResolution[] NO_RESOLUTIONS = new IMarkerResolution[0]; - private DefaultApiProfileResolution profileResolution = new DefaultApiProfileResolution(); + private final DefaultApiProfileResolution profileResolution = new DefaultApiProfileResolution(); @Override public IMarkerResolution[] getResolutions(IMarker marker) { diff --git a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/NodeFinder.java b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/NodeFinder.java index 58cf8c4ff3..3bcce03cd6 100644 --- a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/NodeFinder.java +++ b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/NodeFinder.java @@ -36,7 +36,7 @@ public class NodeFinder extends ASTVisitor { private BodyDeclaration declaration; - private int position; + private final int position; /** * Constructor diff --git a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/PDEConfigureProblemSeverityAction.java b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/PDEConfigureProblemSeverityAction.java index 2354bcafdf..011413fb7c 100644 --- a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/PDEConfigureProblemSeverityAction.java +++ b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/PDEConfigureProblemSeverityAction.java @@ -43,7 +43,7 @@ public class PDEConfigureProblemSeverityAction extends Action { private final String fOptionId; - private int tab; + private final int tab; public PDEConfigureProblemSeverityAction(IJavaProject project, String optionId, int t) { diff --git a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/UpdateSinceTagOperation.java b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/UpdateSinceTagOperation.java index 1a1a20da00..52268d1c12 100644 --- a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/UpdateSinceTagOperation.java +++ b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/UpdateSinceTagOperation.java @@ -43,10 +43,10 @@ public class UpdateSinceTagOperation { - private IMarker fMarker; + private final IMarker fMarker; private IMarker[] otherIMarkers; - private int sinceTagType; - private String sinceTagVersion; + private final int sinceTagType; + private final String sinceTagVersion; public UpdateSinceTagOperation(IMarker marker, IMarker[] otherMarkers, int sinceTagType, String sinceTagVersion) { this.fMarker = marker; diff --git a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/VersionNumberingResolution.java b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/VersionNumberingResolution.java index 308c38a615..0be3cccbb4 100644 --- a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/VersionNumberingResolution.java +++ b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/VersionNumberingResolution.java @@ -35,7 +35,7 @@ public class VersionNumberingResolution implements IMarkerResolution2 { String newVersionValue; // major or minor version - private int kind; + private final int kind; private String description; public VersionNumberingResolution(IMarker marker) { diff --git a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ApiBaselinesConfigurationBlock.java b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ApiBaselinesConfigurationBlock.java index b0f24b27a2..5674b96132 100644 --- a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ApiBaselinesConfigurationBlock.java +++ b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ApiBaselinesConfigurationBlock.java @@ -66,7 +66,7 @@ public class ApiBaselinesConfigurationBlock extends ConfigurationBlock { */ protected static class ControlData { Key key; - private String[] values; + private final String[] values; /** * Constructor @@ -110,8 +110,8 @@ public int getSelection(String value) { */ protected static class Key { - private String qualifier; - private String key; + private final String qualifier; + private final String key; /** * Constructor @@ -237,7 +237,7 @@ protected final static Key getApiToolsKey(String key) { /** * Default selection listener for controls on the page */ - private SelectionListener selectionlistener = new SelectionAdapter() { + private final SelectionListener selectionlistener = new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { if (e.widget instanceof Combo) { @@ -254,11 +254,11 @@ public void widgetSelected(SelectionEvent e) { * Listing of all of the {@link Combo}s added to the block */ - private ArrayList fCombos = new ArrayList<>(); + private final ArrayList fCombos = new ArrayList<>(); /** * Listing of the label in the block */ - private ArrayList