[300443] Some CONSTANTS are not static final.
diff --git a/bundles/org.eclipse.wst.sse.core/src-contentproperties/org/eclipse/wst/sse/internal/contentproperties/ContentSettings.java b/bundles/org.eclipse.wst.sse.core/src-contentproperties/org/eclipse/wst/sse/internal/contentproperties/ContentSettings.java
index 0c797e3..8dca387 100644
--- a/bundles/org.eclipse.wst.sse.core/src-contentproperties/org/eclipse/wst/sse/internal/contentproperties/ContentSettings.java
+++ b/bundles/org.eclipse.wst.sse.core/src-contentproperties/org/eclipse/wst/sse/internal/contentproperties/ContentSettings.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2001, 2007 IBM Corporation and others.
+ * Copyright (c) 2001, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Jens Lukowski/Innoopract - initial renaming/restructuring
+ * David Carver (Intalio) - bug 300443 - some constants aren't static final
*
*******************************************************************************/
package org.eclipse.wst.sse.internal.contentproperties;
@@ -58,13 +59,13 @@
private String contentSettingsPath;
private IProject currProject;
- private final String fileElementName = "file";//$NON-NLS-1$
- private final String PATHATTR = "path"; //$NON-NLS-1$
- private final String projectElementName = "project";//$NON-NLS-1$
+ private static final String fileElementName = "file";//$NON-NLS-1$
+ private static final String PATHATTR = "path"; //$NON-NLS-1$
+ private static final String projectElementName = "project";//$NON-NLS-1$
- private final String rootElementName = "contentsettings";//$NON-NLS-1$
+ private static final String rootElementName = "contentsettings";//$NON-NLS-1$
@@ -122,10 +123,10 @@
Element e = null;
if (resource.getType() == IResource.PROJECT) {
- e = (Element) domOperator.getElementWithNodeName(this.projectElementName);
+ e = (Element) domOperator.getElementWithNodeName(projectElementName);
if (e == null) {
// create project Element and add it into tree
- e = (Element) domOperator.addElementUnderRoot(this.projectElementName);
+ e = (Element) domOperator.addElementUnderRoot(projectElementName);
}
}
else if (resource.getType() == IResource.FILE) {
@@ -133,7 +134,7 @@
e = (Element) domOperator.getElementWithAttribute(getPathAttr(), getRelativePathFromProject(resource));
if (e == null) {
// create file Element and add path into it.
- e = (Element) domOperator.addElementUnderRoot(this.fileElementName);
+ e = (Element) domOperator.addElementUnderRoot(fileElementName);
domOperator.addAttributeAt(e, getPathAttr(), getRelativePathFromProject(resource));
}
}
@@ -222,10 +223,10 @@
Element e = null;
if (resource.getType() == IResource.PROJECT) {
- e = (Element) domOperator.getElementWithNodeName(this.projectElementName);
+ e = (Element) domOperator.getElementWithNodeName(projectElementName);
if (e == null) {
// create project Element and add it into tree
- e = (Element) domOperator.addElementUnderRoot(this.projectElementName);
+ e = (Element) domOperator.addElementUnderRoot(projectElementName);
}
}
else if (resource.getType() == IResource.FILE) {
@@ -233,7 +234,7 @@
e = (Element) domOperator.getElementWithAttribute(getPathAttr(), getRelativePathFromProject(resource));
if (e == null) {
// create file Element and add path into it.
- e = (Element) domOperator.addElementUnderRoot(this.fileElementName);
+ e = (Element) domOperator.addElementUnderRoot(fileElementName);
domOperator.addAttributeAt(e, getPathAttr(), getRelativePathFromProject(resource));
}
}
@@ -330,7 +331,7 @@
Element e = null;
if (deletedFile.getType() == IResource.PROJECT)
// select project element and get attribute
- e = (Element) domOperator.getElementWithNodeName(this.projectElementName);
+ e = (Element) domOperator.getElementWithNodeName(projectElementName);
else if (deletedFile.getType() == IResource.FILE)
e = (Element) domOperator.getElementWithAttribute(getPathAttr(), getRelativePathFromProject(deletedFile));
if (e == null) {
@@ -341,7 +342,7 @@
// when deletedFile entry exists.
if (deletedFile.getType() == IResource.PROJECT)
- domOperator.removeElementWith(this.projectElementName);
+ domOperator.removeElementWith(projectElementName);
else if (deletedFile.getType() == IResource.FILE)
domOperator.removeElementWith(getPathAttr(), getRelativePathFromProject(deletedFile));
@@ -397,7 +398,7 @@
Element e = null;
if (resource.getType() == IResource.PROJECT)
// select project element and get attribute
- e = (Element) domOperator.getElementWithNodeName(this.projectElementName);
+ e = (Element) domOperator.getElementWithNodeName(projectElementName);
else if (resource.getType() == IResource.FILE)
e = (Element) domOperator.getElementWithAttribute(getPathAttr(), getRelativePathFromProject(resource));
@@ -458,7 +459,7 @@
Element e = null;
if (resource.getType() == IResource.PROJECT)
// select project element and get attribute
- e = (Element) domOperator.getElementWithNodeName(this.projectElementName);
+ e = (Element) domOperator.getElementWithNodeName(projectElementName);
else if (resource.getType() == IResource.FILE)
e = (Element) domOperator.getElementWithAttribute(getPathAttr(), getRelativePathFromProject(resource));
@@ -542,7 +543,7 @@
Element e = null;
if (resource.getType() == IResource.PROJECT)
// select project element and get attribute
- e = (Element) domOperator.getElementWithNodeName(this.projectElementName);
+ e = (Element) domOperator.getElementWithNodeName(projectElementName);
else if (resource.getType() == IResource.FILE)
e = (Element) domOperator.getElementWithAttribute(getPathAttr(), getRelativePathFromProject(resource));
@@ -607,7 +608,7 @@
Element e = null;
if (resource.getType() == IResource.PROJECT)
// select project element and get attribute
- e = (Element) domOperator.getElementWithNodeName(this.projectElementName);
+ e = (Element) domOperator.getElementWithNodeName(projectElementName);
else if (resource.getType() == IResource.FILE)
e = (Element) domOperator.getElementWithAttribute(getPathAttr(), getRelativePathFromProject(resource));
diff --git a/bundles/org.eclipse.wst.sse.core/src-tasktags/org/eclipse/wst/sse/core/internal/tasks/TaskScanningJob.java b/bundles/org.eclipse.wst.sse.core/src-tasktags/org/eclipse/wst/sse/core/internal/tasks/TaskScanningJob.java
index 08f4976..92fda63 100644
--- a/bundles/org.eclipse.wst.sse.core/src-tasktags/org/eclipse/wst/sse/core/internal/tasks/TaskScanningJob.java
+++ b/bundles/org.eclipse.wst.sse.core/src-tasktags/org/eclipse/wst/sse/core/internal/tasks/TaskScanningJob.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2001, 2006 IBM Corporation and others.
+ * Copyright (c) 2001, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * David Carver (Intalio) - bug 300443 - some constants aren't static final
*
*******************************************************************************/
package org.eclipse.wst.sse.core.internal.tasks;
@@ -46,7 +47,7 @@
private List fQueue = null;
/** symbolic name for OSGI framework */
- private final String OSGI_FRAMEWORK_ID = "org.eclipse.osgi"; //$NON-NLS-1$
+ private static final String OSGI_FRAMEWORK_ID = "org.eclipse.osgi"; //$NON-NLS-1$
TaskScanningJob() {
super(SSECoreMessages.TaskScanner_0);
diff --git a/bundles/org.eclipse.wst.sse.core/src-tasktags/org/eclipse/wst/sse/core/internal/tasks/WorkspaceTaskScanner.java b/bundles/org.eclipse.wst.sse.core/src-tasktags/org/eclipse/wst/sse/core/internal/tasks/WorkspaceTaskScanner.java
index ad34bad..1ffc3c0 100644
--- a/bundles/org.eclipse.wst.sse.core/src-tasktags/org/eclipse/wst/sse/core/internal/tasks/WorkspaceTaskScanner.java
+++ b/bundles/org.eclipse.wst.sse.core/src-tasktags/org/eclipse/wst/sse/core/internal/tasks/WorkspaceTaskScanner.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2001, 2008 IBM Corporation and others.
+ * Copyright (c) 2001, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Jens Lukowski/Innoopract - initial renaming/restructuring
+ * David Carver (Intalio) - bug 300443 - some constants aren't static final
*
*******************************************************************************/
package org.eclipse.wst.sse.core.internal.tasks;
@@ -60,7 +61,7 @@
return _instance;
}
- final String DEFAULT_MARKER_TYPE = IFileTaskScanner.TASK_MARKER_ID;
+ static final String DEFAULT_MARKER_TYPE = IFileTaskScanner.TASK_MARKER_ID;
private List fActiveScanners = null;
private IContentType[] fCurrentIgnoreContentTypes = null;
private TaskTag[] fCurrentTaskTags = null;
diff --git a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/format/AbstractStructuredFormatProcessor.java b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/format/AbstractStructuredFormatProcessor.java
index 4b554be..1e8d690 100644
--- a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/format/AbstractStructuredFormatProcessor.java
+++ b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/format/AbstractStructuredFormatProcessor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2001, 2007 IBM Corporation and others.
+ * Copyright (c) 2001, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -9,6 +9,7 @@
* IBM Corporation - initial API and implementation
* Jens Lukowski/Innoopract - initial renaming/restructuring
* Jesper Steen Møller - initial IDocumentExtension4 support - #102822
+ * David Carver (Intalio) - bug 300443 - some constants aren't static final
*
*******************************************************************************/
package org.eclipse.wst.sse.core.internal.format;
@@ -45,7 +46,7 @@
* Max length of text to be formatted to be considered a "small change"
* Used for document rewrite session type.
*/
- private final int MAX_SMALL_FORMAT_SIZE = 1000;
+ private static final int MAX_SMALL_FORMAT_SIZE = 1000;
protected void ensureClosed(OutputStream outputStream, InputStream inputStream) {
diff --git a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/BasicStructuredDocument.java b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/BasicStructuredDocument.java
index bfc3b0b..6cafd4d 100644
--- a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/BasicStructuredDocument.java
+++ b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/BasicStructuredDocument.java
@@ -11,6 +11,7 @@
* Jesper Steen Møller - initial IDocumentExtension4 support - #102822
* (see also #239115)
* David Carver (Intalio) - bug 300434 - Make inner classes static where possible
+ * David Carver (Intalio) - bug 300443 - some constants aren't static final
*
*******************************************************************************/
package org.eclipse.wst.sse.core.internal.text;
@@ -106,7 +107,7 @@
// jobs -- found not to be a good assumption. See below.
private List cachedRegionPositionArray = Collections.synchronizedList(new ArrayList());
private final boolean DEBUG = false;
- private final int MAX_SIZE = 50;
+ private static final int MAX_SIZE = 50;
private ThreadLocal threadLocalCachePosition = new ThreadLocal();
@@ -304,7 +305,7 @@
* user's preference is usually to be internally consistent.
*/
private String fInitialLineDelimiter;
- private final String READ_ONLY_REGIONS_CATEGORY = "_READ_ONLY_REGIONS_CATEGORY_"; //$NON-NLS-1$
+ private static final String READ_ONLY_REGIONS_CATEGORY = "_READ_ONLY_REGIONS_CATEGORY_"; //$NON-NLS-1$
/**
* Current rewrite session, or none if not presently rewriting.
*/