[91045] resource strings for xml
diff --git a/bundles/org.eclipse.wst.xml.core/plugin.properties b/bundles/org.eclipse.wst.xml.core/plugin.properties
index 8c6b4b2..7d3a6ac 100644
--- a/bundles/org.eclipse.wst.xml.core/plugin.properties
+++ b/bundles/org.eclipse.wst.xml.core/plugin.properties
@@ -15,3 +15,6 @@
nlFeatureName=Structured Source XML Model NL Support
Structured_XML_Document_Factory_Extension.name=Structured XML Document Factory Extension
XML_Content_Type_Extension_Element.name=XML Content Type
+# contentmodel strings
+Content_Model_Document_Factories_Extension.name=Content Model Document Factories
+Content_Model_Annotation_Files_Extension.name=Content Model Annotation Files
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/CMDataType.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/CMDataType.java
index 1c582c4..cdef962 100644
--- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/CMDataType.java
+++ b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/CMDataType.java
@@ -20,17 +20,17 @@
// todo... at some point we should remove these names to
// avoid exposing implementation details via the interfaces
//
- static final String CDATA = "CDATA";
- static final String ID = "ID";
- static final String IDREF = "IDREF";
- static final String ENTITY = "ENTITY";
- static final String ENTITIES = "ENTITIES";
- static final String NOTATION = "NOTATION";
- static final String NMTOKEN = "NMTOKEN";
- static final String NMTOKENS = "NMTOKENS";
- static final String NUMBER = "NUMBER";
- static final String URI = "URI";
- static final String ENUM = "ENUM";
+ static final String CDATA = "CDATA"; //$NON-NLS-1$
+ static final String ID = "ID"; //$NON-NLS-1$
+ static final String IDREF = "IDREF"; //$NON-NLS-1$
+ static final String ENTITY = "ENTITY"; //$NON-NLS-1$
+ static final String ENTITIES = "ENTITIES"; //$NON-NLS-1$
+ static final String NOTATION = "NOTATION"; //$NON-NLS-1$
+ static final String NMTOKEN = "NMTOKEN"; //$NON-NLS-1$
+ static final String NMTOKENS = "NMTOKENS"; //$NON-NLS-1$
+ static final String NUMBER = "NUMBER"; //$NON-NLS-1$
+ static final String URI = "URI"; //$NON-NLS-1$
+ static final String ENUM = "ENUM"; //$NON-NLS-1$
static final int IMPLIED_VALUE_NONE = 1;
static final int IMPLIED_VALUE_FIXED = 2;
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/ContentModelManager.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/ContentModelManager.java
index 893b91c..1868c18 100644
--- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/ContentModelManager.java
+++ b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/ContentModelManager.java
@@ -45,7 +45,7 @@
public CMDocument createCMDocument(String uri, String resourceType) {
if (resourceType == null && uri != null) {
- int index = uri.lastIndexOf(".");
+ int index = uri.lastIndexOf("."); //$NON-NLS-1$
resourceType = uri.substring(index + 1);
}
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/annotation/Annotation.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/annotation/Annotation.java
index 0358715..e9968a8 100644
--- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/annotation/Annotation.java
+++ b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/annotation/Annotation.java
@@ -28,12 +28,12 @@
public void setSpec(String spec)
{
- hashtable.put("spec", spec);
+ hashtable.put("spec", spec); //$NON-NLS-1$
}
public String getSpec()
{
- return (String)hashtable.get("spec");
+ return (String)hashtable.get("spec"); //$NON-NLS-1$
}
public void setProperty(String name, String value)
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/annotation/AnnotationMap.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/annotation/AnnotationMap.java
index 21168c8..3ea87e6 100644
--- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/annotation/AnnotationMap.java
+++ b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/annotation/AnnotationMap.java
@@ -46,7 +46,7 @@
if (spec != null)
{
list.add(annotation);
- StringTokenizer st = new StringTokenizer(spec, "[]|\t\n\r\f ");
+ StringTokenizer st = new StringTokenizer(spec, "[]|\t\n\r\f "); //$NON-NLS-1$
while (st.hasMoreTokens())
{
String cmNodeSpec = st.nextToken();
@@ -91,7 +91,7 @@
public String getProperty(CMNode cmNode, String propertyName)
{
String result = null;
- String cmNodeSpec = (String)cmNode.getProperty("spec");
+ String cmNodeSpec = (String)cmNode.getProperty("spec"); //$NON-NLS-1$
if (cmNodeSpec == null)
{
cmNodeSpec = cmNode.getNodeName();
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/basic/CMAnyElementImpl.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/basic/CMAnyElementImpl.java
index 09d2885..9913ae2 100644
--- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/basic/CMAnyElementImpl.java
+++ b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/basic/CMAnyElementImpl.java
@@ -27,7 +27,7 @@
public static String computeNodeName(String uri)
{
- return uri != null ? ("any#" + uri) : "any";
+ return uri != null ? ("any#" + uri) : "any"; //$NON-NLS-1$ //$NON-NLS-2$
}
// implements CMNode
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/basic/CMAttributeDeclarationImpl.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/basic/CMAttributeDeclarationImpl.java
index 0de70ac..60b2603 100644
--- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/basic/CMAttributeDeclarationImpl.java
+++ b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/basic/CMAttributeDeclarationImpl.java
@@ -50,17 +50,17 @@
public Object getProperty(String propertyName)
{
Object result = null;
- if (propertyName.equals("CMDocument"))
+ if (propertyName.equals("CMDocument")) //$NON-NLS-1$
{
result = cmDocument;
}
- else if (propertyName.equals("XSITypes"))
+ else if (propertyName.equals("XSITypes")) //$NON-NLS-1$
{
result = xsiTypes;
}
- else if (propertyName.equals("http://org.eclipse.wst/cm/properties/nsPrefixQualification"))
+ else if (propertyName.equals("http://org.eclipse.wst/cm/properties/nsPrefixQualification")) //$NON-NLS-1$
{
- result = prefixQualification ? "qualified" : "unqualified";
+ result = prefixQualification ? "qualified" : "unqualified"; //$NON-NLS-1$ //$NON-NLS-2$
}
else
{
@@ -112,7 +112,7 @@
/** @deprecated */
public String getDefaultValue()
{
- return "";
+ return ""; //$NON-NLS-1$
}
/** @deprecated */
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/basic/CMDocumentImpl.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/basic/CMDocumentImpl.java
index c85348f..933fcb8 100644
--- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/basic/CMDocumentImpl.java
+++ b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/basic/CMDocumentImpl.java
@@ -36,13 +36,13 @@
public String getNodeName()
{
- return "";
+ return ""; //$NON-NLS-1$
}
public Object getProperty(String propertyName)
{
Object result = null;
- if (propertyName.equals("http://org.eclipse.wst/cm/properties/targetNamespaceURI"))
+ if (propertyName.equals("http://org.eclipse.wst/cm/properties/targetNamespaceURI")) //$NON-NLS-1$
{
result = targetNamespace;
}
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/basic/CMElementDeclarationImpl.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/basic/CMElementDeclarationImpl.java
index df88b29..9bdf866 100644
--- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/basic/CMElementDeclarationImpl.java
+++ b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/basic/CMElementDeclarationImpl.java
@@ -50,11 +50,11 @@
public Object getProperty(String propertyName)
{
Object result = null;
- if (propertyName.equals("http://org.eclipse.wst/cm/properties/nsPrefixQualification"))
+ if (propertyName.equals("http://org.eclipse.wst/cm/properties/nsPrefixQualification")) //$NON-NLS-1$
{
- result = isLocal ? "unqualified" : "qualified";
+ result = isLocal ? "unqualified" : "qualified"; //$NON-NLS-1$ //$NON-NLS-2$
}
- else if (propertyName.equals("CMDocument"))
+ else if (propertyName.equals("CMDocument")) //$NON-NLS-1$
{
result = cmDocument;
}
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/basic/CMNodeImpl.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/basic/CMNodeImpl.java
index 396e759..5c63598 100644
--- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/basic/CMNodeImpl.java
+++ b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/basic/CMNodeImpl.java
@@ -21,7 +21,7 @@
public String getNodeName()
{
- return "";
+ return ""; //$NON-NLS-1$
}
public boolean supports(String propertyName)
@@ -32,7 +32,7 @@
public Object getProperty(String propertyName)
{
Object result = null;
- if ("isInferred".equals(propertyName))
+ if ("isInferred".equals(propertyName)) //$NON-NLS-1$
{
result = isInferred ? Boolean.TRUE : Boolean.FALSE;
}
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/factory/CMDocumentFactoryDescriptor.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/factory/CMDocumentFactoryDescriptor.java
index 052b6d2..a502c3b 100644
--- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/factory/CMDocumentFactoryDescriptor.java
+++ b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/factory/CMDocumentFactoryDescriptor.java
@@ -31,7 +31,7 @@
{
try
{
- factory = (CMDocumentFactory) fElement.createExecutableExtension("class");
+ factory = (CMDocumentFactory) fElement.createExecutableExtension("class"); //$NON-NLS-1$
}
catch (Exception e)
{
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/factory/CMDocumentFactoryRegistry.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/factory/CMDocumentFactoryRegistry.java
index 4370068..3f2db44 100644
--- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/factory/CMDocumentFactoryRegistry.java
+++ b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/factory/CMDocumentFactoryRegistry.java
@@ -24,7 +24,7 @@
{
protected static CMDocumentFactoryRegistry instance;
- private static String DEFAULT_RESOURCE_TYPE = "*";
+ private static String DEFAULT_RESOURCE_TYPE = "*"; //$NON-NLS-1$
protected Map resourceTypeMap = new HashMap();
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/factory/CMDocumentFactoryRegistryReader.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/factory/CMDocumentFactoryRegistryReader.java
index 22addc0..87e2b78 100644
--- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/factory/CMDocumentFactoryRegistryReader.java
+++ b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/factory/CMDocumentFactoryRegistryReader.java
@@ -24,10 +24,10 @@
public class CMDocumentFactoryRegistryReader
{
- protected static final String EXTENSION_POINT_ID = "documentFactories";
- protected static final String TAG_NAME = "factory";
- protected static final String ATT_CLASS = "class";
- protected static final String ATT_TYPE = "type";
+ protected static final String EXTENSION_POINT_ID = "documentFactories"; //$NON-NLS-1$
+ protected static final String TAG_NAME = "factory"; //$NON-NLS-1$
+ protected static final String ATT_CLASS = "class"; //$NON-NLS-1$
+ protected static final String ATT_TYPE = "type"; //$NON-NLS-1$
protected String pluginId, extensionPointId;
protected CMDocumentFactoryRegistry registry;
@@ -39,7 +39,7 @@
public void readRegistry()
{
- String bundleid = "org.eclipse.wst.xml.core";
+ String bundleid = "org.eclipse.wst.xml.core"; //$NON-NLS-1$
IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(bundleid, EXTENSION_POINT_ID);
if (point != null)
{
@@ -62,7 +62,7 @@
try
{
CMDocumentFactoryDescriptor descriptor = new CMDocumentFactoryDescriptor(element);
- for (StringTokenizer st = new StringTokenizer(filenameExtensions, ","); st.hasMoreTokens(); )
+ for (StringTokenizer st = new StringTokenizer(filenameExtensions, ","); st.hasMoreTokens(); ) //$NON-NLS-1$
{
String token = st.nextToken().trim();
registry.putFactory(token, descriptor);
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/annotation/AnnotationFileParser.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/annotation/AnnotationFileParser.java
index ad06a90..beaf843 100644
--- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/annotation/AnnotationFileParser.java
+++ b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/annotation/AnnotationFileParser.java
@@ -33,9 +33,9 @@
*/
public class AnnotationFileParser
{
- public static final String TAG_ID_ANNOTATIONS = "abstractGrammarAnnotations";
- public static final String TAG_ID_ANNOTATION = "annotation";
- public static final String TAG_ID_PROPERTY = "property";
+ public static final String TAG_ID_ANNOTATIONS = "abstractGrammarAnnotations"; //$NON-NLS-1$
+ public static final String TAG_ID_ANNOTATION = "annotation"; //$NON-NLS-1$
+ public static final String TAG_ID_PROPERTY = "property"; //$NON-NLS-1$
/**
* This method is called to parse an annotation file and store the contents into an annotationMap
@@ -67,10 +67,10 @@
{
URL url = new URL(uri);
inputStream = url.openStream();
- int index = uri.lastIndexOf("/");
+ int index = uri.lastIndexOf("/"); //$NON-NLS-1$
if (index == -1)
{
- throw new Exception("malformed uri");
+ throw new Exception("malformed uri"); //$NON-NLS-1$
}
String baseURI = uri.substring(0, index);
parse(map, inputStream, baseURI);
@@ -95,7 +95,7 @@
protected String quote(String string)
{
- return "\"" + string + "\"";
+ return "\"" + string + "\""; //$NON-NLS-1$ //$NON-NLS-2$
}
@@ -103,7 +103,7 @@
{
for (int i = 0; i < indent; i++)
{
- out.print(" ");
+ out.print(" "); //$NON-NLS-1$
}
out.println(string);
}
@@ -134,9 +134,9 @@
{
String attributeName = attributes.getLocalName(i);
String attributeValue = attributes.getValue(i);
- if (attributeName.equals("propertiesLocation"))
+ if (attributeName.equals("propertiesLocation")) //$NON-NLS-1$
{
- String resourceURI = baseURI + "/" + attributeValue;
+ String resourceURI = baseURI + "/" + attributeValue; //$NON-NLS-1$
try
{
resourceBundle = ResourceBundleHelper.getResourceBundle(resourceURI);
@@ -146,9 +146,9 @@
e.printStackTrace();
}
}
- else if (attributeName.equals("caseSensitive"))
+ else if (attributeName.equals("caseSensitive")) //$NON-NLS-1$
{
- if (attributeValue.trim().equals("false"))
+ if (attributeValue.trim().equals("false")) //$NON-NLS-1$
{
annotationMap.setCaseSensitive(false);
}
@@ -158,7 +158,7 @@
else if (localName.equals(TAG_ID_ANNOTATION))
{
currentAnnotation = null;
- String specValue = attributes.getValue("spec");
+ String specValue = attributes.getValue("spec"); //$NON-NLS-1$
if (specValue != null)
{
currentAnnotation = new Annotation();
@@ -170,7 +170,7 @@
{
if (currentAnnotation != null)
{
- currentPropertyName = attributes.getValue("name");
+ currentPropertyName = attributes.getValue("name"); //$NON-NLS-1$
}
}
}
@@ -182,7 +182,7 @@
String propertyValue = propertyValueBuffer.toString();
if (propertyValue != null)
{
- if (propertyValue.startsWith("%") && resourceBundle != null)
+ if (propertyValue.startsWith("%") && resourceBundle != null) //$NON-NLS-1$
{
try
{
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/annotation/AnnotationFileRegistryReader.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/annotation/AnnotationFileRegistryReader.java
index d5da539..4ab8537 100644
--- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/annotation/AnnotationFileRegistryReader.java
+++ b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/annotation/AnnotationFileRegistryReader.java
@@ -25,10 +25,10 @@
*/
public class AnnotationFileRegistryReader
{
- protected static final String EXTENSION_POINT_ID = "annotationFiles";
- protected static final String TAG_NAME = "annotationFile";
- protected static final String ATT_PUBLIC_ID = "publicId";
- protected static final String ATT_LOCATION = "location";
+ protected static final String EXTENSION_POINT_ID = "annotationFiles"; //$NON-NLS-1$
+ protected static final String TAG_NAME = "annotationFile"; //$NON-NLS-1$
+ protected static final String ATT_PUBLIC_ID = "publicId"; //$NON-NLS-1$
+ protected static final String ATT_LOCATION = "location"; //$NON-NLS-1$
private AnnotationFileRegistry annotationFileRegistry;
@@ -43,7 +43,7 @@
public void readRegistry()
{
IPluginRegistry pluginRegistry = Platform.getPluginRegistry();
- String pluginId = "org.eclipse.wst.xml.core";
+ String pluginId = "org.eclipse.wst.xml.core"; //$NON-NLS-1$
IExtensionPoint point = pluginRegistry.getExtensionPoint(pluginId, EXTENSION_POINT_ID);
if (point != null)
{
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/annotation/AnnotationUtility.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/annotation/AnnotationUtility.java
index 6777538..c932fed 100644
--- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/annotation/AnnotationUtility.java
+++ b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/annotation/AnnotationUtility.java
@@ -28,7 +28,7 @@
public static void loadAnnotationsForGrammar(String publicId, CMDocument cmDocument)
{
List annotationFiles = ContentModelManager.getInstance().getAnnotationFiles(publicId);
- AnnotationMap map = (AnnotationMap) cmDocument.getProperty("annotationMap");
+ AnnotationMap map = (AnnotationMap) cmDocument.getProperty("annotationMap"); //$NON-NLS-1$
if (map != null)
{
for (Iterator i = annotationFiles.iterator(); i.hasNext();)
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/annotation/ResourceBundleHelper.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/annotation/ResourceBundleHelper.java
index f1eecf0..6870419 100644
--- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/annotation/ResourceBundleHelper.java
+++ b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/annotation/ResourceBundleHelper.java
@@ -27,10 +27,10 @@
// try to load bundle from the location specified in the resourceURI
// we make the assumption that the resourceURI points to the local file system
- int index = resourceURI.lastIndexOf("/");
+ int index = resourceURI.lastIndexOf("/"); //$NON-NLS-1$
if (index == -1)
{
- throw new Exception("Invalid resourceURI");
+ throw new Exception("Invalid resourceURI"); //$NON-NLS-1$
}
// Below we set 'resourceDirectory' so that it ends with a '/'.
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/modelqueryimpl/InferredGrammarFactory.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/modelqueryimpl/InferredGrammarFactory.java
index 1b6e43b..59bcfc7 100644
--- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/modelqueryimpl/InferredGrammarFactory.java
+++ b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/modelqueryimpl/InferredGrammarFactory.java
@@ -141,15 +141,15 @@
for (Iterator iter = collection.iterator(); iter.hasNext(); )
{
CMDocument cmDocument = (CMDocument)iter.next();
- System.out.println("-----------------------------------------------");
- System.out.println("cmDocument (" + cmDocument.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI") +")");
+ System.out.println("-----------------------------------------------"); //$NON-NLS-1$
+ System.out.println("cmDocument (" + cmDocument.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI") +")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
CMNamedNodeMapImpl elementMap = (CMNamedNodeMapImpl)cmDocument.getElements();
int size = elementMap.getLength();
for (int i = 0; i < size; i++)
{
CMElementDeclaration ed = (CMElementDeclaration)elementMap.item(i);
CMDescriptionBuilder builder = new CMDescriptionBuilder();
- System.out.println(" ELEMENT " + ed.getNodeName() + " = " + builder.buildDescription(ed));
+ System.out.println(" ELEMENT " + ed.getNodeName() + " = " + builder.buildDescription(ed)); //$NON-NLS-1$ //$NON-NLS-2$
}
}
}
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/test/CMPrinter.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/test/CMPrinter.java
index a8b8d39..5616a29 100644
--- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/test/CMPrinter.java
+++ b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/test/CMPrinter.java
@@ -38,11 +38,11 @@
protected Vector visitedElements = new Vector();
/****** formatting ******/
- protected String indent = "";
+ protected String indent = ""; //$NON-NLS-1$
protected void incrementIndent()
{
- indent = indent + " ";
+ indent = indent + " "; //$NON-NLS-1$
}
protected void decrementIndent()
@@ -67,45 +67,45 @@
public void visitCMAnyElement(CMAnyElement anyElement)
{
- sb.append(indent + "<CMAnyElement");
+ sb.append(indent + "<CMAnyElement"); //$NON-NLS-1$
printAttributes(sb, anyElement);
- sb.append(">/n");
+ sb.append(">/n"); //$NON-NLS-1$
incrementIndent();
printProperties(sb, anyElement);
decrementIndent();
- sb.append(indent + "</CMAnyElement>/n");
+ sb.append(indent + "</CMAnyElement>/n"); //$NON-NLS-1$
}
public void visitCMAttributeDeclaration(CMAttributeDeclaration ad)
{
- sb.append(indent + "<CMAttributeDeclaration");
+ sb.append(indent + "<CMAttributeDeclaration"); //$NON-NLS-1$
printAttributes(sb, ad);
- sb.append(">\n");
+ sb.append(">\n"); //$NON-NLS-1$
incrementIndent();
printProperties(sb, ad);
decrementIndent();
visitCMNode(ad.getAttrType());
- sb.append(indent + "</CMAttributeDeclaration>\n");
+ sb.append(indent + "</CMAttributeDeclaration>\n"); //$NON-NLS-1$
}
public void visitCMDataType(CMDataType dataType)
{
- sb.append(indent + "<CMDataType");
+ sb.append(indent + "<CMDataType"); //$NON-NLS-1$
printAttributes(sb, dataType);
- sb.append(">\n");
+ sb.append(">\n"); //$NON-NLS-1$
incrementIndent();
- sb.append(indent + "<ImpliedValue kind=\"" + dataType.getImpliedValueKind() + "\">");
- sb.append(dataType.getImpliedValue() + "</ImpliedValue>\n");
+ sb.append(indent + "<ImpliedValue kind=\"" + dataType.getImpliedValueKind() + "\">"); //$NON-NLS-1$ //$NON-NLS-2$
+ sb.append(dataType.getImpliedValue() + "</ImpliedValue>\n"); //$NON-NLS-1$
printEnumeration(sb, dataType.getEnumeratedValues());
decrementIndent();
- sb.append(indent + "</CMDataType>\n");
+ sb.append(indent + "</CMDataType>\n"); //$NON-NLS-1$
}
public void visitCMDocument(CMDocument document)
{
- sb.append(indent + "<CMDocument");
+ sb.append(indent + "<CMDocument"); //$NON-NLS-1$
printAttributes(sb, document);
- sb.append(">\n");
+ sb.append(">\n"); //$NON-NLS-1$
incrementIndent();
// printEntities(sb, document.getEntities());
@@ -119,14 +119,14 @@
}
decrementIndent();
- sb.append(indent + "</CMDocument>\n");
+ sb.append(indent + "</CMDocument>\n"); //$NON-NLS-1$
}
public void visitCMGroup(CMGroup group)
{
- sb.append(indent + "<CMGroup");
+ sb.append(indent + "<CMGroup"); //$NON-NLS-1$
printAttributes(sb, group);
- sb.append(">\n");
+ sb.append(">\n"); //$NON-NLS-1$
incrementIndent();
CMNodeList nodeList = group.getChildNodes();
@@ -137,7 +137,7 @@
}
decrementIndent();
- sb.append(indent + "</CMGroup>\n");
+ sb.append(indent + "</CMGroup>\n"); //$NON-NLS-1$
}
public void visitCMElementDeclaration(CMElementDeclaration ed)
@@ -145,9 +145,9 @@
if (!visitedElements.contains(ed))
{
visitedElements.add(ed);
- sb.append(indent + "<CMElementDeclaration");
+ sb.append(indent + "<CMElementDeclaration"); //$NON-NLS-1$
printAttributes(sb, ed);
- sb.append(">\n");
+ sb.append(">\n"); //$NON-NLS-1$
incrementIndent();
printProperties(sb, ed);
@@ -165,7 +165,7 @@
visitCMNode(dataType);
decrementIndent();
- sb.append(indent + "</CMElementDeclaration>\n");
+ sb.append(indent + "</CMElementDeclaration>\n"); //$NON-NLS-1$
}
}
@@ -174,16 +174,16 @@
{
if ((values != null) && (values.length > 0))
{
- sb.append(indent + "<Enumeration>\n");
+ sb.append(indent + "<Enumeration>\n"); //$NON-NLS-1$
incrementIndent();
for (int i=0; i<values.length; i++)
{
- sb.append(indent + "<Value>" + values[i] + "</Values>\n");
+ sb.append(indent + "<Value>" + values[i] + "</Values>\n"); //$NON-NLS-1$ //$NON-NLS-2$
}
decrementIndent();
- sb.append(indent + "</Enumeration>\n");
+ sb.append(indent + "</Enumeration>\n"); //$NON-NLS-1$
}
}
@@ -192,40 +192,40 @@
{
if (cmnode != null)
{
- sb.append(" nodeName=\"" + cmnode.getNodeName() + "\"");
- sb.append(" nodeType=\"" + cmnode.getNodeType() + "\"");
+ sb.append(" nodeName=\"" + cmnode.getNodeName() + "\""); //$NON-NLS-1$ //$NON-NLS-2$
+ sb.append(" nodeType=\"" + cmnode.getNodeType() + "\""); //$NON-NLS-1$ //$NON-NLS-2$
if (cmnode instanceof CMContent)
{
- sb.append(" minOccur=\"" + ((CMContent)cmnode).getMinOccur() + "\"");
- sb.append(" maxOccur=\"" + ((CMContent)cmnode).getMaxOccur() + "\"");
+ sb.append(" minOccur=\"" + ((CMContent)cmnode).getMinOccur() + "\""); //$NON-NLS-1$ //$NON-NLS-2$
+ sb.append(" maxOccur=\"" + ((CMContent)cmnode).getMaxOccur() + "\""); //$NON-NLS-1$ //$NON-NLS-2$
}
if (cmnode instanceof CMAnyElement)
{
- sb.append(" namespaceURI=\"" + ((CMAnyElement)cmnode).getNamespaceURI() + "\"");
+ sb.append(" namespaceURI=\"" + ((CMAnyElement)cmnode).getNamespaceURI() + "\""); //$NON-NLS-1$ //$NON-NLS-2$
}
if (cmnode instanceof CMAttributeDeclaration)
{
- sb.append(" uasage=\"" + ((CMAttributeDeclaration)cmnode).getUsage() + "\"");
- sb.append(" defaultValue=\"" + ((CMAttributeDeclaration)cmnode).getDefaultValue() + "\"");
+ sb.append(" uasage=\"" + ((CMAttributeDeclaration)cmnode).getUsage() + "\""); //$NON-NLS-1$ //$NON-NLS-2$
+ sb.append(" defaultValue=\"" + ((CMAttributeDeclaration)cmnode).getDefaultValue() + "\""); //$NON-NLS-1$ //$NON-NLS-2$
}
if (cmnode instanceof CMDataType)
{
- sb.append(" instanceValue=\"" + ((CMDataType)cmnode).generateInstanceValue() + "\"");
+ sb.append(" instanceValue=\"" + ((CMDataType)cmnode).generateInstanceValue() + "\""); //$NON-NLS-1$ //$NON-NLS-2$
}
if (cmnode instanceof CMEntityDeclaration)
{
String value = ((CMEntityDeclaration)cmnode).getValue();
- if (value.indexOf("\"") == -1) sb.append(" value=\"" + value + "\"");
- else sb.append(" value=\"" + value + "\"");
+ if (value.indexOf("\"") == -1) sb.append(" value=\"" + value + "\""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ else sb.append(" value=\"" + value + "\""); //$NON-NLS-1$ //$NON-NLS-2$
}
if (cmnode instanceof CMGroup)
{
- sb.append(" operator=\"" + ((CMGroup)cmnode).getOperator() + "\"");
+ sb.append(" operator=\"" + ((CMGroup)cmnode).getOperator() + "\""); //$NON-NLS-1$ //$NON-NLS-2$
}
if (cmnode instanceof CMElementDeclaration)
{
- sb.append(" contentType=\"" + ((CMElementDeclaration)cmnode).getContentType() + "\"");
+ sb.append(" contentType=\"" + ((CMElementDeclaration)cmnode).getContentType() + "\""); //$NON-NLS-1$ //$NON-NLS-2$
}
}
}
@@ -235,51 +235,51 @@
{
if ((entities != null) && (entities.getLength()>0))
{
- sb.append(indent + "<Entities>\n");
+ sb.append(indent + "<Entities>\n"); //$NON-NLS-1$
incrementIndent();
for (Iterator i = entities.iterator(); i.hasNext();)
{
CMEntityDeclaration entity = (CMEntityDeclaration)i.next();
- sb.append(indent + "<Entity");
+ sb.append(indent + "<Entity"); //$NON-NLS-1$
printAttributes(sb, entity);
- sb.append("/>\n");
+ sb.append("/>\n"); //$NON-NLS-1$
}
decrementIndent();
- sb.append(indent + "</Entities>\n");
+ sb.append(indent + "</Entities>\n"); //$NON-NLS-1$
}
}
public void printProperties(StringBuffer sb, CMNode cmnode)
{
List properties = getProperties(cmnode);
- sb.append(indent + "<Properties>\n");
+ sb.append(indent + "<Properties>\n"); //$NON-NLS-1$
incrementIndent();
for (int i=0; i<properties.size(); i++)
{
String property = (String)properties.get(i);
- sb.append(indent + "<Property name=\"" + property + "\"");
+ sb.append(indent + "<Property name=\"" + property + "\""); //$NON-NLS-1$ //$NON-NLS-2$
if (cmnode.supports(property))
{
- sb.append(" supports=\"true\"");
+ sb.append(" supports=\"true\""); //$NON-NLS-1$
}
else
{
- sb.append(" supports=\"false\"");
+ sb.append(" supports=\"false\""); //$NON-NLS-1$
}
Object value = cmnode.getProperty(property);
- if (value instanceof String) sb.append(" value=\"" + (String)value + "\"");
- else if (value instanceof Boolean) sb.append(" value=\"" + value + "\"");
- else if (value != null) sb.append(" value=\"" + value.getClass() + "\"");
- else sb.append(" value=\"null\"");
- sb.append("/>\n");
+ if (value instanceof String) sb.append(" value=\"" + (String)value + "\""); //$NON-NLS-1$ //$NON-NLS-2$
+ else if (value instanceof Boolean) sb.append(" value=\"" + value + "\""); //$NON-NLS-1$ //$NON-NLS-2$
+ else if (value != null) sb.append(" value=\"" + value.getClass() + "\""); //$NON-NLS-1$ //$NON-NLS-2$
+ else sb.append(" value=\"null\""); //$NON-NLS-1$
+ sb.append("/>\n"); //$NON-NLS-1$
}
decrementIndent();
- sb.append(indent + "</Properties>\n");
+ sb.append(indent + "</Properties>\n"); //$NON-NLS-1$
}
public List getProperties(CMNode cmnode)
@@ -288,32 +288,32 @@
if (cmnode != null)
{
- properties.add("CMDocument");
- properties.add("documentation");
- properties.add("http://org.eclipse.wst/cm/properties/usesLocalElementDeclarations");
- properties.add("http://org.eclipse.wst/cm/properties/isNameSpaceAware");
- properties.add("http://org.eclipse.wst/cm/properties/nsPrefixQualification");
- properties.add("http://org.eclipse.wst/cm/properties/nillable");
- properties.add("http://org.eclipse.wst/cm/properties/mofNotifier");
- properties.add("spec");
+ properties.add("CMDocument"); //$NON-NLS-1$
+ properties.add("documentation"); //$NON-NLS-1$
+ properties.add("http://org.eclipse.wst/cm/properties/usesLocalElementDeclarations"); //$NON-NLS-1$
+ properties.add("http://org.eclipse.wst/cm/properties/isNameSpaceAware"); //$NON-NLS-1$
+ properties.add("http://org.eclipse.wst/cm/properties/nsPrefixQualification"); //$NON-NLS-1$
+ properties.add("http://org.eclipse.wst/cm/properties/nillable"); //$NON-NLS-1$
+ properties.add("http://org.eclipse.wst/cm/properties/mofNotifier"); //$NON-NLS-1$
+ properties.add("spec"); //$NON-NLS-1$
if (cmnode instanceof CMElementDeclaration)
{
- properties.add("http://org.eclipse.wst/cm/properties/definitionInfo");
- properties.add("http://org.eclipse.wst/cm/properties/definition");
- properties.add("XSITypes");
- properties.add("DerivedElementDeclaration");
+ properties.add("http://org.eclipse.wst/cm/properties/definitionInfo"); //$NON-NLS-1$
+ properties.add("http://org.eclipse.wst/cm/properties/definition"); //$NON-NLS-1$
+ properties.add("XSITypes"); //$NON-NLS-1$
+ properties.add("DerivedElementDeclaration"); //$NON-NLS-1$
// properties.add("SubstitutionGroup"); Currrently broken for nexted xsd files
- properties.add("Abstract");
+ properties.add("Abstract"); //$NON-NLS-1$
}
if (cmnode instanceof CMDocument)
{
- properties.add("http://org.eclipse.wst/cm/properties/targetNamespaceURI");
- properties.add("http://org.eclipse.wst/cm/properties/importedNamespaceInfo");
- properties.add("http://org.eclipse.wst/cm/properties/namespaceInfo");
- properties.add("http://org.eclipse.wst/cm/properties/elementFormDefault");
- properties.add("annotationMap");
- properties.add("encodingInfo");
+ properties.add("http://org.eclipse.wst/cm/properties/targetNamespaceURI"); //$NON-NLS-1$
+ properties.add("http://org.eclipse.wst/cm/properties/importedNamespaceInfo"); //$NON-NLS-1$
+ properties.add("http://org.eclipse.wst/cm/properties/namespaceInfo"); //$NON-NLS-1$
+ properties.add("http://org.eclipse.wst/cm/properties/elementFormDefault"); //$NON-NLS-1$
+ properties.add("annotationMap"); //$NON-NLS-1$
+ properties.add("encodingInfo"); //$NON-NLS-1$
}
// properties defines but not used
// properties.add("documentationSource");
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/test/Test.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/test/Test.java
index c19dfd4..943dbf7 100644
--- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/test/Test.java
+++ b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/test/Test.java
@@ -38,7 +38,7 @@
}
else
{
- System.out.println("xml file name argument required");
+ System.out.println("xml file name argument required"); //$NON-NLS-1$
}
return null;
}
@@ -76,7 +76,7 @@
protected void visitNode(Node node, ModelQuery mq, int indent)
{
CMNode cmnode = mq.getCMNode(node);
- printlnIndented(indent, "node :" + node.getNodeName() + " cmnode : " + (cmnode != null ? cmnode.getNodeName() : "null"));
+ printlnIndented(indent, "node :" + node.getNodeName() + " cmnode : " + (cmnode != null ? cmnode.getNodeName() : "null")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
NamedNodeMap map = node.getAttributes();
if (map != null)
{
@@ -102,7 +102,7 @@
{
for (int i = 0; i < indent; i++)
{
- System.out.print(" ");
+ System.out.print(" "); //$NON-NLS-1$
}
System.out.println(string);
}
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/util/CMDataTypeValueHelper.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/util/CMDataTypeValueHelper.java
index bf04c04..f027bf7 100644
--- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/util/CMDataTypeValueHelper.java
+++ b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/util/CMDataTypeValueHelper.java
@@ -42,9 +42,9 @@
//
if (value == null)
{
- if (ad.getAttrName().equals("xml:lang"))
+ if (ad.getAttrName().equals("xml:lang")) //$NON-NLS-1$
{
- value = "EN";
+ value = "EN"; //$NON-NLS-1$
}
}
@@ -89,13 +89,13 @@
String dataTypeName = dataType.getDataTypeName();
if (dataTypeName != null)
{
- if (dataTypeName.equals("ID"))
+ if (dataTypeName.equals("ID")) //$NON-NLS-1$
{
- value = "idvalue" + idCount++;
+ value = "idvalue" + idCount++; //$NON-NLS-1$
}
- else if (dataTypeName.equals("IDREF") || dataTypeName.equals("IDREFS"))
+ else if (dataTypeName.equals("IDREF") || dataTypeName.equals("IDREFS")) //$NON-NLS-1$ //$NON-NLS-2$
{
- value = "idvalue0";
+ value = "idvalue0"; //$NON-NLS-1$
}
}
}
@@ -109,8 +109,8 @@
CMDataType dataType = ad.getAttrType();
if (dataType != null)
{
- String propertyValue = (String)dataType.getProperty("isValidEmptyValue");
- if (propertyValue != null && propertyValue.equals("false"))
+ String propertyValue = (String)dataType.getProperty("isValidEmptyValue"); //$NON-NLS-1$
+ if (propertyValue != null && propertyValue.equals("false")) //$NON-NLS-1$
{
result = false;
}
@@ -122,13 +122,13 @@
public boolean isXSIType(CMAttributeDeclaration ad)
{
boolean result = false;
- if (ad.getNodeName().equals("type"))
+ if (ad.getNodeName().equals("type")) //$NON-NLS-1$
{
- CMDocument cmDocument = (CMDocument)ad.getProperty("CMDocument");
+ CMDocument cmDocument = (CMDocument)ad.getProperty("CMDocument"); //$NON-NLS-1$
if (cmDocument != null)
{
- String namespaceName = (String)cmDocument.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI");
- if (namespaceName != null && namespaceName.equals("http://www.w3.org/2001/XMLSchema-instance"))
+ String namespaceName = (String)cmDocument.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI"); //$NON-NLS-1$
+ if (namespaceName != null && namespaceName.equals("http://www.w3.org/2001/XMLSchema-instance")) //$NON-NLS-1$
{
result = true;
}
@@ -142,16 +142,16 @@
{
List list = new Vector();
- List xsiTypes = (List)ad.getProperty("XSITypes");
+ List xsiTypes = (List)ad.getProperty("XSITypes"); //$NON-NLS-1$
if (xsiTypes != null && xsiTypes.size() > 0)
{
for (Iterator i = xsiTypes.iterator(); i.hasNext(); )
{
String uriQualifiedName = (String)i.next();
String[] components = DOMNamespaceHelper.getURIQualifiedNameComponents(uriQualifiedName);
- String prefix = table.getPrefixForURI(components[0] != null ? components[0] : "");
+ String prefix = table.getPrefixForURI(components[0] != null ? components[0] : ""); //$NON-NLS-1$
String typeName = (prefix != null && prefix.length() > 0) ?
- prefix + ":" + components[1] :
+ prefix + ":" + components[1] : //$NON-NLS-1$
components[1];
list.add(typeName);
}
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/util/CMValidator.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/util/CMValidator.java
index 60f1143..3fe490f 100644
--- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/util/CMValidator.java
+++ b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/util/CMValidator.java
@@ -58,7 +58,7 @@
public String toString()
{
- return "[GraphNode " + name + "]";
+ return "[GraphNode " + name + "]"; //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -82,7 +82,7 @@
public Arc(int kind, GraphNode node, CMNode cmNode)
{
- this(kind, "", node, cmNode);
+ this(kind, "", node, cmNode); //$NON-NLS-1$
}
protected Arc(int kind, String name, GraphNode node, CMNode cmNode)
@@ -147,7 +147,7 @@
protected String getGraphNodeName()
{
- return "n" + count++;
+ return "n" + count++; //$NON-NLS-1$
}
@@ -208,8 +208,8 @@
public void visitCMGroup(CMGroup group)
{
Context prevContext = context;
- GraphNode in = new GraphNode("(" + getGraphNodeName());
- GraphNode out = new GraphNode(")" + getGraphNodeName());
+ GraphNode in = new GraphNode("(" + getGraphNodeName()); //$NON-NLS-1$
+ GraphNode out = new GraphNode(")" + getGraphNodeName()); //$NON-NLS-1$
int groupOperator = group.getOperator();
if (groupOperator == CMGroup.SEQUENCE)
@@ -244,7 +244,7 @@
GraphNode in = new GraphNode(getGraphNodeName());
GraphNode out = new GraphNode(getGraphNodeName());
createArcs(in, out, anyElement);
- in.addArc(new Arc(Arc.ELEMENT, "any", out, anyElement));
+ in.addArc(new Arc(Arc.ELEMENT, "any", out, anyElement)); //$NON-NLS-1$
}
}
@@ -280,7 +280,7 @@
{
Arc arc = (Arc)e.nextElement();
//boolean visit = false;
- printlnIndented(indent, "Arc:" + arc.name + " (" + arc.kind + ")");
+ printlnIndented(indent, "Arc:" + arc.name + " (" + arc.kind + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
if (arc.kind == Arc.ELEMENT)
{
//table.add(currentGrammarObject, arc.grammarObject);
@@ -436,7 +436,7 @@
{
result.isValid = false;
result.errorIndex = i;
- result.errorMessage = "Element can not include PCDATA content";
+ result.errorMessage = "Element can not include PCDATA content"; //$NON-NLS-1$
}
}
}
@@ -482,7 +482,7 @@
{
result.isValid = false;
result.errorIndex = i;
- result.errorMessage = "Element may only include PCDATA content";
+ result.errorMessage = "Element may only include PCDATA content"; //$NON-NLS-1$
break;
}
}
@@ -497,7 +497,7 @@
{
result.isValid = false;
result.errorIndex = i;
- result.errorMessage = "Element may not contain PCDATA or Element content";
+ result.errorMessage = "Element may not contain PCDATA or Element content"; //$NON-NLS-1$
break;
}
}
@@ -800,7 +800,7 @@
public String toString()
{
- String string = "[" + head + "],";
+ String string = "[" + head + "],"; //$NON-NLS-1$ //$NON-NLS-2$
if (tail != null)
{
@@ -819,13 +819,13 @@
public boolean isIgnorable(Object o)
{
String string = o.toString();
- return string.startsWith("!") || string.startsWith("?");
+ return string.startsWith("!") || string.startsWith("?"); //$NON-NLS-1$ //$NON-NLS-2$
}
public boolean isPCData(Object o)
{
String string = o.toString();
- return string.startsWith("'") || string.startsWith("\"");
+ return string.startsWith("'") || string.startsWith("\""); //$NON-NLS-1$ //$NON-NLS-2$
}
public boolean isElement(Object o)
@@ -840,7 +840,7 @@
{
CMElementDeclaration element = (CMElementDeclaration)cmNode;
String name = o.toString();
- int index = name.indexOf("]");
+ int index = name.indexOf("]"); //$NON-NLS-1$
if (index != -1)
{
name = name.substring(index + 1);
@@ -850,7 +850,7 @@
// TODO... here's we consider substitution groups... revisit to see if this should be moved into validator code
if (!result)
{
- CMNodeList cmNodeList = (CMNodeList)element.getProperty("SubstitutionGroup");
+ CMNodeList cmNodeList = (CMNodeList)element.getProperty("SubstitutionGroup"); //$NON-NLS-1$
if (cmNodeList != null)
{
int cmNodeListLength = cmNodeList.getLength();
@@ -873,7 +873,7 @@
else if (cmNode.getNodeType() == CMNode.ANY_ELEMENT)
{
String string = o.toString();
- if (string.equals("*"))
+ if (string.equals("*")) //$NON-NLS-1$
{
result = true;
}
@@ -883,17 +883,17 @@
String anyElementURI = anyElement.getNamespaceURI();
if (anyElementURI != null)
{
- if (anyElementURI.equals("##any"))
+ if (anyElementURI.equals("##any")) //$NON-NLS-1$
{
result = true;
}
- else if (anyElementURI.equals("##other"))
+ else if (anyElementURI.equals("##other")) //$NON-NLS-1$
{
result = true;
- CMDocument cmDocument = (CMDocument)anyElement.getProperty("CMDocument");
+ CMDocument cmDocument = (CMDocument)anyElement.getProperty("CMDocument"); //$NON-NLS-1$
if (cmDocument != null)
{
- String excludedURI = (String)cmDocument.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI");
+ String excludedURI = (String)cmDocument.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI"); //$NON-NLS-1$
if (excludedURI != null)
{
String specifiedURI = getURIForContentSpecification(string);
@@ -904,13 +904,13 @@
}
}
}
- else if (anyElementURI.equals("##targetNamespace"))
+ else if (anyElementURI.equals("##targetNamespace")) //$NON-NLS-1$
{
result = true;
- CMDocument cmDocument = (CMDocument)anyElement.getProperty("CMDocument");
+ CMDocument cmDocument = (CMDocument)anyElement.getProperty("CMDocument"); //$NON-NLS-1$
if (cmDocument != null)
{
- String targetNamespaceURI = (String)cmDocument.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI");
+ String targetNamespaceURI = (String)cmDocument.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI"); //$NON-NLS-1$
String specifiedURI = getURIForContentSpecification(string);
if (specifiedURI != null && !targetNamespaceURI.equals(specifiedURI))
{
@@ -941,7 +941,7 @@
protected String getURIForContentSpecification(String specification)
{
String result = null;
- int index = specification.indexOf("]");
+ int index = specification.indexOf("]"); //$NON-NLS-1$
if (index != -1)
{
result = specification.substring(1, index);
@@ -982,7 +982,7 @@
GraphNode graphNode = createGraph(element);
printGraph(graphNode);
*/
- println("-------------- begin validate ---------------");
+ println("-------------- begin validate ---------------"); //$NON-NLS-1$
StringElementContentComparator comparator = new StringElementContentComparator();
CMValidator validator = new CMValidator();
@@ -991,40 +991,40 @@
if (result.isValid)
{
CMNode[] nodeMapping = result.getOriginArray();
- println("Validation Success!");
- print(" ");
+ println("Validation Success!"); //$NON-NLS-1$
+ print(" "); //$NON-NLS-1$
for (int i = 0; i < nodeMapping.length; i++)
{
- String name = nodeMapping[i] != null ? nodeMapping[i].getNodeName() : "null";
- print("[" + name + "]");
+ String name = nodeMapping[i] != null ? nodeMapping[i].getNodeName() : "null"; //$NON-NLS-1$
+ print("[" + name + "]"); //$NON-NLS-1$ //$NON-NLS-2$
}
- println("");
+ println(""); //$NON-NLS-1$
}
else
{
- println("Validation Failed! ");
+ println("Validation Failed! "); //$NON-NLS-1$
if (result.errorMessage != null)
{
- println(" " + result.errorMessage);
+ println(" " + result.errorMessage); //$NON-NLS-1$
}
}
- println("-------------- end validate ---------------");
+ println("-------------- end validate ---------------"); //$NON-NLS-1$
}
else
{
- println("element [" + elementName + "] can not be found");
+ println("element [" + elementName + "] can not be found"); //$NON-NLS-1$ //$NON-NLS-2$
}
}
catch (Exception e)
{
- println("CMValidator error");
+ println("CMValidator error"); //$NON-NLS-1$
e.printStackTrace();
}
}
else
{
- println("2 args required... only " + arg.length + " provided");
- println("usage java org.eclipse.wst.newxml.util.XMLUtil grammarFileName rootElementName pattern");
+ println("2 args required... only " + arg.length + " provided"); //$NON-NLS-1$ //$NON-NLS-2$
+ println("usage java org.eclipse.wst.newxml.util.XMLUtil grammarFileName rootElementName pattern"); //$NON-NLS-1$
}
}
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/util/DOMValidator.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/util/DOMValidator.java
index f75bade..debdef82 100644
--- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/util/DOMValidator.java
+++ b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/util/DOMValidator.java
@@ -47,10 +47,10 @@
protected String getFallbackNamepaceURI(CMElementDeclaration ed)
{
String fallbackNamepaceURI = null;
- CMDocument cmDocument = (CMDocument)ed.getProperty("CMDocument");
+ CMDocument cmDocument = (CMDocument)ed.getProperty("CMDocument"); //$NON-NLS-1$
if (cmDocument != null)
{
- fallbackNamepaceURI = (String)cmDocument.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI");
+ fallbackNamepaceURI = (String)cmDocument.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI"); //$NON-NLS-1$
}
return fallbackNamepaceURI;
}
@@ -89,15 +89,15 @@
*/
public String createContentSpecification(Node node, boolean isNamespaceAware, String fallbackNamepaceURI)
{
- String result = "!";
+ String result = "!"; //$NON-NLS-1$
switch (node.getNodeType())
{
case Node.ELEMENT_NODE :
{
String nodeName = node.getNodeName();
- if (nodeName.startsWith("jsp:"))
+ if (nodeName.startsWith("jsp:")) //$NON-NLS-1$
{
- result = "!"; // treat it as a comment so that it's ignored by the validator
+ result = "!"; // treat it as a comment so that it's ignored by the validator //$NON-NLS-1$
}
else
{
@@ -107,11 +107,11 @@
String uri = getNamespaceURI(node);
if (uri != null)
{
- result = "[" + uri + "]" + result;
+ result = "[" + uri + "]" + result; //$NON-NLS-1$ //$NON-NLS-2$
}
else if (fallbackNamepaceURI != null)
{
- result = "[" + fallbackNamepaceURI + "]" + result;
+ result = "[" + fallbackNamepaceURI + "]" + result; //$NON-NLS-1$ //$NON-NLS-2$
}
}
else
@@ -124,17 +124,17 @@
}
case Node.PROCESSING_INSTRUCTION_NODE :
{
- result = "?";
+ result = "?"; //$NON-NLS-1$
break;
}
case Node.COMMENT_NODE :
{
- result = "!";
+ result = "!"; //$NON-NLS-1$
break;
}
case Node.CDATA_SECTION_NODE :
{
- result = "\"" + node.getNodeName() + "\"";
+ result = "\"" + node.getNodeName() + "\""; //$NON-NLS-1$ //$NON-NLS-2$
break;
}
case Node.TEXT_NODE :
@@ -143,11 +143,11 @@
// here we test to see if the test node is 'ignorable'
if (data != null && data.trim().length() > 0)
{
- result = "\"" + node.getNodeName() + "\"";
+ result = "\"" + node.getNodeName() + "\""; //$NON-NLS-1$ //$NON-NLS-2$
}
else
{
- result = "!"; // todo... use another symbol?
+ result = "!"; // todo... use another symbol? //$NON-NLS-1$
}
break;
}
@@ -171,7 +171,7 @@
}
case CMNode.DATA_TYPE :
{
- list.add("\"" + cmNode.getNodeName() + "\"");
+ list.add("\"" + cmNode.getNodeName() + "\""); //$NON-NLS-1$ //$NON-NLS-2$
break;
}
case CMNode.GROUP :
@@ -181,12 +181,12 @@
}
case CMNode.ANY_ELEMENT :
{
- list.add("*");
+ list.add("*"); //$NON-NLS-1$
break;
}
default :
{
- list.add("!");
+ list.add("!"); //$NON-NLS-1$
}
}
return list;
@@ -198,12 +198,12 @@
*/
protected String createContentSpecificationForCMElementDeclaration(CMElementDeclaration ed)
{
- CMDocument document = (CMDocument)ed.getProperty("CMDocument");
- String uri = document != null ? (String)document.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI") : null;
+ CMDocument document = (CMDocument)ed.getProperty("CMDocument"); //$NON-NLS-1$
+ String uri = document != null ? (String)document.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI") : null; //$NON-NLS-1$
String string = ed.getNodeName();
if (uri != null)
{
- string = "[" + uri + "]" + string;
+ string = "[" + uri + "]" + string; //$NON-NLS-1$ //$NON-NLS-2$
}
return string;
}
@@ -238,7 +238,7 @@
public void visitCMAnyElement(CMAnyElement anyElement)
{
- list.add("*");
+ list.add("*"); //$NON-NLS-1$
}
public void visitCMGroup(CMGroup group)
@@ -264,7 +264,7 @@
public boolean isNamespaceAware(CMElementDeclaration ed)
{
- return ed != null ? ed.getProperty("http://org.eclipse.wst/cm/properties/isNameSpaceAware") != null : false;
+ return ed != null ? ed.getProperty("http://org.eclipse.wst/cm/properties/isNameSpaceAware") != null : false; //$NON-NLS-1$
}
/**
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/util/FTable.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/util/FTable.java
index 2b87d74..fa7535e 100644
--- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/util/FTable.java
+++ b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/util/FTable.java
@@ -23,7 +23,7 @@
public class FTable
{
- public final static String START = "START";
+ public final static String START = "START"; //$NON-NLS-1$
protected Hashtable hashtable = new Hashtable();
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelquery/CMDocumentManager.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelquery/CMDocumentManager.java
index eaf9ab0..8c4a7b6 100644
--- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelquery/CMDocumentManager.java
+++ b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelquery/CMDocumentManager.java
@@ -40,7 +40,7 @@
* call addCMDocumentReference() to explicity trigger a load. This allows
* the client to control exactly when loading should take place. )
*/
- public static final String PROPERTY_AUTO_LOAD = "autoLoad";
+ public static final String PROPERTY_AUTO_LOAD = "autoLoad"; //$NON-NLS-1$
/**
* This property specifies HOW CMDocuments are loaded. When set to false,
@@ -51,12 +51,12 @@
* CMDocumentManager will inform its listeners that the CMDocument has
* been loaded.
*/
- public static final String PROPERTY_ASYNC_LOAD = "asyncLoad";
+ public static final String PROPERTY_ASYNC_LOAD = "asyncLoad"; //$NON-NLS-1$
/**
*
*/
- public static final String PROPERTY_USE_CACHED_RESOLVED_URI = "useCachedResovledURI";
+ public static final String PROPERTY_USE_CACHED_RESOLVED_URI = "useCachedResovledURI"; //$NON-NLS-1$
/**
* Set the enabled state of a property.
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/CMDocumentLoader.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/CMDocumentLoader.java
index a56cbe2..5b0ddb4 100644
--- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/CMDocumentLoader.java
+++ b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/CMDocumentLoader.java
@@ -63,7 +63,7 @@
if (doctypeInfo != null)
{
// load the doctype if required
- walkDocument = handleGrammar(doctypeInfo[0], doctypeInfo[1], "DTD");
+ walkDocument = handleGrammar(doctypeInfo[0], doctypeInfo[1], "DTD"); //$NON-NLS-1$
}
else
{
@@ -177,7 +177,7 @@
for (Iterator i = newNamespaceList.iterator(); i.hasNext(); )
{
NamespaceInfo info = (NamespaceInfo)i.next();
- handleGrammar(info.uri, info.locationHint, "XSD");
+ handleGrammar(info.uri, info.locationHint, "XSD"); //$NON-NLS-1$
}
}
}
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/CMDocumentManagerImpl.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/CMDocumentManagerImpl.java
index 9ed2598..77ac6eb 100644
--- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/CMDocumentManagerImpl.java
+++ b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/CMDocumentManagerImpl.java
@@ -21,6 +21,7 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.wst.xml.core.internal.XMLCoreMessages;
import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
import org.eclipse.wst.xml.core.internal.contentmodel.ContentModelManager;
import org.eclipse.wst.xml.core.internal.contentmodel.internal.annotation.AnnotationUtility;
@@ -59,7 +60,7 @@
public void setPropertyEnabled(String propertyName, boolean value)
{
- propertyTable.put(propertyName, value ? "true" : "false");
+ propertyTable.put(propertyName, value ? "true" : "false"); //$NON-NLS-1$ //$NON-NLS-2$
for (Iterator i = listenerList.iterator(); i.hasNext(); )
{
CMDocumentManagerListener listener = (CMDocumentManagerListener)i.next();
@@ -71,7 +72,7 @@
public boolean getPropertyEnabled(String propertyName)
{
Object object = propertyTable.get(propertyName);
- return object != null && object.equals("true");
+ return object != null && object.equals("true"); //$NON-NLS-1$
}
@@ -91,7 +92,7 @@
protected String lookupResolvedURI(String publicId)
{
- String key = publicId != null ? publicId : "";
+ String key = publicId != null ? publicId : ""; //$NON-NLS-1$
return (String)publicIdTable.get(key);
}
@@ -100,7 +101,7 @@
{
String resolvedURI = null;
- String key = publicId != null ? publicId : "";
+ String key = publicId != null ? publicId : ""; //$NON-NLS-1$
if (getPropertyEnabled(PROPERTY_USE_CACHED_RESOLVED_URI))
{
@@ -112,7 +113,7 @@
resolvedURI = cmDocumentReferenceProvider.resolveGrammarURI(publicId, systemId);
if (resolvedURI == null)
{
- resolvedURI = "";
+ resolvedURI = ""; //$NON-NLS-1$
}
publicIdTable.put(key, resolvedURI);
}
@@ -196,7 +197,7 @@
public void addCMDocument(String publicId, String systemId, String resolvedURI, String type, CMDocument cmDocument)
{
- String key = publicId != null ? publicId : "";
+ String key = publicId != null ? publicId : ""; //$NON-NLS-1$
publicIdTable.put(key, resolvedURI);
cmDocumentCache.putCMDocument(resolvedURI, cmDocument);
}
@@ -212,7 +213,7 @@
cmDocumentCache.setStatus(resolvedURI, CMDocumentCache.STATUS_LOADING);
//Thread thread = new Thread(new AsyncBuildOperation(publicId, resolvedURI, type));
//thread.start();
- Job job = new Job("loading " + resolvedURI)
+ Job job = new Job(XMLCoreMessages.loading + resolvedURI)
{
public boolean belongsTo(Object family)
{
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/CMDocumentReferenceImpl.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/CMDocumentReferenceImpl.java
index 303ca4f..10b9de2 100644
--- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/CMDocumentReferenceImpl.java
+++ b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/CMDocumentReferenceImpl.java
@@ -37,6 +37,6 @@
public String toString()
{
- return "[" + publicId + ", " + systemId + "]";
+ return "[" + publicId + ", " + systemId + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
}
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/InferredGrammarBuildingCMDocumentLoader.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/InferredGrammarBuildingCMDocumentLoader.java
index 8f1b2fd..29d93f3 100644
--- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/InferredGrammarBuildingCMDocumentLoader.java
+++ b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/InferredGrammarBuildingCMDocumentLoader.java
@@ -66,9 +66,9 @@
if (inferredCMDocument == null)
{
- String cacheKey = "inferred-document";
- inferredCMDocument = inferredGrammarFactory.createCMDocument("");
- cmDocumentManager.addCMDocument("", "", cacheKey, "DTD", inferredCMDocument);
+ String cacheKey = "inferred-document"; //$NON-NLS-1$
+ inferredCMDocument = inferredGrammarFactory.createCMDocument(""); //$NON-NLS-1$
+ cmDocumentManager.addCMDocument("", "", cacheKey, "DTD", inferredCMDocument); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
createdCMDocumentTable.put(cacheKey, inferredCMDocument);
}
@@ -108,8 +108,8 @@
{
// when this is the root element
// we need to add an implied "no namespace schema location"
- uri = "ommitted-namespace";
- namespaceTable.addNamespaceInfo(prefix, uri, "");
+ uri = "ommitted-namespace"; //$NON-NLS-1$
+ namespaceTable.addNamespaceInfo(prefix, uri, ""); //$NON-NLS-1$
}
// here's where we update the inferred grammar if required
@@ -129,7 +129,7 @@
{
if (uri == null)
{
- uri = "ommitted-namespace";
+ uri = "ommitted-namespace"; //$NON-NLS-1$
}
}
}
@@ -145,7 +145,7 @@
{
boolean createCMDocument = false;
- String cacheKey = "inferred-document" + uri;
+ String cacheKey = "inferred-document" + uri; //$NON-NLS-1$
inferredCMDocument = (CMDocument)createdCMDocumentTable.get(cacheKey);
if (inferredCMDocument == null)
@@ -164,7 +164,7 @@
{
//System.out.println("encountered element {" + element.getNodeName() + "} ... creating inferred CMDocument for " + uri);
inferredCMDocument = inferredGrammarFactory.createCMDocument(uri);
- cmDocumentManager.addCMDocument(uri, "", cacheKey, "XSD", inferredCMDocument);
+ cmDocumentManager.addCMDocument(uri, "", cacheKey, "XSD", inferredCMDocument); //$NON-NLS-1$ //$NON-NLS-2$
createdCMDocumentTable.put(cacheKey, inferredCMDocument);
}
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/ModelQueryActionHelper.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/ModelQueryActionHelper.java
index 69c21c7..c813dac 100644
--- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/ModelQueryActionHelper.java
+++ b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/ModelQueryActionHelper.java
@@ -332,8 +332,8 @@
CMNode childOrigin= modelQuery.getOrigin(childElement);
CMNodeList cmNodeList = childOrigin != null ?
- (CMNodeList)childOrigin.getProperty("SubstitutionGroup") :
- (CMNodeList)childEd.getProperty("SubstitutionGroup");
+ (CMNodeList)childOrigin.getProperty("SubstitutionGroup") : //$NON-NLS-1$
+ (CMNodeList)childEd.getProperty("SubstitutionGroup"); //$NON-NLS-1$
if (cmNodeList != null && cmNodeList.getLength() > 1)
{
@@ -342,7 +342,7 @@
for (int i = 0; i < cmNodeList.getLength(); i++)
{
CMNode substitution = cmNodeList.item(i);
- if (!substitution.getNodeName().equals(childEdName) && !Boolean.TRUE.equals(substitution.getProperty("Abstract")))
+ if (!substitution.getNodeName().equals(childEdName) && !Boolean.TRUE.equals(substitution.getProperty("Abstract"))) //$NON-NLS-1$
{
Action action = new Action(ModelQueryAction.REPLACE, parent, cmNodeList.item(i), replaceIndex, replaceIndex);
actionList.add(action);
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/ModelQueryImpl.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/ModelQueryImpl.java
index fd32787..6b3aeb3 100644
--- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/ModelQueryImpl.java
+++ b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/ModelQueryImpl.java
@@ -147,26 +147,26 @@
//
if (uri == null)
{
- uri = "##any";
+ uri = "##any"; //$NON-NLS-1$
}
- if (uri.equals("##targetNamespace"))
+ if (uri.equals("##targetNamespace")) //$NON-NLS-1$
{
- CMDocument cmDocument = (CMDocument)ed.getProperty("CMDocument");
+ CMDocument cmDocument = (CMDocument)ed.getProperty("CMDocument"); //$NON-NLS-1$
if (cmDocument != null)
{
result.add(cmDocument);
}
}
- else if (uri.equals("##any") || uri.equals("##other"))
+ else if (uri.equals("##any") || uri.equals("##other")) //$NON-NLS-1$ //$NON-NLS-2$
{
String excludedURI = null;
- if (uri.equals("##other"))
+ if (uri.equals("##other")) //$NON-NLS-1$
{
- CMDocument cmDocument = (CMDocument)ed.getProperty("CMDocument");
+ CMDocument cmDocument = (CMDocument)ed.getProperty("CMDocument"); //$NON-NLS-1$
if (cmDocument != null)
{
- excludedURI = (String)cmDocument.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI");
+ excludedURI = (String)cmDocument.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI"); //$NON-NLS-1$
}
}
@@ -180,7 +180,7 @@
NamespaceInfo info = (NamespaceInfo)i.next();
if (info.uri != null && !info.uri.equals(excludedURI))
{
- CMDocument document = xmlAssociationProvider.getCMDocument(info.uri, info.locationHint, "XSD");
+ CMDocument document = xmlAssociationProvider.getCMDocument(info.uri, info.locationHint, "XSD"); //$NON-NLS-1$
if (document != null)
{
result.add(document);
@@ -621,13 +621,13 @@
protected String getKey(CMNode cmNode)
{
String key = cmNode.getNodeName();
- CMDocument cmDocument = (CMDocument)cmNode.getProperty("CMDocument");
+ CMDocument cmDocument = (CMDocument)cmNode.getProperty("CMDocument"); //$NON-NLS-1$
if (cmDocument != null)
{
- String namespaceURI = (String)cmDocument.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI");
+ String namespaceURI = (String)cmDocument.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI"); //$NON-NLS-1$
if (namespaceURI != null)
{
- key = "[" + namespaceURI + "]" + key;
+ key = "[" + namespaceURI + "]" + key; //$NON-NLS-1$ //$NON-NLS-2$
}
}
return key;
@@ -644,7 +644,7 @@
if ((includeOptions & INCLUDE_ATTRIBUTES) != 0)
{
v.addAll(attributeTable.values());
- CMAttributeDeclaration nillableAttribute = (CMAttributeDeclaration)rootElementDeclaration.getProperty("http://org.eclipse.wst/cm/properties/nillable");
+ CMAttributeDeclaration nillableAttribute = (CMAttributeDeclaration)rootElementDeclaration.getProperty("http://org.eclipse.wst/cm/properties/nillable"); //$NON-NLS-1$
if (nillableAttribute != null)
{
v.add(nillableAttribute);
@@ -660,7 +660,7 @@
}
else if (contentType == CMElementDeclaration.ANY)
{
- CMDocument cmDocument = (CMDocument)rootElementDeclaration.getProperty("CMDocument");
+ CMDocument cmDocument = (CMDocument)rootElementDeclaration.getProperty("CMDocument"); //$NON-NLS-1$
if (cmDocument != null)
{
CMNamedNodeMap elements = cmDocument.getElements();
@@ -721,12 +721,12 @@
}
else
{
- if (!Boolean.TRUE.equals(ed.getProperty("Abstract")))
+ if (!Boolean.TRUE.equals(ed.getProperty("Abstract"))) //$NON-NLS-1$
{
childNodeTable.put(getKey(ed), ed);
}
- CMNodeList substitutionGroup = (CMNodeList)ed.getProperty("SubstitutionGroup");
+ CMNodeList substitutionGroup = (CMNodeList)ed.getProperty("SubstitutionGroup"); //$NON-NLS-1$
if (substitutionGroup != null)
{
handleSubstitutionGroup(substitutionGroup);
@@ -742,7 +742,7 @@
for (int i = 0; i < substitutionGroupLength; i++)
{
CMNode ed = substitutionGroup.item(i);
- if (!Boolean.TRUE.equals(ed.getProperty("Abstract")))
+ if (!Boolean.TRUE.equals(ed.getProperty("Abstract"))) //$NON-NLS-1$
{
childNodeTable.put(getKey(ed), ed);
}
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/XMLAssociationProvider.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/XMLAssociationProvider.java
index 53de3da..bd0c42b 100644
--- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/XMLAssociationProvider.java
+++ b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/XMLAssociationProvider.java
@@ -104,7 +104,7 @@
if (doctypeInfo != null)
{
- result = getCMDocument(doctypeInfo[0], doctypeInfo[1], "DTD");
+ result = getCMDocument(doctypeInfo[0], doctypeInfo[1], "DTD"); //$NON-NLS-1$
}
// defect 211236 ... in some cases calling this method can result in a cycle
// we use the getDocumentFromCMNode as a flag to avoid this
@@ -116,7 +116,7 @@
{
// todo... add a getCMDocument() methods to CMNode
// for now use the getProperty interface
- result = (CMDocument)cmNode.getProperty("CMDocument");
+ result = (CMDocument)cmNode.getProperty("CMDocument"); //$NON-NLS-1$
}
}
}
@@ -136,7 +136,7 @@
NamespaceInfo namespaceInfo = namespaceTable.getNamespaceInfoForURI(uri);
if (namespaceInfo != null)
{
- result = getCMDocument(namespaceInfo.uri, namespaceInfo.locationHint, "XSD");
+ result = getCMDocument(namespaceInfo.uri, namespaceInfo.locationHint, "XSD"); //$NON-NLS-1$
}
return result;
}
@@ -216,7 +216,7 @@
else
{
// we assume that this is an inferred CMDocument for a DTD style 'namespaceless' document
- CMDocument cmDocument = getCMDocument("", "", "DTD");
+ CMDocument cmDocument = getCMDocument("", "", "DTD"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
if (cmDocument != null)
{
result = (CMElementDeclaration)cmDocument.getElements().getNamedItem(element.getNodeName());
@@ -260,7 +260,7 @@
NamespaceInfo namespaceInfo = namespaceTable.getNamespaceInfoForPrefix(prefix);
if (namespaceInfo != null)
{
- CMDocument cmDocument = getCMDocument(namespaceInfo.uri, namespaceInfo.locationHint, "XSD");
+ CMDocument cmDocument = getCMDocument(namespaceInfo.uri, namespaceInfo.locationHint, "XSD"); //$NON-NLS-1$
if (cmDocument != null)
{
ed = (CMElementDeclaration)cmDocument.getElements().getNamedItem(unprefixedName);
@@ -292,10 +292,10 @@
protected CMElementDeclaration getDerivedCMElementDeclaration(Element element, CMElementDeclaration ed, NamespaceTable namespaceTable)
{
CMElementDeclaration result = null;
- String xsiPrefix = namespaceTable.getPrefixForURI("http://www.w3.org/2001/XMLSchema-instance");
+ String xsiPrefix = namespaceTable.getPrefixForURI("http://www.w3.org/2001/XMLSchema-instance"); //$NON-NLS-1$
if (xsiPrefix != null)
{
- String xsiTypeValue = element.getAttribute(xsiPrefix + ":type");
+ String xsiTypeValue = element.getAttribute(xsiPrefix + ":type"); //$NON-NLS-1$
if (xsiTypeValue != null)
{
String typePrefix = DOMNamespaceHelper.getPrefix(xsiTypeValue);
@@ -304,9 +304,9 @@
String uriQualifiedTypeName = typeName;
if (typeURI != null && typeURI.length() > 0)
{
- uriQualifiedTypeName = "[" + typeURI + "]" + typeName;
+ uriQualifiedTypeName = "[" + typeURI + "]" + typeName; //$NON-NLS-1$ //$NON-NLS-2$
}
- result = (CMElementDeclaration)ed.getProperty("DerivedElementDeclaration=" + uriQualifiedTypeName);
+ result = (CMElementDeclaration)ed.getProperty("DerivedElementDeclaration=" + uriQualifiedTypeName); //$NON-NLS-1$
}
}
return result;
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/CMDescriptionBuilder.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/CMDescriptionBuilder.java
index 18e651d..b55003a 100644
--- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/CMDescriptionBuilder.java
+++ b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/CMDescriptionBuilder.java
@@ -39,12 +39,12 @@
public void visitCMAnyElement(CMAnyElement anyElement)
{
- sb.append("namespace:uri=\"" + anyElement.getNamespaceURI() + "\"");
+ sb.append("namespace:uri=\"" + anyElement.getNamespaceURI() + "\""); //$NON-NLS-1$ //$NON-NLS-2$
}
public void visitCMDataType(CMDataType dataType)
{
- sb.append("#PCDATA");
+ sb.append("#PCDATA"); //$NON-NLS-1$
}
public void visitCMDocument(CMDocument document)
@@ -62,16 +62,16 @@
int op = group.getOperator();
if (op == CMGroup.ALL)
{
- sb.append("all");
+ sb.append("all"); //$NON-NLS-1$
}
- sb.append("(");
+ sb.append("("); //$NON-NLS-1$
- String separator = ", ";
+ String separator = ", "; //$NON-NLS-1$
if (op == CMGroup.CHOICE)
{
- separator = " | ";
+ separator = " | "; //$NON-NLS-1$
}
CMNodeList nodeList = group.getChildNodes();
@@ -84,7 +84,7 @@
sb.append(separator);
}
}
- sb.append(")");
+ sb.append(")"); //$NON-NLS-1$
addOccurenceSymbol(group);
}
@@ -98,9 +98,9 @@
{
if (content.getNodeType() != CMNode.GROUP)
{
- sb.append("(");
+ sb.append("("); //$NON-NLS-1$
visitCMNode(content);
- sb.append(")");
+ sb.append(")"); //$NON-NLS-1$
}
else
{
@@ -123,16 +123,16 @@
{
if (max > 1 || max == -1)
{
- sb.append("*");
+ sb.append("*"); //$NON-NLS-1$
}
else
{
- sb.append("?");
+ sb.append("?"); //$NON-NLS-1$
}
}
else if (max > 1 || max == -1)
{
- sb.append("+");
+ sb.append("+"); //$NON-NLS-1$
}
}
}
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/DOMContentBuilder.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/DOMContentBuilder.java
index e86ff9e..8b6dda7 100644
--- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/DOMContentBuilder.java
+++ b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/DOMContentBuilder.java
@@ -39,7 +39,7 @@
| BUILD_FIRST_CHOICE
| BUILD_TEXT_NODES;
- public static final String PROPERTY_BUILD_BLANK_TEXT_NODES = "buildBlankTextNodes";
+ public static final String PROPERTY_BUILD_BLANK_TEXT_NODES = "buildBlankTextNodes"; //$NON-NLS-1$
public void setBuildPolicy(int buildPolicy);
public int getBuildPolicy();
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/DOMContentBuilderImpl.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/DOMContentBuilderImpl.java
index 58870cd..16fdf77 100644
--- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/DOMContentBuilderImpl.java
+++ b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/DOMContentBuilderImpl.java
@@ -163,19 +163,19 @@
String grammarFileName = cmDocument.getNodeName();
if (!uglyTempHack)
{
- String piValue = "version=\"1.0\"";
- String[] encodingInfo = (String[])cmDocument.getProperty("encodingInfo");
+ String piValue = "version=\"1.0\""; //$NON-NLS-1$
+ String[] encodingInfo = (String[])cmDocument.getProperty("encodingInfo"); //$NON-NLS-1$
String encoding = encodingInfo != null ? encodingInfo[1] : null;
if (encoding != null)
{
- piValue += " encoding=\"" + encoding + "\"";
+ piValue += " encoding=\"" + encoding + "\""; //$NON-NLS-1$ //$NON-NLS-2$
}
- ProcessingInstruction pi = document.createProcessingInstruction("xml", piValue);
+ ProcessingInstruction pi = document.createProcessingInstruction("xml", piValue); //$NON-NLS-1$
document.appendChild(pi);
// if we have a 'dtd' then add a DOCTYPE tag
//
- if (grammarFileName != null && grammarFileName.endsWith("dtd"))
+ if (grammarFileName != null && grammarFileName.endsWith("dtd")) //$NON-NLS-1$
{
DOMImplementation domImpl = document.getImplementation();
DocumentType documentType = domImpl.createDocumentType(rootCMElementDeclaration.getElementName(), grammarFileName, grammarFileName);
@@ -185,7 +185,7 @@
// if we have a schema add an xsi:schemaLocation attribute
//
- if (grammarFileName != null && grammarFileName.endsWith("xsd") && namespaceInfoList != null)
+ if (grammarFileName != null && grammarFileName.endsWith("xsd") && namespaceInfoList != null) //$NON-NLS-1$
{
DOMNamespaceInfoManager manager = new DOMNamespaceInfoManager();
String name = rootCMElementDeclaration.getNodeName();
@@ -194,7 +194,7 @@
NamespaceInfo info = (NamespaceInfo)namespaceInfoList.get(0);
if (info.prefix != null && info.prefix.length() > 0)
{
- name = info.prefix + ":" + name;
+ name = info.prefix + ":" + name; //$NON-NLS-1$
}
}
rootElement = createElement(rootCMElementDeclaration, name, document);
@@ -362,7 +362,7 @@
// Previous code uses a property value but new one uses
// buildPolicy.
if (getProperty(PROPERTY_BUILD_BLANK_TEXT_NODES) != null
- && getProperty(PROPERTY_BUILD_BLANK_TEXT_NODES).equals("true"))
+ && getProperty(PROPERTY_BUILD_BLANK_TEXT_NODES).equals("true")) //$NON-NLS-1$
buildPolicy = buildPolicy ^ BUILD_TEXT_NODES;
if (buildTextNodes(buildPolicy))
@@ -376,13 +376,13 @@
}
else
{
- value = "pcdata";
+ value = "pcdata"; //$NON-NLS-1$
}
}
}
else
{
- value = "";
+ value = ""; //$NON-NLS-1$
}
text = createTextNode(dataType, value, currentParent);
linkNode(text);
@@ -422,7 +422,7 @@
if (listSize > 0)
{
CMElementDeclaration ed = (CMElementDeclaration)visitedCMElementDeclarationList.get(listSize - 1);
- Object contentHint = ed.getProperty("contentHint");
+ Object contentHint = ed.getProperty("contentHint"); //$NON-NLS-1$
if (contentHint instanceof CMNode)
{
hintNode = (CMNode)contentHint;
@@ -485,7 +485,7 @@
String name = computeName(ad, currentParent);
String value = valueHelper.getValue(ad, namespaceTable);
Attr attr = createAttribute(ad, name, currentParent);
- attr.setValue(value != null ? value : "");
+ attr.setValue(value != null ? value : ""); //$NON-NLS-1$
linkNode(attr);
}
}
@@ -495,7 +495,7 @@
boolean result = false;
if (ed != null)
{
- Object value = ed.getProperty("Abstract");
+ Object value = ed.getProperty("Abstract"); //$NON-NLS-1$
result = (value == Boolean.TRUE);
}
return result;
@@ -504,7 +504,7 @@
protected CMElementDeclaration getSubstitution(CMElementDeclaration ed)
{
CMElementDeclaration result = ed;
- CMNodeList l = (CMNodeList)ed.getProperty("SubstitutionGroup");
+ CMNodeList l = (CMNodeList)ed.getProperty("SubstitutionGroup"); //$NON-NLS-1$
if (l != null)
{
for (int i=0; i < l.getLength(); i++)
@@ -540,21 +540,21 @@
alwaysVisit = false;
String uri = anyElement.getNamespaceURI();
- String targetNSProperty = "http://org.eclipse.wst/cm/properties/targetNamespaceURI";
- CMDocument parentCMDocument = (CMDocument)anyElement.getProperty("CMDocument");
+ String targetNSProperty = "http://org.eclipse.wst/cm/properties/targetNamespaceURI"; //$NON-NLS-1$
+ CMDocument parentCMDocument = (CMDocument)anyElement.getProperty("CMDocument"); //$NON-NLS-1$
CMElementDeclaration ed = null;
- System.out.println("parentCMDocument = " + parentCMDocument);
+ System.out.println("parentCMDocument = " + parentCMDocument); //$NON-NLS-1$
if (parentCMDocument != null)
{
- if (uri == null || uri.startsWith("##") || uri.equals(parentCMDocument.getProperty(targetNSProperty)))
+ if (uri == null || uri.startsWith("##") || uri.equals(parentCMDocument.getProperty(targetNSProperty))) //$NON-NLS-1$
{
ed = getSuitableElement(getParentCMElementDeclaration(), parentCMDocument);
}
}
- if (ed == null && externalCMDocumentSupport != null && uri != null && !uri.startsWith("##") && currentParent instanceof Element)
+ if (ed == null && externalCMDocumentSupport != null && uri != null && !uri.startsWith("##") && currentParent instanceof Element) //$NON-NLS-1$
{
CMDocument externalCMDocument = externalCMDocumentSupport.getCMDocument((Element)currentParent, uri);
if (externalCMDocument != null)
@@ -571,7 +571,7 @@
}
else
{
- Element element = document.createElement("ANY-ELEMENT");
+ Element element = document.createElement("ANY-ELEMENT"); //$NON-NLS-1$
linkNode(element);
}
}
@@ -643,7 +643,7 @@
contentBuilder.createDefaultRootContent(cmDocument, element);
System.out.println();
- System.out.println("-----------------------------");
+ System.out.println("-----------------------------"); //$NON-NLS-1$
DOMWriter writer = new DOMWriter();
if (hack)
{
@@ -653,11 +653,11 @@
{
writer.print(document);
}
- System.out.println("-----------------------------");
+ System.out.println("-----------------------------"); //$NON-NLS-1$
}
catch (Exception e)
{
- System.out.println("Error: " + e);
+ System.out.println("Error: " + e); //$NON-NLS-1$
e.printStackTrace();
}
}
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/DOMNamespaceHelper.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/DOMNamespaceHelper.java
index 275f059..2bc784f 100644
--- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/DOMNamespaceHelper.java
+++ b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/DOMNamespaceHelper.java
@@ -28,11 +28,11 @@
String nsAttrName = null;
if (prefix != null && prefix.length() > 0)
{
- nsAttrName = "xmlns:" + prefix;
+ nsAttrName = "xmlns:" + prefix; //$NON-NLS-1$
}
else
{
- nsAttrName = "xmlns";
+ nsAttrName = "xmlns"; //$NON-NLS-1$
}
// assume the node is qualified... look up the URI base on the prefix
@@ -105,7 +105,7 @@
public static String getPrefix(String name)
{
String prefix = null;
- int index = name.indexOf(":");
+ int index = name.indexOf(":"); //$NON-NLS-1$
if (index != -1)
{
prefix = name.substring(0, index);
@@ -116,7 +116,7 @@
public static String getUnprefixedName(String name)
{
- int index = name.indexOf(":");
+ int index = name.indexOf(":"); //$NON-NLS-1$
if (index != -1)
{
name = name.substring(index + 1);
@@ -139,19 +139,19 @@
//
if (getPrefix(result) == null)
{
- String qualification = (String)cmNode.getProperty("http://org.eclipse.wst/cm/properties/nsPrefixQualification");
+ String qualification = (String)cmNode.getProperty("http://org.eclipse.wst/cm/properties/nsPrefixQualification"); //$NON-NLS-1$
// see if we need a namespace prefix
//
- if (qualification != null && qualification.equals("qualified"))
+ if (qualification != null && qualification.equals("qualified")) //$NON-NLS-1$
{
if (prefix == null)
{
// todo... add getCMDocument() method to CMNode
// for now use this getProperty() hack
- CMDocument cmDocument = (CMDocument)cmNode.getProperty("CMDocument");
+ CMDocument cmDocument = (CMDocument)cmNode.getProperty("CMDocument"); //$NON-NLS-1$
if (cmDocument != null)
{
- String namespaceURI = (String)cmDocument.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI");
+ String namespaceURI = (String)cmDocument.getProperty("http://org.eclipse.wst/cm/properties/targetNamespaceURI"); //$NON-NLS-1$
if (namespaceURI != null)
{
// use the NamespaceTable to figure out the correct prefix for this namespace uri
@@ -171,7 +171,7 @@
}
if (prefix != null && prefix.length() > 0)
{
- result = prefix + ":" + result;
+ result = prefix + ":" + result; //$NON-NLS-1$
}
}
}
@@ -182,8 +182,8 @@
public static String[] getURIQualifiedNameComponents(String uriQualifiedName)
{
String[] result = new String[2];
- int firstIndex = uriQualifiedName.indexOf("[");
- int lastIndex = uriQualifiedName.indexOf("]");
+ int firstIndex = uriQualifiedName.indexOf("["); //$NON-NLS-1$
+ int lastIndex = uriQualifiedName.indexOf("]"); //$NON-NLS-1$
if (firstIndex != -1 && lastIndex > firstIndex)
{
result[0] = uriQualifiedName.substring(firstIndex + 1, lastIndex);
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/DOMNamespaceInfoManager.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/DOMNamespaceInfoManager.java
index e7e5dab..e16579c 100644
--- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/DOMNamespaceInfoManager.java
+++ b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/DOMNamespaceInfoManager.java
@@ -28,7 +28,7 @@
*/
public class DOMNamespaceInfoManager
{
- public static final String XSI_URI = "http://www.w3.org/2001/XMLSchema-instance";
+ public static final String XSI_URI = "http://www.w3.org/2001/XMLSchema-instance"; //$NON-NLS-1$
public DOMNamespaceInfoManager()
{
@@ -52,7 +52,7 @@
//
Document document = element.getOwnerDocument();
- String schemaLocationValue = "";
+ String schemaLocationValue = ""; //$NON-NLS-1$
for (Iterator iterator = namespaceInfoList.iterator(); iterator.hasNext(); )
{
@@ -61,7 +61,7 @@
if (nsInfo.uri != null)
{
- String attrName = nsInfo.prefix != null ? "xmlns:" + nsInfo.prefix : "xmlns";
+ String attrName = nsInfo.prefix != null ? "xmlns:" + nsInfo.prefix : "xmlns"; //$NON-NLS-1$ //$NON-NLS-2$
Attr namespaceAttr = document.createAttribute(attrName);
namespaceAttr.setValue(nsInfo.uri);
element.setAttributeNode(namespaceAttr);
@@ -72,9 +72,9 @@
if (nsInfo.locationHint != null)
{
schemaLocationValue += nsInfo.uri;
- schemaLocationValue += " ";
+ schemaLocationValue += " "; //$NON-NLS-1$
schemaLocationValue += nsInfo.locationHint;
- schemaLocationValue += " ";
+ schemaLocationValue += " "; //$NON-NLS-1$
}
if (nsInfo.uri.equals(XSI_URI))
@@ -86,7 +86,7 @@
{
// in this case we use the attribute "xsi:noNamespaceSchemaLocation"
//
- Attr attr = document.createAttribute("xsi:noNamespaceSchemaLocation");
+ Attr attr = document.createAttribute("xsi:noNamespaceSchemaLocation"); //$NON-NLS-1$
attr.setValue(nsInfo.locationHint);
element.setAttributeNode(attr);
}
@@ -96,7 +96,7 @@
{
// we add an xmlns:xsi attribute to define 'xsi:schemaLocation' attribute
//
- Attr attr = document.createAttribute("xmlns:xsi");
+ Attr attr = document.createAttribute("xmlns:xsi"); //$NON-NLS-1$
attr.setValue(XSI_URI);
element.setAttributeNode(attr);
}
@@ -105,7 +105,7 @@
{
// create the "xsi:schemaLocation" attribute
//
- Attr attr = document.createAttribute("xsi:schemaLocation");
+ Attr attr = document.createAttribute("xsi:schemaLocation"); //$NON-NLS-1$
attr.setValue(schemaLocationValue);
element.setAttributeNode(attr);
}
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/DOMWriter.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/DOMWriter.java
index a6ffc7e..03aca74 100644
--- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/DOMWriter.java
+++ b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/DOMWriter.java
@@ -135,7 +135,7 @@
if (outputDoctypeEnabled)
{
String data = getDocumentTypeData(doctype);
- print("<!DOCTYPE " + data + ">");
+ print("<!DOCTYPE " + data + ">"); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -148,7 +148,7 @@
currentElementHasChildElements = hasChildElements(element);
printIndent();
- print("<");
+ print("<"); //$NON-NLS-1$
print(element.getNodeName());
visitAttributesHelper(element);
@@ -158,11 +158,11 @@
{
if (currentElementHasChildElements || isRootElement)
{
- println(">");
+ println(">"); //$NON-NLS-1$
}
else
{
- print(">");
+ print(">"); //$NON-NLS-1$
}
indent += 2;
visitChildNodesHelper(element);
@@ -172,13 +172,13 @@
{
printIndent();
}
- print("</");
+ print("</"); //$NON-NLS-1$
print(element.getNodeName());
- println(">");
+ println(">"); //$NON-NLS-1$
}
else
{
- println("/>");
+ println("/>"); //$NON-NLS-1$
}
currentElementHasChildElements = parentElementHasChildNodes;
@@ -186,11 +186,11 @@
public void visitAttr(Attr attr)
{
- print(" ");
+ print(" "); //$NON-NLS-1$
print(attr.getNodeName());
- print("=\"");
+ print("=\""); //$NON-NLS-1$
print(createPrintableCharacterData(attr.getValue()));
- print("\"");
+ print("\""); //$NON-NLS-1$
}
public void visitText(Text text)
@@ -214,19 +214,19 @@
public void visitComment(Comment comment)
{
printIndent();
- print("<!--");
+ print("<!--"); //$NON-NLS-1$
print(comment.getNodeValue());
- println("-->");
+ println("-->"); //$NON-NLS-1$
}
public void visitProcessingInstruction(ProcessingInstruction pi)
{
printIndent();
- print("<?");
+ print("<?"); //$NON-NLS-1$
print(pi.getNodeName());
- print(" ");
+ print(" "); //$NON-NLS-1$
print(pi.getNodeValue());
- println("?>");
+ println("?>"); //$NON-NLS-1$
}
@@ -277,15 +277,15 @@
*/
protected String createPrintableCharacterData(String string)
{
- String result = "";
+ String result = ""; //$NON-NLS-1$
int index = 0;
while (true)
{
- int ampersandIndex = string.indexOf("&", index);
+ int ampersandIndex = string.indexOf("&", index); //$NON-NLS-1$
if (ampersandIndex != -1)
{
result += string.substring(index, ampersandIndex);
- result += "&";
+ result += "&"; //$NON-NLS-1$
index = ampersandIndex + 1;
}
else
@@ -314,38 +314,38 @@
public void print(Document document, String grammarURL)
{
String systemId = null;
- if (grammarURL.endsWith("dtd"))
+ if (grammarURL.endsWith("dtd")) //$NON-NLS-1$
{
- int lastSlashIndex = Math.max(grammarURL.lastIndexOf("/"), grammarURL.lastIndexOf("\\"));
+ int lastSlashIndex = Math.max(grammarURL.lastIndexOf("/"), grammarURL.lastIndexOf("\\")); //$NON-NLS-1$ //$NON-NLS-2$
if (lastSlashIndex != -1)
{
systemId = grammarURL.substring(lastSlashIndex + 1);
}
}
- print(document, "UTF-8", grammarURL, null, systemId);
+ print(document, "UTF-8", grammarURL, null, systemId); //$NON-NLS-1$
}
/** a temporary hack to workaround our inability to create a DocumentType tag*/
public void print(Document document, String encoding, String grammarFileName, String publicId, String systemId)
{
- out.println("<?xml version=\"1.0\"" + " encoding=\"" + encoding + "\"?>");
- if (grammarFileName.endsWith(".dtd"))
+ out.println("<?xml version=\"1.0\"" + " encoding=\"" + encoding + "\"?>"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ if (grammarFileName.endsWith(".dtd")) //$NON-NLS-1$
{
- String docTypeLine = "<!DOCTYPE " + document.getDocumentElement().getNodeName() + " ";
+ String docTypeLine = "<!DOCTYPE " + document.getDocumentElement().getNodeName() + " "; //$NON-NLS-1$ //$NON-NLS-2$
if (publicId != null)
{
- docTypeLine += "PUBLIC \"" + publicId + "\" ";
+ docTypeLine += "PUBLIC \"" + publicId + "\" "; //$NON-NLS-1$ //$NON-NLS-2$
if (systemId != null)
{
- docTypeLine += "\"" + systemId + "\" ";
+ docTypeLine += "\"" + systemId + "\" "; //$NON-NLS-1$ //$NON-NLS-2$
}
- docTypeLine += ">";
+ docTypeLine += ">"; //$NON-NLS-1$
out.println(docTypeLine);
}
else if (systemId != null)
{
- docTypeLine += "SYSTEM \"" + systemId + "\" >";
+ docTypeLine += "SYSTEM \"" + systemId + "\" >"; //$NON-NLS-1$ //$NON-NLS-2$
out.println(docTypeLine);
}
}
@@ -357,17 +357,17 @@
String data = doctype.getName();
if (doctype.getPublicId() != null)
{
- data += " PUBLIC \"" + doctype.getPublicId() + "\"";
+ data += " PUBLIC \"" + doctype.getPublicId() + "\""; //$NON-NLS-1$ //$NON-NLS-2$
String systemId = doctype.getSystemId();
if (systemId == null)
{
- systemId = "";
+ systemId = ""; //$NON-NLS-1$
}
- data += " \"" + systemId + "\"";
+ data += " \"" + systemId + "\""; //$NON-NLS-1$ //$NON-NLS-2$
}
else
{
- data += " SYSTEM \"" + doctype.getSystemId() + "\"";
+ data += " SYSTEM \"" + doctype.getSystemId() + "\""; //$NON-NLS-1$ //$NON-NLS-2$
}
return data;
}
@@ -398,7 +398,7 @@
{
for (int i = 0; i < indent; i++)
{
- out.print(" ");
+ out.print(" "); //$NON-NLS-1$
}
}
}
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/NamespaceAttributeVisitor.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/NamespaceAttributeVisitor.java
index 51580c2..f14a5b7 100644
--- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/NamespaceAttributeVisitor.java
+++ b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/NamespaceAttributeVisitor.java
@@ -21,8 +21,8 @@
public class NamespaceAttributeVisitor
{
- public static final String XML_SCHEMA_INSTANCE_URI = "http://www.w3.org/2001/XMLSchema-instance";
- public String xsiPrefix = "xsi";
+ public static final String XML_SCHEMA_INSTANCE_URI = "http://www.w3.org/2001/XMLSchema-instance"; //$NON-NLS-1$
+ public String xsiPrefix = "xsi"; //$NON-NLS-1$
public void visitXMLNamespaceAttribute(Attr attr, String namespacePrefix, String namespaceURI)
{
@@ -69,24 +69,24 @@
String unprefixedName = DOMNamespaceHelper.getUnprefixedName(attr.getName());
if (prefix != null && unprefixedName != null)
{
- if (prefix.equals("xmlns"))
+ if (prefix.equals("xmlns")) //$NON-NLS-1$
{
visitXMLNamespaceAttribute(attr, unprefixedName, attr.getValue());
}
- else if (prefix.equals(xsiPrefix) && unprefixedName.equals("schemaLocation"))
+ else if (prefix.equals(xsiPrefix) && unprefixedName.equals("schemaLocation")) //$NON-NLS-1$
{
visitXSISchemaLocationAttribute(attr, attr.getValue());
}
- else if (prefix.equals(xsiPrefix) && unprefixedName.equals("noNamespaceSchemaLocation"))
+ else if (prefix.equals(xsiPrefix) && unprefixedName.equals("noNamespaceSchemaLocation")) //$NON-NLS-1$
{
visitXSINoNamespaceSchemaLocationAttribute(attr, attr.getValue());
}
}
else if (unprefixedName != null)
{
- if (unprefixedName.equals("xmlns"))
+ if (unprefixedName.equals("xmlns")) //$NON-NLS-1$
{
- visitXMLNamespaceAttribute(attr, "", attr.getValue());
+ visitXMLNamespaceAttribute(attr, "", attr.getValue()); //$NON-NLS-1$
}
}
}
diff --git a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/NamespaceTable.java b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/NamespaceTable.java
index 0286ebb..617f11e 100644
--- a/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/NamespaceTable.java
+++ b/bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/NamespaceTable.java
@@ -92,7 +92,7 @@
if (isMatchingString(nsInfo.uri, uri))
{
result = nsInfo;
- if (testImplied && nsInfo.getProperty("isImplied") != null)
+ if (testImplied && nsInfo.getProperty("isImplied") != null) //$NON-NLS-1$
{
// continue
}
@@ -122,7 +122,7 @@
public NamespaceInfo getNamespaceInfoForPrefix(String prefix)
{
- prefix = prefix != null ? prefix : "";
+ prefix = prefix != null ? prefix : ""; //$NON-NLS-1$
return (NamespaceInfo)hashtable.get(prefix);
}
@@ -151,7 +151,7 @@
public void addNamespaceInfo(NamespaceInfo info)
{
- String key = (info.prefix != null) ? info.prefix : "";
+ String key = (info.prefix != null) ? info.prefix : ""; //$NON-NLS-1$
internalAddNamespaceInfo(key, info);
}
@@ -170,7 +170,7 @@
NamespaceInfo clone = new NamespaceInfo(info);
if (isImplied)
{
- clone.setProperty("isImplied", "true");
+ clone.setProperty("isImplied", "true"); //$NON-NLS-1$ //$NON-NLS-2$
}
addNamespaceInfo(clone);
}
@@ -191,9 +191,9 @@
{
NamespaceInfo nsInfo = new NamespaceInfo();
nsInfo.prefix = null;
- nsInfo.uri = "";
+ nsInfo.uri = ""; //$NON-NLS-1$
nsInfo.locationHint = locationHint;
- internalAddNamespaceInfo("", nsInfo);
+ internalAddNamespaceInfo("", nsInfo); //$NON-NLS-1$
}
public void addNamespaceInfo(String prefix, String uri, String locationHint)
@@ -202,7 +202,7 @@
nsInfo.prefix = prefix;
nsInfo.uri = uri;
nsInfo.locationHint = locationHint;
- internalAddNamespaceInfo(prefix != null ? prefix : "", nsInfo);
+ internalAddNamespaceInfo(prefix != null ? prefix : "", nsInfo); //$NON-NLS-1$
}
public void addElement(Element element)
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/EveryNodeDebugAdapter.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/EveryNodeDebugAdapter.java
index f4d3223..fb25dc7 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/EveryNodeDebugAdapter.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/EveryNodeDebugAdapter.java
@@ -112,12 +112,12 @@
}
public void modelAboutToBeReinitialized(IStructuredModel structuredModel) {
- Debug.println("modelAboutToBeReinitialized: " + "structuredModel: " + structuredModel);
+ Debug.println("modelAboutToBeReinitialized: " + "structuredModel: " + structuredModel); //$NON-NLS-1$ //$NON-NLS-2$
}
public void modelReinitialized(IStructuredModel structuredModel) {
- Debug.println("modelReinitialized: " + "structuredModel: " + structuredModel);
+ Debug.println("modelReinitialized: " + "structuredModel: " + structuredModel); //$NON-NLS-1$ //$NON-NLS-2$
}
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/XMLCoreMessages.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/XMLCoreMessages.java
new file mode 100644
index 0000000..b591de9
--- /dev/null
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/XMLCoreMessages.java
@@ -0,0 +1,36 @@
+/**********************************************************************
+ * Copyright (c) 2005 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 http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.wst.xml.core.internal;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Strings used by XML Core
+ *
+ * @since 1.0
+ */
+public class XMLCoreMessages {
+ private static final String BUNDLE_NAME = "org.eclipse.wst.xml.core.internal.XMLCorePluginResources";//$NON-NLS-1$
+
+ public static String Invalid_character_lt_fo_ERROR_;
+ public static String Invalid_character_gt_fo_ERROR_;
+ public static String Invalid_character_amp_fo_ERROR_;
+ public static String Invalid_character__f_EXC_;
+ public static String loading;
+
+ static {
+ // load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, XMLCoreMessages.class);
+ }
+
+ private XMLCoreMessages() {
+ // cannot create new instance
+ }
+}
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/XMLCorePlugin.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/XMLCorePlugin.java
index c8d55f6..da97753 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/XMLCorePlugin.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/XMLCorePlugin.java
@@ -12,10 +12,6 @@
*******************************************************************************/
package org.eclipse.wst.xml.core.internal;
-import java.text.MessageFormat;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.Plugin;
@@ -29,11 +25,7 @@
*/
public class XMLCorePlugin extends Plugin {
//The shared instance.
- private static XMLCorePlugin plugin;
- //Resource bundle.
- private ResourceBundle resourceBundle;
- private static final String KEY_PREFIX = "%"; //$NON-NLS-1$
- private static final String KEY_DOUBLE_PREFIX = "%%"; //$NON-NLS-1$
+ private static XMLCorePlugin plugin;
/**
* Returns the shared instance.
@@ -90,49 +82,4 @@
prefs.setDefault(CommonModelPreferenceNames.TAG_NAME_CASE, CommonModelPreferenceNames.LOWER);
prefs.setDefault(CommonModelPreferenceNames.ATTR_NAME_CASE, CommonModelPreferenceNames.LOWER);
}
-
- /**
- * Returns the string from the plugin's resource bundle,
- * or 'key' if not found.
- */
- public static String getResourceString(String value) {
- String s = value.trim();
- if (!s.startsWith(KEY_PREFIX, 0))
- return s;
- if (s.startsWith(KEY_DOUBLE_PREFIX, 0))
- return s.substring(1);
-
- int ix = s.indexOf(' ');
- String key = ix == -1 ? s : s.substring(0, ix);
-
- ResourceBundle bundle = getDefault().getResourceBundle();
- try {
- return (bundle != null) ? bundle.getString(key.substring(1)) : key;
- } catch (MissingResourceException e) {
- return key;
- }
- }
-
- public static String getResourceString(String key, Object[] args) {
-
- try {
- return MessageFormat.format(getResourceString(key), args);
- } catch (IllegalArgumentException e) {
- return getResourceString(key);
- }
-
- }
-
- /**
- * Returns the plugin's resource bundle,
- */
- public ResourceBundle getResourceBundle() {
- try {
- if (resourceBundle == null)
- resourceBundle = ResourceBundle.getBundle("org.eclipse.wst.xml.core.internal.XMLCorePluginResources");
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
- return resourceBundle;
- }
}
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/XMLCorePluginResources.properties b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/XMLCorePluginResources.properties
index 49a18aa..8abbf31 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/XMLCorePluginResources.properties
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/XMLCorePluginResources.properties
@@ -10,8 +10,10 @@
# Jens Lukowski/Innoopract - initial renaming/restructuring
#
###############################################################################
-Invalid_character_('<')_fo_ERROR_=Invalid character ('<') found
-Invalid_character_('>')_fo_ERROR_=Invalid character ('>') found
-Invalid_character_('&')_fo_ERROR_=Invalid character ('&') found
-Invalid_character_('__')_f_EXC_=Invalid character ('\"') found
+Invalid_character_lt_fo_ERROR_=Invalid character ('<') found
+Invalid_character_gt_fo_ERROR_=Invalid character ('>') found
+Invalid_character_amp_fo_ERROR_=Invalid character ('&') found
+Invalid_character__f_EXC_=Invalid character ('\"') found
###############################################################################
+# contentmodel strings
+loading=loading
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DocumentImpl.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DocumentImpl.java
index f870824..c5cb70a 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DocumentImpl.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DocumentImpl.java
@@ -958,7 +958,7 @@
if (id == null)
return false;
// ISSUE: -- avoid this hardcoded string
- return id.equals("org.eclipse.jst.jsp.core.jspsource");
+ return id.equals("org.eclipse.jst.jsp.core.jspsource"); //$NON-NLS-1$
}
/**
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/SourceValidator.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/SourceValidator.java
index 1f5648d..a91d8e1 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/SourceValidator.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/SourceValidator.java
@@ -14,7 +14,7 @@
import org.eclipse.wst.xml.core.IXMLCharEntity;
import org.eclipse.wst.xml.core.document.IDOMDocument;
-import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
+import org.eclipse.wst.xml.core.internal.XMLCoreMessages;
import org.w3c.dom.Attr;
import org.w3c.dom.Node;
@@ -268,7 +268,7 @@
int index = source.indexOf(JSPTag.TAG_CLOSE);
if (index < 0)
return true;
- message = XMLCorePlugin.getResourceString("%Invalid_character_('>')_fo_ERROR_"); //$NON-NLS-1$ = "Invalid character ('>') found"
+ message = XMLCoreMessages.Invalid_character_gt_fo_ERROR_;
throw new InvalidCharacterException(message, '>', index + 1);
} else if (text.isCDATAContent()) {
endTagName = text.getParentNode().getNodeName();
@@ -307,12 +307,12 @@
}
// invalid tag
}
- message = XMLCorePlugin.getResourceString("%Invalid_character_('<')_fo_ERROR_"); //$NON-NLS-1$ = "Invalid character ('<') found"
+ message = XMLCoreMessages.Invalid_character_lt_fo_ERROR_;
break;
case '>' :
if (acceptClose)
continue;
- message = XMLCorePlugin.getResourceString("%Invalid_character_('>')_fo_ERROR_"); //$NON-NLS-1$ = "Invalid character ('>') found"
+ message = XMLCoreMessages.Invalid_character_gt_fo_ERROR_;
break;
case '&' :
if (acceptEntityRef) {
@@ -325,12 +325,12 @@
}
// invalid entity reference
}
- message = XMLCorePlugin.getResourceString("%Invalid_character_('&')_fo_ERROR_"); //$NON-NLS-1$ = "Invalid character ('&') found"
+ message = XMLCoreMessages.Invalid_character_amp_fo_ERROR_;
break;
case '"' :
if (acceptQuote)
continue;
- message = XMLCorePlugin.getResourceString("%Invalid_character_('__')_f_EXC_"); //$NON-NLS-1$ = "Invalid character ('\"') found"
+ message = XMLCoreMessages.Invalid_character__f_EXC_;
break;
default :
continue;
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/StructuredDocumentRegionContainer.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/StructuredDocumentRegionContainer.java
index db527fa..0c36483 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/StructuredDocumentRegionContainer.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/StructuredDocumentRegionContainer.java
@@ -40,7 +40,7 @@
* @see com.ibm.sed.structured.text.IStructuredDocumentRegion#addRegion(com.ibm.sed.structured.text.ITextRegion)
*/
public void addRegion(ITextRegion aRegion) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
@@ -50,7 +50,7 @@
* @see com.ibm.sed.structured.text.ITextRegion#adjust(int)
*/
public void adjust(int i) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
@@ -60,7 +60,7 @@
* @see com.ibm.sed.structured.text.ITextRegion#adjustLengthWith(int)
*/
public void adjustLength(int i) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
@@ -70,7 +70,7 @@
* @see com.ibm.sed.structured.text.ITextRegion#adjustStart(int)
*/
public void adjustStart(int i) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
@@ -80,7 +80,7 @@
* @see com.ibm.sed.structured.text.ITextRegion#adjustTextLength(int)
*/
public void adjustTextLength(int i) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
@@ -106,7 +106,7 @@
* @see com.ibm.sed.structured.text.ITextRegionCollection#containsOffset(int)
*/
public boolean containsOffset(int i) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/*
@@ -116,7 +116,7 @@
* int)
*/
public boolean containsOffset(ITextRegion region, int i) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/*
@@ -125,7 +125,7 @@
* @see com.ibm.sed.structured.text.ITextRegion#equatePositions(com.ibm.sed.structured.text.ITextRegion)
*/
public void equatePositions(ITextRegion region) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
@@ -135,7 +135,7 @@
* @see com.ibm.sed.structured.text.ITextRegionCollection#getDeepestRegionAtCharacterOffset(int)
*/
public ITextRegion getDeepestRegionAtCharacterOffset(int offset) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/**
@@ -159,7 +159,7 @@
* @see com.ibm.sed.structured.text.ITextRegionCollection#getEndOffset(com.ibm.sed.structured.text.ITextRegion)
*/
public int getEndOffset(ITextRegion containedRegion) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/*
@@ -168,7 +168,7 @@
* @see com.ibm.sed.structured.text.ITextRegionCollection#getFirstRegion()
*/
public ITextRegion getFirstRegion() {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/**
@@ -188,13 +188,13 @@
/**
*/
public String getFullText(ITextRegion aRegion) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/**
*/
public String getFullText(String context) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/*
@@ -203,7 +203,7 @@
* @see com.ibm.sed.structured.text.ITextRegionCollection#getLastRegion()
*/
public ITextRegion getLastRegion() {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/**
@@ -227,13 +227,13 @@
* @see com.ibm.sed.structured.text.IStructuredDocumentRegion#getNext()
*/
public IStructuredDocumentRegion getNext() {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/**
*/
public int getNumberOfRegions() {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/**
@@ -248,7 +248,7 @@
* @see com.ibm.sed.structured.text.IStructuredDocumentRegion#getParentDocument()
*/
public IStructuredDocument getParentDocument() {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/*
@@ -257,19 +257,19 @@
* @see com.ibm.sed.structured.text.IStructuredDocumentRegion#getPrevious()
*/
public IStructuredDocumentRegion getPrevious() {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/**
*/
public ITextRegion getRegionAtCharacterOffset(int offset) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/**
*/
public ITextRegionList getRegions() {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/**
@@ -293,7 +293,7 @@
* @see com.ibm.sed.structured.text.ITextRegionCollection#getStartOffset(com.ibm.sed.structured.text.ITextRegion)
*/
public int getStartOffset(ITextRegion containedRegion) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/**
@@ -338,13 +338,13 @@
/**
*/
public String getText(ITextRegion aRegion) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/**
*/
public String getText(String context) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/**
@@ -365,7 +365,7 @@
* @see com.ibm.sed.structured.text.ITextRegionCollection#getTextEndOffset(com.ibm.sed.structured.text.ITextRegion)
*/
public int getTextEndOffset(ITextRegion containedRegion) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/**
@@ -410,7 +410,7 @@
* @see com.ibm.sed.structured.text.IStructuredDocumentRegion#isEnded()
*/
public boolean isEnded() {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/**
@@ -458,13 +458,13 @@
* int)
*/
public boolean sameAs(IStructuredDocumentRegion region, int shift) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/**
*/
public boolean sameAs(ITextRegion region, int shift) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/*
@@ -475,7 +475,7 @@
* com.ibm.sed.structured.text.ITextRegion, int)
*/
public boolean sameAs(ITextRegion oldRegion, IStructuredDocumentRegion documentRegion, ITextRegion newRegion, int shift) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
public void setDeleted(boolean deleted) {
@@ -488,7 +488,7 @@
* @see com.ibm.sed.structured.text.IStructuredDocumentRegion#setEnded(boolean)
*/
public void setEnded(boolean hasEnd) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/*
@@ -497,7 +497,7 @@
* @see com.ibm.sed.structured.text.IStructuredDocumentRegion#setLength(int)
*/
public void setLength(int newLength) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/*
@@ -506,7 +506,7 @@
* @see com.ibm.sed.structured.text.IStructuredDocumentRegion#setNext(com.ibm.sed.structured.text.IStructuredDocumentRegion)
*/
public void setNext(IStructuredDocumentRegion newNext) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/*
@@ -515,7 +515,7 @@
* @see com.ibm.sed.structured.text.IStructuredDocumentRegion#setParentDocument(com.ibm.sed.structured.text.IStructuredDocument)
*/
public void setParentDocument(IStructuredDocument document) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/*
@@ -524,13 +524,13 @@
* @see com.ibm.sed.structured.text.IStructuredDocumentRegion#setPrevious(com.ibm.sed.structured.text.IStructuredDocumentRegion)
*/
public void setPrevious(IStructuredDocumentRegion newPrevious) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/**
*/
public void setRegions(ITextRegionList embeddedRegions) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/*
@@ -539,7 +539,7 @@
* @see com.ibm.sed.structured.text.IStructuredDocumentRegion#setStart(int)
*/
public void setStart(int newStart) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/**
@@ -572,6 +572,6 @@
* java.lang.String, int, int)
*/
public StructuredDocumentEvent updateRegion(Object requester, IStructuredDocumentRegion flatnode, String changes, int start, int end) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
}
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/StructuredDocumentRegionProxy.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/StructuredDocumentRegionProxy.java
index 5324bd1..fbaede3 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/StructuredDocumentRegionProxy.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/StructuredDocumentRegionProxy.java
@@ -61,7 +61,7 @@
* @see com.ibm.sed.structured.text.IStructuredDocumentRegion#addRegion(com.ibm.sed.structured.text.ITextRegion)
*/
public void addRegion(ITextRegion aRegion) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
@@ -71,7 +71,7 @@
* @see com.ibm.sed.structured.text.ITextRegion#adjust(int)
*/
public void adjust(int i) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
@@ -81,7 +81,7 @@
* @see com.ibm.sed.structured.text.ITextRegion#adjustLengthWith(int)
*/
public void adjustLength(int i) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
@@ -91,7 +91,7 @@
* @see com.ibm.sed.structured.text.ITextRegion#adjustStart(int)
*/
public void adjustStart(int i) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
@@ -101,7 +101,7 @@
* @see com.ibm.sed.structured.text.ITextRegion#adjustTextLength(int)
*/
public void adjustTextLength(int i) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
@@ -111,7 +111,7 @@
* @see com.ibm.sed.structured.text.ITextRegionCollection#containsOffset(int)
*/
public boolean containsOffset(int i) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/*
@@ -121,7 +121,7 @@
* int)
*/
public boolean containsOffset(ITextRegion region, int i) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/*
@@ -130,7 +130,7 @@
* @see com.ibm.sed.structured.text.ITextRegion#equatePositions(com.ibm.sed.structured.text.ITextRegion)
*/
public void equatePositions(ITextRegion region) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
@@ -140,7 +140,7 @@
* @see com.ibm.sed.structured.text.ITextRegionCollection#getDeepestRegionAtCharacterOffset(int)
*/
public ITextRegion getDeepestRegionAtCharacterOffset(int offset) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/**
@@ -164,7 +164,7 @@
* @see com.ibm.sed.structured.text.ITextRegionCollection#getEndOffset(com.ibm.sed.structured.text.ITextRegion)
*/
public int getEndOffset(ITextRegion containedRegion) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/*
@@ -173,7 +173,7 @@
* @see com.ibm.sed.structured.text.ITextRegionCollection#getFirstRegion()
*/
public ITextRegion getFirstRegion() {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/**
@@ -185,13 +185,13 @@
/**
*/
public String getFullText(ITextRegion aRegion) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/**
*/
public String getFullText(String context) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/*
@@ -200,7 +200,7 @@
* @see com.ibm.sed.structured.text.ITextRegionCollection#getLastRegion()
*/
public ITextRegion getLastRegion() {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/**
@@ -215,13 +215,13 @@
* @see com.ibm.sed.structured.text.IStructuredDocumentRegion#getNext()
*/
public IStructuredDocumentRegion getNext() {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/**
*/
public int getNumberOfRegions() {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/**
@@ -256,19 +256,19 @@
* @see com.ibm.sed.structured.text.IStructuredDocumentRegion#getPrevious()
*/
public IStructuredDocumentRegion getPrevious() {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/**
*/
public ITextRegion getRegionAtCharacterOffset(int offset) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/**
*/
public ITextRegionList getRegions() {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/**
@@ -292,13 +292,13 @@
* @see com.ibm.sed.structured.text.ITextRegionCollection#getStartOffset(com.ibm.sed.structured.text.ITextRegion)
*/
public int getStartOffset(ITextRegion containedRegion) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/**
*/
public IStructuredDocument getStructuredDocument() {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/**
@@ -322,13 +322,13 @@
/**
*/
public String getText(ITextRegion aRegion) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/**
*/
public String getText(String context) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/**
@@ -349,7 +349,7 @@
* @see com.ibm.sed.structured.text.ITextRegionCollection#getTextEndOffset(com.ibm.sed.structured.text.ITextRegion)
*/
public int getTextEndOffset(ITextRegion containedRegion) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/**
@@ -377,7 +377,7 @@
* @see com.ibm.sed.structured.text.IStructuredDocumentRegion#isEnded()
*/
public boolean isEnded() {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/*
@@ -387,13 +387,13 @@
* int)
*/
public boolean sameAs(IStructuredDocumentRegion region, int shift) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/**
*/
public boolean sameAs(ITextRegion region, int shift) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/*
@@ -404,11 +404,11 @@
* com.ibm.sed.structured.text.ITextRegion, int)
*/
public boolean sameAs(ITextRegion oldRegion, IStructuredDocumentRegion documentRegion, ITextRegion newRegion, int shift) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
public void setDeleted(boolean deleted) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/*
@@ -417,7 +417,7 @@
* @see com.ibm.sed.structured.text.IStructuredDocumentRegion#setEnded(boolean)
*/
public void setEnded(boolean hasEnd) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/**
@@ -433,7 +433,7 @@
* @see com.ibm.sed.structured.text.IStructuredDocumentRegion#setNext(com.ibm.sed.structured.text.IStructuredDocumentRegion)
*/
public void setNext(IStructuredDocumentRegion newNext) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/**
@@ -450,7 +450,7 @@
* @see com.ibm.sed.structured.text.IStructuredDocumentRegion#setParentDocument(com.ibm.sed.structured.text.IStructuredDocument)
*/
public void setParentDocument(IStructuredDocument document) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/*
@@ -459,13 +459,13 @@
* @see com.ibm.sed.structured.text.IStructuredDocumentRegion#setPrevious(com.ibm.sed.structured.text.IStructuredDocumentRegion)
*/
public void setPrevious(IStructuredDocumentRegion newPrevious) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/**
*/
public void setRegions(ITextRegionList embeddedRegions) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/*
@@ -474,7 +474,7 @@
* @see com.ibm.sed.structured.text.IStructuredDocumentRegion#setStart(int)
*/
public void setStart(int newStart) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
/**
@@ -516,6 +516,6 @@
* java.lang.String, int, int)
*/
public StructuredDocumentEvent updateRegion(Object requester, IStructuredDocumentRegion flatnode, String changes, int start, int end) {
- throw new Error("intentionally not implemented since should never be called");
+ throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
}
}
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/XMLSourceParser.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/XMLSourceParser.java
index 22ea931..6504150 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/XMLSourceParser.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/XMLSourceParser.java
@@ -242,7 +242,7 @@
try {
text = fDocumentInput.get(offset, length);
} catch (BadLocationException e) {
- text = "";
+ text = ""; //$NON-NLS-1$
}
} else {
if (fStringInput == null || fStringInput.length() == 0 || offset + length > fStringInput.length() || offset < 0) {
diff --git a/bundles/org.eclipse.wst.xml.ui/plugin.properties b/bundles/org.eclipse.wst.xml.ui/plugin.properties
index 9777e46..c097d3a 100644
--- a/bundles/org.eclipse.wst.xml.ui/plugin.properties
+++ b/bundles/org.eclipse.wst.xml.ui/plugin.properties
@@ -19,21 +19,6 @@
XML_Templates.name=XML Templates
XML_Styles.name=XML Styles
XML_Editor.name=XML Editor
-XMLTableTreeViewer.0=Design
-XMLMultiPageEditorPart.0=Source
-XMLTreeExtension.0=Structure
-XMLTreeExtension.1=Value
-XMLTreeExtension.3=The document is empty.
-XMLTreeExtension.4=Right mouse click here to insert content.
-XMLTableTreeActionBarContributor.0=&XML
-XMLTableTreeActionBarContributor.1=&Expand All
-XMLTableTreeActionBarContributor.2=&Collapse All
-XMLTableTreeActionBarContributor.3=Turn Grammar Constraints Off
-XMLTableTreeActionBarContributor.4=&Turn Grammar Constraints Off
-XMLTableTreeActionBarContributor.5=Turn Grammar Constraints On
-XMLTableTreeActionBarContributor.6=&Turn Grammar Constraints On
-XMLTableTreeActionBarContributor.7=Reload Dependencies
-XMLTableTreeActionBarContributor.8=&Reload Dependencies
###############################################################################
_UI_WIZARD_NEW_XML=XML
genMenuLabel=&Generate
@@ -51,10 +36,4 @@
XML_Tag_context_type_Extension_Element.name=XML Tag
XML_Attribute_context_type_Extension_Element.name=XML Attribute
XML_Attribute_value_context_type_Extension_Element.name=XML Attribute value
-###############################################################################
-# The following property keys maybe unused. Commented out on 12/7/2004. Uncomment if needed.
-#XMLExampleProjectCreationWizard.name=XML Examples
-#XMLExampleProjectCreationWizard.description=Create a project containing XML sample files
-#XML_Annotations.name=XML Annotations
-#XML_Extension_Element.name=XML
-refreshoutline.0=Refreshing Content Outline
+###############################################################################
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/internal/ui/XMLEditorMessages.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/internal/ui/XMLEditorMessages.java
new file mode 100644
index 0000000..a1f2180
--- /dev/null
+++ b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/internal/ui/XMLEditorMessages.java
@@ -0,0 +1,49 @@
+/**********************************************************************
+ * Copyright (c) 2005 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 http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.wst.xml.internal.ui;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Strings used by XML Editor
+ *
+ * @since 1.0
+ */
+public class XMLEditorMessages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.wst.xml.internal.ui.XMLEditorResources";//$NON-NLS-1$
+
+ public static String XMLTableTreeViewer_0;
+ public static String XMLMultiPageEditorPart_0;
+ public static String XMLTreeExtension_0;
+ public static String XMLTreeExtension_1;
+ public static String XMLTreeExtension_3;
+ public static String XMLTreeExtension_4;
+ public static String XMLTableTreeActionBarContributor_0;
+ public static String XMLTableTreeActionBarContributor_1;
+ public static String XMLTableTreeActionBarContributor_2;
+ public static String XMLTableTreeActionBarContributor_3;
+ public static String XMLTableTreeActionBarContributor_4;
+ public static String XMLTableTreeActionBarContributor_5;
+ public static String XMLTableTreeActionBarContributor_6;
+ public static String XMLTableTreeActionBarContributor_7;
+ public static String XMLTableTreeActionBarContributor_8;
+ public static String An_error_has_occurred_when1_ERROR_;
+ public static String Resource__does_not_exist;
+ public static String Editor_could_not_be_open;
+
+ static {
+ // load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, XMLEditorMessages.class);
+ }
+
+ private XMLEditorMessages() {
+ // cannot create new instance
+ }
+}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/internal/ui/XMLEditorResourceHandler.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/internal/ui/XMLEditorResourceHandler.java
deleted file mode 100644
index 1c5ae81..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/internal/ui/XMLEditorResourceHandler.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2004 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- ****************************************************************************/
-package org.eclipse.wst.xml.internal.ui;
-
-import java.text.MessageFormat;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class XMLEditorResourceHandler {
- //Resource bundle.
- private static ResourceBundle resourceBundle;
- private static final String KEY_PREFIX = "%"; //$NON-NLS-1$
- private static final String KEY_DOUBLE_PREFIX = "%%"; //$NON-NLS-1$
-
- /**
- * Returns the string from the plugin's resource bundle,
- * or 'key' if not found.
- */
- public static String getResourceString(String value) {
- String s = value.trim();
- if (!s.startsWith(KEY_PREFIX, 0))
- return s;
- if (s.startsWith(KEY_DOUBLE_PREFIX, 0))
- return s.substring(1);
-
- int ix = s.indexOf(' ');
- String key = ix == -1 ? s : s.substring(0, ix);
-
- ResourceBundle bundle = getResourceBundle();
- try {
- return (bundle != null) ? bundle.getString(key.substring(1)) : key;
- } catch (MissingResourceException e) {
- return key;
- }
- }
-
- public static String getResourceString(String key, Object[] args) {
-
- try {
- return MessageFormat.format(getResourceString(key), args);
- } catch (IllegalArgumentException e) {
- return getResourceString(key);
- }
-
- }
-
- /**
- * Returns the plugin's resource bundle,
- */
- public static ResourceBundle getResourceBundle() {
- try {
- if (resourceBundle == null)
- resourceBundle = ResourceBundle.getBundle("org.eclipse.wst.xml.internal.ui.XMLEditorResources");
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
- return resourceBundle;
- }
-}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/internal/ui/XMLEditorResources.properties b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/internal/ui/XMLEditorResources.properties
index 6fcd774..579c9b6 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/internal/ui/XMLEditorResources.properties
+++ b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/internal/ui/XMLEditorResources.properties
@@ -4,22 +4,26 @@
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
-#
+#
# Contributors:
# IBM Corporation - initial API and implementation
###############################################################################
-XMLTableTreeViewer.0=Design
-XMLMultiPageEditorPart.0=Source
-XMLTreeExtension.0=Structure
-XMLTreeExtension.1=Value
-XMLTreeExtension.3=The document is empty.
-XMLTreeExtension.4=Right mouse click here to insert content.
-XMLTableTreeActionBarContributor.0=&XML
-XMLTableTreeActionBarContributor.1=&Expand All
-XMLTableTreeActionBarContributor.2=&Collapse All
-XMLTableTreeActionBarContributor.3=Turn Grammar Constraints Off
-XMLTableTreeActionBarContributor.4=&Turn Grammar Constraints Off
-XMLTableTreeActionBarContributor.5=Turn Grammar Constraints On
-XMLTableTreeActionBarContributor.6=&Turn Grammar Constraints On
-XMLTableTreeActionBarContributor.7=Reload Dependencies
-XMLTableTreeActionBarContributor.8=&Reload Dependencies
+XMLTableTreeViewer_0=Design
+XMLMultiPageEditorPart_0=Source
+XMLTreeExtension_0=Structure
+XMLTreeExtension_1=Value
+XMLTreeExtension_3=The document is empty.
+XMLTreeExtension_4=Right mouse click here to insert content.
+XMLTableTreeActionBarContributor_0=&XML
+XMLTableTreeActionBarContributor_1=&Expand All
+XMLTableTreeActionBarContributor_2=&Collapse All
+XMLTableTreeActionBarContributor_3=Turn Grammar Constraints Off
+XMLTableTreeActionBarContributor_4=&Turn Grammar Constraints Off
+XMLTableTreeActionBarContributor_5=Turn Grammar Constraints On
+XMLTableTreeActionBarContributor_6=&Turn Grammar Constraints On
+XMLTableTreeActionBarContributor_7=Reload Dependencies
+XMLTableTreeActionBarContributor_8=&Reload Dependencies
+##
+An_error_has_occurred_when1_ERROR_=An error has occurred when initializing the input for the the editor's source page.
+Resource__does_not_exist=Resource {0} does not exist.
+Editor_could_not_be_open=Editor could not be open on {0}
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/internal/ui/XMLMultiPageEditorPart.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/internal/ui/XMLMultiPageEditorPart.java
index 3defabc..5deac30 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/internal/ui/XMLMultiPageEditorPart.java
+++ b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/internal/ui/XMLMultiPageEditorPart.java
@@ -23,6 +23,7 @@
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.ITextInputListener;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.events.ShellAdapter;
import org.eclipse.swt.events.ShellEvent;
import org.eclipse.swt.graphics.Point;
@@ -47,7 +48,6 @@
import org.eclipse.ui.part.MultiPageEditorSite;
import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.sse.core.exceptions.SourceEditingRuntimeException;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.StructuredTextEditor;
import org.eclipse.wst.xml.core.IXMLPreferenceNames;
import org.eclipse.wst.xml.ui.StructuredTextEditorXML;
@@ -167,7 +167,7 @@
protected void addSourcePage() throws PartInitException {
try {
fSourcePageIndex = addPage(fTextEditor, getEditorInput());
- setPageText(fSourcePageIndex, XMLEditorResourceHandler.getResourceString("%XMLMultiPageEditorPart.0")); //$NON-NLS-1$
+ setPageText(fSourcePageIndex, XMLEditorMessages.XMLMultiPageEditorPart_0);
// the update's critical, to get viewer selection manager and
// highlighting to work
fTextEditor.update();
@@ -182,7 +182,7 @@
// dispose editor
dispose();
Logger.logException(exception);
- throw new SourceEditingRuntimeException(exception, SSEUIPlugin.getResourceString("%An_error_has_occurred_when1_ERROR_")); //$NON-NLS-1$
+ throw new SourceEditingRuntimeException(exception, XMLEditorMessages.An_error_has_occurred_when1_ERROR_);
}
}
@@ -374,11 +374,9 @@
// very unlikely
Logger.logException(ce);
}
- throw new PartInitException(SSEUIPlugin.getResourceString("%23concat_EXC_", (new Object[]{input.getName()}))); //$NON-NLS-1$
- //$NON-NLS-1$ = "Resource {0} does not exist."
+ throw new PartInitException(NLS.bind(XMLEditorMessages.Resource__does_not_exist, (new Object[]{input.getName()})));
} else {
- throw new PartInitException(SSEUIPlugin.getResourceString("%32concat_EXC_", (new Object[]{input.getName()}))); //$NON-NLS-1$
- //$NON-NLS-1$ = "Editor could not be open on {0}"
+ throw new PartInitException(NLS.bind(XMLEditorMessages.Editor_could_not_be_open, (new Object[]{input.getName()})));
}
}
} else if (input instanceof IStorageEditorInput) {
@@ -388,7 +386,7 @@
} catch (CoreException noStorageExc) {
}
if (contents == null) {
- throw new PartInitException(SSEUIPlugin.getResourceString("%32concat_EXC_", (new Object[]{input.getName()}))); //$NON-NLS-1$
+ throw new PartInitException(NLS.bind(XMLEditorMessages.Editor_could_not_be_open, (new Object[]{input.getName()})));
} else {
try {
contents.close();
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/ViewerExpandCollapseAction.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/ViewerExpandCollapseAction.java
index 9d37f78..4c84e80 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/ViewerExpandCollapseAction.java
+++ b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/ViewerExpandCollapseAction.java
@@ -13,7 +13,7 @@
import org.eclipse.jface.viewers.AbstractTreeViewer;
import org.eclipse.wst.xml.internal.ui.XMLEditorPluginImageHelper;
import org.eclipse.wst.xml.internal.ui.XMLEditorPluginImages;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
public class ViewerExpandCollapseAction extends Action {
@@ -28,14 +28,14 @@
setImageDescriptor(e_imageDescriptor);
setDisabledImageDescriptor(d_imageDescriptor);
- setToolTipText(XMLUIPlugin.getResourceString("%_UI_INFO_EXPAND_ALL")); //$NON-NLS-1$
+ setToolTipText(XMLUIMessages._UI_INFO_EXPAND_ALL); //$NON-NLS-1$
} else {
ImageDescriptor e_imageDescriptor = XMLEditorPluginImageHelper.getInstance().getImageDescriptor(XMLEditorPluginImages.IMG_ETOOL_COLLAPSEALL);
ImageDescriptor d_imageDescriptor = XMLEditorPluginImageHelper.getInstance().getImageDescriptor(XMLEditorPluginImages.IMG_DTOOL_COLLAPSEALL);
setImageDescriptor(e_imageDescriptor);
setDisabledImageDescriptor(d_imageDescriptor);
- setToolTipText(XMLUIPlugin.getResourceString("%_UI_INFO_COLLAPSE_ALL")); //$NON-NLS-1$
+ setToolTipText(XMLUIMessages._UI_INFO_COLLAPSE_ALL); //$NON-NLS-1$
}
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeActionBarContributor.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeActionBarContributor.java
index cbbf7d7..df20762 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeActionBarContributor.java
+++ b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeActionBarContributor.java
@@ -35,7 +35,7 @@
import org.eclipse.wst.xml.core.internal.modelquery.ModelQueryUtil;
import org.eclipse.wst.xml.internal.ui.IDesignViewer;
import org.eclipse.wst.xml.internal.ui.IDesignViewerActionBarContributor;
-import org.eclipse.wst.xml.internal.ui.XMLEditorResourceHandler;
+import org.eclipse.wst.xml.internal.ui.XMLEditorMessages;
import org.eclipse.wst.xml.internal.ui.XMLMultiPageEditorPart;
import org.eclipse.wst.xml.ui.util.SharedXMLEditorPluginImageHelper;
import org.w3c.dom.Document;
@@ -97,7 +97,7 @@
IMenuManager xmlMenu = bars.getMenuManager().findMenuUsingPath("com.ibm.etools.sed.editor.xmlmenu"); //$NON-NLS-1$
if (xmlMenu == null) {
- xmlMenu = new MenuManager(XMLEditorResourceHandler.getResourceString("%XMLTableTreeActionBarContributor.0"), "com.ibm.etools.sed.editor.xmlmenu"); //$NON-NLS-1$ //$NON-NLS-2$
+ xmlMenu = new MenuManager(XMLEditorMessages.XMLTableTreeActionBarContributor_0, "com.ibm.etools.sed.editor.xmlmenu"); //$NON-NLS-1$ //$NON-NLS-2$
bars.getMenuManager().insertBefore(IWorkbenchActionConstants.M_WINDOW, xmlMenu);
} else {
removeContributions(xmlMenu);
@@ -138,13 +138,13 @@
//
xmlMenuExpandAction = new ViewerExpandCollapseAction(true);
xmlMenuExpandAction.setId(EXPAND_ALL_ID);
- xmlMenuExpandAction.setText(XMLEditorResourceHandler.getResourceString("%XMLTableTreeActionBarContributor.1")); //$NON-NLS-1$
+ xmlMenuExpandAction.setText(XMLEditorMessages.XMLTableTreeActionBarContributor_1); //$NON-NLS-1$
xmlMenu.add(xmlMenuExpandAction);
xmlMenuCollapseAction = new ViewerExpandCollapseAction(false);
xmlMenuCollapseAction.setId(COLLAPSE_ALL_ID);
xmlMenuCollapseAction.setId(EXPAND_ALL_ID);
- xmlMenuCollapseAction.setText(XMLEditorResourceHandler.getResourceString("%XMLTableTreeActionBarContributor.2")); //$NON-NLS-1$
+ xmlMenuCollapseAction.setText(XMLEditorMessages.XMLTableTreeActionBarContributor_2); //$NON-NLS-1$
xmlMenu.add(xmlMenuCollapseAction);
}
@@ -261,12 +261,12 @@
public void setAppearanceForEditMode(int editMode) {
if (editMode == ModelQuery.EDIT_MODE_CONSTRAINED_STRICT) {
- setToolTipText(XMLEditorResourceHandler.getResourceString("%XMLTableTreeActionBarContributor.3")); //$NON-NLS-1$
- setText(XMLEditorResourceHandler.getResourceString("%XMLTableTreeActionBarContributor.4")); //$NON-NLS-1$
+ setToolTipText(XMLEditorMessages.XMLTableTreeActionBarContributor_3); //$NON-NLS-1$
+ setText(XMLEditorMessages.XMLTableTreeActionBarContributor_4); //$NON-NLS-1$
setImageDescriptor(onImage);
} else {
- setToolTipText(XMLEditorResourceHandler.getResourceString("%XMLTableTreeActionBarContributor.5")); //$NON-NLS-1$
- setText(XMLEditorResourceHandler.getResourceString("%XMLTableTreeActionBarContributor.6")); //$NON-NLS-1$
+ setToolTipText(XMLEditorMessages.XMLTableTreeActionBarContributor_5); //$NON-NLS-1$
+ setText(XMLEditorMessages.XMLTableTreeActionBarContributor_6); //$NON-NLS-1$
setImageDescriptor(offImage);
}
}
@@ -291,8 +291,8 @@
public ReloadGrammarAction() {
setDisabledImageDescriptor(SharedXMLEditorPluginImageHelper.getImageDescriptor(SharedXMLEditorPluginImageHelper.IMG_DTOOL_RLDGRMR));
setImageDescriptor(SharedXMLEditorPluginImageHelper.getImageDescriptor(SharedXMLEditorPluginImageHelper.IMG_ETOOL_RLDGRMR));
- setToolTipText(XMLEditorResourceHandler.getResourceString("%XMLTableTreeActionBarContributor.7")); //$NON-NLS-1$
- setText(XMLEditorResourceHandler.getResourceString("%XMLTableTreeActionBarContributor.8")); //$NON-NLS-1$
+ setToolTipText(XMLEditorMessages.XMLTableTreeActionBarContributor_7); //$NON-NLS-1$
+ setText(XMLEditorMessages.XMLTableTreeActionBarContributor_8); //$NON-NLS-1$
}
public void setModel(IStructuredModel newModel) {
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeViewer.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeViewer.java
index eafd467..0ca8bd1 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeViewer.java
+++ b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeViewer.java
@@ -34,7 +34,7 @@
import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.xml.core.internal.modelquery.ModelQueryUtil;
import org.eclipse.wst.xml.internal.ui.IDesignViewer;
-import org.eclipse.wst.xml.internal.ui.XMLEditorResourceHandler;
+import org.eclipse.wst.xml.internal.ui.XMLEditorMessages;
import org.eclipse.wst.xml.ui.actions.NodeAction;
import org.eclipse.wst.xml.ui.dnd.XMLDragAndDropManager;
import org.eclipse.wst.xml.ui.internal.contentoutline.XMLNodeActionManager;
@@ -251,7 +251,7 @@
}
public String getTitle() {
- return XMLEditorResourceHandler.getResourceString("%XMLTableTreeViewer.0"); //$NON-NLS-1$
+ return XMLEditorMessages.XMLTableTreeViewer_0;
}
protected void handleDispose(DisposeEvent event) {
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTreeExtension.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTreeExtension.java
index 7edf576..f7b3473 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTreeExtension.java
+++ b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTreeExtension.java
@@ -22,14 +22,14 @@
import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.xml.core.internal.contentmodel.util.CMDescriptionBuilder;
-import org.eclipse.wst.xml.internal.ui.XMLEditorResourceHandler;
+import org.eclipse.wst.xml.internal.ui.XMLEditorMessages;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
public class XMLTreeExtension extends TreeExtension {
- public final static String STRUCTURE_PROPERTY = XMLEditorResourceHandler.getResourceString("%XMLTreeExtension.0"); //$NON-NLS-1$
- public final static String VALUE_PROPERTY = XMLEditorResourceHandler.getResourceString("%XMLTreeExtension.1"); //$NON-NLS-1$
+ public final static String STRUCTURE_PROPERTY = XMLEditorMessages.XMLTreeExtension_0;
+ public final static String VALUE_PROPERTY = XMLEditorMessages.XMLTreeExtension_1;
protected Composite control;
protected MyCellModifier modifier;
@@ -109,8 +109,8 @@
// so that they know how to proceed to edit the blank view
gc.setForeground(tree.getDisplay().getSystemColor(SWT.COLOR_BLACK));
gc.setBackground(tree.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
- gc.drawString(XMLEditorResourceHandler.getResourceString("%XMLTreeExtension.3"), 10, 10); //$NON-NLS-1$
- gc.drawString(XMLEditorResourceHandler.getResourceString("%XMLTreeExtension.4"), 10, 10 + gc.getFontMetrics().getHeight()); //$NON-NLS-1$
+ gc.drawString(XMLEditorMessages.XMLTreeExtension_3, 10, 10);
+ gc.drawString(XMLEditorMessages.XMLTreeExtension_4, 10, 10 + gc.getFontMetrics().getHeight());
}
public String getElementValueHelper(Element element) {
diff --git a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NamespaceInfoContentBuilder.java b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NamespaceInfoContentBuilder.java
index a95a322..5817c01 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NamespaceInfoContentBuilder.java
+++ b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NamespaceInfoContentBuilder.java
@@ -32,7 +32,7 @@
public void visitCMElementDeclaration(CMElementDeclaration ed)
{
- if (ed.getProperty("http://org.eclipse.wst/cm/properties/definitionInfo") != null)
+ if (ed.getProperty("http://org.eclipse.wst/cm/properties/definitionInfo") != null) //$NON-NLS-1$
{
super.visitCMElementDeclaration(ed);
}
@@ -41,13 +41,13 @@
protected void createAnyElementNode(CMAnyElement anyElement)
{
String uri = anyElement.getNamespaceURI();
- if (uri != null && !uri.startsWith("##"))
+ if (uri != null && !uri.startsWith("##")) //$NON-NLS-1$
{
if (table.get(uri) == null)
{
NamespaceInfo info = new NamespaceInfo();
info.uri = uri;
- info.prefix = "p" + count++;
+ info.prefix = "p" + count++; //$NON-NLS-1$
table.put(uri, info);
list.add(info);
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewModelWizard.java b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewModelWizard.java
index e3a929b..25a5dba 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewModelWizard.java
+++ b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewModelWizard.java
@@ -204,13 +204,13 @@
*/
public class NewFilePage extends WizardNewFileCreationPage
{
- public String defaultName = "NewFile";
- public String defaultFileExtension = ".txt";
- public String[] filterExtensions = { "*.txt"};
+ public String defaultName = "NewFile"; //$NON-NLS-1$
+ public String defaultFileExtension = ".txt"; //$NON-NLS-1$
+ public String[] filterExtensions = { "*.txt"}; //$NON-NLS-1$
public NewFilePage(IStructuredSelection selection)
{
- super("", selection);
+ super("", selection); //$NON-NLS-1$
}
protected String computeDefaultFileName()
@@ -241,7 +241,7 @@
protected String existsFileAnyCase(String fileName)
{
if ( (getContainerFullPath() != null) && (getContainerFullPath().isEmpty() == false)
- && (fileName.compareTo("") != 0))
+ && (fileName.compareTo("") != 0)) //$NON-NLS-1$
{
//look through all resources at the specified container - compare in upper case
IResource parent = ResourcesPlugin.getWorkspace().getRoot().findMember(getContainerFullPath());
@@ -281,22 +281,22 @@
IEditorDescriptor[] descriptors = editorRegistry.getEditors(getFileName());
if (descriptors.length == 0)
{
- setErrorMessage(XMLWizard.getString("_ERROR_BAD_FILENAME_EXTENSION"));
+ setErrorMessage(XMLWizardsMessages._ERROR_BAD_FILENAME_EXTENSION);
return false;
}
}
else
{
// no fileExtension, let's check for this file with an .xml extension
- fullFileName += ".xml";
+ fullFileName += ".xml"; //$NON-NLS-1$
if ( (getContainerFullPath() != null) && (getContainerFullPath().isEmpty() == false)
- && (getFileName().compareTo("") != 0))
+ && (getFileName().compareTo("") != 0)) //$NON-NLS-1$
{
Path fullPath = new Path(getContainerFullPath().toString() + '/' + fullFileName);
IResource resource = ResourcesPlugin.getWorkspace().getRoot().findMember(fullPath);
if (resource != null)
{
- setErrorMessage(XMLWizard.getString("_ERROR_FILE_ALREADY_EXISTS"));
+ setErrorMessage(XMLWizardsMessages._ERROR_FILE_ALREADY_EXISTS);
return false;
}
}
@@ -307,7 +307,7 @@
if (sameName != null)
{
String qualifiedFileName = getContainerFullPath().toString() + '/' + fullFileName;
- setErrorMessage(XMLWizard.getString("_ERROR_FILE_ALREADY_EXISTS") + " " + sameName);
+ setErrorMessage(XMLWizardsMessages._ERROR_FILE_ALREADY_EXISTS + " " + sameName); //$NON-NLS-1$
return false;
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLGenerator.java b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLGenerator.java
index 875668d..4ad0e51 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLGenerator.java
+++ b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLGenerator.java
@@ -80,10 +80,10 @@
uri = URIHelper.normalize(uri, null, null);
cmDocument = ContentModelManager.getInstance().createCMDocument(uri, null);
- if (uri.endsWith(".dtd")) {
+ if (uri.endsWith(".dtd")) { //$NON-NLS-1$
if (errorList.size() > 0) {
- title = XMLWizard.getString("_UI_INVALID_GRAMMAR_ERROR");
- message = XMLWizard.getString("_UI_LABEL_ERROR_DTD_INVALID_INFO");
+ title = XMLWizardsMessages._UI_INVALID_GRAMMAR_ERROR;
+ message = XMLWizardsMessages._UI_LABEL_ERROR_DTD_INVALID_INFO;
}
}
else // ".xsd"
@@ -91,21 +91,21 @@
// To be consistent with the schema editor validation
XMLSchemaValidationChecker validator = new XMLSchemaValidationChecker();
if (!validator.isValid(uri)) {
- title = XMLWizard.getString("_UI_INVALID_GRAMMAR_ERROR");
- message = XMLWizard.getString("_UI_LABEL_ERROR_SCHEMA_INVALID_INFO");
+ title = XMLWizardsMessages._UI_INVALID_GRAMMAR_ERROR;
+ message = XMLWizardsMessages._UI_LABEL_ERROR_SCHEMA_INVALID_INFO;
}
else if (cmDocument != null) {
int globalElementCount = cmDocument.getElements().getLength();
if (globalElementCount == 0) {
- title = XMLWizard.getString("_UI_WARNING_TITLE_NO_ROOT_ELEMENTS");
- message = XMLWizard.getString("_UI_WARNING_MSG_NO_ROOT_ELEMENTS");
+ title = XMLWizardsMessages._UI_WARNING_TITLE_NO_ROOT_ELEMENTS;
+ message = XMLWizardsMessages._UI_WARNING_MSG_NO_ROOT_ELEMENTS;
}
}
}
}
else {
- title = XMLWizard.getString("_UI_WARNING_TITLE_NO_ROOT_ELEMENTS");
- message = XMLWizard.getString("_UI_WARNING_URI_NOT_FOUND_COLON") + " " + uri;
+ title = XMLWizardsMessages._UI_WARNING_TITLE_NO_ROOT_ELEMENTS;
+ message = XMLWizardsMessages._UI_WARNING_URI_NOT_FOUND_COLON + " " + uri; //$NON-NLS-1$
}
errorInfo[0] = title;
errorInfo[1] = message;
@@ -120,7 +120,7 @@
String charSet = preference.getString(CommonEncodingPreferenceNames.OUTPUT_CODESET);
PrintWriter writer = new PrintWriter(new OutputStreamWriter(outputStream, charSet));
- writer.println("<?xml version=\"1.0\" encoding=\"" + charSet + "\"?>");
+ writer.println("<?xml version=\"1.0\" encoding=\"" + charSet + "\"?>"); //$NON-NLS-1$ //$NON-NLS-2$
writer.flush();
outputStream.close();
@@ -167,7 +167,7 @@
// removed when 169191 is fixed
contentBuilder.createDefaultRootContent(cmDocument, cmElementDeclaration, namespaceInfoList);
- String[] encodingInfo = (String[]) cmDocument.getProperty("encodingInfo");
+ String[] encodingInfo = (String[]) cmDocument.getProperty("encodingInfo"); //$NON-NLS-1$
if (encodingInfo == null) {
encodingInfo = new String[2];
}
@@ -195,7 +195,7 @@
List result = new Vector();
XMLCatalog xmlCatalog = XMLCatalogPlugin.getInstance().getDefaultXMLCatalog();
if (cmDocument != null) {
- result = (List) cmDocument.getProperty("http://org.eclipse.wst/cm/properties/namespaceInfo");
+ result = (List) cmDocument.getProperty("http://org.eclipse.wst/cm/properties/namespaceInfo"); //$NON-NLS-1$
if (result != null) {
int size = result.size();
for (int i = 0; i < size; i++) {
@@ -214,10 +214,10 @@
locationInfo = defaultSystemId;
}
info.locationHint = locationInfo;
- info.setProperty("locationHint-readOnly", "true");
+ info.setProperty("locationHint-readOnly", "true"); //$NON-NLS-1$ //$NON-NLS-2$
}
- info.setProperty("uri-readOnly", "true");
- info.setProperty("unremovable", "true");
+ info.setProperty("uri-readOnly", "true"); //$NON-NLS-1$ //$NON-NLS-2$
+ info.setProperty("unremovable", "true"); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -247,8 +247,8 @@
String[] errorList = null;
if (namespaceInfoList != null && isMissingNamespaceLocation()) {
- String title = XMLWizard.getString("_UI_LABEL_NO_LOCATION_HINT");
- String message = XMLWizard.getString("_UI_WARNING_MSG_NO_LOCATION_HINT_1") + " " + XMLWizard.getString("_UI_WARNING_MSG_NO_LOCATION_HINT_2") + "\n\n" + XMLWizard.getString("_UI_WARNING_MSG_NO_LOCATION_HINT_3");
+ String title = XMLWizardsMessages._UI_LABEL_NO_LOCATION_HINT;
+ String message = XMLWizardsMessages._UI_WARNING_MSG_NO_LOCATION_HINT_1 + " " + XMLWizardsMessages._UI_WARNING_MSG_NO_LOCATION_HINT_2 + "\n\n" + XMLWizardsMessages._UI_WARNING_MSG_NO_LOCATION_HINT_3; //$NON-NLS-1$ //$NON-NLS-2$
errorList = new String[2];
errorList[0] = title;
diff --git a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLWizard.java b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLWizard.java
index 6295597..8799334 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLWizard.java
+++ b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLWizard.java
@@ -66,13 +66,13 @@
protected static final int CREATE_FROM_SCRATCH = 2;
protected static final String[] createFromRadioButtonLabel
- = {XMLWizard.getString("_UI_RADIO_XML_FROM_DTD"),
- XMLWizard.getString("_UI_RADIO_XML_FROM_SCHEMA"),
- XMLWizard.getString("_UI_RADIO_XML_FROM_SCRATCH")};
+ = {XMLWizardsMessages._UI_RADIO_XML_FROM_DTD,
+ XMLWizardsMessages._UI_RADIO_XML_FROM_SCHEMA,
+ XMLWizardsMessages._UI_RADIO_XML_FROM_SCRATCH};
- protected static final String[] filePageFilterExtensions = {".xml"};
- protected static final String[] browseXSDFilterExtensions = {".xsd"};
- protected static final String[] browseDTDFilterExtensions = {".dtd"};
+ protected static final String[] filePageFilterExtensions = {".xml"}; //$NON-NLS-1$
+ protected static final String[] browseXSDFilterExtensions = {".xsd"}; //$NON-NLS-1$
+ protected static final String[] browseDTDFilterExtensions = {".dtd"}; //$NON-NLS-1$
protected NewFilePage newFilePage;
protected StartPage startPage;
@@ -86,8 +86,8 @@
public NewXMLWizard()
{
- setWindowTitle(XMLWizard.getString("_UI_WIZARD_CREATE_XML_HEADING"));
- setDefaultPageImageDescriptor(ImageDescriptor.createFromFile(XMLWizard.class,"icons/generatexml_wiz.gif"));
+ setWindowTitle(XMLWizardsMessages._UI_WIZARD_CREATE_XML_HEADING);
+ setDefaultPageImageDescriptor(ImageDescriptor.createFromFile(XMLWizard.class,"icons/generatexml_wiz.gif")); //$NON-NLS-1$
generator = new NewXMLGenerator();
}
@@ -113,7 +113,7 @@
wizard.setNeedsProgressMonitor(true);
WizardDialog dialog = new WizardDialog(shell, wizard);
dialog.create();
- dialog.getShell().setText(XMLWizard.getString("_UI_DIALOG_NEW_TITLE"));
+ dialog.getShell().setText(XMLWizardsMessages._UI_DIALOG_NEW_TITLE);
dialog.setBlockOnOpen(true);
dialog.open();
}
@@ -131,7 +131,7 @@
if (grammarURI == null)
{
// start page
- startPage = new StartPage("StartPage", createFromRadioButtonLabel)
+ startPage = new StartPage("StartPage", createFromRadioButtonLabel) //$NON-NLS-1$
{
public void createControl(Composite parent)
{
@@ -152,17 +152,17 @@
};
- startPage.setTitle(XMLWizard.getString("_UI_WIZARD_CREATE_XML_HEADING"));
- startPage.setDescription(XMLWizard.getString("_UI_WIZARD_CREATE_XML_EXPL"));
+ startPage.setTitle(XMLWizardsMessages._UI_WIZARD_CREATE_XML_HEADING);
+ startPage.setDescription(XMLWizardsMessages._UI_WIZARD_CREATE_XML_EXPL);
addPage(startPage);
}
// new file page
newFilePage = new NewFilePage(selection);
- newFilePage.setTitle(XMLWizard.getString("_UI_WIZARD_CREATE_XML_FILE_HEADING"));
- newFilePage.setDescription(XMLWizard.getString("_UI_WIZARD_CREATE_XML_FILE_EXPL"));
- newFilePage.defaultName = (grammarURI != null) ? URIHelper.removeFileExtension(URIHelper.getLastSegment(grammarURI)) : "NewFile";
- newFilePage.defaultFileExtension = ".xml";
+ newFilePage.setTitle(XMLWizardsMessages._UI_WIZARD_CREATE_XML_FILE_HEADING);
+ newFilePage.setDescription(XMLWizardsMessages._UI_WIZARD_CREATE_XML_FILE_EXPL);
+ newFilePage.defaultName = (grammarURI != null) ? URIHelper.removeFileExtension(URIHelper.getLastSegment(grammarURI)) : "NewFile"; //$NON-NLS-1$
+ newFilePage.defaultFileExtension = ".xml"; //$NON-NLS-1$
newFilePage.filterExtensions = filePageFilterExtensions;
addPage(newFilePage);
@@ -172,8 +172,8 @@
// select root element page
selectRootElementPage = new SelectRootElementPage();
- selectRootElementPage.setTitle(XMLWizard.getString("_UI_WIZARD_SELECT_ROOT_HEADING"));
- selectRootElementPage.setDescription(XMLWizard.getString("_UI_WIZARD_SELECT_ROOT_EXPL"));
+ selectRootElementPage.setTitle(XMLWizardsMessages._UI_WIZARD_SELECT_ROOT_HEADING);
+ selectRootElementPage.setDescription(XMLWizardsMessages._UI_WIZARD_SELECT_ROOT_EXPL);
addPage(selectRootElementPage);
}
@@ -200,11 +200,11 @@
int result = CREATE_FROM_SCRATCH;
if (grammarURI != null)
{
- if (grammarURI.endsWith(".dtd"))
+ if (grammarURI.endsWith(".dtd")) //$NON-NLS-1$
{
result = CREATE_FROM_DTD;
}
- else if (grammarURI.endsWith(".xsd"))
+ else if (grammarURI.endsWith(".xsd")) //$NON-NLS-1$
{
result = CREATE_FROM_XSD;
}
@@ -286,7 +286,7 @@
String fileName = newFilePage.getFileName();
if ((new Path(fileName)).getFileExtension() == null)
{
- newFilePage.setFileName(fileName.concat(".xml"));
+ newFilePage.setFileName(fileName.concat(".xml")); //$NON-NLS-1$
}
IFile newFile = newFilePage.createNewFile();
@@ -338,7 +338,7 @@
protected String getDefaultSystemId()
{
- String relativePath = "platform:/resource/" + newFilePage.getContainerFullPath().toString() + "/dummy";
+ String relativePath = "platform:/resource/" + newFilePage.getContainerFullPath().toString() + "/dummy"; //$NON-NLS-1$ //$NON-NLS-2$
return URIHelper.getRelativeURI(generator.getGrammarURI(), relativePath);
}
@@ -352,7 +352,7 @@
SelectGrammarFilePage()
{
- super("SelectGrammarFilePage");
+ super("SelectGrammarFilePage"); //$NON-NLS-1$
}
public void createControl(Composite parent)
@@ -383,14 +383,14 @@
{
if (getCreateMode() == CREATE_FROM_DTD)
{
- setTitle(XMLWizard.getString("_UI_WIZARD_SELECT_DTD_FILE_TITLE"));
- setDescription(XMLWizard.getString("_UI_WIZARD_SELECT_DTD_FILE_DESC"));
+ setTitle(XMLWizardsMessages._UI_WIZARD_SELECT_DTD_FILE_TITLE);
+ setDescription(XMLWizardsMessages._UI_WIZARD_SELECT_DTD_FILE_DESC);
panel.setFilterExtensions(browseDTDFilterExtensions);
}
else
{
- setTitle(XMLWizard.getString("_UI_WIZARD_SELECT_XSD_FILE_TITLE"));
- setDescription(XMLWizard.getString("_UI_WIZARD_SELECT_XSD_FILE_DESC"));
+ setTitle(XMLWizardsMessages._UI_WIZARD_SELECT_XSD_FILE_TITLE);
+ setDescription(XMLWizardsMessages._UI_WIZARD_SELECT_XSD_FILE_DESC);
panel.setFilterExtensions(browseXSDFilterExtensions);
}
generator.setGrammarURI(null);
@@ -437,7 +437,7 @@
{
if (!URIHelper.isReadableURI(uri,false))
{
- errorMessage = XMLWizard.getString("_UI_LABEL_ERROR_CATALOG_ENTRY_INVALID");
+ errorMessage = XMLWizardsMessages._UI_LABEL_ERROR_CATALOG_ENTRY_INVALID;
}
}
return errorMessage;
@@ -467,7 +467,7 @@
SelectRootElementPage()
{
- super("SelectRootElementPage");
+ super("SelectRootElementPage"); //$NON-NLS-1$
}
public void createControl(Composite parent)
@@ -481,7 +481,7 @@
// select root element
Label containerLabel = new Label(containerGroup, SWT.NONE);
- containerLabel.setText(XMLWizard.getString("_UI_LABEL_ROOT_ELEMENT"));
+ containerLabel.setText(XMLWizardsMessages._UI_LABEL_ROOT_ELEMENT);
combo = new Combo(containerGroup, SWT.DROP_DOWN | SWT.READ_ONLY);
combo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
combo.addSelectionListener(this);
@@ -490,7 +490,7 @@
// Options
{
Group group = new Group(containerGroup, SWT.NONE);
- group.setText(XMLWizard.getString("_UI_WIZARD_CONTENT_OPTIONS"));
+ group.setText(XMLWizardsMessages._UI_WIZARD_CONTENT_OPTIONS);
//WorkbenchHelp.setHelp(group, XMLBuilderContextIds.XMLC_CURRENT_GROUP);
GridLayout layout = new GridLayout();
@@ -503,25 +503,25 @@
radioButton = new Button[4];
radioButton[0] = new Button(group, SWT.CHECK);
- radioButton[0].setText(XMLWizard.getString("_UI_WIZARD_CREATE_OPTIONAL_ATTRIBUTES"));
+ radioButton[0].setText(XMLWizardsMessages._UI_WIZARD_CREATE_OPTIONAL_ATTRIBUTES);
radioButton[0].setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
radioButton[0].setSelection(false);
//WorkbenchHelp.setHelp(radioButton[0], XMLBuilderContextIds.XMLC_CREATE_OPTIONAL_ATTRIBUTES);
radioButton[1] = new Button(group, SWT.CHECK);
- radioButton[1].setText(XMLWizard.getString("_UI_WIZARD_CREATE_OPTIONAL_ELEMENTS"));
+ radioButton[1].setText(XMLWizardsMessages._UI_WIZARD_CREATE_OPTIONAL_ELEMENTS);
radioButton[1].setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
radioButton[1].setSelection(false);
//WorkbenchHelp.setHelp(radioButton[1], XMLBuilderContextIds.XMLC_CREATE_OPTIONAL_ELEMENTS);
radioButton[2] = new Button(group, SWT.CHECK);
- radioButton[2].setText(XMLWizard.getString("_UI_WIZARD_CREATE_FIRST_CHOICE"));
+ radioButton[2].setText(XMLWizardsMessages._UI_WIZARD_CREATE_FIRST_CHOICE);
radioButton[2].setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
radioButton[2].setSelection(true);
//WorkbenchHelp.setHelp(radioButton[2], XMLBuilderContextIds.XMLC_CREATE_FIRST_CHOICE);
radioButton[3] = new Button(group, SWT.CHECK);
- radioButton[3].setText(XMLWizard.getString("_UI_WIZARD_FILL_ELEMENTS_AND_ATTRIBUTES"));
+ radioButton[3].setText(XMLWizardsMessages._UI_WIZARD_FILL_ELEMENTS_AND_ATTRIBUTES);
radioButton[3].setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
radioButton[3].setSelection(true);
//WorkbenchHelp.setHelp(radioButton[3], XMLBuilderContextIds.XMLC_FILL_ELEMENTS_AND_ATTRIBUTES);
@@ -529,13 +529,13 @@
radioButton = new Button[2];
radioButton[0] = new Button(group, SWT.RADIO);
- radioButton[0].setText(XMLWizard.getString("_UI_WIZARD_CREATE_REQUIRED"));
+ radioButton[0].setText(XMLWizardsMessages.getString("_UI_WIZARD_CREATE_REQUIRED"));
radioButton[0].setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
radioButton[0].setSelection(true);
WorkbenchHelp.setHelp(radioButton[0], XMLBuilderContextIds.XMLC_CREATE_REQUIRED_ONLY);
radioButton[1] = new Button(group, SWT.RADIO);
- radioButton[1].setText(XMLWizard.getString("_UI_WIZARD_CREATE_OPTIONAL"));
+ radioButton[1].setText(XMLWizardsMessages.getString("_UI_WIZARD_CREATE_OPTIONAL"));
radioButton[1].setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
WorkbenchHelp.setHelp(radioButton[1], XMLBuilderContextIds.XMLC_CREATE_REQUIRED_AND_OPTION);
*/
@@ -603,7 +603,7 @@
for (int i = 0; i < nameNodeMap.getLength(); i++)
{
CMElementDeclaration cmElementDeclaration = (CMElementDeclaration)nameNodeMap.item(i);
- Object value = cmElementDeclaration.getProperty("Abstract");
+ Object value = cmElementDeclaration.getProperty("Abstract"); //$NON-NLS-1$
if (value != Boolean.TRUE)
{
nameNodeVector.add(cmElementDeclaration.getElementName());
@@ -616,7 +616,7 @@
Arrays.sort(nameNodeArray, Collator.getInstance());
}
- String defaultRootName = (String) (generator.getCMDocument()).getProperty("http://org.eclipse.wst/cm/properties/defaultRootName");
+ String defaultRootName = (String) (generator.getCMDocument()).getProperty("http://org.eclipse.wst/cm/properties/defaultRootName"); //$NON-NLS-1$
int defaultRootIndex = -1;
combo.removeAll();
@@ -640,7 +640,7 @@
}
}
- if (generator.getGrammarURI().endsWith("xsd"))
+ if (generator.getGrammarURI().endsWith("xsd")) //$NON-NLS-1$
{
pageBook.showPage(xsdOptionsPanel);
generator.setDefaultSystemId(getDefaultSystemId());
@@ -659,7 +659,7 @@
}
xsdOptionsPanel.setNamespaceInfoList(generator.namespaceInfoList);
}
- else if (generator.getGrammarURI().endsWith("dtd"))
+ else if (generator.getGrammarURI().endsWith("dtd")) //$NON-NLS-1$
{
pageBook.showPage(dtdOptionsPanel);
dtdOptionsPanel.update();
@@ -682,7 +682,7 @@
private String getDefaultPrefix(List nsInfoList)
{
- String defaultPrefix = "p";
+ String defaultPrefix = "p"; //$NON-NLS-1$
if (nsInfoList == null)
return defaultPrefix;
@@ -743,7 +743,7 @@
}
else if (generator.getRootElementName() == null || generator.getRootElementName().length() == 0)
{
- errorMessage = XMLWizard.getString("_ERROR_ROOT_ELEMENT_MUST_BE_SPECIFIED");
+ errorMessage = XMLWizardsMessages._ERROR_ROOT_ELEMENT_MUST_BE_SPECIFIED;
}
return errorMessage;
@@ -807,14 +807,14 @@
{
// todo... this is a nasty mess. I need to revist this code.
//
- String resourceURI = "platform:/resource" + newFilePage.getContainerFullPath().toString() + "/dummy";
+ String resourceURI = "platform:/resource" + newFilePage.getContainerFullPath().toString() + "/dummy"; //$NON-NLS-1$ //$NON-NLS-2$
String resolvedPath = URIHelper.normalize(resourceURI, null, null);
- if (resolvedPath.startsWith("file:/"))
+ if (resolvedPath.startsWith("file:/")) //$NON-NLS-1$
{
resolvedPath = resolvedPath.substring(6);
}
// end nasty messs
- String tableTitle = XMLWizard.getString("_UI_LABEL_NAMESPACE_INFORMATION");
+ String tableTitle = XMLWizardsMessages._UI_LABEL_NAMESPACE_INFORMATION;
editNamespaces = new CommonEditNamespacesDialog(co, new Path(resolvedPath), tableTitle, true, true);
}
@@ -866,7 +866,7 @@
setLayout(createOptionsPanelLayout());
Group group = new Group(this, SWT.NONE);
- group.setText(XMLWizard.getString("_UI_LABEL_DOCTYPE_INFORMATION"));
+ group.setText(XMLWizardsMessages._UI_LABEL_DOCTYPE_INFORMATION);
//WorkbenchHelp.setHelp(group, XMLBuilderContextIds.XMLC_DOCUMENTATION_GROUP);
GridLayout layout = new GridLayout();
@@ -875,14 +875,14 @@
group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
Label publicIdLabel = new Label(group, SWT.NONE);
- publicIdLabel.setText(XMLWizard.getString("_UI_LABEL_PUBLIC_ID"));
+ publicIdLabel.setText(XMLWizardsMessages._UI_LABEL_PUBLIC_ID);
publicIdField = new Text(group, SWT.SINGLE | SWT.BORDER);
publicIdField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
publicIdField.addModifyListener(this);
//WorkbenchHelp.setHelp(publicIdField, XMLBuilderContextIds.XMLC_PUBLIC);
Label systemIdLabel = new Label(group, SWT.NONE);
- systemIdLabel.setText(XMLWizard.getString("_UI_LABEL_SYSTEM_ID"));
+ systemIdLabel.setText(XMLWizardsMessages._UI_LABEL_SYSTEM_ID);
systemIdField = new Text(group, SWT.SINGLE | SWT.BORDER);
systemIdField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
systemIdField.addModifyListener(this);
@@ -903,7 +903,7 @@
theSystemId = xmlCatalogEntry.getWebAddress();
if (theSystemId == null)
{
- theSystemId = generator.getGrammarURI().startsWith("http:") ? generator.getGrammarURI() : URIHelper.getLastSegment(generator.getGrammarURI());
+ theSystemId = generator.getGrammarURI().startsWith("http:") ? generator.getGrammarURI() : URIHelper.getLastSegment(generator.getGrammarURI()); //$NON-NLS-1$
}
}
else
@@ -916,8 +916,8 @@
theSystemId = getDefaultSystemId();
}
- publicIdField.setText(thePublicId != null ? thePublicId : "");
- systemIdField.setText(theSystemId != null ? theSystemId : "");
+ publicIdField.setText(thePublicId != null ? thePublicId : ""); //$NON-NLS-1$
+ systemIdField.setText(theSystemId != null ? theSystemId : ""); //$NON-NLS-1$
}
public void modifyText(ModifyEvent e)
diff --git a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/XMLImportActionDelegate.java b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/XMLImportActionDelegate.java
index c6a7d69..b400590 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/XMLImportActionDelegate.java
+++ b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/XMLImportActionDelegate.java
@@ -31,13 +31,13 @@
public class XMLImportActionDelegate implements IActionDelegate
{
- private static final String validateXSDPluginID = "org.eclipse.wst.xsd.validation";
- private static final String xsdValidatorClassName = "org.eclipse.wst.xsd.validation.internal.ui.eclipse.XSDValidator";
+ private static final String validateXSDPluginID = "org.eclipse.wst.xsd.validation"; //$NON-NLS-1$
+ private static final String xsdValidatorClassName = "org.eclipse.wst.xsd.validation.internal.ui.eclipse.XSDValidator"; //$NON-NLS-1$
- private static final String validateDTDPluginID = "org.eclipse.wst.dtd.validation";
- private static final String dtdValidatorClassName = "org.eclipse.wst.dtd.validation.internal.ui.eclipse.DTDValidator";
+ private static final String validateDTDPluginID = "org.eclipse.wst.dtd.validation"; //$NON-NLS-1$
+ private static final String dtdValidatorClassName = "org.eclipse.wst.dtd.validation.internal.ui.eclipse.DTDValidator"; //$NON-NLS-1$
- private static final String validationReportClassName = "org.eclipse.wst.xml.validation.internal.core.ValidationReport";
+ private static final String validationReportClassName = "org.eclipse.wst.xml.validation.internal.core.ValidationReport"; //$NON-NLS-1$
/**
@@ -58,7 +58,7 @@
IFile file = (IFile)selectedObject;
IStructuredSelection structuredSelection = (IStructuredSelection)selection;
- if (file.getName().endsWith(".dtd") || file.getName().endsWith(".xsd"))
+ if (file.getName().endsWith(".dtd") || file.getName().endsWith(".xsd")) //$NON-NLS-1$ //$NON-NLS-2$
{
IPath path = file.getLocation();
String uri = URIHelper.getURIForFilePath(path.toString());
@@ -69,7 +69,7 @@
try
{
- if (file.getName().endsWith(".xsd"))
+ if (file.getName().endsWith(".xsd")) //$NON-NLS-1$
{
Class[] parameterTypes = new Class[] {String.class, InputStream.class};
Object[] arguments = new Object[] {uri, null};
@@ -86,15 +86,15 @@
xsdValidatorClass = validateXSDBundle.loadClass(xsdValidatorClassName);
- Method getInstanceMethod = xsdValidatorClass.getMethod("getInstance", null);
+ Method getInstanceMethod = xsdValidatorClass.getMethod("getInstance", null); //$NON-NLS-1$
xsdValidatorObject = getInstanceMethod.invoke(null, null); // static and no parameters
- Method validateMethod = xsdValidatorClass.getMethod("validate", parameterTypes);
+ Method validateMethod = xsdValidatorClass.getMethod("validate", parameterTypes); //$NON-NLS-1$
validationReportObject = validateMethod.invoke(xsdValidatorObject, arguments);
validationReportClass = validateXSDBundle.loadClass(validationReportClassName);
- Method isValidMethod = validationReportClass.getMethod("isValid", null);
+ Method isValidMethod = validationReportClass.getMethod("isValid", null); //$NON-NLS-1$
isValid = (Boolean)isValidMethod.invoke(validationReportObject, null);
validationPluginsFound = true; // made it this far, so declare that validation can be performed
@@ -118,15 +118,15 @@
dtdValidatorClass = validateDTDBundle.loadClass(dtdValidatorClassName);
- Method getInstanceMethod = dtdValidatorClass.getMethod("getInstance", null);
+ Method getInstanceMethod = dtdValidatorClass.getMethod("getInstance", null); //$NON-NLS-1$
dtdValidatorObject = getInstanceMethod.invoke(null, null); // static and no parameters
- Method validateMethod = dtdValidatorClass.getMethod("validate", parameterTypes);
+ Method validateMethod = dtdValidatorClass.getMethod("validate", parameterTypes); //$NON-NLS-1$
validationReportObject = validateMethod.invoke(dtdValidatorObject, arguments);
validationReportClass = validateDTDBundle.loadClass(validationReportClassName);
- Method isValidMethod = validationReportClass.getMethod("isValid", null);
+ Method isValidMethod = validationReportClass.getMethod("isValid", null); //$NON-NLS-1$
isValid = (Boolean)isValidMethod.invoke(validationReportObject, null);
validationPluginsFound = true; // made it this far, so declare that validation can be performed
@@ -154,8 +154,8 @@
{
if (isValid != null && !isValid.booleanValue())
{
- String title = XMLWizard.getString("_UI_DIALOG_TITLE_INVALID_GRAMMAR");
- String message = XMLWizard.getString("_UI_DIALOG_MESSAGE_INVALID_GRAMMAR");
+ String title = XMLWizardsMessages._UI_DIALOG_TITLE_INVALID_GRAMMAR;
+ String message = XMLWizardsMessages._UI_DIALOG_MESSAGE_INVALID_GRAMMAR;
boolean answer = MessageDialog.openQuestion(Display.getDefault().getActiveShell(), title, message);
if (!answer)
return;
@@ -164,8 +164,8 @@
else
{
// TODO externalize these strings
- String title = "Validation Plugins Unavailable";
- String message = "Validation cannot be performed because the validation plugins were disabled or not found. The generated file may be invalid. Do you wish to continue?";
+ String title = XMLWizardsMessages.Validation_Plugins_Unavailable;
+ String message = XMLWizardsMessages.Validation_cannot_be_performed;
boolean answer = MessageDialog.openQuestion(Display.getDefault().getActiveShell(), title, message);
if (!answer)
return;
diff --git a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/XMLWizard.java b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/XMLWizard.java
index 55e0021..10cafe6 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/XMLWizard.java
+++ b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/XMLWizard.java
@@ -12,15 +12,12 @@
import java.net.MalformedURLException;
import java.net.URL;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.resource.ImageDescriptor;
public class XMLWizard
{
- private ResourceBundle wizardResourceBundle;
protected static XMLWizard instance = new XMLWizard();
public synchronized static XMLWizard getInstance() {
@@ -30,34 +27,13 @@
public XMLWizard()
{
instance = this;
- try {
- wizardResourceBundle = ResourceBundle.getBundle("wizardResource"); //$NON-NLS-1$
- }
- catch (java.util.MissingResourceException exception) {
- wizardResourceBundle = null;
- }
- }
- public ResourceBundle getWizardResourceBundle()
- {
- return wizardResourceBundle;
- }
-
- public static String getString(String key)
- {
- try {
- ResourceBundle bundle = getInstance().getWizardResourceBundle();
- return bundle.getString(key);
- }
- catch (MissingResourceException e) {
- return key;
- }
}
public ImageDescriptor getImageDescriptor(String name)
{
try {
- URL url= new URL(Platform.getBundle("org.eclipse.wst.xml.ui").getEntry("/"), name);
+ URL url= new URL(Platform.getBundle("org.eclipse.wst.xml.ui").getEntry("/"), name); //$NON-NLS-1$ //$NON-NLS-2$
return ImageDescriptor.createFromURL(url);
}
catch (MalformedURLException e) {
diff --git a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/XMLWizardsMessages.java b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/XMLWizardsMessages.java
new file mode 100644
index 0000000..be40574
--- /dev/null
+++ b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/XMLWizardsMessages.java
@@ -0,0 +1,75 @@
+/**********************************************************************
+ * Copyright (c) 2005 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 http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.wst.xml.ui.internal.wizards;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Strings used by XML Wizards
+ *
+ * @since 1.0
+ */
+public class XMLWizardsMessages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.wst.xml.ui.internal.wizards.wizardResource";//$NON-NLS-1$
+
+ public static String _UI_DIALOG_NEW_TITLE;
+ public static String _UI_DIALOG_TITLE_INVALID_GRAMMAR;
+ public static String _UI_DIALOG_MESSAGE_INVALID_GRAMMAR;
+ public static String _UI_RADIO_XML_FROM_DTD;
+ public static String _UI_RADIO_XML_FROM_SCHEMA;
+ public static String _UI_RADIO_XML_FROM_SCRATCH;
+ public static String _UI_WIZARD_CREATE_XML_HEADING;
+ public static String _UI_WIZARD_CREATE_XML_EXPL;
+ public static String _UI_WIZARD_CREATE_XML_FILE_HEADING;
+ public static String _UI_WIZARD_CREATE_XML_FILE_EXPL;
+ public static String _UI_WIZARD_SELECT_DTD_FILE_DESC;
+ public static String _UI_WIZARD_SELECT_DTD_FILE_TITLE;
+ public static String _UI_WIZARD_SELECT_XSD_FILE_DESC;
+ public static String _UI_WIZARD_SELECT_XSD_FILE_TITLE;
+ public static String _UI_WIZARD_SELECT_ROOT_HEADING;
+ public static String _UI_WIZARD_SELECT_ROOT_EXPL;
+ public static String _UI_LABEL_ROOT_ELEMENT;
+ public static String _UI_WARNING_TITLE_NO_ROOT_ELEMENTS;
+ public static String _UI_WARNING_MSG_NO_ROOT_ELEMENTS;
+ public static String _UI_LABEL_NO_LOCATION_HINT;
+ public static String _UI_WARNING_MSG_NO_LOCATION_HINT_1;
+ public static String _UI_WARNING_MSG_NO_LOCATION_HINT_2;
+ public static String _UI_WARNING_MSG_NO_LOCATION_HINT_3;
+ public static String _UI_WIZARD_CONTENT_OPTIONS;
+ public static String _UI_WIZARD_CREATE_REQUIRED;// commented out
+ public static String _UI_WIZARD_CREATE_OPTIONAL;// commented out
+ public static String _UI_WIZARD_CREATE_OPTIONAL_ATTRIBUTES;
+ public static String _UI_WIZARD_CREATE_OPTIONAL_ELEMENTS;
+ public static String _UI_WIZARD_CREATE_FIRST_CHOICE;
+ public static String _UI_WIZARD_FILL_ELEMENTS_AND_ATTRIBUTES;
+ public static String _UI_LABEL_DOCTYPE_INFORMATION;
+ public static String _UI_LABEL_SYSTEM_ID;
+ public static String _UI_LABEL_PUBLIC_ID;
+ public static String _UI_WARNING_URI_NOT_FOUND_COLON;
+ public static String _UI_INVALID_GRAMMAR_ERROR;
+ public static String _ERROR_BAD_FILENAME_EXTENSION;
+ public static String _ERROR_FILE_ALREADY_EXISTS;
+ public static String _ERROR_ROOT_ELEMENT_MUST_BE_SPECIFIED;
+ public static String _UI_LABEL_ERROR_SCHEMA_INVALID_INFO;
+ public static String _UI_LABEL_ERROR_DTD_INVALID_INFO;
+ public static String _UI_LABEL_ERROR_CATALOG_ENTRY_INVALID;
+ public static String _UI_LABEL_NAMESPACE_INFORMATION;
+ public static String Validation_Plugins_Unavailable;
+ public static String Validation_cannot_be_performed;
+
+ static {
+ // load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, XMLWizardsMessages.class);
+ }
+
+ private XMLWizardsMessages() {
+ // cannot create new instance
+ }
+}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/wizardResource.properties b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/wizardResource.properties
new file mode 100644
index 0000000..91965ba
--- /dev/null
+++ b/bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/wizardResource.properties
@@ -0,0 +1,70 @@
+###############################################################################
+# Copyright (c) 2001, 2004 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
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# IBM Corporation - initial API and implementation
+###############################################################################
+! Properties file for component: XML Tools - New XML Wizard
+! Packaged for translation in: xml.zip
+
+!XMLImportActionDelegate
+_UI_DIALOG_NEW_TITLE = New
+_UI_DIALOG_TITLE_INVALID_GRAMMAR = Invalid Grammar
+_UI_DIALOG_MESSAGE_INVALID_GRAMMAR = The grammar file contains errors. If you proceed, an incorrect result file will be generated. Do you want to continue?
+
+!NewXMLBWizard
+_UI_RADIO_XML_FROM_DTD = Create XML file from a &DTD file
+_UI_RADIO_XML_FROM_SCHEMA = Create XML file from an &XML schema file
+_UI_RADIO_XML_FROM_SCRATCH = Create XML file from &scratch
+_UI_WIZARD_CREATE_XML_HEADING = Create XML File
+_UI_WIZARD_CREATE_XML_EXPL = Select how you would like to create your XML file.
+_UI_WIZARD_CREATE_XML_FILE_HEADING = XML File Name
+_UI_WIZARD_CREATE_XML_FILE_EXPL = Specify a name for the new XML file.
+_UI_WIZARD_SELECT_DTD_FILE_DESC = Select the DTD file to create the XML file.
+_UI_WIZARD_SELECT_DTD_FILE_TITLE = Select DTD File
+_UI_WIZARD_SELECT_XSD_FILE_DESC = Select the schema file to create the XML file.
+_UI_WIZARD_SELECT_XSD_FILE_TITLE = Select XML Schema File
+_UI_WIZARD_SELECT_ROOT_HEADING = Select Root Element
+_UI_WIZARD_SELECT_ROOT_EXPL = Select the root element of the XML file.
+_UI_LABEL_ROOT_ELEMENT = Root element:
+_UI_WARNING_TITLE_NO_ROOT_ELEMENTS = No Root Elements
+_UI_WARNING_MSG_NO_ROOT_ELEMENTS = No root element exists since the schema provided has no global elements.
+_UI_LABEL_NO_LOCATION_HINT = Unspecified Namespace Location
+_UI_WARNING_MSG_NO_LOCATION_HINT_1 = You have not specified a location hint for one or more namespace entries.
+_UI_WARNING_MSG_NO_LOCATION_HINT_2 = Elements from these namespaces will not be generated. This may lead to an invalid generated document.
+_UI_WARNING_MSG_NO_LOCATION_HINT_3 = Click Yes to continue, Click No to go back and specify the location hints.
+_UI_WIZARD_CONTENT_OPTIONS = Content options
+
+_UI_WIZARD_CREATE_REQUIRED = &Create required content only
+_UI_WIZARD_CREATE_OPTIONAL = Create required and &optional content
+
+_UI_WIZARD_CREATE_OPTIONAL_ATTRIBUTES = Create optional &attributes
+_UI_WIZARD_CREATE_OPTIONAL_ELEMENTS = Create optional e&lements
+_UI_WIZARD_CREATE_FIRST_CHOICE = Create first choice of required &choice
+_UI_WIZARD_FILL_ELEMENTS_AND_ATTRIBUTES = Fill elements and attributes with &data
+
+_UI_LABEL_DOCTYPE_INFORMATION = Document type information
+_UI_LABEL_SYSTEM_ID = &System ID:
+_UI_LABEL_PUBLIC_ID = &Public ID:
+
+_UI_WARNING_URI_NOT_FOUND_COLON = The specified resource cannot be located :
+
+!NewModelWizard
+_UI_INVALID_GRAMMAR_ERROR = Invalid Grammar
+
+!NewModelWizard
+_ERROR_BAD_FILENAME_EXTENSION = The specified file name must have a recognized extension (e.g. '.xml').
+_ERROR_FILE_ALREADY_EXISTS = The same file already exists.
+_ERROR_ROOT_ELEMENT_MUST_BE_SPECIFIED = A root element must be specified.
+_UI_LABEL_ERROR_SCHEMA_INVALID_INFO = The schema file contains errors. Open it in the XML schema editor for details.
+_UI_LABEL_ERROR_DTD_INVALID_INFO = The DTD file contains errors. Open it in the DTD editor for details.
+
+_UI_LABEL_ERROR_CATALOG_ENTRY_INVALID = The selected catalog entry specifies a URI that can not be located.
+
+_UI_LABEL_NAMESPACE_INFORMATION=Namespace Information
+Validation_Plugins_Unavailable=Validation Plugins Unavailable
+Validation_cannot_be_performed=Validation cannot be performed because the validation plugins were disabled or not found. The generated file may be invalid. Do you wish to continue?
diff --git a/bundles/org.eclipse.wst.xml.ui/src-wizards/wizardResource.properties b/bundles/org.eclipse.wst.xml.ui/src-wizards/wizardResource.properties
deleted file mode 100644
index b1cdb33..0000000
--- a/bundles/org.eclipse.wst.xml.ui/src-wizards/wizardResource.properties
+++ /dev/null
@@ -1,163 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2004 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
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-! Properties file for component: XML Tools - New XML Wizard
-! Packaged for translation in: xml.zip
-
-! Plugin
-
-_UI_XML_PLUGIN_NAME = XML Builder
-_UI_PREF_XML_CATALOG = XML Catalog
-
-!XMLImportActionDelegate
-_UI_DIALOG_NEW_TITLE = New
-_UI_DIALOG_TITLE_INVALID_GRAMMAR = Invalid Grammar
-_UI_DIALOG_MESSAGE_INVALID_GRAMMAR = The grammar file contains errors. If you proceed, an incorrect result file will be generated. Do you want to continue?
-
-!NewXMLBWizard
-_UI_RADIO_XML_FROM_DTD = Create XML file from a &DTD file
-_UI_RADIO_XML_FROM_SCHEMA = Create XML file from an &XML schema file
-_UI_RADIO_XML_FROM_SCRATCH = Create XML file from &scratch
-_UI_WIZARD_CREATE_XML_HEADING = Create XML File
-_UI_WIZARD_CREATE_XML_EXPL = Select how you would like to create your XML file.
-_UI_WIZARD_CREATE_XML_FILE_HEADING = XML File Name
-_UI_WIZARD_CREATE_XML_FILE_EXPL = Specify a name for the new XML file.
-_UI_WIZARD_SELECT_DTD_FILE_DESC = Select the DTD file to create the XML file.
-_UI_WIZARD_SELECT_DTD_FILE_TITLE = Select DTD File
-_UI_WIZARD_SELECT_XSD_FILE_DESC = Select the schema file to create the XML file.
-_UI_WIZARD_SELECT_XSD_FILE_TITLE = Select XML Schema File
-_UI_LABEL_DTD_FILENAME = DTD file name
-_UI_WIZARD_SELECT_ROOT_HEADING = Select Root Element
-_UI_WIZARD_SELECT_ROOT_EXPL = Select the root element of the XML file.
-_UI_WIZARD_SELECT_SCHEMA_HEADING = Select Schema File
-_UI_WIZARD_SELECT_SCHEMA_EXPL = Select the schema file you want to create the XML file from.
-_UI_LABEL_SCHEMA_FILENAME = Schema file name:
-_UI_LABEL_ROOT_ELEMENT_GROUP = &Root Element
-_UI_LABEL_ROOT_ELEMENT = Root element:
-_UI_WARNING_TITLE_NO_ROOT_ELEMENTS = No Root Elements
-_UI_WARNING_MSG_NO_ROOT_ELEMENTS = No root element exists since the schema provided has no global elements.
-_UI_LABEL_NO_LOCATION_HINT = Unspecified Namespace Location
-_UI_WARNING_MSG_NO_LOCATION_HINT_1 = You have not specified a location hint for one or more namespace entries.
-_UI_WARNING_MSG_NO_LOCATION_HINT_2 = Elements from these namespaces will not be generated. This may lead to an invalid generated document.
-_UI_WARNING_MSG_NO_LOCATION_HINT_3 = Click Yes to continue, Click No to go back and specify the location hints.
-_UI_WIZARD_CONTENT_OPTIONS = Content options
-
-_UI_WIZARD_CREATE_REQUIRED = &Create required content only
-_UI_WIZARD_CREATE_OPTIONAL = Create required and &optional content
-
-_UI_WIZARD_CREATE_OPTIONAL_ATTRIBUTES = Create optional &attributes
-_UI_WIZARD_CREATE_OPTIONAL_ELEMENTS = Create optional e&lements
-_UI_WIZARD_CREATE_FIRST_CHOICE = Create first choice of required &choice
-_UI_WIZARD_FILL_ELEMENTS_AND_ATTRIBUTES = Fill elements and attributes with &data
-
-_UI_WIZARD_SCHEMA_AND_NAME_SPACE_INFO = Schema and Namespace Information
-_UI_LABEL_NAME_SPACE_PREFIX = Namespace prefix:
-_UI_LABEL_NAME_SPACE_URI = Namespace URI:
-_UI_LABEL_XSD_LOCATION = Schema location:
-_UI_LABEL_DOCTYPE_INFORMATION = Document type information
-_UI_LABEL_SYSTEM_ID = &System ID:
-_UI_LABEL_PUBLIC_ID = &Public ID:
-_UI_LABEL_SELECT_FILE = Select File
-_UI_LABEL_KEY = Key
-_UI_LABEL_KEY_COLON = &Key:
-_UI_LABEL_DETAILS_KEY_COLON = Key:
-_UI_LABEL_URI = URI
-_UI_LABEL_URI_COLON = &URI:
-_UI_LABEL_DETAILS_URI_COLON = URI:
-_UI_KEY_TYPE_COLON = Key &Type:
-_UI_KEY_TYPE_DETAILS_COLON = Key Type:
-_UI_KEY_TYPE_DESCRIPTION_XSD_PUBLIC = Namespace name
-_UI_KEY_TYPE_DESCRIPTION_XSD_SYSTEM = Schema location
-_UI_KEY_TYPE_DESCRIPTION_DTD_PUBLIC = Public ID
-_UI_KEY_TYPE_DESCRIPTION_DTD_SYSTEM = System ID
-_UI_LABEL_SPECIFY_ALTERNATIVE_WEB_URL = Specify &alternative Web address
-_UI_WARNING_URI_MUST_NOT_HAVE_DOTS = URI must not included '.' or '..'
-
-_UI_WARNING_URI_NOT_FOUND_COLON = The specified resource cannot be located :
-_UI_WARNING_URI_NOT_FOUND_LONG = The specified file cannot be found. It may have been moved to a different location. If the file is located remotely, a network connection cannot be established to the remote location.
-_UI_WARNING_INVALID_FILE = The specified file is invalid.
-_UI_WARNING_INVALID_FILE_LONG = The specified file is invalid. A proper XML file cannot be generated from it. Open the DTD or XML schema file, edit it as necessary, validate it and try again.
-_UI_WARNING_NO_ELEMENT = The specified file must contain at least one element declaration.
-_UI_WARNING_NO_ELEMENT_DTD_LONG = The specified file must contain at least one element declaration that can be used as the root element in the generated XML file.
-_UI_WARNING_NO_ELEMENT_XSD_LONG = The specified file must contain at least one global element declaration that can be used as the root element in the generated XML file.
-
-
-!NewModelWizard
-_UI_INVALID_GRAMMAR_ERROR = Invalid Grammar
-_UI_BUTTON_BROWSE = &Browse...
-
-!XMLCatalogIdMappingPage
-_UI_LABEL_MAP_TO = Map to:
-_UI_LABEL_MAP_FROM = Map from:
-_UI_BUTTON_NEW = &New...
-_UI_BUTTON_EDIT = &Edit...
-_UI_BUTTON_DELETE = &Delete
-_UI_LABEL_NEW_DIALOG_TITLE = New XML Catalog Entry
-_UI_LABEL_EDIT_DIALOG_TITLE = Edit XML Catalog Entry
-
-
-!XMLCatalogPreferencePage
-_UI_LABEL_USER_ENTRIES = XML Catalog entries
-_UI_LABEL_USER_ENTRIES_TOOL_TIP = XML Catalog entries that have been specified by the user
-_UI_LABEL_SYSTEM_ENTRIES = Plug-in specified entries
-_UI_LABEL_SYSTEM_ENTRIES_TOOL_TIP = XML Catalog entries that have been specified by a plug-in
-_UI_BUTTON_CHANGE = Change...
-_UI_LABEL_SELECT_PROJECT = Select Project
-_UI_LABEL_SPECIFY_PROJECT_DESCRIPTION = Specify the project to persist the XML Catalog information
-_UI_WARNING_NO_PROJECTS_CREATED = No projects have been created yet.
-_UI_WARNING_PROJECT_NOT_SPECIFIED = A project name has not been specified.
-_UI_WARNING_PROJECT_DOES_NOT_EXIST = The specified project does not exist.
-_UI_LABEL_PROJECT_TO_USE = Project to use to persist XML Catalog User Entries:
-_UI_LABEL_CATALOG_SAVE_ERROR = XML Catalog Save Error
-_UI_LABEL_CATALOG_COULD_NOT_BE_SAVED = The XML Catalog entry could not be saved.
-_UI_LABEL_ADVANCED = &Advanced...
-_UI_LABEL_ADVANCED_XML_CATALOG_PREFS = Advanced XML Catalog Preferences
-_UI_LABEL_SPECIFY_PERSISTENCE_FILE = &Specify a file to use to persist the XML Catalog information.
-_UI_LABEL_SAVE_CATALOG_DIALOG_TITLE = Save Changes
-_UI_LABEL_SAVE_CATALOG_DIALOG_DESC = You have made unsaved changes to the current XML Catalog settings. Do you wish to save your changes before loading the new XML Catalog settings?
-_UI_LABEL_BROWSE_CATALOG_FILE_TITLE = Select Folder
-_UI_LABEL_BROWSE_CATALOG_FILE_DESC = Select the folder that contains the '.xmlcatalog' file.
-_UI_LABEL_DETAILS = Details
-_UI_LABEL_USER_SPECIFIED_ENTRIES = User Specified Entries
-_UI_LABEL_PLUGIN_SPECIFIED_ENTRIES = Plugin Specified Entries
-
-!AdvancedOptionsDialog
-_UI_LABEL_DIALOG_DESCRIPTION = Use the buttons below to import or export XML Catalog settings.
-_UI_BUTTON_IMPORT = Import...
-_UI_BUTTON_EXPORT = Export...
-
-_UI_LABEL_IMPORT_DIALOG_TITLE = Import XML Catalog Settings
-_UI_LABEL_IMPORT_DIALOG_HEADING = Specify XML Catalog File
-_UI_LABEL_IMPORT_DIALOG_MESSAGE = Specify the file that will used to load the XML Catalog settings.
-
-_UI_LABEL_EXPORT_DIALOG_TITLE = Export XML Catalog Settings
-_UI_LABEL_EXPORT_DIALOG_HEADING = Specify XML Catalog File
-_UI_LABEL_EXPORT_DIALOG_MESSAGE = Specify the file that will used to save the XML Catalog setting.
-
-!NewModelWizard
-_ERROR_NO_FILENAME = Enter a file name.
-_ERROR_FILE_DOESNT_EXIST = File does not exist.
-_ERROR_INVALID_FILENAME = Invalid file name.
-_ERROR_BAD_FILENAME_EXTENSION = The specified file name must have a recognized extension (e.g. '.xml').
-_ERROR_FILE_ALREADY_EXISTS = The same file already exists.
-_ERROR_ROOT_ELEMENT_MUST_BE_SPECIFIED = A root element must be specified.
-_ERROR_XML_REQUIRES_NS_PREFIX = The schema instance requires a namespace prefix.
-_UI_LABEL_ERROR_SCHEMA_INVALID_INFO = The schema file contains errors. Open it in the XML schema editor for details.
-_UI_LABEL_ERROR_DTD_INVALID_INFO = The DTD file contains errors. Open it in the DTD editor for details.
-
-_UI_LABEL_ERROR_CATALOG_ENTRY_INVALID = The selected catalog entry specifies a URI that can not be located.
-_ERROR_DOCUMENT_GENERATION_FAILURE = Document generation failed.
-_UI_LABEL_ERROR_FILE_HAS_ERRORS = contains errors
-
-!diagnostic strings
-! NOTE TO TRANSLATOR: Do not translate following line
-DIAGNOSTIC_SHOW_DEBUG_TREE = NO
-
-_UI_MENU_GENERATE_XML_FROM_XSD = Generate XML ...
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/StructuredTextEditorXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/StructuredTextEditorXML.java
index 00e21d2..5ea3302 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/StructuredTextEditorXML.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/StructuredTextEditorXML.java
@@ -15,7 +15,6 @@
import java.util.ResourceBundle;
import org.eclipse.jface.action.Action;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.StructuredTextEditor;
import org.eclipse.wst.sse.ui.internal.actions.ActionDefinitionIds;
import org.eclipse.wst.sse.ui.internal.actions.StructuredTextEditorActionConstants;
@@ -24,16 +23,19 @@
import org.eclipse.wst.xml.ui.actions.CleanupActionXML;
import org.eclipse.wst.xml.ui.actions.RemoveBlockCommentActionXML;
import org.eclipse.wst.xml.ui.actions.ToggleCommentActionXML;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.eclipse.wst.xml.ui.internal.editor.IHelpContextIds;
import org.eclipse.wst.xml.ui.internal.search.XMLFindOccurrencesAction;
public class StructuredTextEditorXML extends StructuredTextEditor {
+ private final static String UNDERSCORE = "_"; //$NON-NLS-1$
+
protected void createActions() {
super.createActions();
- ResourceBundle resourceBundle = SSEUIPlugin.getDefault().getResourceBundle();
+ ResourceBundle resourceBundle = XMLUIMessages.getResourceBundle();
- Action action = new CleanupActionXML(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_CLEANUP_DOCUMENT + DOT, this);
+ Action action = new CleanupActionXML(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_CLEANUP_DOCUMENT + UNDERSCORE, this);
action.setActionDefinitionId(ActionDefinitionIds.CLEANUP_DOCUMENT);
setAction(StructuredTextEditorActionConstants.ACTION_NAME_CLEANUP_DOCUMENT, action);
@@ -51,19 +53,19 @@
* action);
*/
- action = new ToggleCommentActionXML(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_TOGGLE_COMMENT + DOT, this);
+ action = new ToggleCommentActionXML(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_TOGGLE_COMMENT + UNDERSCORE, this);
action.setActionDefinitionId(ActionDefinitionIds.TOGGLE_COMMENT);
setAction(StructuredTextEditorActionConstants.ACTION_NAME_TOGGLE_COMMENT, action);
- action = new AddBlockCommentActionXML(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_ADD_BLOCK_COMMENT + DOT, this);
+ action = new AddBlockCommentActionXML(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_ADD_BLOCK_COMMENT + UNDERSCORE, this);
action.setActionDefinitionId(ActionDefinitionIds.ADD_BLOCK_COMMENT);
setAction(StructuredTextEditorActionConstants.ACTION_NAME_ADD_BLOCK_COMMENT, action);
- action = new RemoveBlockCommentActionXML(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_REMOVE_BLOCK_COMMENT + DOT, this);
+ action = new RemoveBlockCommentActionXML(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_REMOVE_BLOCK_COMMENT + UNDERSCORE, this);
action.setActionDefinitionId(ActionDefinitionIds.REMOVE_BLOCK_COMMENT);
setAction(StructuredTextEditorActionConstants.ACTION_NAME_REMOVE_BLOCK_COMMENT, action);
- FindOccurrencesActionProvider foAction = new FindOccurrencesActionProvider(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_FIND_OCCURRENCES + DOT, this);
+ FindOccurrencesActionProvider foAction = new FindOccurrencesActionProvider(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_FIND_OCCURRENCES + UNDERSCORE, this);
foAction.addAction(new XMLFindOccurrencesAction(resourceBundle, "", this)); //$NON-NLS-1$
foAction.setActionDefinitionId(ActionDefinitionIds.FIND_OCCURRENCES);
setAction(StructuredTextEditorActionConstants.ACTION_NAME_FIND_OCCURRENCES, foAction);
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/AbstractNodeActionManager.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/AbstractNodeActionManager.java
index c2b54e3..3432bc1 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/AbstractNodeActionManager.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/AbstractNodeActionManager.java
@@ -35,6 +35,7 @@
import org.eclipse.wst.xml.core.internal.contentmodel.util.DOMContentBuilder;
import org.eclipse.wst.xml.core.internal.contentmodel.util.DOMContentBuilderImpl;
import org.eclipse.wst.xml.core.internal.contentmodel.util.DOMNamespaceHelper;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.eclipse.wst.xml.ui.internal.editor.CMImageUtil;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
@@ -70,7 +71,7 @@
String text = getLabel(parent, cmnode);
setText(text);
description = text;
- undoDescription = XMLUIPlugin.getResourceString("%_UI_MENU_ADD") + " " + text; //$NON-NLS-1$ //$NON-NLS-2$
+ undoDescription = XMLUIMessages._UI_MENU_ADD + " " + text; //$NON-NLS-1$ //$NON-NLS-2$
ImageDescriptor descriptor = CMImageUtil.getImageDescriptor(cmnode);
if (descriptor == null) {
descriptor = imageDescriptorCache.getImageDescriptor(cmnode);
@@ -86,23 +87,23 @@
switch (nodeType) {
case Node.COMMENT_NODE : {
- description = XMLUIPlugin.getResourceString("%_UI_MENU_COMMENT"); //$NON-NLS-1$
- undoDescription = XMLUIPlugin.getResourceString("%_UI_MENU_ADD_COMMENT"); //$NON-NLS-1$
+ description = XMLUIMessages._UI_MENU_COMMENT; //$NON-NLS-1$
+ undoDescription = XMLUIMessages._UI_MENU_ADD_COMMENT; //$NON-NLS-1$
break;
}
case Node.PROCESSING_INSTRUCTION_NODE : {
- description = XMLUIPlugin.getResourceString("%_UI_MENU_PROCESSING_INSTRUCTION"); //$NON-NLS-1$
- undoDescription = XMLUIPlugin.getResourceString("%_UI_MENU_ADD_PROCESSING_INSTRUCTION"); //$NON-NLS-1$
+ description = XMLUIMessages._UI_MENU_PROCESSING_INSTRUCTION; //$NON-NLS-1$
+ undoDescription = XMLUIMessages._UI_MENU_ADD_PROCESSING_INSTRUCTION; //$NON-NLS-1$
break;
}
case Node.CDATA_SECTION_NODE : {
- description = XMLUIPlugin.getResourceString("%_UI_MENU_CDATA_SECTION"); //$NON-NLS-1$
- undoDescription = XMLUIPlugin.getResourceString("%_UI_MENU_ADD_CDATA_SECTION"); //$NON-NLS-1$
+ description = XMLUIMessages._UI_MENU_CDATA_SECTION; //$NON-NLS-1$
+ undoDescription = XMLUIMessages._UI_MENU_ADD_CDATA_SECTION; //$NON-NLS-1$
break;
}
case Node.TEXT_NODE : {
- description = XMLUIPlugin.getResourceString("%_UI_MENU_PCDATA"); //$NON-NLS-1$
- undoDescription = XMLUIPlugin.getResourceString("%_UI_MENU_ADD_PCDATA"); //$NON-NLS-1$
+ description = XMLUIMessages._UI_MENU_PCDATA; //$NON-NLS-1$
+ undoDescription = XMLUIMessages._UI_MENU_ADD_PCDATA; //$NON-NLS-1$
break;
}
}
@@ -124,11 +125,11 @@
boolean format = true;
switch (nodeType) {
case Node.COMMENT_NODE : {
- newChildNode = document.createComment(XMLUIPlugin.getResourceString("%_UI_COMMENT_VALUE")); //$NON-NLS-1$
+ newChildNode = document.createComment(XMLUIMessages._UI_COMMENT_VALUE); //$NON-NLS-1$
break;
}
case Node.PROCESSING_INSTRUCTION_NODE : {
- newChildNode = document.createProcessingInstruction(XMLUIPlugin.getResourceString("%_UI_PI_TARGET_VALUE"), XMLUIPlugin.getResourceString("%_UI_PI_DATA_VALUE")); //$NON-NLS-1$ //$NON-NLS-2$
+ newChildNode = document.createProcessingInstruction(XMLUIMessages._UI_PI_TARGET_VALUE, XMLUIMessages._UI_PI_DATA_VALUE); //$NON-NLS-1$ //$NON-NLS-2$
break;
}
case Node.CDATA_SECTION_NODE : {
@@ -174,18 +175,18 @@
protected List list;
public DeleteAction(List list) {
- setText(XMLUIPlugin.getResourceString("%_UI_MENU_REMOVE")); //$NON-NLS-1$
+ setText(XMLUIMessages._UI_MENU_REMOVE); //$NON-NLS-1$
this.list = list;
}
public DeleteAction(Node node) {
- setText(XMLUIPlugin.getResourceString("%_UI_MENU_REMOVE")); //$NON-NLS-1$
+ setText(XMLUIMessages._UI_MENU_REMOVE); //$NON-NLS-1$
list = new Vector();
list.add(node);
}
public String getUndoDescription() {
- return XMLUIPlugin.getResourceString("%DELETE"); //$NON-NLS-1$
+ return XMLUIMessages.DELETE; //$NON-NLS-1$
}
public void run() {
@@ -293,19 +294,19 @@
this.parent = parent;
switch (nodeType) {
case Node.COMMENT_NODE : {
- description = XMLUIPlugin.getResourceString("%_UI_MENU_COMMENT"); //$NON-NLS-1$
+ description = XMLUIMessages._UI_MENU_COMMENT; //$NON-NLS-1$
break;
}
case Node.PROCESSING_INSTRUCTION_NODE : {
- description = XMLUIPlugin.getResourceString("%_UI_MENU_PROCESSING_INSTRUCTION"); //$NON-NLS-1$
+ description = XMLUIMessages._UI_MENU_PROCESSING_INSTRUCTION; //$NON-NLS-1$
break;
}
case Node.CDATA_SECTION_NODE : {
- description = XMLUIPlugin.getResourceString("%_UI_MENU_CDATA_SECTION"); //$NON-NLS-1$
+ description = XMLUIMessages._UI_MENU_CDATA_SECTION; //$NON-NLS-1$
break;
}
case Node.TEXT_NODE : {
- description = XMLUIPlugin.getResourceString("%_UI_MENU_PCDATA"); //$NON-NLS-1$
+ description = XMLUIMessages._UI_MENU_PCDATA; //$NON-NLS-1$
break;
}
}
@@ -323,7 +324,7 @@
}
public String getUndoDescription() {
- return XMLUIPlugin.getResourceString("%_UI_MENU_ADD") + " " + description; //$NON-NLS-1$ //$NON-NLS-2$
+ return XMLUIMessages._UI_MENU_ADD + " " + description; //$NON-NLS-1$ //$NON-NLS-2$
}
public void run() {
@@ -334,11 +335,11 @@
boolean format = true;
switch (nodeType) {
case Node.COMMENT_NODE : {
- newChildNode = document.createComment(XMLUIPlugin.getResourceString("%_UI_COMMENT_VALUE")); //$NON-NLS-1$
+ newChildNode = document.createComment(XMLUIMessages._UI_COMMENT_VALUE); //$NON-NLS-1$
break;
}
case Node.PROCESSING_INSTRUCTION_NODE : {
- newChildNode = document.createProcessingInstruction(XMLUIPlugin.getResourceString("%_UI_PI_TARGET_VALUE"), XMLUIPlugin.getResourceString("%_UI_PI_DATA_VALUE")); //$NON-NLS-1$ //$NON-NLS-2$
+ newChildNode = document.createProcessingInstruction(XMLUIMessages._UI_PI_TARGET_VALUE, XMLUIMessages._UI_PI_DATA_VALUE); //$NON-NLS-1$ //$NON-NLS-2$
break;
}
case Node.CDATA_SECTION_NODE : {
@@ -385,7 +386,7 @@
}
public String getUndoDescription() {
- String result = XMLUIPlugin.getResourceString("%_UI_LABEL_UNDO_REPLACE_DESCRIPTION"); //$NON-NLS-1$
+ String result = XMLUIMessages._UI_LABEL_UNDO_REPLACE_DESCRIPTION; //$NON-NLS-1$
result += " " + getLabel(parent, cmnode); //$NON-NLS-1$
return result;
}
@@ -418,7 +419,7 @@
protected Action createAddAttributeAction(Element parent, CMAttributeDeclaration ad) {
Action action = null;
if (ad == null) {
- action = new EditAttributeAction(this, parent, null, XMLUIPlugin.getResourceString("%_UI_MENU_NEW_ATTRIBUTE"), XMLUIPlugin.getResourceString("%_UI_MENU_NEW_ATTRIBUTE_TITLE")); //$NON-NLS-1$ //$NON-NLS-2$
+ action = new EditAttributeAction(this, parent, null, XMLUIMessages._UI_MENU_NEW_ATTRIBUTE, XMLUIMessages._UI_MENU_NEW_ATTRIBUTE_TITLE); //$NON-NLS-1$ //$NON-NLS-2$
} else {
action = new AddNodeAction(ad, parent, -1);
}
@@ -437,14 +438,14 @@
protected Action createAddDoctypeAction(Document document, int index) {
- return new EditDoctypeAction(model, document, model.getBaseLocation(), XMLUIPlugin.getResourceString("%_UI_MENU_ADD_DTD_INFORMATION")); //$NON-NLS-1$
+ return new EditDoctypeAction(model, document, model.getBaseLocation(), XMLUIMessages._UI_MENU_ADD_DTD_INFORMATION); //$NON-NLS-1$
}
protected Action createAddElementAction(Node parent, CMElementDeclaration ed, int index) {
Action action = null;
if (ed == null) {
- action = new EditElementAction(this, parent, index, XMLUIPlugin.getResourceString("%_UI_MENU_NEW_ELEMENT"), XMLUIPlugin.getResourceString("%_UI_MENU_NEW_ELEMENT_TITLE")); //$NON-NLS-1$ //$NON-NLS-2$
+ action = new EditElementAction(this, parent, index, XMLUIMessages._UI_MENU_NEW_ELEMENT, XMLUIMessages._UI_MENU_NEW_ELEMENT_TITLE); //$NON-NLS-1$ //$NON-NLS-2$
} else {
action = new AddNodeAction(ed, parent, index);
}
@@ -465,14 +466,14 @@
protected Action createAddProcessingInstructionAction(Node parent, int index) {
Node refChild = getRefChildNodeAtIndex(parent, index);
- Action action = new EditProcessingInstructionAction(this, parent, refChild, XMLUIPlugin.getResourceString("%_UI_MENU_ADD_PROCESSING_INSTRUCTION"), XMLUIPlugin.getResourceString("%ADD_PROCESSING_INSTRUCTION")); //$NON-NLS-1$ //$NON-NLS-2$
+ Action action = new EditProcessingInstructionAction(this, parent, refChild, XMLUIMessages._UI_MENU_ADD_PROCESSING_INSTRUCTION, XMLUIMessages.ADD_PROCESSING_INSTRUCTION); //$NON-NLS-1$ //$NON-NLS-2$
action.setImageDescriptor(imageDescriptorCache.getImageDescriptor(new Integer(Node.PROCESSING_INSTRUCTION_NODE)));
return action;
}
protected Action createAddSchemaInfoAction(Element element) {
- return new EditSchemaInfoAction(this, element.getOwnerDocument(), model.getBaseLocation(), XMLUIPlugin.getResourceString("%_UI_MENU_ADD_SCHEMA_INFORMATION")); //$NON-NLS-1$
+ return new EditSchemaInfoAction(this, element.getOwnerDocument(), model.getBaseLocation(), XMLUIMessages._UI_MENU_ADD_SCHEMA_INFORMATION); //$NON-NLS-1$
}
@@ -490,29 +491,29 @@
protected Action createEditAttributeAction(Attr attr, CMAttributeDeclaration ad) {
- return new EditAttributeAction(this, attr.getOwnerElement(), attr, XMLUIPlugin.getResourceString("%_UI_MENU_EDIT_ATTRIBUTE"), XMLUIPlugin.getResourceString("%_UI_MENU_EDIT_ATTRIBUTE_TITLE")); //$NON-NLS-1$ //$NON-NLS-2$
+ return new EditAttributeAction(this, attr.getOwnerElement(), attr, XMLUIMessages._UI_MENU_EDIT_ATTRIBUTE, XMLUIMessages._UI_MENU_EDIT_ATTRIBUTE_TITLE); //$NON-NLS-1$ //$NON-NLS-2$
}
protected Action createEditDoctypeAction(DocumentType doctype) {
- return new EditDoctypeAction(model, doctype, model.getBaseLocation(), XMLUIPlugin.getResourceString("%_UI_MENU_EDIT_DOCTYPE")); //$NON-NLS-1$
+ return new EditDoctypeAction(model, doctype, model.getBaseLocation(), XMLUIMessages._UI_MENU_EDIT_DOCTYPE); //$NON-NLS-1$
}
protected Action createEditProcessingInstructionAction(ProcessingInstruction pi) {
- return new EditProcessingInstructionAction(this, pi, XMLUIPlugin.getResourceString("%_UI_MENU_EDIT_PROCESSING_INSTRUCTION"), XMLUIPlugin.getResourceString("%_UI_MENU_EDIT_PROCESSING_INSTRUCTION_TITLE")); //$NON-NLS-1$ //$NON-NLS-2$
+ return new EditProcessingInstructionAction(this, pi, XMLUIMessages._UI_MENU_EDIT_PROCESSING_INSTRUCTION, XMLUIMessages._UI_MENU_EDIT_PROCESSING_INSTRUCTION_TITLE); //$NON-NLS-1$ //$NON-NLS-2$
}
protected Action createEditSchemaInfoAction(Element element) {
- return new EditSchemaInfoAction(this, element.getOwnerDocument(), model.getBaseLocation(), XMLUIPlugin.getResourceString("%_UI_MENU_EDIT_NAMESPACES")); //$NON-NLS-1$
+ return new EditSchemaInfoAction(this, element.getOwnerDocument(), model.getBaseLocation(), XMLUIMessages._UI_MENU_EDIT_NAMESPACES); //$NON-NLS-1$
}
protected Action createRenameAction(Node node) {
Action result = null;
if (node instanceof Element) {
- result = new EditElementAction(this, (Element) node, XMLUIPlugin.getResourceString("%_UI_MENU_RENAME"), XMLUIPlugin.getResourceString("%_UI_MENU_RENAME_TITLE")); //$NON-NLS-1$ //$NON-NLS-2$
+ result = new EditElementAction(this, (Element) node, XMLUIMessages._UI_MENU_RENAME, XMLUIMessages._UI_MENU_RENAME_TITLE); //$NON-NLS-1$ //$NON-NLS-2$
}
return result;
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/ActionContributorXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/ActionContributorXML.java
index 76e9c66..59643be 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/ActionContributorXML.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/ActionContributorXML.java
@@ -23,10 +23,10 @@
import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
import org.eclipse.ui.texteditor.RetargetTextEditorAction;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.actions.ActionContributor;
import org.eclipse.wst.sse.ui.internal.actions.ActionDefinitionIds;
import org.eclipse.wst.sse.ui.internal.actions.StructuredTextEditorActionConstants;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
/**
* XMLEditorActionContributor
@@ -62,37 +62,37 @@
public ActionContributorXML() {
super();
- ResourceBundle resourceBundle = SSEUIPlugin.getDefault().getResourceBundle();
+ ResourceBundle resourceBundle = XMLUIMessages.getResourceBundle();
// edit commands
- fShowTooltipAction = new RetargetTextEditorAction(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_INFORMATION + StructuredTextEditorActionConstants.DOT);
+ fShowTooltipAction = new RetargetTextEditorAction(resourceBundle, ""); //$NON-NLS-1$
fShowTooltipAction.setActionDefinitionId(ActionDefinitionIds.INFORMATION);
- fContentAssist = new RetargetTextEditorAction(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_CONTENTASSIST_PROPOSALS + StructuredTextEditorActionConstants.DOT);
+ fContentAssist = new RetargetTextEditorAction(resourceBundle, ""); //$NON-NLS-1$
fContentAssist.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
- fQuickFix = new RetargetTextEditorAction(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_QUICK_FIX + StructuredTextEditorActionConstants.DOT);
+ fQuickFix = new RetargetTextEditorAction(resourceBundle, ""); //$NON-NLS-1$
fQuickFix.setActionDefinitionId(ActionDefinitionIds.QUICK_FIX);
// source commands
- fCleanupDocument = new RetargetTextEditorAction(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_CLEANUP_DOCUMENT + StructuredTextEditorActionConstants.DOT);
+ fCleanupDocument = new RetargetTextEditorAction(resourceBundle, ""); //$NON-NLS-1$
fCleanupDocument.setActionDefinitionId(ActionDefinitionIds.CLEANUP_DOCUMENT);
- fFormatDocument = new RetargetTextEditorAction(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_FORMAT_DOCUMENT + StructuredTextEditorActionConstants.DOT);
+ fFormatDocument = new RetargetTextEditorAction(resourceBundle, ""); //$NON-NLS-1$
fFormatDocument.setActionDefinitionId(ActionDefinitionIds.FORMAT_DOCUMENT);
- fFormatActiveElements = new RetargetTextEditorAction(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_FORMAT_ACTIVE_ELEMENTS + StructuredTextEditorActionConstants.DOT);
+ fFormatActiveElements = new RetargetTextEditorAction(resourceBundle, ""); //$NON-NLS-1$
fFormatActiveElements.setActionDefinitionId(ActionDefinitionIds.FORMAT_ACTIVE_ELEMENTS);
- fFormatMenu = new MenuManager(SSEUIPlugin.getResourceString("%FormatMenu.label")); //$NON-NLS-1$
+ fFormatMenu = new MenuManager(XMLUIMessages.FormatMenu_label);
fFormatMenu.add(fFormatDocument);
fFormatMenu.add(fFormatActiveElements);
// navigate commands
- fOpenFileAction = new RetargetTextEditorAction(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_OPEN_FILE + StructuredTextEditorActionConstants.DOT);
+ fOpenFileAction = new RetargetTextEditorAction(resourceBundle, ""); //$NON-NLS-1$
fOpenFileAction.setActionDefinitionId(ActionDefinitionIds.OPEN_FILE);
- fFindOccurrences = new RetargetTextEditorAction(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_FIND_OCCURRENCES + StructuredTextEditorActionConstants.DOT);
+ fFindOccurrences = new RetargetTextEditorAction(resourceBundle, ""); //$NON-NLS-1$
fFindOccurrences.setActionDefinitionId(ActionDefinitionIds.FIND_OCCURRENCES);
}
@@ -112,10 +112,8 @@
}
// source commands
- String sourceMenuLabel = SSEUIPlugin.getResourceString("%SourceMenu.label"); //$NON-NLS-1$
- String sourceMenuId = "sourceMenuId"; // This is just a menu id. No
- // need to translate.
- // //$NON-NLS-1$
+ String sourceMenuLabel = XMLUIMessages.SourceMenu_label;
+ String sourceMenuId = "sourceMenuId"; //$NON-NLS-1$
IMenuManager sourceMenu = new MenuManager(sourceMenuLabel, sourceMenuId);
menu.insertAfter(IWorkbenchActionConstants.M_EDIT, sourceMenu);
if (sourceMenu != null) {
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/AddBlockCommentActionXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/AddBlockCommentActionXML.java
index 1122621..a3b3475 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/AddBlockCommentActionXML.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/AddBlockCommentActionXML.java
@@ -18,9 +18,8 @@
import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.wst.sse.core.IndexedRegion;
import org.eclipse.wst.sse.core.exceptions.SourceEditingRuntimeException;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
-import org.eclipse.wst.sse.ui.internal.actions.StructuredTextEditorActionConstants;
import org.eclipse.wst.xml.core.internal.document.CommentImpl;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
public class AddBlockCommentActionXML extends CommentActionXML {
protected int fCloseCommentOffset;
@@ -49,7 +48,7 @@
if (fSelection.getLength() == 0 && fSelectionStartIndexedRegion instanceof CommentImpl)
return;
- fModel.beginRecording(this, SSEUIPlugin.getResourceString(StructuredTextEditorActionConstants.ACTION_NAME_ADD_BLOCK_COMMENT + ".tooltip")); //$NON-NLS-1$
+ fModel.beginRecording(this, XMLUIMessages.AddBlockComment_tooltip);
fModel.aboutToChangeModel();
try {
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/BaseNodeActionManager.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/BaseNodeActionManager.java
index d530994..9aa4de9 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/BaseNodeActionManager.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/BaseNodeActionManager.java
@@ -30,7 +30,7 @@
import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQueryAction;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.DocumentType;
@@ -159,8 +159,8 @@
//
Element element = (Element) node;
- IMenuManager addAttributeMenu = new MyMenuManager(XMLUIPlugin.getResourceString("%_UI_MENU_ADD_ATTRIBUTE")); //$NON-NLS-1$
- IMenuManager addChildMenu = new MyMenuManager(XMLUIPlugin.getResourceString("%_UI_MENU_ADD_CHILD")); //$NON-NLS-1$
+ IMenuManager addAttributeMenu = new MyMenuManager(XMLUIMessages._UI_MENU_ADD_ATTRIBUTE); //$NON-NLS-1$
+ IMenuManager addChildMenu = new MyMenuManager(XMLUIMessages._UI_MENU_ADD_CHILD); //$NON-NLS-1$
menu.add(addAttributeMenu);
menu.add(addChildMenu);
@@ -195,7 +195,7 @@
protected void contributeAddDocumentChildActions(IMenuManager menu, Document document, int ic, int vc) {
- IMenuManager addChildMenu = new MyMenuManager(XMLUIPlugin.getResourceString("%_UI_MENU_ADD_CHILD")); //$NON-NLS-1$
+ IMenuManager addChildMenu = new MyMenuManager(XMLUIMessages._UI_MENU_ADD_CHILD); //$NON-NLS-1$
menu.add(addChildMenu);
// add PI and COMMENT
@@ -207,8 +207,8 @@
protected void contributeAddSiblingActions(IMenuManager menu, Node node, int ic, int vc) {
- IMenuManager addBeforeMenu = new MyMenuManager(XMLUIPlugin.getResourceString("%_UI_MENU_ADD_BEFORE")); //$NON-NLS-1$
- IMenuManager addAfterMenu = new MyMenuManager(XMLUIPlugin.getResourceString("%_UI_MENU_ADD_AFTER")); //$NON-NLS-1$
+ IMenuManager addBeforeMenu = new MyMenuManager(XMLUIMessages._UI_MENU_ADD_BEFORE); //$NON-NLS-1$
+ IMenuManager addAfterMenu = new MyMenuManager(XMLUIMessages._UI_MENU_ADD_AFTER); //$NON-NLS-1$
menu.add(addBeforeMenu);
menu.add(addAfterMenu);
@@ -326,7 +326,7 @@
protected void contributeReplaceActions(IMenuManager menu, List selectedNodeList, int ic, int vc) {
// 'Replace With...' actions
//
- IMenuManager replaceWithMenu = new MyMenuManager(XMLUIPlugin.getResourceString("%_UI_MENU_REPLACE_WITH")); //$NON-NLS-1$
+ IMenuManager replaceWithMenu = new MyMenuManager(XMLUIMessages._UI_MENU_REPLACE_WITH); //$NON-NLS-1$
menu.add(replaceWithMenu);
if (modelQuery.getEditMode() == ModelQuery.EDIT_MODE_CONSTRAINED_STRICT && selectedNodeList.size() > 0) {
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/CleanupDialogXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/CleanupDialogXML.java
index f4dd831..1f60008 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/CleanupDialogXML.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/CleanupDialogXML.java
@@ -26,8 +26,8 @@
import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.sse.core.internal.encoding.CommonEncodingPreferenceNames;
import org.eclipse.wst.sse.core.preferences.CommonModelPreferenceNames;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.eclipse.wst.xml.ui.internal.editor.IHelpContextIds;
public class CleanupDialogXML extends Dialog implements SelectionListener {
@@ -57,7 +57,7 @@
public Control createDialogArea(Composite parent) {
- getShell().setText(SSEUIPlugin.getResourceString("%Cleanup_UI_")); //$NON-NLS-1$ = "Cleanup"
+ getShell().setText(XMLUIMessages.Cleanup_UI_);
Composite composite = new Composite(parent, SWT.NULL);
createDialogAreaInComposite(composite);
initializeOptions();
@@ -78,45 +78,45 @@
// Compress empty element tags
fCheckBoxCompressEmptyElementTags = new Button(composite, SWT.CHECK);
- fCheckBoxCompressEmptyElementTags.setText(SSEUIPlugin.getResourceString("%Compress_empty_element_tags_UI_")); //$NON-NLS-1$
+ fCheckBoxCompressEmptyElementTags.setText(XMLUIMessages.Compress_empty_element_tags_UI_);
fCheckBoxCompressEmptyElementTags.addSelectionListener(this);
// Insert missing required attrs
fCheckBoxInsertRequiredAttrs = new Button(composite, SWT.CHECK);
- fCheckBoxInsertRequiredAttrs.setText(SSEUIPlugin.getResourceString("%Insert_required_attributes_UI_")); //$NON-NLS-1$
+ fCheckBoxInsertRequiredAttrs.setText(XMLUIMessages.Insert_required_attributes_UI_);
fCheckBoxInsertRequiredAttrs.addSelectionListener(this);
// Insert missing begin/end tags
fCheckBoxInsertMissingTags = new Button(composite, SWT.CHECK);
- fCheckBoxInsertMissingTags.setText(SSEUIPlugin.getResourceString("%Insert_missing_tags_UI_")); //$NON-NLS-1$ = "Insert missing tags"
+ fCheckBoxInsertMissingTags.setText(XMLUIMessages.Insert_missing_tags_UI_);
fCheckBoxInsertMissingTags.addSelectionListener(this);
// Quote attribute values
fCheckBoxQuoteAttrValues = new Button(composite, SWT.CHECK);
- fCheckBoxQuoteAttrValues.setText(SSEUIPlugin.getResourceString("%Quote_attribute_values_UI_")); //$NON-NLS-1$ = "Quote attribute values"
+ fCheckBoxQuoteAttrValues.setText(XMLUIMessages.Quote_attribute_values_UI_);
fCheckBoxQuoteAttrValues.addSelectionListener(this);
// Format source
fCheckBoxFormatSource = new Button(composite, SWT.CHECK);
- fCheckBoxFormatSource.setText(SSEUIPlugin.getResourceString("%Format_source_UI_")); //$NON-NLS-1$ = "Format source"
+ fCheckBoxFormatSource.setText(XMLUIMessages.Format_source_UI_);
fCheckBoxFormatSource.addSelectionListener(this);
// Convert EOL code
fCheckBoxConvertEOLCodes = new Button(composite, SWT.CHECK);
- fCheckBoxConvertEOLCodes.setText(SSEUIPlugin.getResourceString("%Convert_EOL_codes_UI_")); //$NON-NLS-1$ = "Convert end-of-line codes"
+ fCheckBoxConvertEOLCodes.setText(XMLUIMessages.Convert_EOL_codes_UI_);
fCheckBoxConvertEOLCodes.addSelectionListener(this);
Composite EOLCodes = new Composite(composite, SWT.NULL);
GridLayout hLayout = new GridLayout();
hLayout.numColumns = 3;
EOLCodes.setLayout(hLayout);
fRadioButtonConvertEOLWindows = new Button(EOLCodes, SWT.RADIO);
- fRadioButtonConvertEOLWindows.setText(SSEUIPlugin.getResourceString("%EOL_Windows_UI")); //$NON-NLS-1$ = "Windows"
+ fRadioButtonConvertEOLWindows.setText(XMLUIMessages.EOL_Windows_UI);
fRadioButtonConvertEOLWindows.addSelectionListener(this);
fRadioButtonConvertEOLUnix = new Button(EOLCodes, SWT.RADIO);
- fRadioButtonConvertEOLUnix.setText(SSEUIPlugin.getResourceString("%EOL_Unix_UI")); //$NON-NLS-1$ = "Unix"
+ fRadioButtonConvertEOLUnix.setText(XMLUIMessages.EOL_Unix_UI);
fRadioButtonConvertEOLUnix.addSelectionListener(this);
fRadioButtonConvertEOLMac = new Button(EOLCodes, SWT.RADIO);
- fRadioButtonConvertEOLMac.setText(SSEUIPlugin.getResourceString("%EOL_Mac_UI")); //$NON-NLS-1$ = "Mac"
+ fRadioButtonConvertEOLMac.setText(XMLUIMessages.EOL_Mac_UI);
fRadioButtonConvertEOLMac.addSelectionListener(this);
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/CommentActionXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/CommentActionXML.java
index 803a1d1..f743aff 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/CommentActionXML.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/CommentActionXML.java
@@ -30,8 +30,7 @@
import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.sse.core.exceptions.SourceEditingRuntimeException;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
-import org.eclipse.wst.sse.ui.internal.actions.StructuredTextEditorActionConstants;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
public class CommentActionXML extends TextEditorAction {
protected static final String CLOSE_COMMENT = "-->"; //$NON-NLS-1$
@@ -155,7 +154,7 @@
}
protected void processAction() {
- fModel.beginRecording(this, SSEUIPlugin.getResourceString(StructuredTextEditorActionConstants.ACTION_NAME_COMMENT + ".tooltip")); //$NON-NLS-1$
+ fModel.beginRecording(this, XMLUIMessages.Comment_tooltip);
fModel.aboutToChangeModel();
for (int i = fSelectionStartLine; i <= fSelectionEndLine; i++) {
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditDoctypeAction.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditDoctypeAction.java
index 0810bef..bc891c2 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditDoctypeAction.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditDoctypeAction.java
@@ -23,7 +23,7 @@
import org.eclipse.wst.xml.core.document.IDOMDocumentType;
import org.eclipse.wst.xml.core.internal.document.DocumentImpl;
import org.eclipse.wst.xml.ui.dialogs.EditDoctypeDialog;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.w3c.dom.Document;
import org.w3c.dom.DocumentType;
import org.w3c.dom.Element;
@@ -92,7 +92,7 @@
break;
}
}
- return rootElement != null ? rootElement.getNodeName() : XMLUIPlugin.getResourceString("%_UI_LABEL_ROOT_ELEMENT_VALUE"); //$NON-NLS-1$
+ return rootElement != null ? rootElement.getNodeName() : XMLUIMessages._UI_LABEL_ROOT_ELEMENT_VALUE; //$NON-NLS-1$
}
public String getUndoDescription() {
@@ -144,13 +144,13 @@
if (doctype != null) {
dialog = new EditDoctypeDialog(shell, doctype);
if (title == null) {
- title = XMLUIPlugin.getResourceString("%_UI_LABEL_EDIT_DOCTYPE"); //$NON-NLS-1$
+ title = XMLUIMessages._UI_LABEL_EDIT_DOCTYPE; //$NON-NLS-1$
}
} else if (document != null) {
String rootElementName = getRootElementName(document);
dialog = new EditDoctypeDialog(shell, rootElementName, "", rootElementName + ".dtd"); //$NON-NLS-1$ //$NON-NLS-2$
if (title == null) {
- title = XMLUIPlugin.getResourceString("%_UI_MENU_ADD_DTD_INFORMATION_TITLE"); //$NON-NLS-1$
+ title = XMLUIMessages._UI_MENU_ADD_DTD_INFORMATION_TITLE; //$NON-NLS-1$
}
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditProcessingInstructionAction.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditProcessingInstructionAction.java
index b8c118b..272d50d 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditProcessingInstructionAction.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditProcessingInstructionAction.java
@@ -15,6 +15,7 @@
import org.eclipse.jface.window.Window;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.wst.xml.ui.dialogs.EditProcessingInstructionDialog;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
@@ -64,7 +65,7 @@
if (pi != null) {
dialog = new EditProcessingInstructionDialog(shell, pi);
} else {
- dialog = new EditProcessingInstructionDialog(shell, XMLUIPlugin.getResourceString("%_UI_PI_TARGET_VALUE"), XMLUIPlugin.getResourceString("%_UI_PI_DATA_VALUE")); //$NON-NLS-1$ //$NON-NLS-2$
+ dialog = new EditProcessingInstructionDialog(shell, XMLUIMessages._UI_PI_TARGET_VALUE, XMLUIMessages._UI_PI_DATA_VALUE); //$NON-NLS-1$ //$NON-NLS-2$
}
dialog.create();
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditSchemaInfoAction.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditSchemaInfoAction.java
index 9c6d1c7..bafd931 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditSchemaInfoAction.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/EditSchemaInfoAction.java
@@ -23,6 +23,7 @@
import org.eclipse.wst.xml.core.internal.contentmodel.util.DOMNamespaceInfoManager;
import org.eclipse.wst.xml.core.internal.contentmodel.util.NamespaceInfo;
import org.eclipse.wst.xml.ui.dialogs.EditSchemaInfoDialog;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -136,7 +137,7 @@
dialog.setNamespaceInfoList(namespaceInfoList);
dialog.create();
//dialog.getShell().setSize(500, 300);
- dialog.getShell().setText(XMLUIPlugin.getResourceString("%_UI_MENU_EDIT_SCHEMA_INFORMATION_TITLE")); //$NON-NLS-1$
+ dialog.getShell().setText(XMLUIMessages._UI_MENU_EDIT_SCHEMA_INFORMATION_TITLE); //$NON-NLS-1$
dialog.setBlockOnOpen(true);
dialog.open();
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/RemoveBlockCommentActionXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/RemoveBlockCommentActionXML.java
index f310959..cf2dea3 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/RemoveBlockCommentActionXML.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/RemoveBlockCommentActionXML.java
@@ -15,11 +15,10 @@
import java.util.ResourceBundle;
import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.wst.xml.core.internal.document.CommentImpl;
import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.wst.sse.core.exceptions.SourceEditingRuntimeException;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
-import org.eclipse.wst.sse.ui.internal.actions.StructuredTextEditorActionConstants;
+import org.eclipse.wst.xml.core.internal.document.CommentImpl;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
public class RemoveBlockCommentActionXML extends AddBlockCommentActionXML {
public RemoveBlockCommentActionXML(ResourceBundle bundle, String prefix, ITextEditor editor) {
@@ -33,7 +32,7 @@
}
protected void processAction() {
- fModel.beginRecording(this, SSEUIPlugin.getResourceString(StructuredTextEditorActionConstants.ACTION_NAME_REMOVE_BLOCK_COMMENT + ".tooltip")); //$NON-NLS-1$
+ fModel.beginRecording(this, XMLUIMessages.RemoveBlockComment_tooltip);
fModel.aboutToChangeModel();
if (fSelection.getLength() == 0) {
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/ToggleCommentActionXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/ToggleCommentActionXML.java
index 257fdef..98f0487 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/ToggleCommentActionXML.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/ToggleCommentActionXML.java
@@ -18,8 +18,7 @@
import org.eclipse.jface.text.IRegion;
import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.wst.sse.core.exceptions.SourceEditingRuntimeException;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
-import org.eclipse.wst.sse.ui.internal.actions.StructuredTextEditorActionConstants;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
public class ToggleCommentActionXML extends UncommentActionXML {
public ToggleCommentActionXML(ResourceBundle bundle, String prefix, ITextEditor editor) {
@@ -27,7 +26,7 @@
}
protected void processAction() {
- fModel.beginRecording(this, SSEUIPlugin.getResourceString(StructuredTextEditorActionConstants.ACTION_NAME_COMMENT + ".tooltip")); //$NON-NLS-1$
+ fModel.beginRecording(this, XMLUIMessages.ToggleComment_tooltip);
fModel.aboutToChangeModel();
for (int i = fSelectionStartLine; i <= fSelectionEndLine; i++) {
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/UncommentActionXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/UncommentActionXML.java
index 408494e..a82177e 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/UncommentActionXML.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/actions/UncommentActionXML.java
@@ -18,8 +18,7 @@
import org.eclipse.jface.text.IRegion;
import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.wst.sse.core.exceptions.SourceEditingRuntimeException;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
-import org.eclipse.wst.sse.ui.internal.actions.StructuredTextEditorActionConstants;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
public class UncommentActionXML extends CommentActionXML {
public UncommentActionXML(ResourceBundle bundle, String prefix, ITextEditor editor) {
@@ -27,7 +26,7 @@
}
protected void processAction() {
- fModel.beginRecording(this, SSEUIPlugin.getResourceString(StructuredTextEditorActionConstants.ACTION_NAME_COMMENT + ".tooltip")); //$NON-NLS-1$
+ fModel.beginRecording(this, XMLUIMessages.Uncomment_tooltip);
fModel.aboutToChangeModel();
for (int i = fSelectionStartLine; i <= fSelectionEndLine; i++) {
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/AbstractContentAssistProcessor.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/AbstractContentAssistProcessor.java
index e03c753..b89458e 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/AbstractContentAssistProcessor.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/AbstractContentAssistProcessor.java
@@ -24,6 +24,7 @@
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.eclipse.jface.text.contentassist.IContextInformation;
import org.eclipse.jface.text.contentassist.IContextInformationValidator;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.graphics.Image;
import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.sse.core.IndexedRegion;
@@ -36,7 +37,6 @@
import org.eclipse.wst.sse.core.text.ITextRegionList;
import org.eclipse.wst.sse.core.util.Debug;
import org.eclipse.wst.sse.ui.internal.IReleasable;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
import org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal;
@@ -62,6 +62,7 @@
import org.eclipse.wst.xml.core.internal.modelquery.ModelQueryUtil;
import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
import org.eclipse.wst.xml.ui.internal.Logger;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.eclipse.wst.xml.ui.internal.editor.CMImageUtil;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImages;
@@ -98,9 +99,9 @@
}
- protected static final String INTERNALERROR = SSEUIPlugin.getResourceString("%SEVERE_internal_error_occu_UI_"); //$NON-NLS-1$ = "SEVERE internal error occurred "
- protected static final String UNKNOWN_ATTR = SSEUIPlugin.getResourceString("%No_known_attribute__UI_"); //$NON-NLS-1$ = "No known attribute "
- protected static final String UNKNOWN_CONTEXT = SSEUIPlugin.getResourceString("%Content_Assist_not_availab_UI_"); //$NON-NLS-1$ = "Content Assist not available at the current location "
+ protected static final String INTERNALERROR = XMLUIMessages.SEVERE_internal_error_occu_UI_;
+ protected static final String UNKNOWN_ATTR = XMLUIMessages.No_known_attribute__UI_;
+ protected static final String UNKNOWN_CONTEXT = XMLUIMessages.Content_Assist_not_availab_UI_;
protected char completionProposalAutoActivationCharacters[] = null;
protected char contextInformationAutoActivationCharacters[] = null;
private AttributeContextInformationProvider fAttributeInfoProvider = null;
@@ -205,7 +206,7 @@
}
}
else {
- setErrorMessage(SSEUIPlugin.getResourceString("%25concat", (new Object[]{node.getNodeName()})));
+ setErrorMessage(NLS.bind(XMLUIMessages.Element__is_unknown, (new Object[]{node.getNodeName()})));
}
}
@@ -326,7 +327,7 @@
protected void addCommentProposal(ContentAssistRequest contentAssistRequest) {
contentAssistRequest.addProposal(new CustomCompletionProposal("<!-- -->", //$NON-NLS-1$
- contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), 5, XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_COMMENT), SSEUIPlugin.getResourceString("%6concat", (new Object[]{" <!-- -->"})), //$NON-NLS-1$ = "comment {0}"//$NON-NLS-2$
+ contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), 5, XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_COMMENT), NLS.bind(XMLUIMessages.Comment__, (new Object[]{" <!-- -->"})), //$NON-NLS-1$
null, null, XMLRelevanceConstants.R_COMMENT));
}
@@ -388,7 +389,7 @@
if (contentAssistRequest.getStartOffset() + contentAssistRequest.getRegion().getTextLength() < contentAssistRequest.getReplacementBeginPosition()) {
CustomCompletionProposal proposal = new CustomCompletionProposal(">", //$NON-NLS-1$
- contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), 1, XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_TAG_GENERIC), SSEUIPlugin.getResourceString("%9concat", (new Object[]{" '>'"})), //$NON-NLS-1$ = "Close with {0}"//$NON-NLS-2$
+ contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), 1, XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_TAG_GENERIC), NLS.bind(XMLUIMessages.Close_with__, (new Object[]{" '>'"})), //$NON-NLS-1$
null, null, XMLRelevanceConstants.R_END_TAG_NAME);
contentAssistRequest.addProposal(proposal);
}
@@ -420,7 +421,7 @@
proposal = new CustomCompletionProposal(proposedText, contentAssistRequest.getStartOffset(), contentAssistRequest.getRegion().getTextLength(), proposedText.length(), image, proposedText, null, proposedInfo, XMLRelevanceConstants.R_END_TAG_NAME);
}
else {
- proposal = new CustomCompletionProposal(proposedText, contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), proposedText.length(), image, SSEUIPlugin.getResourceString("%9concat", (new Object[]{"'" + proposedText + "'"})), //$NON-NLS-1$ = "Close with {0}"//$NON-NLS-2$ //$NON-NLS-3$
+ proposal = new CustomCompletionProposal(proposedText, contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), proposedText.length(), image, NLS.bind(XMLUIMessages.Close_with__, (new Object[]{"'" + proposedText + "'"})), //$NON-NLS-1$ //$NON-NLS-2$
null, proposedInfo, XMLRelevanceConstants.R_END_TAG_NAME);
}
contentAssistRequest.addProposal(proposal);
@@ -496,7 +497,7 @@
// replaceText = "</" + node.getNodeName() + ">";
// //$NON-NLS-1$ $NON-NLS-2$
cursorOffset = tagName.length() + 3;
- displayString = SSEUIPlugin.getResourceString("%17concat", (new Object[]{tagName})); //$NON-NLS-1$
+ displayString = NLS.bind(XMLUIMessages.End_with__, (new Object[]{tagName}));
addProposal = true;
}
}
@@ -508,7 +509,7 @@
replaceText = node.getNodeName() + ">"; //$NON-NLS-1$
cursorOffset = replaceText.length();
replaceBegin = xmlEndTagOpen.getTextEndOffset();
- displayString = SSEUIPlugin.getResourceString("%15concat", (new Object[]{node.getNodeName()})); //$NON-NLS-1$
+ displayString = NLS.bind(XMLUIMessages.End_with_, (new Object[]{node.getNodeName()}));
addProposal = true;
}
else if (type == DOMRegionContext.XML_TAG_OPEN) {
@@ -520,7 +521,7 @@
// should only be replacing white space...
replaceLength = (replaceBegin > xmlEndTagOpen.getTextEndOffset()) ? replaceBegin - xmlEndTagOpen.getTextEndOffset() : 0;
replaceBegin = xmlEndTagOpen.getTextEndOffset();
- displayString = SSEUIPlugin.getResourceString("%15concat", (new Object[]{"/" + node.getNodeName()})); //$NON-NLS-1$ //$NON-NLS-2$
+ displayString = NLS.bind(XMLUIMessages.End_with_, (new Object[]{"/" + node.getNodeName()})); //$NON-NLS-1$
addProposal = true;
}
}
@@ -536,7 +537,7 @@
if (parent != null && parent.getNodeType() != Node.DOCUMENT_NODE) {
replaceText = parent.getNodeName() + ">"; //$NON-NLS-1$
cursorOffset = replaceText.length();
- displayString = SSEUIPlugin.getResourceString("%17concat", (new Object[]{parent.getNodeName()})); //$NON-NLS-1$
+ displayString = NLS.bind(XMLUIMessages.End_with__, (new Object[]{parent.getNodeName()}));
setErrorMessage(null);
addProposal = true;
}
@@ -676,7 +677,7 @@
// this is one of the few times to ignore the length --
// always insert
// contentAssistRequest.getReplacementLength(),
- 0, getContentGenerator().getStartTagClose(node, elementDecl).length(), image, SSEUIPlugin.getResourceString("%3concat", (new Object[]{getContentGenerator().getStartTagClose(node, elementDecl)})), //$NON-NLS-1$ = "Close with '{0}'"
+ 0, getContentGenerator().getStartTagClose(node, elementDecl).length(), image, NLS.bind(XMLUIMessages.Close_with___, (new Object[]{getContentGenerator().getStartTagClose(node, elementDecl)})),
null, proposedInfo, XMLRelevanceConstants.R_CLOSE_TAG);
contentAssistRequest.addProposal(proposal);
}
@@ -687,7 +688,7 @@
// this is one of the few times to ignore the
// length -- always insert
// contentAssistRequest.getReplacementLength(),
- 0, 1, image, SSEUIPlugin.getResourceString("%9concat", (new Object[]{" '>'"})), //$NON-NLS-1$ = "Close with {0}"//$NON-NLS-2$
+ 0, 1, image, NLS.bind(XMLUIMessages.Close_with__, (new Object[]{" '>'"})), //$NON-NLS-1$
null, proposedInfo, XMLRelevanceConstants.R_CLOSE_TAG);
contentAssistRequest.addProposal(proposal);
@@ -705,7 +706,7 @@
// this is one of the few times to
// ignore the length -- always insert
// contentAssistRequest.getReplacementLength(),
- 0, 1, image, SSEUIPlugin.getResourceString("%5concat", (new Object[]{node.getNodeName()})), //$NON-NLS-1$ = "Close with '></{0}>'"
+ 0, 1, image, NLS.bind(XMLUIMessages.Close_with____, (new Object[]{node.getNodeName()})),
null, proposedInfo, XMLRelevanceConstants.R_CLOSE_TAG);
contentAssistRequest.addProposal(proposal);
}
@@ -718,7 +719,7 @@
// this is one of the few times to ignore
// the length -- always insert
// contentAssistRequest.getReplacementLength(),
- 0, 2, image, SSEUIPlugin.getResourceString("%9concat", (new Object[]{" \"/>\""})), //$NON-NLS-1$ = "Close with {0}"//$NON-NLS-2$
+ 0, 2, image, NLS.bind(XMLUIMessages.Close_with__, (new Object[]{" \"/>\""})), //$NON-NLS-1$
null, proposedInfo, XMLRelevanceConstants.R_CLOSE_TAG + 1); // +1
// to
// bring
@@ -738,7 +739,7 @@
// this is one of the few times to ignore the
// length -- always insert
// contentAssistRequest.getReplacementLength(),
- 0, 1, image, SSEUIPlugin.getResourceString("%9concat", (new Object[]{" '>'"})), //$NON-NLS-1$ = "Close with {0}"//$NON-NLS-2$
+ 0, 1, image, NLS.bind(XMLUIMessages.Close_with__, (new Object[]{" '>'"})), //$NON-NLS-1$
null, proposedInfo, XMLRelevanceConstants.R_CLOSE_TAG);
contentAssistRequest.addProposal(proposal);
}
@@ -811,9 +812,9 @@
Iterator nodeIterator = cmnodes.iterator();
if (!nodeIterator.hasNext()) {
if (getCMElementDeclaration(parent) != null)
- error = SSEUIPlugin.getResourceString("%1concat", (new Object[]{parent.getNodeName()})); //$NON-NLS-1$ = "{0} has no available child tags."
+ error = NLS.bind(XMLUIMessages._Has_no_available_child, (new Object[]{parent.getNodeName()}));
else
- error = SSEUIPlugin.getResourceString("%31concat", (new Object[]{parent.getNodeName()})); //$NON-NLS-1$
+ error = NLS.bind(XMLUIMessages.Element__is_unknown, (new Object[]{parent.getNodeName()}));
}
String matchString = contentAssistRequest.getMatchString();
// chop off any leading <'s and whitespace from the
@@ -849,10 +850,10 @@
if (error != null)
setErrorMessage(error);
else if (contentAssistRequest.getMatchString() != null && contentAssistRequest.getMatchString().length() > 0)
- setErrorMessage(SSEUIPlugin.getResourceString("%11concat", (new Object[]{parent.getNodeName(), contentAssistRequest.getMatchString()}))); //$NON-NLS-1$
+ setErrorMessage(NLS.bind(XMLUIMessages.No_known_child_tag, (new Object[]{parent.getNodeName(), contentAssistRequest.getMatchString()})));
//$NON-NLS-1$ = "No known child tag names of <{0}> begin with \"{1}\"."
else
- setErrorMessage(SSEUIPlugin.getResourceString("%14concat", (new Object[]{parent.getNodeName()}))); //$NON-NLS-1$
+ setErrorMessage(NLS.bind(XMLUIMessages.__Has_no_known_child, (new Object[]{parent.getNodeName()})));
}
}
}
@@ -916,7 +917,7 @@
//$NON-NLS-1$
matchString = matchString.substring(1);
if (!nodeIterator.hasNext())
- error = SSEUIPlugin.getResourceString("%8concat", (new Object[]{parent.getNodeName()})); //$NON-NLS-1$
+ error = NLS.bind(XMLUIMessages.__Has_no_known_child, (new Object[]{parent.getNodeName()}));
while (nodeIterator.hasNext()) {
CMNode elementDecl = (CMNode) nodeIterator.next();
if (elementDecl != null) {
@@ -962,10 +963,10 @@
if (error != null)
setErrorMessage(error);
else if (contentAssistRequest.getMatchString() != null && contentAssistRequest.getMatchString().length() > 0)
- setErrorMessage(SSEUIPlugin.getResourceString("%27concat", (new Object[]{parent.getNodeName(), contentAssistRequest.getMatchString()}))); //$NON-NLS-1$
+ setErrorMessage(NLS.bind(XMLUIMessages.No_known_child_tag_names, (new Object[]{parent.getNodeName(), contentAssistRequest.getMatchString()})));
//$NON-NLS-1$ = "No known child tag names of <{0}> begin with \"{1}\""
else
- setErrorMessage(SSEUIPlugin.getResourceString("%28concat", (new Object[]{parent.getNodeName()}))); //$NON-NLS-1$
+ setErrorMessage(NLS.bind(XMLUIMessages.__Has_no_known_child, (new Object[]{parent.getNodeName()})));
}
}
else if (parent.getNodeType() == Node.DOCUMENT_NODE) {
@@ -1620,7 +1621,7 @@
continue;
if (Debug.displayInfo)
System.out.println(rootName + " already present!"); //$NON-NLS-1$
- setErrorMessage(SSEUIPlugin.getResourceString("%18concat", (new Object[]{rootName}))); //$NON-NLS-1$ = "The document element <{0}> is already present."
+ setErrorMessage(NLS.bind(XMLUIMessages.The_document_element__, (new Object[]{rootName})));
return new ArrayList(0);
}
}
@@ -1645,9 +1646,9 @@
//$NON-NLS-4$//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
//$NON-NLS-4$//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
if (location.length() > 0)
- setErrorMessage(SSEUIPlugin.getResourceString("%29concat", (new Object[]{rootName, location}))); //$NON-NLS-1$ = "No definition was found for element <{0}> in {1}"
+ setErrorMessage(NLS.bind(XMLUIMessages.No_definition_for_in, (new Object[]{rootName, location})));
else
- setErrorMessage(SSEUIPlugin.getResourceString("%20concat", (new Object[]{rootName}))); //$NON-NLS-1$ = "No definition was found for element <{0}>"
+ setErrorMessage(NLS.bind(XMLUIMessages.No_definition_for, (new Object[]{rootName})));
}
}
}
@@ -1660,9 +1661,9 @@
//$NON-NLS-4$//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
//$NON-NLS-4$//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
if (location.length() > 0)
- setErrorMessage(SSEUIPlugin.getResourceString("%24concat", (new Object[]{location}))); //$NON-NLS-1$ = "No content model found for {0}."
+ setErrorMessage(NLS.bind(XMLUIMessages.No_content_model_for, (new Object[]{location})));
else
- setErrorMessage(SSEUIPlugin.getResourceString("%No_content_model_found_UI_")); //$NON-NLS-1$ = "No content model found"
+ setErrorMessage(XMLUIMessages.No_content_model_found_UI_);
}
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/XMLContentAssistUtilities.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/XMLContentAssistUtilities.java
index cbaf959..0bce02f 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/XMLContentAssistUtilities.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/contentassist/XMLContentAssistUtilities.java
@@ -17,17 +17,18 @@
import org.eclipse.jface.text.ITextViewer;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.wst.sse.core.IndexedRegion;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
import org.eclipse.wst.sse.core.text.ITextRegion;
import org.eclipse.wst.sse.core.text.ITextRegionContainer;
import org.eclipse.wst.sse.core.util.ScriptLanguageKeys;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
import org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal;
import org.eclipse.wst.xml.core.document.IDOMElement;
import org.eclipse.wst.xml.core.document.IDOMNode;
import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
@@ -106,11 +107,7 @@
if (!hasEndTag && !isJSPTag) {
// create appropriate close tag text
- String proposedText = proposedText = "</" + tagName; // ResourceHandler
- // wants text
- // w/out
- // ending '>'
- // //$NON-NLS-1$
+ String proposedText = proposedText = "</" + tagName; //$NON-NLS-1$
String viewerText = viewer.getTextWidget().getText();
if (viewerText.length() >= documentPosition && viewerText.length() >= 2 && documentPosition >= 2) {
String last2chars = viewerText.substring(documentPosition - 2, documentPosition);
@@ -123,16 +120,13 @@
// create proposal
p = new CustomCompletionProposal(proposedText + ">", //$NON-NLS-1$
documentPosition, 0, proposedText.length() + 1, XMLEditorPluginImageHelper.getInstance().getImage(imagePath), //$NON-NLS-1$
- SSEUIPlugin.getResourceString("%15concat", (new Object[]{proposedText})), //$NON-NLS-1$ = "End with '{0}>'"
+ NLS.bind(XMLUIMessages.End_with_, (new Object[]{proposedText})),
null, null, XMLRelevanceConstants.R_END_TAG);
}
else if (!hasEndTag && isJSPTag) {
// create appropriate close tag text
- String proposedText = proposedText = "%"; // ResourceHandler
- // wants
- // text w/out ending '>'
- // //$NON-NLS-1$
+ String proposedText = proposedText = "%"; //$NON-NLS-1$
String viewerText = viewer.getTextWidget().getText();
// TODO (pa) make it smarter to add "%>" or just ">" if % is
@@ -152,7 +146,7 @@
// create proposal
p = new CustomCompletionProposal(proposedText + ">", //$NON-NLS-1$
documentPosition, 0, proposedText.length() + 1, XMLEditorPluginImageHelper.getInstance().getImage(imagePath), //$NON-NLS-1$
- SSEUIPlugin.getResourceString("%15concat", (new Object[]{proposedText})), //$NON-NLS-1$ = "End with '{0}>'"
+ NLS.bind(XMLUIMessages.End_with_, (new Object[]{proposedText})),
null, null, XMLRelevanceConstants.R_END_TAG);
}
@@ -204,11 +198,7 @@
if (!hasEndTag) {
// create appropriate close tag text
- String proposedText = proposedText = "</" + tagName; // ResourceHandler
- // wants text
- // w/out
- // ending '>'
- // //$NON-NLS-1$
+ String proposedText = proposedText = "</" + tagName; //$NON-NLS-1$
String viewerText = viewer.getTextWidget().getText();
if (viewerText.length() >= documentPosition && viewerText.length() >= 2 && documentPosition >= 2) {
String last2chars = viewerText.substring(documentPosition - 2, documentPosition);
@@ -221,7 +211,7 @@
// create proposal
p = new CustomCompletionProposal(proposedText + ">", //$NON-NLS-1$
documentPosition, 0, proposedText.length() + 1, XMLEditorPluginImageHelper.getInstance().getImage(imagePath), //$NON-NLS-1$
- SSEUIPlugin.getResourceString("%15concat", (new Object[]{proposedText})), //$NON-NLS-1$ = "End with '{0}>'"
+ NLS.bind(XMLUIMessages.End_with_, (new Object[]{proposedText})),
null, null, XMLRelevanceConstants.R_END_TAG);
}
return p;
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditAttributeDialog.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditAttributeDialog.java
index 8226a4f..bdbad1e 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditAttributeDialog.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditAttributeDialog.java
@@ -27,7 +27,7 @@
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.eclipse.wst.xml.ui.util.XMLCommonUIContextIds;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
@@ -86,7 +86,7 @@
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
Label attributeNameLabel = new Label(composite, SWT.NONE);
- attributeNameLabel.setText(XMLUIPlugin.getResourceString("%_UI_LABEL_NAME_COLON")); //$NON-NLS-1$
+ attributeNameLabel.setText(XMLUIMessages._UI_LABEL_NAME_COLON); //$NON-NLS-1$
attributeNameField = new Text(composite, SWT.SINGLE | SWT.BORDER);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
@@ -96,7 +96,7 @@
attributeNameField.addModifyListener(this);
Label attributeValueLabel = new Label(composite, SWT.NONE);
- attributeValueLabel.setText(XMLUIPlugin.getResourceString("%_UI_LABEL_VALUE_COLON")); //$NON-NLS-1$
+ attributeValueLabel.setText(XMLUIMessages._UI_LABEL_VALUE_COLON); //$NON-NLS-1$
String value = attribute != null ? attribute.getValue() : ""; //$NON-NLS-1$
int style = SWT.SINGLE | SWT.BORDER;
@@ -112,7 +112,7 @@
// error message
errorMessageLabel = new Label(composite, SWT.WRAP);
- errorMessageLabel.setText(XMLUIPlugin.getResourceString("%error_message_goes_here")); //$NON-NLS-1$
+ errorMessageLabel.setText(XMLUIMessages.error_message_goes_here); //$NON-NLS-1$
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.widthHint = 200;
gd.heightHint = Math.max(30, errorMessageLabel.computeSize(0, 0, false).y * 2);
@@ -154,7 +154,7 @@
if (name.length() > 0) {
Attr matchingAttribute = ownerElement.getAttributeNode(name);
if (matchingAttribute != null && matchingAttribute != attribute) {
- errorMessage = XMLUIPlugin.getResourceString("%_ERROR_XML_ATTRIBUTE_ALREADY_EXISTS"); //$NON-NLS-1$
+ errorMessage = XMLUIMessages._ERROR_XML_ATTRIBUTE_ALREADY_EXISTS; //$NON-NLS-1$
} else {
// TODO get checkName from Model
//errorMessage = ValidateHelper.checkXMLName(name);
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditDoctypeDialog.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditDoctypeDialog.java
index 443f85b..e6acdf9 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditDoctypeDialog.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditDoctypeDialog.java
@@ -31,7 +31,7 @@
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.eclipse.wst.xml.ui.util.XMLCommonUIContextIds;
import org.w3c.dom.DocumentType;
@@ -104,7 +104,7 @@
// row 1
//
Label rootElementNameLabel = new Label(composite, SWT.NONE);
- rootElementNameLabel.setText(XMLUIPlugin.getResourceString("%_UI_LABEL_ROOT_ELEMENT_NAME_COLON")); //$NON-NLS-1$
+ rootElementNameLabel.setText(XMLUIMessages._UI_LABEL_ROOT_ELEMENT_NAME_COLON); //$NON-NLS-1$
rootElementNameField = new Text(composite, SWT.SINGLE | SWT.BORDER);
WorkbenchHelp.setHelp(rootElementNameField, XMLCommonUIContextIds.XCUI_DOCTYPE_ROOT);
@@ -120,7 +120,7 @@
// row 2
//
Label publicIdLabel = new Label(composite, SWT.NONE);
- publicIdLabel.setText(XMLUIPlugin.getResourceString("%_UI_LABEL_PUBLIC_ID_COLON")); //$NON-NLS-1$
+ publicIdLabel.setText(XMLUIMessages._UI_LABEL_PUBLIC_ID_COLON); //$NON-NLS-1$
publicIdField = new Text(composite, SWT.SINGLE | SWT.BORDER);
WorkbenchHelp.setHelp(publicIdField, XMLCommonUIContextIds.XCUI_DOCTYPE_PUBLIC);
@@ -140,12 +140,12 @@
publicIdBrowseButton = new Button(composite, SWT.NONE);
WorkbenchHelp.setHelp(publicIdBrowseButton, XMLCommonUIContextIds.XCUI_DOCTYPE_PUBLIC_BROWSE);
- publicIdBrowseButton.setText(XMLUIPlugin.getResourceString("%_UI_LABEL_BROWSE")); //$NON-NLS-1$
+ publicIdBrowseButton.setText(XMLUIMessages._UI_LABEL_BROWSE); //$NON-NLS-1$
publicIdBrowseButton.addSelectionListener(selectionListener);
// row 3
Label systemIdLabel = new Label(composite, SWT.NONE);
- systemIdLabel.setText(XMLUIPlugin.getResourceString("%_UI_LABEL_SYSTEM_ID_COLON")); //$NON-NLS-1$
+ systemIdLabel.setText(XMLUIMessages._UI_LABEL_SYSTEM_ID_COLON); //$NON-NLS-1$
systemIdField = new Text(composite, SWT.SINGLE | SWT.BORDER);
WorkbenchHelp.setHelp(systemIdField, XMLCommonUIContextIds.XCUI_DOCTYPE_SYSTEM);
@@ -156,7 +156,7 @@
systemIdBrowseButton = new Button(composite, SWT.NONE);
WorkbenchHelp.setHelp(systemIdBrowseButton, XMLCommonUIContextIds.XCUI_DOCTYPE_SYSTEM_BROWSE);
- systemIdBrowseButton.setText(XMLUIPlugin.getResourceString("%_UI_LABEL_BROWSE")); //$NON-NLS-1$
+ systemIdBrowseButton.setText(XMLUIMessages._UI_LABEL_BROWSE); //$NON-NLS-1$
systemIdBrowseButton.addSelectionListener(selectionListener);
// error message
@@ -222,9 +222,9 @@
if (errorChecking) {
String errorMessage = null;
if (getModelValue(systemIdField.getText()) == null) {
- errorMessage = XMLUIPlugin.getResourceString("%_UI_WARNING_SYSTEM_ID_MUST_BE_SPECIFIED"); //$NON-NLS-1$
+ errorMessage = XMLUIMessages._UI_WARNING_SYSTEM_ID_MUST_BE_SPECIFIED; //$NON-NLS-1$
} else if (getModelValue(rootElementNameField.getText()) == null) {
- errorMessage = XMLUIPlugin.getResourceString("%_UI_WARNING_ROOT_ELEMENT_MUST_BE_SPECIFIED"); //$NON-NLS-1$
+ errorMessage = XMLUIMessages._UI_WARNING_ROOT_ELEMENT_MUST_BE_SPECIFIED; //$NON-NLS-1$
}
errorMessageLabel.setText(errorMessage != null ? errorMessage : ""); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditElementDialog.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditElementDialog.java
index d196e12..a2d14dd 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditElementDialog.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditElementDialog.java
@@ -28,7 +28,7 @@
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.wst.xml.core.NameValidator;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.eclipse.wst.xml.ui.util.XMLCommonUIContextIds;
import org.w3c.dom.Element;
@@ -79,7 +79,7 @@
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
Label elementNameLabel = new Label(composite, SWT.NONE);
- elementNameLabel.setText(XMLUIPlugin.getResourceString("%_UI_LABEL_ELEMENT_NAME")); //$NON-NLS-1$
+ elementNameLabel.setText(XMLUIMessages._UI_LABEL_ELEMENT_NAME); //$NON-NLS-1$
elementNameField = new Text(composite, SWT.SINGLE | SWT.BORDER);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
@@ -90,7 +90,7 @@
// error message
errorMessageLabel = new Label(composite, SWT.NONE);
- errorMessageLabel.setText(XMLUIPlugin.getResourceString("%error_message_goes_here")); //$NON-NLS-1$
+ errorMessageLabel.setText(XMLUIMessages.error_message_goes_here); //$NON-NLS-1$
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 2;
errorMessageLabel.setLayoutData(gd);
@@ -128,7 +128,7 @@
// TODO use checkName from model level
//errorMessage = ValidateHelper.checkXMLName(name);
if (!NameValidator.isValid(name)) {
- errorMessage = XMLUIPlugin.getResourceString("%_UI_INVALID_NAME");
+ errorMessage = XMLUIMessages._UI_INVALID_NAME;
}
} else {
errorMessage = ""; //$NON-NLS-1$
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditEntityHelper.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditEntityHelper.java
index 8b05e24..100a759 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditEntityHelper.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditEntityHelper.java
@@ -17,7 +17,7 @@
import org.eclipse.jface.window.Window;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.eclipse.wst.xml.uriresolver.XMLCatalogEntry;
import org.eclipse.wst.xml.uriresolver.util.URIHelper;
@@ -31,7 +31,7 @@
String[] extensions = {"dtd", "txt"}; //$NON-NLS-1$ //$NON-NLS-2$
SelectXMLCatalogIdDialog dialog = new SelectXMLCatalogIdDialog(parentShell, extensions);
dialog.create();
- dialog.getShell().setText(XMLUIPlugin.getResourceString("%_UI_LABEL_SELECT_XML_CATALOG_ENTRY")); //$NON-NLS-1$
+ dialog.getShell().setText(XMLUIMessages._UI_LABEL_SELECT_XML_CATALOG_ENTRY); //$NON-NLS-1$
dialog.setBlockOnOpen(true);
dialog.open();
if (dialog.getReturnCode() == Window.OK) {
@@ -49,7 +49,7 @@
String[] extensions = {"dtd"}; //$NON-NLS-1$
SelectFileOrXMLCatalogIdDialog dialog = new SelectFileOrXMLCatalogIdDialog(parentShell, extensions, XMLCatalogEntry.SYSTEM);
dialog.create();
- dialog.getShell().setText(XMLUIPlugin.getResourceString("%_UI_LABEL_SPECIFY_SYSTEM_ID")); //$NON-NLS-1$
+ dialog.getShell().setText(XMLUIMessages._UI_LABEL_SPECIFY_SYSTEM_ID); //$NON-NLS-1$
dialog.setBlockOnOpen(true);
dialog.open();
if (dialog.getReturnCode() == Window.OK) {
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditNamespaceInfoDialog.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditNamespaceInfoDialog.java
index 451b3bb..1c12941 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditNamespaceInfoDialog.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditNamespaceInfoDialog.java
@@ -37,7 +37,7 @@
import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
import org.eclipse.wst.xml.core.internal.contentmodel.ContentModelManager;
import org.eclipse.wst.xml.core.internal.contentmodel.util.NamespaceInfo;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.eclipse.wst.xml.uriresolver.util.IdResolver;
import org.eclipse.wst.xml.uriresolver.util.IdResolverImpl;
import org.eclipse.wst.xml.uriresolver.util.URIHelper;
@@ -118,7 +118,7 @@
// row 1
//
Label uriLabel = new Label(composite, SWT.NONE);
- uriLabel.setText(XMLUIPlugin.getResourceString("%_UI_LABEL_NAMESPACE_NAME_COLON")); //$NON-NLS-1$
+ uriLabel.setText(XMLUIMessages._UI_LABEL_NAMESPACE_NAME_COLON); //$NON-NLS-1$
uriField = new Text(composite, SWT.SINGLE | SWT.BORDER);
gd = new GridData(GridData.FILL_HORIZONTAL);
@@ -133,7 +133,7 @@
// row 2
//
Label prefixLabel = new Label(composite, SWT.NONE);
- prefixLabel.setText(XMLUIPlugin.getResourceString("%_UI_LABEL_PREFIX_COLON")); //$NON-NLS-1$
+ prefixLabel.setText(XMLUIMessages._UI_LABEL_PREFIX_COLON); //$NON-NLS-1$
prefixField = new Text(composite, SWT.SINGLE | SWT.BORDER);
gd = new GridData(GridData.FILL_HORIZONTAL);
@@ -147,7 +147,7 @@
// row 3
//
Label locationHintLabel = new Label(composite, SWT.NONE);
- locationHintLabel.setText(XMLUIPlugin.getResourceString("%_UI_LABEL_LOCATION_HINT_COLON")); //$NON-NLS-1$
+ locationHintLabel.setText(XMLUIMessages._UI_LABEL_LOCATION_HINT_COLON); //$NON-NLS-1$
locationHintField = new Text(composite, SWT.SINGLE | SWT.BORDER);
gd = new GridData(GridData.FILL_HORIZONTAL);
@@ -164,13 +164,13 @@
};
browseButton = new Button(composite, SWT.NONE);
- browseButton.setText(XMLUIPlugin.getResourceString("%_UI_LABEL_BROWSE")); //$NON-NLS-1$
+ browseButton.setText(XMLUIMessages._UI_LABEL_BROWSE); //$NON-NLS-1$
browseButton.addSelectionListener(selectionListener);
browseButton.setEnabled(locationHintField.getEnabled());
// error message
errorMessageLabel = new Label(dialogArea, SWT.NONE);
- errorMessageLabel.setText(XMLUIPlugin.getResourceString("%error_message_goes_here")); //$NON-NLS-1$
+ errorMessageLabel.setText(XMLUIMessages.error_message_goes_here); //$NON-NLS-1$
errorMessageLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
Color color = new Color(errorMessageLabel.getDisplay(), 200, 0, 0);
errorMessageLabel.setForeground(color);
@@ -186,7 +186,7 @@
String[] extensions = {".xsd"}; //$NON-NLS-1$
SelectFileOrXMLCatalogIdDialog dialog = new SelectFileOrXMLCatalogIdDialog(getShell(), extensions);
dialog.create();
- dialog.getShell().setText(XMLUIPlugin.getResourceString("%_UI_LABEL_SELECT_FILE")); //$NON-NLS-1$
+ dialog.getShell().setText(XMLUIMessages._UI_LABEL_SELECT_FILE); //$NON-NLS-1$
dialog.setBlockOnOpen(true);
dialog.open();
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditProcessingInstructionDialog.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditProcessingInstructionDialog.java
index cda35f9..89b741e 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditProcessingInstructionDialog.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditProcessingInstructionDialog.java
@@ -24,7 +24,7 @@
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.eclipse.wst.xml.ui.util.XMLCommonUIContextIds;
import org.w3c.dom.ProcessingInstruction;
@@ -72,14 +72,14 @@
gd.widthHint = 250;
Label targetLabel = new Label(composite, SWT.NONE);
- targetLabel.setText(XMLUIPlugin.getResourceString("%_UI_LABEL_TARGET_COLON")); //$NON-NLS-1$
+ targetLabel.setText(XMLUIMessages._UI_LABEL_TARGET_COLON); //$NON-NLS-1$
targetField = new Text(composite, SWT.SINGLE | SWT.BORDER);
targetField.setLayoutData(gd);
targetField.setText(getDisplayValue(target));
Label dataLabel = new Label(composite, SWT.NONE);
- dataLabel.setText(XMLUIPlugin.getResourceString("%_UI_LABEL_DATA_COLON")); //$NON-NLS-1$
+ dataLabel.setText(XMLUIMessages._UI_LABEL_DATA_COLON); //$NON-NLS-1$
dataField = new Text(composite, SWT.SINGLE | SWT.BORDER);
dataField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditSchemaInfoDialog.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditSchemaInfoDialog.java
index 8f6096e..d4a4fe3 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditSchemaInfoDialog.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/EditSchemaInfoDialog.java
@@ -23,7 +23,7 @@
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.eclipse.wst.xml.ui.nsedit.CommonEditNamespacesDialog;
public class EditSchemaInfoDialog extends Dialog implements UpdateListener {
@@ -45,7 +45,7 @@
protected Control createDialogArea(Composite parent) {
Composite dialogArea = (Composite) super.createDialogArea(parent);
- CommonEditNamespacesDialog editNamespacesControl = new CommonEditNamespacesDialog(dialogArea, resourceLocation, XMLUIPlugin.getResourceString("%_UI_NAMESPACE_DECLARATIONS"), false, true); //$NON-NLS-1$
+ CommonEditNamespacesDialog editNamespacesControl = new CommonEditNamespacesDialog(dialogArea, resourceLocation, XMLUIMessages._UI_NAMESPACE_DECLARATIONS, false, true); //$NON-NLS-1$
editNamespacesControl.setNamespaceInfoList(namespaceInfoList);
editNamespacesControl.updateErrorMessage(namespaceInfoList);
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/NamespaceInfoErrorHelper.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/NamespaceInfoErrorHelper.java
index 08cfb29..fc846d3 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/NamespaceInfoErrorHelper.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/NamespaceInfoErrorHelper.java
@@ -18,7 +18,7 @@
import org.eclipse.wst.xml.core.internal.contentmodel.util.DOMNamespaceInfoManager;
import org.eclipse.wst.xml.core.internal.contentmodel.util.NamespaceInfo;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.eclipse.wst.xml.uriresolver.util.IdResolver;
import org.eclipse.wst.xml.uriresolver.util.URIHelper;
@@ -41,9 +41,9 @@
NamespaceInfo nsInfo2 = null;
if ((nsInfo2 = (NamespaceInfo) uriTable.get(urikey)) != null) {
if (nsInfo.uri != null && nsInfo.uri.equals(nsInfo2.uri)) {
- result = XMLUIPlugin.getResourceString("%_UI_WARNING_MORE_THAN_ONE_NS_WITH_NAME") + "'" + nsInfo.uri + "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ result = XMLUIMessages._UI_WARNING_MORE_THAN_ONE_NS_WITH_NAME + "'" + nsInfo.uri + "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
} else {
- result = XMLUIPlugin.getResourceString("%_UI_WARNING_MORE_THAN_ONE_NS_WITHOUT_NAME"); //$NON-NLS-1$
+ result = XMLUIMessages._UI_WARNING_MORE_THAN_ONE_NS_WITHOUT_NAME; //$NON-NLS-1$
}
break;
} else {
@@ -54,10 +54,10 @@
String key = nsInfo.prefix != null ? nsInfo.prefix : ""; //$NON-NLS-1$
if (prefixTable.get(key) != null) {
if (nsInfo.prefix != null) {
- result = XMLUIPlugin.getResourceString("%_UI_WARNING_MORE_THAN_ONE_NS_WITH_PREFIX") + "'" + nsInfo.prefix + "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ result = XMLUIMessages._UI_WARNING_MORE_THAN_ONE_NS_WITH_PREFIX + "'" + nsInfo.prefix + "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
break;
} else {
- result = XMLUIPlugin.getResourceString("%_UI_WARNING_MORE_THAN_ONE_NS_WITHOUT_PREFIX"); //$NON-NLS-1$
+ result = XMLUIMessages._UI_WARNING_MORE_THAN_ONE_NS_WITHOUT_PREFIX; //$NON-NLS-1$
break;
}
} else {
@@ -67,17 +67,17 @@
if (nsInfo.locationHint != null && idResolver != null) {
String grammarURI = idResolver.resolveId(nsInfo.locationHint, nsInfo.locationHint);
if (!URIHelper.isReadableURI(grammarURI, false)) {
- result = XMLUIPlugin.getResourceString("%_UI_WARNING_SCHEMA_CAN_NOT_BE_LOCATED") + " '" + nsInfo.locationHint + "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ result = XMLUIMessages._UI_WARNING_SCHEMA_CAN_NOT_BE_LOCATED + " '" + nsInfo.locationHint + "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
break;
}
}
if (idResolver != null && nsInfo.locationHint == null && !nsInfo.uri.equals(DOMNamespaceInfoManager.XSI_URI)) {
- result = XMLUIPlugin.getResourceString("%_UI_WARNING_LOCATION_HINT_NOT_SPECIFIED") + " '" + nsInfo.uri + "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ result = XMLUIMessages._UI_WARNING_LOCATION_HINT_NOT_SPECIFIED + " '" + nsInfo.uri + "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
break;
}
} else {
if (nsInfo.prefix != null) {
- result = XMLUIPlugin.getResourceString("%_UI_WARNING_NAMESPACE_NAME_NOT_SPECIFIED") + " '" + nsInfo.prefix + "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ result = XMLUIMessages._UI_WARNING_NAMESPACE_NAME_NOT_SPECIFIED + " '" + nsInfo.prefix + "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
break;
}
}
@@ -88,7 +88,7 @@
NamespaceInfo nsInfo = (NamespaceInfo) iterator.next();
nsInfo.normalize();
if (nsInfo.uri != null && nsInfo.isPrefixRequired && nsInfo.prefix == null) {
- result = XMLUIPlugin.getResourceString("%_UI_WARNING_PREFIX_NOT_SPECIFIED") + " '" + nsInfo.uri + "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ result = XMLUIMessages._UI_WARNING_PREFIX_NOT_SPECIFIED + " '" + nsInfo.uri + "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
break;
}
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/NamespaceInfoTable.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/NamespaceInfoTable.java
index f7b53af..2f9936a 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/NamespaceInfoTable.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/NamespaceInfoTable.java
@@ -49,6 +49,7 @@
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.wst.xml.core.internal.contentmodel.util.NamespaceInfo;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
public class NamespaceInfoTable extends Composite {
@@ -89,11 +90,11 @@
if (result.equals("")) { //$NON-NLS-1$
switch (column) {
case 0 : {
- result = XMLUIPlugin.getResourceString("%_UI_NO_NAMESPACE_NAME"); //$NON-NLS-1$
+ result = XMLUIMessages._UI_NO_NAMESPACE_NAME; //$NON-NLS-1$
break;
}
case 1 : {
- result = XMLUIPlugin.getResourceString("%_UI_NO_PREFIX"); //$NON-NLS-1$
+ result = XMLUIMessages._UI_NO_PREFIX; //$NON-NLS-1$
break;
}
}
@@ -144,9 +145,9 @@
}
}
- protected static final String LOCATION_HINT = XMLUIPlugin.getResourceString("%_UI_LABEL_LOCATION_HINT"); //$NON-NLS-1$
- protected static final String NAMESPACE_URI = XMLUIPlugin.getResourceString("%_UI_LABEL_NAMESPACE_NAME"); //$NON-NLS-1$
- protected static final String PREFIX = XMLUIPlugin.getResourceString("%_UI_LABEL_PREFIX"); //$NON-NLS-1$
+ protected static final String LOCATION_HINT = XMLUIMessages._UI_LABEL_LOCATION_HINT; //$NON-NLS-1$
+ protected static final String NAMESPACE_URI = XMLUIMessages._UI_LABEL_NAMESPACE_NAME; //$NON-NLS-1$
+ protected static final String PREFIX = XMLUIMessages._UI_LABEL_PREFIX; //$NON-NLS-1$
protected Button deleteButton;
protected boolean dummyRowsRemoved = false;
protected Button editButton;
@@ -175,7 +176,7 @@
setLayout(createGridLayout());
setLayoutData(new GridData(GridData.FILL_BOTH));
Group namespaceInfoGroup = new Group(this, SWT.NONE);
- namespaceInfoGroup.setText(XMLUIPlugin.getResourceString("%_UI_LABEL_XML_SCHEMA_INFORMATION")); //$NON-NLS-1$
+ namespaceInfoGroup.setText(XMLUIMessages._UI_LABEL_XML_SCHEMA_INFORMATION); //$NON-NLS-1$
namespaceInfoGroup.setLayout(new GridLayout());
GridData gd = new GridData(GridData.FILL_BOTH);
if (widthHint != -1) {
@@ -265,19 +266,19 @@
// add the New button
//
newButton = new Button(buttonComposite, SWT.NONE);
- newButton.setText(XMLUIPlugin.getResourceString("%_UI_BUTTON_NEW")); //$NON-NLS-1$
+ newButton.setText(XMLUIMessages._UI_BUTTON_NEW); //$NON-NLS-1$
newButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
newButton.addSelectionListener(selectionListener);
// add the Edit button
//
editButton = new Button(buttonComposite, SWT.NONE);
- editButton.setText(XMLUIPlugin.getResourceString("%_UI_BUTTON_EDIT")); //$NON-NLS-1$
+ editButton.setText(XMLUIMessages._UI_BUTTON_EDIT); //$NON-NLS-1$
editButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
editButton.addSelectionListener(selectionListener);
// add the Delete button
//
deleteButton = new Button(buttonComposite, SWT.NONE);
- deleteButton.setText(XMLUIPlugin.getResourceString("%_UI_BUTTON_DELETE")); //$NON-NLS-1$
+ deleteButton.setText(XMLUIMessages._UI_BUTTON_DELETE); //$NON-NLS-1$
deleteButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
deleteButton.addSelectionListener(selectionListener);
}
@@ -333,14 +334,14 @@
ISelection selection = tableViewer.getSelection();
Object selectedObject = (selection instanceof IStructuredSelection) ? ((IStructuredSelection) selection).getFirstElement() : null;
if (selectedObject instanceof NamespaceInfo) {
- EditNamespaceInfoDialog dialog = invokeDialog(XMLUIPlugin.getResourceString("%_UI_LABEL_NEW_NAMESPACE_INFORMATION"), (NamespaceInfo) selectedObject); //$NON-NLS-1$
+ EditNamespaceInfoDialog dialog = invokeDialog(XMLUIMessages._UI_LABEL_NEW_NAMESPACE_INFORMATION, (NamespaceInfo) selectedObject); //$NON-NLS-1$
performDelayedUpdate();
}
}
public void performNew() {
NamespaceInfo info = new NamespaceInfo();
- EditNamespaceInfoDialog dialog = invokeDialog(XMLUIPlugin.getResourceString("%_UI_LABEL_NEW_NAMESPACE_INFORMATION"), info); //$NON-NLS-1$
+ EditNamespaceInfoDialog dialog = invokeDialog(XMLUIMessages._UI_LABEL_NEW_NAMESPACE_INFORMATION, info); //$NON-NLS-1$
if (dialog.getReturnCode() == Window.OK) {
namespaceInfoList.add(info);
performDelayedUpdate();
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/SelectFileOrXMLCatalogIdPanel.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/SelectFileOrXMLCatalogIdPanel.java
index ff786ab..cc5c43d 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/SelectFileOrXMLCatalogIdPanel.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/SelectFileOrXMLCatalogIdPanel.java
@@ -25,7 +25,7 @@
import org.eclipse.swt.widgets.Control;
import org.eclipse.ui.part.PageBook;
import org.eclipse.wst.common.ui.viewers.SelectSingleFileView;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.eclipse.wst.xml.uriresolver.XMLCatalog;
import org.eclipse.wst.xml.uriresolver.XMLCatalogEntry;
import org.eclipse.wst.xml.uriresolver.XMLCatalogPlugin;
@@ -83,13 +83,13 @@
radioButton = new Button[2];
radioButton[0] = new Button(this, SWT.RADIO);
- radioButton[0].setText(XMLUIPlugin.getResourceString("%_UI_RADIO_BUTTON_SELECT_FROM_WORKSPACE")); //$NON-NLS-1$
+ radioButton[0].setText(XMLUIMessages._UI_RADIO_BUTTON_SELECT_FROM_WORKSPACE); //$NON-NLS-1$
radioButton[0].setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
radioButton[0].setSelection(true);
radioButton[0].addSelectionListener(this);
radioButton[1] = new Button(this, SWT.RADIO);
- radioButton[1].setText(XMLUIPlugin.getResourceString("%_UI_RADIO_BUTTON_SELECT_FROM_CATALOG")); //$NON-NLS-1$
+ radioButton[1].setText(XMLUIMessages._UI_RADIO_BUTTON_SELECT_FROM_CATALOG); //$NON-NLS-1$
radioButton[1].setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
radioButton[1].addSelectionListener(this);
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/SelectXMLCatalogIdPanel.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/SelectXMLCatalogIdPanel.java
index 082ebc7..f72594b 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/SelectXMLCatalogIdPanel.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dialogs/SelectXMLCatalogIdPanel.java
@@ -24,7 +24,7 @@
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.eclipse.wst.xml.uriresolver.XMLCatalog;
import org.eclipse.wst.xml.uriresolver.XMLCatalogEntry;
@@ -47,7 +47,7 @@
this.setLayoutData(gd);
Label label = new Label(this, SWT.NONE);
- label.setText(XMLUIPlugin.getResourceString("%_UI_LABEL_XML_CATALOG_COLON")); //$NON-NLS-1$
+ label.setText(XMLUIMessages._UI_LABEL_XML_CATALOG_COLON); //$NON-NLS-1$
tableViewer = createTableViewer(this);
tableViewer.getControl().setLayoutData(new GridData(GridData.FILL_BOTH));
@@ -56,8 +56,8 @@
protected XMLCatalogTableViewer createTableViewer(Composite parent) {
String headings[] = new String[2];
- headings[0] = XMLUIPlugin.getResourceString("%_UI_LABEL_KEY"); //$NON-NLS-1$
- headings[1] = XMLUIPlugin.getResourceString("%_UI_LABEL_URI"); //$NON-NLS-1$
+ headings[0] = XMLUIMessages._UI_LABEL_KEY; //$NON-NLS-1$
+ headings[1] = XMLUIMessages._UI_LABEL_URI; //$NON-NLS-1$
XMLCatalogTableViewer theTableViewer = new XMLCatalogTableViewer(parent, headings) {
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dnd/DragNodeCommand.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dnd/DragNodeCommand.java
index c1cac6e..6c435d3 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dnd/DragNodeCommand.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/dnd/DragNodeCommand.java
@@ -22,7 +22,7 @@
import org.eclipse.wst.common.ui.dnd.DefaultDragAndDropCommand;
import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.xml.core.document.IDOMNode;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -35,7 +35,7 @@
protected void beginModelChange(Node node, boolean batchUpdate) {
IStructuredModel structuredModel = getStructedModel(node);
if (structuredModel != null) {
- structuredModel.beginRecording(this, XMLUIPlugin.getResourceString("%DragNodeCommand.0")); //$NON-NLS-1$
+ structuredModel.beginRecording(this, XMLUIMessages.DragNodeCommand_0); //$NON-NLS-1$
if (batchUpdate) {
// structuredModel.aboutToChangeModel();
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIMessages.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIMessages.java
new file mode 100644
index 0000000..8264ae2
--- /dev/null
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIMessages.java
@@ -0,0 +1,289 @@
+/**********************************************************************
+ * Copyright (c) 2005 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 http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.wst.xml.ui.internal;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Strings used by XML UI
+ *
+ * @since 1.0
+ */
+public class XMLUIMessages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.wst.xml.ui.internal.XMLUIPluginResources";//$NON-NLS-1$
+ private static ResourceBundle fResourceBundle;
+
+ public static String Sample_XML_doc;
+ public static String Comment_Delimiters_UI_;
+ public static String Comment_Content_UI_;
+ public static String Tag_Delimiters_UI_;
+ public static String Tag_Names_UI_;
+ public static String Attribute_Names_UI_;
+ public static String Attribute_Values_UI_;
+ public static String Declaration_Delimiters_UI_;
+ public static String Content_UI_;
+ public static String CDATA_Delimiters_UI_;
+ public static String CDATA_Content_UI_;
+ public static String Processing_Instruction_Del_UI_;
+ public static String Processing_Instruction_Con_UI__UI_;
+ public static String DOCTYPE_Name_UI_;
+ public static String DOCTYPE_SYSTEM_PUBLIC_Keyw_UI_;
+ public static String DOCTYPE_Public_Reference_UI_;
+ public static String DOCTYPE_System_Reference_UI_;
+ public static String DELETE;
+ public static String ADD_PROCESSING_INSTRUCTION;
+ public static String _UI_MENU_ADD_AFTER;
+ public static String _UI_MENU_ADD_ATTRIBUTE;
+ public static String _UI_MENU_ADD_BEFORE;
+ public static String _UI_MENU_ADD_CHILD;
+ public static String _UI_MENU_REMOVE;
+ public static String _UI_MENU_REPLACE_WITH;
+ public static String _UI_MENU_EDIT_DOCTYPE;
+ public static String _UI_LABEL_UNDO_REPLACE_DESCRIPTION;
+ public static String _UI_LABEL_EDIT_DOCTYPE;
+ public static String _UI_INFO_EXPAND_ALL;
+ public static String _UI_INFO_COLLAPSE_ALL;
+ public static String _UI_MENU_ADD_DTD_INFORMATION;
+ public static String _UI_MENU_ADD_SCHEMA_INFORMATION;
+ public static String _UI_MENU_EDIT_PROCESSING_INSTRUCTION;
+ public static String _UI_MENU_EDIT_NAMESPACES;
+ public static String _UI_MENU_ADD_DTD_INFORMATION_TITLE;
+ public static String _UI_MENU_EDIT_PROCESSING_INSTRUCTION_TITLE;
+ public static String _UI_MENU_EDIT_SCHEMA_INFORMATION_TITLE;
+ public static String _UI_MENU_NEW_ATTRIBUTE;
+ public static String _UI_MENU_NEW_ATTRIBUTE_TITLE;
+ public static String _UI_MENU_EDIT_ATTRIBUTE;
+ public static String _UI_MENU_EDIT_ATTRIBUTE_TITLE;
+ public static String _UI_MENU_NEW_ELEMENT;
+ public static String _UI_MENU_NEW_ELEMENT_TITLE;
+ public static String _UI_MENU_RENAME;
+ public static String _UI_MENU_RENAME_TITLE;
+ public static String _UI_LABEL_ELEMENT_NAME;
+ public static String _UI_MENU_ADD_COMMENT;
+ public static String _UI_MENU_ADD_PROCESSING_INSTRUCTION;
+ public static String _UI_MENU_ADD_CDATA_SECTION;
+ public static String _UI_MENU_ADD_PCDATA;
+ public static String _UI_MENU_COMMENT;
+ public static String _UI_MENU_PROCESSING_INSTRUCTION;
+ public static String _UI_MENU_CDATA_SECTION;
+ public static String _UI_MENU_PCDATA;
+ public static String _UI_MENU_ADD;
+ public static String _UI_COMMENT_VALUE;
+ public static String _UI_PI_TARGET_VALUE;
+ public static String _UI_PI_DATA_VALUE;
+ public static String _UI_LABEL_ROOT_ELEMENT_VALUE;
+ public static String _UI_LABEL_TARGET_COLON;
+ public static String _UI_LABEL_DATA_COLON;
+ public static String _UI_LABEL_ROOT_ELEMENT_NAME_COLON;
+ public static String _UI_LABEL_PUBLIC_ID_COLON;
+ public static String _UI_LABEL_SYSTEM_ID_COLON;
+ public static String _UI_LABEL_BROWSE;
+ public static String _UI_LABEL_SELECT_XML_CATALOG_ENTRY;
+ public static String _UI_LABEL_SPECIFY_SYSTEM_ID;
+ public static String _UI_LABEL_SELECT_FILE;
+ public static String _UI_LABEL_KEY;
+ public static String _UI_LABEL_URI;
+ public static String _UI_LABEL_XML_CATALOG_COLON;
+ public static String _UI_LABEL_NAMESPACE_NAME;
+ public static String _UI_LABEL_LOCATION_HINT;
+ public static String _UI_LABEL_PREFIX;
+ public static String _UI_LABEL_NAMESPACE_NAME_COLON;
+ public static String _UI_LABEL_LOCATION_HINT_COLON;
+ public static String _UI_LABEL_PREFIX_COLON;
+ public static String _UI_NO_NAMESPACE_NAME;
+ public static String _UI_NO_PREFIX;
+ public static String _UI_LABEL_XML_SCHEMA_INFORMATION;
+ public static String _UI_LABEL_NAME_COLON;
+ public static String _UI_LABEL_VALUE_COLON;
+ public static String _UI_BUTTON_DELETE;
+ public static String _UI_BUTTON_NEW;
+ public static String _UI_BUTTON_EDIT;
+ public static String _UI_LABEL_NEW_NAMESPACE_INFORMATION;
+ public static String _UI_RADIO_BUTTON_SELECT_FROM_WORKSPACE;
+ public static String _UI_RADIO_BUTTON_SELECT_FROM_CATALOG;
+ public static String _UI_WARNING_MORE_THAN_ONE_NS_WITH_NAME;
+ public static String _UI_WARNING_MORE_THAN_ONE_NS_WITHOUT_NAME;
+ public static String _UI_WARNING_MORE_THAN_ONE_NS_WITHOUT_PREFIX;
+ public static String _UI_WARNING_MORE_THAN_ONE_NS_WITH_PREFIX;
+ public static String _UI_WARNING_SCHEMA_CAN_NOT_BE_LOCATED;
+ public static String _UI_WARNING_LOCATION_HINT_NOT_SPECIFIED;
+ public static String _UI_WARNING_NAMESPACE_NAME_NOT_SPECIFIED;
+ public static String _UI_WARNING_PREFIX_NOT_SPECIFIED;
+ public static String _UI_WARNING_ROOT_ELEMENT_MUST_BE_SPECIFIED;
+ public static String _UI_WARNING_SYSTEM_ID_MUST_BE_SPECIFIED;
+ public static String _UI_INVALID_NAME;
+ public static String _UI_ENTER_REQ_PREFIX_AND_NAMESPACE;
+ public static String _UI_SELECT_REGISTERED_NAMESPACES;
+ public static String _UI_SPECIFY_NEW_NAMESPACE;
+ public static String _UI_SELECT_NAMESPACE_TO_ADD;
+ public static String _UI_ADD_NAMESPACE_DECLARATIONS;
+ public static String _UI_NAMESPACE_DECLARATIONS;
+ public static String _UI_TARGET_NAMESPACE;
+ public static String _ERROR_XML_ATTRIBUTE_ALREADY_EXISTS;
+ public static String error_message_goes_here;
+ public static String SurroundWithNewElementQuickAssistProposal_0;
+ public static String SurroundWithNewElementQuickAssistProposal_1;
+ public static String RenameInFileQuickAssistProposal_0;
+ public static String RenameInFileQuickAssistProposal_1;
+ public static String InsertRequiredAttrsQuickAssistProposal_0;
+ public static String InsertRequiredAttrsQuickAssistProposal_1;
+ public static String EncodingSettings_0;
+ public static String EncodingSettings_1;
+ public static String DragNodeCommand_0;
+ public static String CommonEditNamespacesDialog_0;
+ public static String JFaceNodeAdapter_1;
+ public static String QuickFixProcessorXML_0;
+ public static String QuickFixProcessorXML_1;
+ public static String QuickFixProcessorXML_2;
+ public static String QuickFixProcessorXML_3;
+ public static String QuickFixProcessorXML_4;
+ public static String QuickFixProcessorXML_5;
+ public static String QuickFixProcessorXML_6;
+ public static String QuickFixProcessorXML_7;
+ public static String QuickFixProcessorXML_8;
+ public static String QuickFixProcessorXML_9;
+ public static String QuickFixProcessorXML_10;
+ public static String QuickFixProcessorXML_11;
+ public static String QuickFixProcessorXML_12;
+ public static String QuickFixProcessorXML_13;
+ public static String QuickFixProcessorXML_14;
+ public static String QuickFixProcessorXML_15;
+ public static String XMLPropertySourceAdapter_0;
+ public static String WorkbenchDefaultEncodingSettings_0;
+ public static String refreshoutline_0;
+ public static String Creating_files_encoding;
+ public static String End_tag_has_attributes;
+ public static String Attribute__is_missing_a_value;
+ public static String Attribute__has_no_value;
+ public static String Missing_end_tag_;
+ public static String ReconcileStepForMarkup_0;
+ public static String ReconcileStepForMarkup_1;
+ public static String ReconcileStepForMarkup_2;
+ public static String ReconcileStepForMarkup_3;
+ public static String ReconcileStepForMarkup_4;
+ public static String ReconcileStepForMarkup_5;
+ public static String ReconcileStepForMarkup_6;
+ public static String End_with_;
+ public static String SEVERE_internal_error_occu_UI_;
+ public static String No_known_attribute__UI_;
+ public static String Content_Assist_not_availab_UI_;
+ public static String Element__is_unknown;
+ public static String Comment__;
+ public static String Close_with__;
+ public static String End_with__;
+ public static String Close_with___;
+ public static String Close_with____;
+ public static String _Has_no_available_child;
+ public static String No_known_child_tag;
+ public static String __Has_no_known_child;
+ public static String No_known_child_tag_names;
+ public static String The_document_element__;
+ public static String No_definition_for_in;
+ public static String No_definition_for;
+ public static String No_content_model_for;
+ public static String No_content_model_found_UI_;
+ public static String Cleanup_UI_;
+ public static String Compress_empty_element_tags_UI_;
+ public static String Insert_required_attributes_UI_;
+ public static String Insert_missing_tags_UI_;
+ public static String Quote_attribute_values_UI_;
+ public static String Format_source_UI_;
+ public static String Convert_EOL_codes_UI_;
+ public static String EOL_Windows_UI;
+ public static String EOL_Unix_UI;
+ public static String EOL_Mac_UI;
+ public static String Creating_files;
+ public static String Encoding_desc;
+ public static String Encoding;
+ public static String Creating_or_saving_files;
+ public static String End_of_line_code_desc;
+ public static String End_of_line_code;
+ public static String EOL_Windows;
+ public static String EOL_Unix;
+ public static String EOL_Mac;
+ public static String EOL_NoTranslation;
+ public static String Content_assist_UI_;
+ public static String Automatically_make_suggest_UI_;
+ public static String Prompt_when_these_characte_UI_;
+ public static String Formatting_UI_;
+ public static String Line_width__UI_;
+ public static String Split_multiple_attributes;
+ public static String Indent_using_tabs;
+ public static String Clear_all_blank_lines_UI_;
+ public static String Grammar_Constraints;
+ public static String Use_inferred_grammar_in_absence_of;
+ public static String Element____1;
+ public static String Content_Model____2;
+ public static String Attribute____3;
+ public static String Data_Type____4;
+ public static String Enumerated_Values____5;
+ public static String FormatMenu_label;
+ public static String SourceMenu_label;
+ public static String Comment_label; // Resource bundle
+ public static String Comment_tooltip; // Resource bundle
+ public static String Comment_description; // Resource bundle
+ public static String Uncomment_label; // Resource bundle
+ public static String Uncomment_tooltip; // Resource bundle
+ public static String Uncomment_description; // Resource bundle
+ public static String ToggleComment_label; // Resource bundle
+ public static String ToggleComment_tooltip; // Resource bundle
+ public static String ToggleComment_description; // Resource bundle
+ public static String AddBlockComment_label; // Resource bundle
+ public static String AddBlockComment_tooltip; // Resource bundle
+ public static String AddBlockComment_description; // Resource bundle
+ public static String RemoveBlockComment_label; // Resource bundle
+ public static String RemoveBlockComment_tooltip; // Resource bundle
+ public static String RemoveBlockComment_description; // Resource bundle
+ public static String CleanupDocument_label; // Resource bundle
+ public static String CleanupDocument_tooltip; // Resource bundle
+ public static String CleanupDocument_description; // Resource bundle
+ public static String FindOccurrences_label; // Resource bundle
+ public static String ShowTooltipDesc_label; // Resource bundle
+ public static String ShowTooltipDesc_tooltip; // Resource bundle
+ public static String ShowTooltipDesc_description; // Resource bundle
+ public static String ContentAssistProposals_label; // Resource bundle
+ public static String ContentAssistProposals_tooltip; // Resource bundle
+ public static String ContentAssistProposals_description; // Resourcebundle
+ public static String QuickFix_label; // Resource bundle
+ public static String QuickFix_tooltip; // Resource bundle
+ public static String QuickFix_description; // Resource bundle
+ public static String FormatDocument_label; // Resource bundle
+ public static String FormatDocument_tooltip; // Resource bundle
+ public static String FormatDocument_description; // Resource bundle
+ public static String FormatActiveElements_label; // Resource bundle
+ public static String FormatActiveElements_tooltip; // Resource bundle
+ public static String FormatActiveElements_description; // Resource bundle
+ public static String OpenFileFromSource_label; // Resource bundle
+ public static String OpenFileFromSource_tooltip; // Resource bundle
+ public static String OpenFileFromSource_description; // Resource bundle
+
+ static {
+ // load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, XMLUIMessages.class);
+ }
+
+ private XMLUIMessages() {
+ // cannot create new instance
+ }
+
+ public static ResourceBundle getResourceBundle() {
+ try {
+ if (fResourceBundle == null)
+ fResourceBundle = ResourceBundle.getBundle(BUNDLE_NAME);
+ }
+ catch (MissingResourceException x) {
+ fResourceBundle = null;
+ }
+ return fResourceBundle;
+ }
+}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIPlugin.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIPlugin.java
index 5807032..094a020 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIPlugin.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIPlugin.java
@@ -13,9 +13,6 @@
package org.eclipse.wst.xml.ui.internal;
import java.io.IOException;
-import java.text.MessageFormat;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
import org.eclipse.jface.text.templates.ContextTypeRegistry;
import org.eclipse.jface.text.templates.persistence.TemplateStore;
@@ -34,10 +31,6 @@
public class XMLUIPlugin extends AbstractUIPlugin {
public final static String ID = "org.eclipse.wst.xml.ui"; //$NON-NLS-1$
protected static XMLUIPlugin instance = null;
- //Resource bundle.
- private ResourceBundle resourceBundle;
- private static final String KEY_PREFIX = "%"; //$NON-NLS-1$
- private static final String KEY_DOUBLE_PREFIX = "%%"; //$NON-NLS-1$
public static XMLUIPlugin getDefault() {
return instance;
@@ -115,49 +108,4 @@
return fContextTypeRegistry;
}
-
- /**
- * Returns the string from the plugin's resource bundle,
- * or 'key' if not found.
- */
- public static String getResourceString(String value) {
- String s = value.trim();
- if (!s.startsWith(KEY_PREFIX, 0))
- return s;
- if (s.startsWith(KEY_DOUBLE_PREFIX, 0))
- return s.substring(1);
-
- int ix = s.indexOf(' ');
- String key = ix == -1 ? s : s.substring(0, ix);
-
- ResourceBundle bundle = getDefault().getResourceBundle();
- try {
- return (bundle != null) ? bundle.getString(key.substring(1)) : key;
- } catch (MissingResourceException e) {
- return key;
- }
- }
-
- public static String getResourceString(String key, Object[] args) {
-
- try {
- return MessageFormat.format(getResourceString(key), args);
- } catch (IllegalArgumentException e) {
- return getResourceString(key);
- }
-
- }
-
- /**
- * Returns the plugin's resource bundle,
- */
- public ResourceBundle getResourceBundle() {
- try {
- if (resourceBundle == null)
- resourceBundle = ResourceBundle.getBundle("org.eclipse.wst.xml.ui.internal.XMLUIPluginResources");
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
- return resourceBundle;
- }
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIPluginResources.properties b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIPluginResources.properties
index fbf6661..6b69139 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIPluginResources.properties
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIPluginResources.properties
@@ -4,13 +4,13 @@
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
-#
+#
# Contributors:
# IBM Corporation - initial API and implementation
# Jens Lukowski/Innoopract - initial renaming/restructuring
-#
+#
###############################################################################
-## The following line is a sample XML document. Please translate only the following parts:
+## The following line is a sample XML document. Please translate only the following parts:
## begin color definitions
## Normal text content.
Sample_XML_doc=<?xml version=\"1.0\"?>\n<?customProcessingInstruction\n\tXML processor specific\n\tcontent ?>\n<!DOCTYPE colors\n\tPUBLIC \"//IBM/XML/COLORS/\" \"colors.dtd\">\n<colors>\n\t<!-- begin color definitions -->\n\t<color name=\"plaintext\" foreground=\"#000000\"\n\t\tbackground=\"#D4D0C8\" />\n\t<color name=\"bold\" foreground=\"#000000\"\n\t\tbackground=\"#B3ACA0\" />\n\t<![CDATA[<123456789>]]>\n\tNormal text content.\n\t<color name=\"inverse\" foreground=\"#F0F0F0\"\n\t\tbackground=\"#D4D0C8\" />\n\n</colors>\n
@@ -30,19 +30,15 @@
## on the following line solely translate: Name
DOCTYPE_Name_UI_=DOCTYPE Name
## on the following line solely translate: Keyword
-DOCTYPE_SYSTEM/PUBLIC_Keyw_UI_=DOCTYPE SYSTEM/PUBLIC Keyword
+DOCTYPE_SYSTEM_PUBLIC_Keyw_UI_=DOCTYPE SYSTEM/PUBLIC Keyword
## on the following line solely translate: Public Reference
DOCTYPE_Public_Reference_UI_=DOCTYPE Public Reference
## on the following line solely translate: System Reference
DOCTYPE_System_Reference_UI_=DOCTYPE System Reference
-# XML Common UI
+# XML Common UI
# Constants for strings
-NEW=New
DELETE=Remove
-ADD_TEXT=Add Text
-ADD_CDATA_SECTION=Add CDATA Section
-ADD_COMMENT=Add Commen&t
ADD_PROCESSING_INSTRUCTION=Add Processing Instruction
_UI_MENU_ADD_AFTER=Add &After
@@ -51,11 +47,7 @@
_UI_MENU_ADD_CHILD=Add &Child
_UI_MENU_REMOVE=Re&move
_UI_MENU_REPLACE_WITH=Re&place With
-_UI_MENU_ADD_DOCTYPE=Add DOCTYPE...
_UI_MENU_EDIT_DOCTYPE=Edit DOCTYPE...
-_UI_MENU_ADD_GRAMMAR_INFORMATION=Add Grammar Information
-_UI_MENU_VALIDATE_XML=Validate XML File
-_UI_LABEL_UNDO_ADD_DESCRIPTION=Add
_UI_LABEL_UNDO_REPLACE_DESCRIPTION=Replace
_UI_LABEL_EDIT_DOCTYPE=Edit DOCTYPE
_UI_INFO_EXPAND_ALL=Expand All
@@ -63,7 +55,6 @@
_UI_MENU_ADD_DTD_INFORMATION=Add DTD Information...
_UI_MENU_ADD_SCHEMA_INFORMATION=Add Schema Information...
-_UI_MENU_EDIT_SCHEMA_INFORMATION=Edit &Schema Information...
_UI_MENU_EDIT_PROCESSING_INSTRUCTION=Edit Process&ing Instruction...
_UI_MENU_EDIT_NAMESPACES=Edit &Namespaces...
@@ -80,7 +71,6 @@
_UI_MENU_RENAME=R&ename
_UI_MENU_RENAME_TITLE=Rename
_UI_LABEL_ELEMENT_NAME=Element name:
-_UI_LABEL_LOADING_GRAMMAR=Loading grammar:
_UI_MENU_ADD_COMMENT=Add Comment
_UI_MENU_ADD_PROCESSING_INSTRUCTION=Add Processing Instruction
@@ -122,7 +112,6 @@
_UI_NO_PREFIX=<no prefix>
_UI_LABEL_XML_SCHEMA_INFORMATION=XML Schema Information
-_UI_LABEL_NAMESPACE_INFORMATION=Namespace Information
_UI_LABEL_NAME_COLON=Name:
_UI_LABEL_VALUE_COLON=Value:
@@ -132,33 +121,12 @@
_UI_BUTTON_EDIT=Edit...
_UI_LABEL_NEW_NAMESPACE_INFORMATION=New Namespace Information
-_UI_LABEL_EDIT_NAMESPACE_INFORMATION=Edit Namespace Information
-#
-# Assign links to an XML file
-#
-_UI_WORK_BENCH=Workbench Files...
-_UI_FILE_SYSTEM=Import Files...
-_UI_ASSIGN_XSL=Assign An XSL Stylesheet To The XML File
-_UI_ASSIGN_DTD=Assign A DTD file To The XML File
-_UI_ASSIGN_XSD=Assign An XML schema To The XML File
-_UI_SELECT_XSL_TITLE=Select an XSL File
-_UI_SELECT_XSL_DESC=Select an XSL file from the workbench.
-
-_UI_ASSIGN=Assign
-_UI_XSD=XML Schema...
-_UI_DTD=DTD...
-_UI_XSL=XSL Stylesheet...
-
-# XMLValidator.java
-_UI_XML_VALIDATOR=XML Validator
# SelectFileOrXMLCatalogIdPanel.java
_UI_RADIO_BUTTON_SELECT_FROM_WORKSPACE=Select file from workbench
_UI_RADIO_BUTTON_SELECT_FROM_CATALOG=Select XML Catalog entry
-_UI_WARNING_TITLE_ROOT_ELEMENT_REQUIRED=Root Element Required
-_UI_WARNING_DOCUMENT_REQUIRES_ROOT=The document requires a root element in order to add schema information.
_UI_WARNING_MORE_THAN_ONE_NS_WITH_NAME=More than one namespace has been specified with the namespace name :
_UI_WARNING_MORE_THAN_ONE_NS_WITHOUT_NAME=More than one schema has been specified without a namespace name
_UI_WARNING_MORE_THAN_ONE_NS_WITHOUT_PREFIX=More than one namespace has been specificed without a prefix
@@ -185,39 +153,150 @@
#
error_message_goes_here=error message goes here
-SurroundWithNewElementQuickAssistProposal.0=Surround with new element
-SurroundWithNewElementQuickAssistProposal.1=Surround with new element
-RenameInFileQuickAssistProposal.0=Link all references for a rename in file (does not change references in other files)
-RenameInFileQuickAssistProposal.1=Rename in file
-InsertRequiredAttrsQuickAssistProposal.0=Insert required attributes
-InsertRequiredAttrsQuickAssistProposal.1=Insert required attributes
-EncodingSettings.0=IANA:
-EncodingSettings.1=Encoding:
-TemplateContextTypeXMLTag.0=XML Tags
-TemplateContextTypeXMLAttributeValue.0=XML Attribute Values
-TemplateContextTypeXMLAttribute.0=XML Attributes
-TemplateContextTypeXML.0=All XML
-DragNodeCommand.0=Move
-CommonEditNamespacesDialog.0=Add...
-JFaceNodeAdapter.1=Refresh Property Sheet
-QuickFixProcessorXML.0=Remove empty tag
-QuickFixProcessorXML.1=Change to empty-element tag
-QuickFixProcessorXML.2=Remove this tag
-QuickFixProcessorXML.3=Insert end tag before first child element
-QuickFixProcessorXML.4=Insert end tag at end of element
-QuickFixProcessorXML.5=Remove attributes in end tag
-QuickFixProcessorXML.6=Insert default attribute value
-QuickFixProcessorXML.7=Remove this attribute
-QuickFixProcessorXML.8=Remove spaces before tag name
-QuickFixProcessorXML.9=Remove spaces before processing instruction
-QuickFixProcessorXML.10=Remove namespace in processing instruction
-QuickFixProcessorXML.11=Remove this element
-QuickFixProcessorXML.12=Remove this attribute value
-QuickFixProcessorXML.13=Insert required attribute
-QuickFixProcessorXML.14=Quote attribute value
-QuickFixProcessorXML.15=Insert closing bracket
-QuickFixProcessorXML.16=Remove this attribute and its value
-XMLPropertySourceAdapter.0=Attributes
+SurroundWithNewElementQuickAssistProposal_0=Surround with new element
+SurroundWithNewElementQuickAssistProposal_1=Surround with new element
+RenameInFileQuickAssistProposal_0=Link all references for a rename in file (does not change references in other files)
+RenameInFileQuickAssistProposal_1=Rename in file
+InsertRequiredAttrsQuickAssistProposal_0=Insert required attributes
+InsertRequiredAttrsQuickAssistProposal_1=Insert required attributes
+EncodingSettings_0=IANA:
+EncodingSettings_1=Encoding:
+TemplateContextTypeXMLTag_0=XML Tags
+TemplateContextTypeXMLAttributeValue_0=XML Attribute Values
+TemplateContextTypeXMLAttribute_0=XML Attributes
+TemplateContextTypeXML_0=All XML
+DragNodeCommand_0=Move
+CommonEditNamespacesDialog_0=Add...
+JFaceNodeAdapter_1=Refresh Property Sheet
+QuickFixProcessorXML_0=Remove empty tag
+QuickFixProcessorXML_1=Change to empty-element tag
+QuickFixProcessorXML_2=Remove this tag
+QuickFixProcessorXML_3=Insert end tag before first child element
+QuickFixProcessorXML_4=Insert end tag at end of element
+QuickFixProcessorXML_5=Remove attributes in end tag
+QuickFixProcessorXML_6=Insert default attribute value
+QuickFixProcessorXML_7=Remove this attribute
+QuickFixProcessorXML_8=Remove spaces before tag name
+QuickFixProcessorXML_9=Remove spaces before processing instruction
+QuickFixProcessorXML_10=Remove namespace in processing instruction
+QuickFixProcessorXML_11=Remove this element
+QuickFixProcessorXML_12=Remove this attribute value
+QuickFixProcessorXML_13=Insert required attribute
+QuickFixProcessorXML_14=Quote attribute value
+QuickFixProcessorXML_15=Insert closing bracket
+XMLPropertySourceAdapter_0=Attributes
-WorkbenchDefaultEncodingSettings.0=Use workbench encoding
-refreshoutline.0=Refreshing Outline
+WorkbenchDefaultEncodingSettings_0=Use workbench encoding
+refreshoutline_0=Refreshing Outline
+Creating_files_encoding=Creating files encoding preference
+# ReconcileStepForMarkup
+End_tag_has_attributes=End tag has attributes
+Attribute__is_missing_a_value=Attribute \"{0}\" is missing a value
+Attribute__has_no_value=Attribute \"{0}\" has no value
+Missing_end_tag_=Missing end tag \"{0}\"
+ReconcileStepForMarkup_0=Missing closing quote
+ReconcileStepForMarkup_1=Missing quotes for attribute value
+ReconcileStepForMarkup_2=A tagname cannot start with a space
+ReconcileStepForMarkup_3=Empty tags are not allowed
+ReconcileStepForMarkup_4=Namespaces are not allowed in a Processing Instruction target
+ReconcileStepForMarkup_5=Spaces are not allowed before a Processing Instruction
+ReconcileStepForMarkup_6=Tag missing closing bracket '>'
+# Content Assist
+End_with_=End with {0}>
+SEVERE_internal_error_occu_UI_=SEVERE internal error occurred
+No_known_attribute__UI_=No known attribute
+Content_Assist_not_availab_UI_=Content Assist not available at the current location
+Element__is_unknown=Element <{0}> is unknown.
+Comment__=comment {0}
+Close_with__=Close with {0}
+End_with__=End with \"</{0}>\"
+Close_with___=Close with \"{0}\"
+Close_with____=Close with \"></{0}>\"
+_Has_no_available_child={0} has no available child tags.
+No_known_child_tag=No known child tag names of <{0}> begin with \"{1}\".
+__Has_no_known_child=<{0}> has no known child tags.
+No_known_child_tag_names=No known child tag names of <{0}> begin with \"{1}\"
+The_document_element__=The document element <{0}> is already present.
+No_definition_for_in=No definition was found for element <{0}> in {1}
+No_definition_for=No definition was found for element <{0}>
+No_content_model_for=No content model found for {0}.
+No_content_model_found_UI_=No content model found
+## The following strings are for the XML Cleanup dialog
+Cleanup_UI_=Cleanup
+Compress_empty_element_tags_UI_=&Compress empty element tags
+Insert_required_attributes_UI_=Insert &required attributes
+Insert_missing_tags_UI_=&Insert missing tags
+Quote_attribute_values_UI_=&Quote attribute values
+Format_source_UI_=&Format source
+Convert_EOL_codes_UI_=Convert line &delimiters to
+EOL_Windows_UI=&Windows
+EOL_Unix_UI=U&NIX
+EOL_Mac_UI=&Mac
+## XML Files preference page
+Creating_files=Creating files
+Encoding_desc=The following encoding will apply:
+Encoding=En&coding:
+Creating_or_saving_files=Creating or saving files
+End_of_line_code_desc=The following line delimiter will apply:
+End_of_line_code=&Line delimiter:
+EOL_Windows=Windows
+EOL_Unix=UNIX
+EOL_Mac=Mac
+EOL_NoTranslation=No translation
+## XML Source preference page
+Content_assist_UI_=Content assist
+Automatically_make_suggest_UI_=Automatically ma&ke suggestions
+Prompt_when_these_characte_UI_=P&rompt when these characters are inserted:
+Formatting_UI_=Formatting
+Line_width__UI_=Line &width:
+Split_multiple_attributes=Split &multiple attributes each on a new line
+Indent_using_tabs=&Indent using tabs
+Clear_all_blank_lines_UI_=Clear all &blank lines
+Grammar_Constraints=Grammar Constraints
+Use_inferred_grammar_in_absence_of=Use inferred grammar in absence of DTD/Schema
+## tag info
+Element____1=Element :
+Content_Model____2=Content Model :
+Attribute____3=Attribute :
+Data_Type____4=Data Type :
+Enumerated_Values____5=Enumerated Values :
+## copied from sse.ui
+FormatMenu_label=F&ormat
+SourceMenu_label=&Source
+Comment_label=Co&mment
+Comment_tooltip=Comment
+Comment_description=Comment
+Uncomment_label=&Uncomment
+Uncomment_tooltip=Uncomment
+Uncomment_description=Uncomment
+ToggleComment_label=Togg&le Comment
+ToggleComment_tooltip=Toggle Comment
+ToggleComment_description=Toggle Comment
+AddBlockComment_label=Add &Block Comment
+AddBlockComment_tooltip=Add Block Comment
+AddBlockComment_description=Add Block Comment
+RemoveBlockComment_label=Remove Bloc&k Comment
+RemoveBlockComment_tooltip=Remove Block Comment
+RemoveBlockComment_description=Remove Block Comment
+CleanupDocument_label=C&leanup Document...
+CleanupDocument_tooltip=Cleanup Document
+CleanupDocument_description=Cleanup Document
+FindOccurrences_label=O&ccurrences in File
+ShowTooltipDesc_label=Show &Tooltip Description
+ShowTooltipDesc_tooltip=Displays the hover help for the selected element
+ShowTooltipDesc_description=Displays the hover help for the selected element
+ContentAssistProposals_label=Con&tent Assist
+ContentAssistProposals_tooltip=Content Assist
+ContentAssistProposals_description=Content Assist
+QuickFix_label=&Quick Fix
+QuickFix_tooltip=Quick Fix
+QuickFix_description=Quick Fix
+FormatDocument_label=&Document
+FormatDocument_tooltip=Format Document
+FormatDocument_description=Format Document
+FormatActiveElements_label=Act&ive Elements
+FormatActiveElements_tooltip=Format Active Elements
+FormatActiveElements_description=Format Active Elements
+OpenFileFromSource_label=Op&en Selection
+OpenFileFromSource_tooltip=Open an editor on the selected link
+OpenFileFromSource_description=Open an editor on the selected link
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/JFaceNodeAdapter.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/JFaceNodeAdapter.java
index 5d4cbeb..c3615de 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/JFaceNodeAdapter.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/JFaceNodeAdapter.java
@@ -34,7 +34,7 @@
import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.CMDocumentManager;
import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.CMDocumentManagerListener;
import org.eclipse.wst.xml.core.internal.contentmodel.util.CMDocumentCache;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.eclipse.wst.xml.ui.internal.editor.CMImageUtil;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImages;
@@ -319,7 +319,7 @@
if (notifier instanceof Node && (listener instanceof StructuredViewer) && (eventType == INodeNotifier.STRUCTURE_CHANGED || (eventType == INodeNotifier.CHANGE && changedFeature == null))) {
if (DEBUG)
- System.out.println("JFaceNodeAdapter notified on event type > " + eventType);
+ System.out.println("JFaceNodeAdapter notified on event type > " + eventType); //$NON-NLS-1$
// refresh on structural and "unknown" changes
StructuredViewer structuredViewer = (StructuredViewer) listener;
@@ -335,7 +335,7 @@
* &&
* !propertySheetPage.getControl().isDisposed()
*/) {
- RefreshPropertySheetJob refreshPropertySheetJob = new RefreshPropertySheetJob(getDisplay(), XMLUIPlugin.getResourceString("%JFaceNodeAdapter.1"), propertySheetPage); //$NON-NLS-1$
+ RefreshPropertySheetJob refreshPropertySheetJob = new RefreshPropertySheetJob(getDisplay(), XMLUIMessages.JFaceNodeAdapter_1, propertySheetPage); //$NON-NLS-1$
refreshPropertySheetJob.schedule();
}
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/RefreshOutlineJob.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/RefreshOutlineJob.java
index 51da71b..da47a04 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/RefreshOutlineJob.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/RefreshOutlineJob.java
@@ -25,7 +25,7 @@
import org.eclipse.jface.viewers.StructuredViewer;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
@@ -51,7 +51,7 @@
}
public RefreshOutlineJob(StructuredViewer viewer) {
- super(XMLUIPlugin.getResourceString("%refreshoutline.0"));
+ super(XMLUIMessages.refreshoutline_0); //$NON-NLS-1$
setPriority(Job.LONG);
setSystem(true);
fRequests = new ArrayList(1);
@@ -106,9 +106,9 @@
private boolean contains(Node root, Node possible) {
if (DEBUG) {
- System.out.println("==============================================================================================================");
- System.out.println("recursive call w/ root: " + root.getNodeName() + " and possible: " + possible);
- System.out.println("--------------------------------------------------------------------------------------------------------------");
+ System.out.println("=============================================================================================================="); //$NON-NLS-1$
+ System.out.println("recursive call w/ root: " + root.getNodeName() + " and possible: " + possible); //$NON-NLS-1$ //$NON-NLS-2$
+ System.out.println("--------------------------------------------------------------------------------------------------------------"); //$NON-NLS-1$
}
// the following checks are important
@@ -116,17 +116,17 @@
// can't contain the parent if it's null
if (root == null) {
- if (DEBUG) System.out.println("returning false: root is null");
+ if (DEBUG) System.out.println("returning false: root is null"); //$NON-NLS-1$
return false;
}
// nothing can be parent of Document node
if (possible instanceof Document) {
- if (DEBUG) System.out.println("returning false: possible is Document node");
+ if (DEBUG) System.out.println("returning false: possible is Document node"); //$NON-NLS-1$
return false;
}
// document contains everything
if(root instanceof Document) {
- if (DEBUG) System.out.println("returning true: root is Document node");
+ if (DEBUG) System.out.println("returning true: root is Document node"); //$NON-NLS-1$
return true;
}
@@ -134,10 +134,10 @@
Node current = root;
// loop siblings
while (current != null) {
- if (DEBUG) System.out.println(" -> iterating sibling (" + current.getNodeName() + ")");
+ if (DEBUG) System.out.println(" -> iterating sibling (" + current.getNodeName() + ")"); //$NON-NLS-1$ //$NON-NLS-2$
// found it
if (possible.equals(current)) {
- if (DEBUG) System.out.println(" !!! found: " + possible.getNodeName() + " in subtree for: " + root.getNodeName());
+ if (DEBUG) System.out.println(" !!! found: " + possible.getNodeName() + " in subtree for: " + root.getNodeName()); //$NON-NLS-1$ //$NON-NLS-2$
return true;
}
// drop one level deeper if necessary
@@ -176,7 +176,7 @@
public void run() {
if(DEBUG)
- System.out.println("refresh on: [" +node.getNodeName()+ "]");
+ System.out.println("refresh on: [" +node.getNodeName()+ "]"); //$NON-NLS-1$ //$NON-NLS-2$
if(node instanceof Document)
fViewer.refresh();
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/InsertRequiredAttrsQuickAssistProposal.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/InsertRequiredAttrsQuickAssistProposal.java
index f8e3560..10b8cb7 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/InsertRequiredAttrsQuickAssistProposal.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/InsertRequiredAttrsQuickAssistProposal.java
@@ -33,7 +33,7 @@
import org.eclipse.wst.xml.core.document.IDOMNode;
import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImages;
@@ -105,7 +105,7 @@
* @see org.eclipse.jface.text.contentassist.ICompletionProposal#getAdditionalProposalInfo()
*/
public String getAdditionalProposalInfo() {
- return XMLUIPlugin.getResourceString("%InsertRequiredAttrsQuickAssistProposal.0"); //$NON-NLS-1$
+ return XMLUIMessages.InsertRequiredAttrsQuickAssistProposal_0; //$NON-NLS-1$
}
/*
@@ -123,7 +123,7 @@
* @see org.eclipse.jface.text.contentassist.ICompletionProposal#getDisplayString()
*/
public String getDisplayString() {
- return XMLUIPlugin.getResourceString("%InsertRequiredAttrsQuickAssistProposal.1"); //$NON-NLS-1$
+ return XMLUIMessages.InsertRequiredAttrsQuickAssistProposal_1; //$NON-NLS-1$
}
/*
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/QuickFixProcessorXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/QuickFixProcessorXML.java
index 8f9410e..6e65a97 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/QuickFixProcessorXML.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/QuickFixProcessorXML.java
@@ -21,7 +21,7 @@
import org.eclipse.swt.graphics.Image;
import org.eclipse.wst.sse.ui.internal.correction.IQuickFixProcessor;
import org.eclipse.wst.sse.ui.internal.reconcile.TemporaryAnnotation;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImages;
@@ -79,7 +79,7 @@
int problemID = tempAnnotation.getProblemID();
switch (problemID) {
case ProblemIDsXML.EmptyTag :
- proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), XMLUIPlugin.getResourceString("%QuickFixProcessorXML.0"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), XMLUIMessages.QuickFixProcessorXML_0, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
break;
case ProblemIDsXML.MissingEndTag :
String tagName = (String) ((Object[]) tempAnnotation.getAdditionalFixInfo())[0];
@@ -88,56 +88,56 @@
int startTagEndOffset = ((Integer) ((Object[]) tempAnnotation.getAdditionalFixInfo())[3]).intValue();
int firstChildStartOffset = ((Integer) ((Object[]) tempAnnotation.getAdditionalFixInfo())[4]).intValue();
int endOffset = ((Integer) ((Object[]) tempAnnotation.getAdditionalFixInfo())[5]).intValue();
- proposals.add(new CompletionProposal(tagClose, tagCloseOffset, 0, 0, getImage(), XMLUIPlugin.getResourceString("%QuickFixProcessorXML.1"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), startTagEndOffset - tempAnnotation.getPosition().getOffset(), 0, getImage(), XMLUIPlugin.getResourceString("%QuickFixProcessorXML.2"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- proposals.add(new CompletionProposal("</" + tagName + ">", firstChildStartOffset, 0, 0, getImage(), XMLUIPlugin.getResourceString("%QuickFixProcessorXML.3"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- proposals.add(new CompletionProposal("</" + tagName + ">", endOffset, 0, 0, getImage(), XMLUIPlugin.getResourceString("%QuickFixProcessorXML.4"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ proposals.add(new CompletionProposal(tagClose, tagCloseOffset, 0, 0, getImage(), XMLUIMessages.QuickFixProcessorXML_1, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), startTagEndOffset - tempAnnotation.getPosition().getOffset(), 0, getImage(), XMLUIMessages.QuickFixProcessorXML_2, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ proposals.add(new CompletionProposal("</" + tagName + ">", firstChildStartOffset, 0, 0, getImage(), XMLUIMessages.QuickFixProcessorXML_3, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ proposals.add(new CompletionProposal("</" + tagName + ">", endOffset, 0, 0, getImage(), XMLUIMessages.QuickFixProcessorXML_4, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
break;
case ProblemIDsXML.AttrsInEndTag :
- proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), XMLUIPlugin.getResourceString("%QuickFixProcessorXML.5"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), XMLUIMessages.QuickFixProcessorXML_5, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
break;
case ProblemIDsXML.MissingAttrValue :
String defaultAttrValue = (String) ((Object[]) tempAnnotation.getAdditionalFixInfo())[0];
int insertOffset = ((Integer) ((Object[]) tempAnnotation.getAdditionalFixInfo())[1]).intValue();
- proposals.add(new CompletionProposal("\"" + defaultAttrValue + "\"", tempAnnotation.getPosition().getOffset() + tempAnnotation.getPosition().getLength() + insertOffset, 0, defaultAttrValue.length() + 2, getImage(), XMLUIPlugin.getResourceString("%QuickFixProcessorXML.6"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), XMLUIPlugin.getResourceString("%QuickFixProcessorXML.7"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ proposals.add(new CompletionProposal("\"" + defaultAttrValue + "\"", tempAnnotation.getPosition().getOffset() + tempAnnotation.getPosition().getLength() + insertOffset, 0, defaultAttrValue.length() + 2, getImage(), XMLUIMessages.QuickFixProcessorXML_6, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), XMLUIMessages.QuickFixProcessorXML_7, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
break;
case ProblemIDsXML.NoAttrValue :
defaultAttrValue = (String) tempAnnotation.getAdditionalFixInfo();
- proposals.add(new CompletionProposal("=\"" + defaultAttrValue + "\"", tempAnnotation.getPosition().getOffset() + tempAnnotation.getPosition().getLength(), 0, defaultAttrValue.length() + 3, getImage(), XMLUIPlugin.getResourceString("%QuickFixProcessorXML.6"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), XMLUIPlugin.getResourceString("%QuickFixProcessorXML.7"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ proposals.add(new CompletionProposal("=\"" + defaultAttrValue + "\"", tempAnnotation.getPosition().getOffset() + tempAnnotation.getPosition().getLength(), 0, defaultAttrValue.length() + 3, getImage(), XMLUIMessages.QuickFixProcessorXML_6, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), XMLUIMessages.QuickFixProcessorXML_7, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
break;
case ProblemIDsXML.SpacesBeforeTagName :
- proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), XMLUIPlugin.getResourceString("%QuickFixProcessorXML.8"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), XMLUIMessages.QuickFixProcessorXML_8, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
break;
case ProblemIDsXML.SpacesBeforePI :
- proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), XMLUIPlugin.getResourceString("%QuickFixProcessorXML.9"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), XMLUIMessages.QuickFixProcessorXML_9, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
break;
case ProblemIDsXML.NamespaceInPI :
- proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), XMLUIPlugin.getResourceString("%QuickFixProcessorXML.10"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), XMLUIMessages.QuickFixProcessorXML_10, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
break;
case ProblemIDsXML.UnknownElement :
- proposals.add(new RemoveUnknownElementQuickFixProposal(tempAnnotation.getAdditionalFixInfo(), getImage(), XMLUIPlugin.getResourceString("%QuickFixProcessorXML.11"))); //$NON-NLS-1$
+ proposals.add(new RemoveUnknownElementQuickFixProposal(tempAnnotation.getAdditionalFixInfo(), getImage(), XMLUIMessages.QuickFixProcessorXML_11)); //$NON-NLS-1$
proposals.add(new RenameInFileQuickAssistProposal());
break;
case ProblemIDsXML.UnknownAttr :
- proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), XMLUIPlugin.getResourceString("%QuickFixProcessorXML.7"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), XMLUIMessages.QuickFixProcessorXML_7, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
proposals.add(new RenameInFileQuickAssistProposal());
break;
case ProblemIDsXML.InvalidAttrValue :
- proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), XMLUIPlugin.getResourceString("%QuickFixProcessorXML.12"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ proposals.add(new CompletionProposal("", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), 0, getImage(), XMLUIMessages.QuickFixProcessorXML_12, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
break;
case ProblemIDsXML.MissingRequiredAttr :
String requiredAttr = (String) ((Object[]) tempAnnotation.getAdditionalFixInfo())[0];
insertOffset = ((Integer) ((Object[]) tempAnnotation.getAdditionalFixInfo())[1]).intValue();
- proposals.add(new CompletionProposal(requiredAttr, tempAnnotation.getPosition().getOffset() + insertOffset, 0, requiredAttr.length(), getImage(), XMLUIPlugin.getResourceString("%QuickFixProcessorXML.13"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$
+ proposals.add(new CompletionProposal(requiredAttr, tempAnnotation.getPosition().getOffset() + insertOffset, 0, requiredAttr.length(), getImage(), XMLUIMessages.QuickFixProcessorXML_13, null, "")); //$NON-NLS-1$ //$NON-NLS-2$
break;
case ProblemIDsXML.AttrValueNotQuoted :
String attrValue = (String) tempAnnotation.getAdditionalFixInfo();
- proposals.add(new CompletionProposal("\"" + attrValue + "\"", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), attrValue.length() + 2, getImage(), XMLUIPlugin.getResourceString("%QuickFixProcessorXML.14"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ proposals.add(new CompletionProposal("\"" + attrValue + "\"", tempAnnotation.getPosition().getOffset(), tempAnnotation.getPosition().getLength(), attrValue.length() + 2, getImage(), XMLUIMessages.QuickFixProcessorXML_14, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
break;
case ProblemIDsXML.MissingClosingBracket :
- proposals.add(new CompletionProposal(">", tempAnnotation.getPosition().getOffset() + tempAnnotation.getPosition().getLength(), 0, 1, getImage(), XMLUIPlugin.getResourceString("%QuickFixProcessorXML.15"), null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ proposals.add(new CompletionProposal(">", tempAnnotation.getPosition().getOffset() + tempAnnotation.getPosition().getLength(), 0, 1, getImage(), XMLUIMessages.QuickFixProcessorXML_15, null, "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
break;
}
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/RemoveUnknownElementQuickFixProposal.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/RemoveUnknownElementQuickFixProposal.java
index 6af8773..24f391d 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/RemoveUnknownElementQuickFixProposal.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/RemoveUnknownElementQuickFixProposal.java
@@ -25,7 +25,7 @@
import org.eclipse.text.edits.MalformedTreeException;
import org.eclipse.text.edits.MultiTextEdit;
import org.eclipse.wst.sse.core.exceptions.SourceEditingRuntimeException;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
public class RemoveUnknownElementQuickFixProposal implements ICompletionProposal, ICompletionProposalExtension2 {
private Object fAdditionalFixInfo = null;
@@ -103,7 +103,7 @@
*/
public String getDisplayString() {
if (fDisplayString == null)
- fDisplayString = XMLUIPlugin.getResourceString("%QuickFixProcessorXML.11"); //$NON-NLS-1$
+ fDisplayString = XMLUIMessages.QuickFixProcessorXML_11; //$NON-NLS-1$
return fDisplayString;
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/RenameInFileQuickAssistProposal.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/RenameInFileQuickAssistProposal.java
index 01d09ca..8bf20e6 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/RenameInFileQuickAssistProposal.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/RenameInFileQuickAssistProposal.java
@@ -34,7 +34,7 @@
import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
import org.eclipse.wst.xml.core.document.IDOMNode;
import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImages;
@@ -112,7 +112,7 @@
* @see org.eclipse.jface.text.contentassist.ICompletionProposal#getAdditionalProposalInfo()
*/
public String getAdditionalProposalInfo() {
- return XMLUIPlugin.getResourceString("%RenameInFileQuickAssistProposal.0"); //$NON-NLS-1$
+ return XMLUIMessages.RenameInFileQuickAssistProposal_0; //$NON-NLS-1$
}
/*
@@ -130,7 +130,7 @@
* @see org.eclipse.jface.text.contentassist.ICompletionProposal#getDisplayString()
*/
public String getDisplayString() {
- return XMLUIPlugin.getResourceString("%RenameInFileQuickAssistProposal.1"); //$NON-NLS-1$
+ return XMLUIMessages.RenameInFileQuickAssistProposal_1; //$NON-NLS-1$
}
/*
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/SurroundWithNewElementQuickAssistProposal.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/SurroundWithNewElementQuickAssistProposal.java
index 5384479..e9ca0a4 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/SurroundWithNewElementQuickAssistProposal.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/SurroundWithNewElementQuickAssistProposal.java
@@ -24,7 +24,7 @@
import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
import org.eclipse.wst.xml.core.document.IDOMNode;
import org.eclipse.wst.xml.core.internal.provisional.format.FormatProcessorXML;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImages;
import org.w3c.dom.Node;
@@ -83,7 +83,7 @@
* @see org.eclipse.jface.text.contentassist.ICompletionProposal#getAdditionalProposalInfo()
*/
public String getAdditionalProposalInfo() {
- return XMLUIPlugin.getResourceString("%SurroundWithNewElementQuickAssistProposal.0"); //$NON-NLS-1$
+ return XMLUIMessages.SurroundWithNewElementQuickAssistProposal_0; //$NON-NLS-1$
}
/*
@@ -92,7 +92,7 @@
* @see org.eclipse.jface.text.contentassist.ICompletionProposal#getDisplayString()
*/
public String getDisplayString() {
- return XMLUIPlugin.getResourceString("%SurroundWithNewElementQuickAssistProposal.1"); //$NON-NLS-1$
+ return XMLUIMessages.SurroundWithNewElementQuickAssistProposal_1; //$NON-NLS-1$
}
/*
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/editor/CMImageUtil.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/editor/CMImageUtil.java
index 9b27ba7..c90bc44 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/editor/CMImageUtil.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/editor/CMImageUtil.java
@@ -63,7 +63,7 @@
if (cmnode == null)
return null;
// cache CM-specified images with the XML UI plugin
- String imageURLString = (String) cmnode.getProperty("small-icon");
+ String imageURLString = (String) cmnode.getProperty("small-icon"); //$NON-NLS-1$
ImageDescriptor descriptor = null;
if (imageURLString != null && imageURLString.length() > 0) {
descriptor = XMLUIPlugin.getInstance().getImageRegistry()
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/projection/ProjectionModelNodeAdapterXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/projection/ProjectionModelNodeAdapterXML.java
index 7817f0d..3def0fe 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/projection/ProjectionModelNodeAdapterXML.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/projection/ProjectionModelNodeAdapterXML.java
@@ -266,8 +266,8 @@
long end = System.currentTimeMillis();
if (debugProjectionPerf) {
- String nodeName = node != null ? node.getNodeName() : "null";
- System.out.println("ProjectionModelNodeAdapterXML.updateAdapter (" + nodeName + "):" + (end - start));
+ String nodeName = node != null ? node.getNodeName() : "null"; //$NON-NLS-1$
+ System.out.println("ProjectionModelNodeAdapterXML.updateAdapter (" + nodeName + "):" + (end - start)); //$NON-NLS-1$ //$NON-NLS-2$
}
}
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/projection/StructuredTextFoldingProviderXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/projection/StructuredTextFoldingProviderXML.java
index 8faede1..7240e05 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/projection/StructuredTextFoldingProviderXML.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/projection/StructuredTextFoldingProviderXML.java
@@ -89,7 +89,7 @@
long end = System.currentTimeMillis();
if (debugProjectionPerf)
- System.out.println("StructuredTextFoldingProviderXML.addAllAdapters: " + (end - start));
+ System.out.println("StructuredTextFoldingProviderXML.addAllAdapters: " + (end - start)); //$NON-NLS-1$
}
/**
@@ -135,7 +135,7 @@
long end = System.currentTimeMillis();
if (debugProjectionPerf)
- System.out.println("StructuredTextFoldingProviderXML.getAdapterFactory: " + (end - start));
+ System.out.println("StructuredTextFoldingProviderXML.getAdapterFactory: " + (end - start)); //$NON-NLS-1$
return factory;
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/properties/XMLPropertySourceAdapter.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/properties/XMLPropertySourceAdapter.java
index 99791c7..69460c0 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/properties/XMLPropertySourceAdapter.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/properties/XMLPropertySourceAdapter.java
@@ -36,7 +36,7 @@
import org.eclipse.wst.xml.core.internal.document.DocumentTypeAdapter;
import org.eclipse.wst.xml.core.internal.modelquery.ModelQueryUtil;
import org.eclipse.wst.xml.ui.internal.Logger;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.w3c.dom.Attr;
import org.w3c.dom.DOMException;
import org.w3c.dom.Document;
@@ -50,7 +50,7 @@
* adapters for the nodes in the tree.
*/
public class XMLPropertySourceAdapter implements INodeAdapter, IPropertySource, IPropertySourceExtension, IPropertySource2 {
- protected final static String CATEGORY_ATTRIBUTES = XMLUIPlugin.getResourceString("%XMLPropertySourceAdapter.0"); //$NON-NLS-1$
+ protected final static String CATEGORY_ATTRIBUTES = XMLUIMessages.XMLPropertySourceAdapter_0; //$NON-NLS-1$
private static final boolean fSetExpertFilter = false;
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/templates/EncodingTemplateVariableResolverXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/templates/EncodingTemplateVariableResolverXML.java
index 16460bb..079b042 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/templates/EncodingTemplateVariableResolverXML.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/templates/EncodingTemplateVariableResolverXML.java
@@ -15,20 +15,21 @@
import org.eclipse.jface.text.templates.TemplateContext;
import org.eclipse.wst.sse.core.internal.encoding.CommonEncodingPreferenceNames;
import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
public class EncodingTemplateVariableResolverXML extends SimpleTemplateVariableResolver {
private static final String ENCODING_TYPE = getEncodingType();
private static String getEncodingType() {
- return "encoding";
+ return "encoding"; //$NON-NLS-1$
}
/**
* Creates a new encoding variable
*/
public EncodingTemplateVariableResolverXML() {
- super(ENCODING_TYPE, "Creating files encoding preference");
+ super(ENCODING_TYPE, XMLUIMessages.Creating_files_encoding);
}
protected String resolve(TemplateContext context) {
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonAddNamespacesControl.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonAddNamespacesControl.java
index cf741ff..063d580 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonAddNamespacesControl.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonAddNamespacesControl.java
@@ -32,7 +32,7 @@
import org.eclipse.ui.part.PageBook;
import org.eclipse.wst.xml.core.internal.contentmodel.util.NamespaceInfo;
import org.eclipse.wst.xml.ui.dialogs.SelectFileOrXMLCatalogIdDialog;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.eclipse.wst.xml.uriresolver.util.IdResolver;
import org.eclipse.wst.xml.uriresolver.util.IdResolverImpl;
import org.eclipse.wst.xml.uriresolver.util.URIHelper;
@@ -53,7 +53,7 @@
setLayoutData(new GridData(GridData.FILL_BOTH));
Label label = new Label(this, SWT.NONE);
- label.setText(XMLUIPlugin.getResourceString("%_UI_ENTER_REQ_PREFIX_AND_NAMESPACE")); //$NON-NLS-1$
+ label.setText(XMLUIMessages._UI_ENTER_REQ_PREFIX_AND_NAMESPACE); //$NON-NLS-1$
Composite composite = new Composite(this, SWT.NONE);
GridLayout layout = new GridLayout();
@@ -69,7 +69,7 @@
// row 1
//
Label prefixLabel = new Label(composite, SWT.NONE);
- prefixLabel.setText(XMLUIPlugin.getResourceString("%_UI_LABEL_PREFIX_COLON")); //$NON-NLS-1$
+ prefixLabel.setText(XMLUIMessages._UI_LABEL_PREFIX_COLON); //$NON-NLS-1$
prefixField = new Text(composite, SWT.SINGLE | SWT.BORDER);
prefixField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
@@ -82,7 +82,7 @@
// row 2
//
Label uriLabel = new Label(composite, SWT.NONE);
- uriLabel.setText(XMLUIPlugin.getResourceString("%_UI_LABEL_NAMESPACE_NAME_COLON")); //$NON-NLS-1$
+ uriLabel.setText(XMLUIMessages._UI_LABEL_NAMESPACE_NAME_COLON); //$NON-NLS-1$
uriField = new Text(composite, SWT.SINGLE | SWT.BORDER);
uriField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
@@ -95,7 +95,7 @@
// row 3
//
Label locationHintLabel = new Label(composite, SWT.NONE);
- locationHintLabel.setText(XMLUIPlugin.getResourceString("%_UI_LABEL_LOCATION_HINT_COLON")); //$NON-NLS-1$
+ locationHintLabel.setText(XMLUIMessages._UI_LABEL_LOCATION_HINT_COLON); //$NON-NLS-1$
locationHintField = new Text(composite, SWT.SINGLE | SWT.BORDER);
locationHintField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
@@ -111,7 +111,7 @@
};
browseButton = new Button(composite, SWT.NONE);
- browseButton.setText(XMLUIPlugin.getResourceString("%_UI_LABEL_BROWSE")); //$NON-NLS-1$
+ browseButton.setText(XMLUIMessages._UI_LABEL_BROWSE); //$NON-NLS-1$
browseButton.addSelectionListener(selectionListener);
browseButton.setEnabled(locationHintField.getEnabled());
}
@@ -120,7 +120,7 @@
String[] extensions = {".xsd"}; //$NON-NLS-1$
SelectFileOrXMLCatalogIdDialog dialog = new SelectFileOrXMLCatalogIdDialog(getShell(), extensions);
dialog.create();
- dialog.getShell().setText(XMLUIPlugin.getResourceString("%_UI_LABEL_SELECT_FILE")); //$NON-NLS-1$
+ dialog.getShell().setText(XMLUIMessages._UI_LABEL_SELECT_FILE); //$NON-NLS-1$
dialog.setBlockOnOpen(true);
dialog.open();
@@ -196,11 +196,11 @@
setLayout(new GridLayout());
radio1 = new Button(this, SWT.RADIO);
- radio1.setText(XMLUIPlugin.getResourceString("%_UI_SELECT_REGISTERED_NAMESPACES")); //$NON-NLS-1$
+ radio1.setText(XMLUIMessages._UI_SELECT_REGISTERED_NAMESPACES); //$NON-NLS-1$
radio1.addSelectionListener(this);
radio2 = new Button(this, SWT.RADIO);
- radio2.setText(XMLUIPlugin.getResourceString("%_UI_SPECIFY_NEW_NAMESPACE")); //$NON-NLS-1$
+ radio2.setText(XMLUIMessages._UI_SPECIFY_NEW_NAMESPACE); //$NON-NLS-1$
radio2.addSelectionListener(this);
Label separator = new Label(this, SWT.SEPARATOR | SWT.HORIZONTAL);
@@ -216,7 +216,7 @@
tableSection = new Composite(pageBook, SWT.NONE);
tableSection.setLayout(new GridLayout());
Label label = new Label(tableSection, SWT.NONE);
- label.setText(XMLUIPlugin.getResourceString("%_UI_SELECT_NAMESPACE_TO_ADD")); //$NON-NLS-1$
+ label.setText(XMLUIMessages._UI_SELECT_NAMESPACE_TO_ADD); //$NON-NLS-1$
tableViewer = new CommonNamespaceInfoTable(tableSection, SWT.CHECK, 6);
editNamespaceControl = new EditNamespaceControl(pageBook);
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonEditNamespacesDialog.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonEditNamespacesDialog.java
index edac2dd..7489cba 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonEditNamespacesDialog.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonEditNamespacesDialog.java
@@ -37,6 +37,7 @@
import org.eclipse.wst.xml.core.internal.contentmodel.util.NamespaceInfo;
import org.eclipse.wst.xml.ui.dialogs.EditNamespaceInfoDialog;
import org.eclipse.wst.xml.ui.dialogs.NamespaceInfoErrorHelper;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
public class CommonEditNamespacesDialog {
@@ -141,7 +142,7 @@
newButton = new Button(buttonComposite, SWT.NONE);
//newButton.setText(" " +
// XMLCommonUIPlugin.getInstance().getString("_UI_BUTTON_NEW") + " ");
- newButton.setText(" " + XMLUIPlugin.getResourceString("%CommonEditNamespacesDialog.0") + " "); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ newButton.setText(" " + XMLUIMessages.CommonEditNamespacesDialog_0 + " "); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
newButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); //ViewUtility.createHorizontalFill());
newButton.addSelectionListener(selectionListener);
@@ -152,7 +153,7 @@
//gd.grabExcessHorizontalSpace = true;
editButton = new Button(buttonComposite, SWT.NONE);
- editButton.setText(XMLUIPlugin.getResourceString("%_UI_BUTTON_EDIT")); //$NON-NLS-1$
+ editButton.setText(XMLUIMessages._UI_BUTTON_EDIT); //$NON-NLS-1$
editButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); //ViewUtility.createHorizontalFill());
editButton.addSelectionListener(selectionListener);
@@ -163,7 +164,7 @@
//gd.grabExcessHorizontalSpace = true;
deleteButton = new Button(buttonComposite, SWT.NONE);
- deleteButton.setText(XMLUIPlugin.getResourceString("%_UI_BUTTON_DELETE")); //$NON-NLS-1$
+ deleteButton.setText(XMLUIMessages._UI_BUTTON_DELETE); //$NON-NLS-1$
deleteButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); //ViewUtility.createHorizontalFill());
deleteButton.addSelectionListener(selectionListener);
}
@@ -281,7 +282,7 @@
public void performEdit() {
Object selection = getSelection(tableViewer.getSelection());
if (selection != null) {
- EditNamespaceInfoDialog dialog = invokeDialog(XMLUIPlugin.getResourceString("%_UI_LABEL_NEW_NAMESPACE_INFORMATION"), (NamespaceInfo) selection); //$NON-NLS-1$
+ EditNamespaceInfoDialog dialog = invokeDialog(XMLUIMessages._UI_LABEL_NEW_NAMESPACE_INFORMATION, (NamespaceInfo) selection); //$NON-NLS-1$
updateErrorMessage(namespaceInfoList);
performDelayedUpdate();
}
@@ -289,7 +290,7 @@
public void performNew() {
Shell shell = XMLUIPlugin.getInstance().getWorkbench().getActiveWorkbenchWindow().getShell();
- CommonAddNamespacesDialog dialog = new CommonAddNamespacesDialog(shell, XMLUIPlugin.getResourceString("%_UI_ADD_NAMESPACE_DECLARATIONS"), resourceLocation, namespaceInfoList); //$NON-NLS-1$
+ CommonAddNamespacesDialog dialog = new CommonAddNamespacesDialog(shell, XMLUIMessages._UI_ADD_NAMESPACE_DECLARATIONS, resourceLocation, namespaceInfoList); //$NON-NLS-1$
dialog.createAndOpen();
if (dialog.getReturnCode() == Window.OK) {
namespaceInfoList.addAll(dialog.getNamespaceInfoList());
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonEditNamespacesTargetFieldDialog.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonEditNamespacesTargetFieldDialog.java
index b04a998..bec63f1 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonEditNamespacesTargetFieldDialog.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonEditNamespacesTargetFieldDialog.java
@@ -22,7 +22,7 @@
import org.eclipse.swt.widgets.Text;
import org.eclipse.wst.xml.core.internal.contentmodel.util.NamespaceInfo;
import org.eclipse.wst.xml.ui.dialogs.EditNamespaceInfoDialog;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
/*
* This class is an extension of CommonEditNamespacesDialog. This class adds
@@ -42,7 +42,7 @@
protected Text targetNamespaceField;
public CommonEditNamespacesTargetFieldDialog(Composite parent, IPath resourceLocation) {
- super(parent, resourceLocation, XMLUIPlugin.getResourceString("%_UI_NAMESPACE_DECLARATIONS")); //$NON-NLS-1$
+ super(parent, resourceLocation, XMLUIMessages._UI_NAMESPACE_DECLARATIONS); //$NON-NLS-1$
Composite targetComp = getTopComposite();
targetComp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
@@ -50,7 +50,7 @@
GridData gd = new GridData(GridData.FILL_BOTH);
Label targetNamespaceLabel = new Label(targetComp, SWT.NONE);
targetNamespaceLabel.setLayoutData(gd);
- targetNamespaceLabel.setText(XMLUIPlugin.getResourceString("%_UI_TARGET_NAMESPACE")); //$NON-NLS-1$
+ targetNamespaceLabel.setText(XMLUIMessages._UI_TARGET_NAMESPACE); //$NON-NLS-1$
targetNamespaceField = new Text(targetComp, SWT.BORDER);
targetNamespaceField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
@@ -72,7 +72,7 @@
editTargetNamespace = true;
}
- EditNamespaceInfoDialog dialog = invokeDialog(XMLUIPlugin.getResourceString("%_UI_LABEL_NEW_NAMESPACE_INFORMATION"), nsInfo); //$NON-NLS-1$
+ EditNamespaceInfoDialog dialog = invokeDialog(XMLUIMessages._UI_LABEL_NEW_NAMESPACE_INFORMATION, nsInfo); //$NON-NLS-1$
updateErrorMessage(namespaceInfoList);
performDelayedUpdate();
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonNamespaceInfoTable.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonNamespaceInfoTable.java
index 78fc820..594eb75 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonNamespaceInfoTable.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/nsedit/CommonNamespaceInfoTable.java
@@ -33,7 +33,7 @@
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.wst.xml.core.internal.contentmodel.util.NamespaceInfo;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
public class CommonNamespaceInfoTable extends TableViewer {
@@ -86,11 +86,11 @@
if (result.equals("")) { //$NON-NLS-1$
switch (columnCode) {
case COLUMN_PREFIX : {
- result = XMLUIPlugin.getResourceString("%_UI_NO_PREFIX"); //$NON-NLS-1$
+ result = XMLUIMessages._UI_NO_PREFIX; //$NON-NLS-1$
break;
}
case COLUMN_NAMESPACE_URI : {
- result = XMLUIPlugin.getResourceString("%_UI_NO_NAMESPACE_NAME"); //$NON-NLS-1$
+ result = XMLUIMessages._UI_NO_NAMESPACE_NAME; //$NON-NLS-1$
break;
}
}
@@ -141,9 +141,9 @@
protected static final int COLUMN_PREFIX = 3;
protected static final String LABEL_CHECKBOX = ""; //$NON-NLS-1$
- protected static final String LABEL_LOCATION_HINT = XMLUIPlugin.getResourceString("%_UI_LABEL_LOCATION_HINT"); //$NON-NLS-1$
- protected static final String LABEL_NAMESPACE_URI = XMLUIPlugin.getResourceString("%_UI_LABEL_NAMESPACE_NAME"); //$NON-NLS-1$
- protected static final String LABEL_PREFIX = XMLUIPlugin.getResourceString("%_UI_LABEL_PREFIX"); //$NON-NLS-1$
+ protected static final String LABEL_LOCATION_HINT = XMLUIMessages._UI_LABEL_LOCATION_HINT; //$NON-NLS-1$
+ protected static final String LABEL_NAMESPACE_URI = XMLUIMessages._UI_LABEL_NAMESPACE_NAME; //$NON-NLS-1$
+ protected static final String LABEL_PREFIX = XMLUIMessages._UI_LABEL_PREFIX; //$NON-NLS-1$
protected List checkedList = new ArrayList();
//protected List namespaceInfoList = new ArrayList();
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/EncodingSettings.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/EncodingSettings.java
index e05a354..2214022 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/EncodingSettings.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/EncodingSettings.java
@@ -25,7 +25,7 @@
import org.eclipse.swt.widgets.Text;
import org.eclipse.wst.sse.core.internal.encoding.CommonCharsetNames;
import org.eclipse.wst.xml.ui.internal.Logger;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
/**
* EncodingSettings is a composite that can be used to display the set of
@@ -48,9 +48,9 @@
}
}
- private static String ENCODING_LABEL = XMLUIPlugin.getResourceString("%EncodingSettings.1"); //$NON-NLS-1$
+ private static String ENCODING_LABEL = XMLUIMessages.EncodingSettings_1; //$NON-NLS-1$
- private static String IANA_LABEL = XMLUIPlugin.getResourceString("%EncodingSettings.0"); //$NON-NLS-1$
+ private static String IANA_LABEL = XMLUIMessages.EncodingSettings_0; //$NON-NLS-1$
private ModifyListener comboListener = new ComboListener();
protected Combo encodingCombo;
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/WorkbenchDefaultEncodingSettings.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/WorkbenchDefaultEncodingSettings.java
index 6bb93dc..0c7cf74 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/WorkbenchDefaultEncodingSettings.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/WorkbenchDefaultEncodingSettings.java
@@ -22,7 +22,7 @@
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.wst.sse.core.internal.encoding.CommonCharsetNames;
-import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
/**
* WorkbenchDefaultEncodingSettings is an extension of EncodingSettings. This
@@ -65,7 +65,7 @@
defaultEncodingComposite.setLayoutData(data);
fUseDefaultButton = new Button(defaultEncodingComposite, SWT.CHECK);
- fUseDefaultButton.setText(XMLUIPlugin.getResourceString("%WorkbenchDefaultEncodingSettings.0")); //$NON-NLS-1$
+ fUseDefaultButton.setText(XMLUIMessages.WorkbenchDefaultEncodingSettings_0); //$NON-NLS-1$
fUseDefaultButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/XMLColorPage.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/XMLColorPage.java
index 932e5f0..bc913a9 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/XMLColorPage.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/XMLColorPage.java
@@ -31,6 +31,7 @@
import org.eclipse.wst.sse.ui.preferences.ui.StyledTextColorPicker;
import org.eclipse.wst.xml.core.contenttype.ContentTypeIdForXML;
import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.eclipse.wst.xml.ui.internal.editor.IHelpContextIds;
import org.eclipse.wst.xml.ui.style.IStyleConstantsXML;
@@ -69,7 +70,7 @@
}
public String getSampleText() {
- return XMLUIPlugin.getResourceString("%Sample_XML_doc"); //$NON-NLS-1$ = "<?xml version=\"1.0\"?>\n<?customProcessingInstruction\n\tXML processor specific\n\tcontent ?>\n<!DOCTYPE colors\n\tPUBLIC \"//IBM/XML/COLORS/\" \"colors.dtd\">\n<colors>\n\t<!-- begin color definitions -->\n\t<color name=\"plaintext\" foreground=\"#000000\"\n\t\tbackground=\"#D4D0C8\"/>\n\t<color name=\"bold\" foreground=\"#000000\"\n\t\tbackground=\"#B3ACA0\">\n\t<![CDATA[<123456789>]]>\n\tNormal text content.\n\t<color name=\"inverse\" foreground=\"#F0F0F0\"\n\t\tbackground=\"#D4D0C8\"/>\n\n</colors>\n";
+ return XMLUIMessages.Sample_XML_doc; //$NON-NLS-1$ = "<?xml version=\"1.0\"?>\n<?customProcessingInstruction\n\tXML processor specific\n\tcontent ?>\n<!DOCTYPE colors\n\tPUBLIC \"//IBM/XML/COLORS/\" \"colors.dtd\">\n<colors>\n\t<!-- begin color definitions -->\n\t<color name=\"plaintext\" foreground=\"#000000\"\n\t\tbackground=\"#D4D0C8\"/>\n\t<color name=\"bold\" foreground=\"#000000\"\n\t\tbackground=\"#B3ACA0\">\n\t<![CDATA[<123456789>]]>\n\tNormal text content.\n\t<color name=\"inverse\" foreground=\"#F0F0F0\"\n\t\tbackground=\"#D4D0C8\"/>\n\n</colors>\n";
}
protected void initCommonContextStyleMap(Dictionary contextStyleMap) {
@@ -97,14 +98,14 @@
protected void initCommonDescriptions(Dictionary descriptions) {
// create descriptions for hilighting types
- descriptions.put(IStyleConstantsXML.COMMENT_BORDER, XMLUIPlugin.getResourceString("%Comment_Delimiters_UI_")); //$NON-NLS-1$ = "Comment Delimiters"
- descriptions.put(IStyleConstantsXML.COMMENT_TEXT, XMLUIPlugin.getResourceString("%Comment_Content_UI_")); //$NON-NLS-1$ = "Comment Content"
- descriptions.put(IStyleConstantsXML.TAG_BORDER, XMLUIPlugin.getResourceString("%Tag_Delimiters_UI_")); //$NON-NLS-1$ = "Tag Delimiters"
- descriptions.put(IStyleConstantsXML.TAG_NAME, XMLUIPlugin.getResourceString("%Tag_Names_UI_")); //$NON-NLS-1$ = "Tag Names"
- descriptions.put(IStyleConstantsXML.TAG_ATTRIBUTE_NAME, XMLUIPlugin.getResourceString("%Attribute_Names_UI_")); //$NON-NLS-1$ = "Attribute Names"
- descriptions.put(IStyleConstantsXML.TAG_ATTRIBUTE_VALUE, XMLUIPlugin.getResourceString("%Attribute_Values_UI_")); //$NON-NLS-1$ = "Attribute Values"
- descriptions.put(IStyleConstantsXML.DECL_BORDER, XMLUIPlugin.getResourceString("%Declaration_Delimiters_UI_")); //$NON-NLS-1$ = "Declaration Delimiters"
- descriptions.put(IStyleConstantsXML.XML_CONTENT, XMLUIPlugin.getResourceString("%Content_UI_")); //$NON-NLS-1$ = "Content"
+ descriptions.put(IStyleConstantsXML.COMMENT_BORDER, XMLUIMessages.Comment_Delimiters_UI_); //$NON-NLS-1$ = "Comment Delimiters"
+ descriptions.put(IStyleConstantsXML.COMMENT_TEXT, XMLUIMessages.Comment_Content_UI_); //$NON-NLS-1$ = "Comment Content"
+ descriptions.put(IStyleConstantsXML.TAG_BORDER, XMLUIMessages.Tag_Delimiters_UI_); //$NON-NLS-1$ = "Tag Delimiters"
+ descriptions.put(IStyleConstantsXML.TAG_NAME, XMLUIMessages.Tag_Names_UI_); //$NON-NLS-1$ = "Tag Names"
+ descriptions.put(IStyleConstantsXML.TAG_ATTRIBUTE_NAME, XMLUIMessages.Attribute_Names_UI_); //$NON-NLS-1$ = "Attribute Names"
+ descriptions.put(IStyleConstantsXML.TAG_ATTRIBUTE_VALUE, XMLUIMessages.Attribute_Values_UI_); //$NON-NLS-1$ = "Attribute Values"
+ descriptions.put(IStyleConstantsXML.DECL_BORDER, XMLUIMessages.Declaration_Delimiters_UI_); //$NON-NLS-1$ = "Declaration Delimiters"
+ descriptions.put(IStyleConstantsXML.XML_CONTENT, XMLUIMessages.Content_UI_); //$NON-NLS-1$ = "Content"
}
protected void initCommonStyleList(ArrayList list) {
@@ -142,10 +143,10 @@
initCommonDescriptions(descriptions);
initDocTypeDescriptions(descriptions);
- descriptions.put(IStyleConstantsXML.CDATA_BORDER, XMLUIPlugin.getResourceString("%CDATA_Delimiters_UI_")); //$NON-NLS-1$ = "CDATA Delimiters"
- descriptions.put(IStyleConstantsXML.CDATA_TEXT, XMLUIPlugin.getResourceString("%CDATA_Content_UI_")); //$NON-NLS-1$ = "CDATA Content"
- descriptions.put(IStyleConstantsXML.PI_BORDER, XMLUIPlugin.getResourceString("%Processing_Instruction_Del_UI_")); //$NON-NLS-1$ = "Processing Instruction Delimiters"
- descriptions.put(IStyleConstantsXML.PI_CONTENT, XMLUIPlugin.getResourceString("%Processing_Instruction_Con_UI__UI_")); //$NON-NLS-1$ = "Processing Instruction Content"
+ descriptions.put(IStyleConstantsXML.CDATA_BORDER, XMLUIMessages.CDATA_Delimiters_UI_); //$NON-NLS-1$ = "CDATA Delimiters"
+ descriptions.put(IStyleConstantsXML.CDATA_TEXT, XMLUIMessages.CDATA_Content_UI_); //$NON-NLS-1$ = "CDATA Content"
+ descriptions.put(IStyleConstantsXML.PI_BORDER, XMLUIMessages.Processing_Instruction_Del_UI_); //$NON-NLS-1$ = "Processing Instruction Delimiters"
+ descriptions.put(IStyleConstantsXML.PI_CONTENT, XMLUIMessages.Processing_Instruction_Con_UI__UI_); //$NON-NLS-1$ = "Processing Instruction Content"
}
protected void initDocTypeContextStyleMap(Dictionary contextStyleMap) {
@@ -164,10 +165,10 @@
protected void initDocTypeDescriptions(Dictionary descriptions) {
// create descriptions for hilighting types for DOCTYPE related items
- descriptions.put(IStyleConstantsXML.DOCTYPE_NAME, XMLUIPlugin.getResourceString("%DOCTYPE_Name_UI_")); //$NON-NLS-1$ = "DOCTYPE Name"
- descriptions.put(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID, XMLUIPlugin.getResourceString("%DOCTYPE_SYSTEM/PUBLIC_Keyw_UI_")); //$NON-NLS-1$ = "DOCTYPE SYSTEM/PUBLIC Keyword"
- descriptions.put(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_PUBREF, XMLUIPlugin.getResourceString("%DOCTYPE_Public_Reference_UI_")); //$NON-NLS-1$ = "DOCTYPE Public Reference"
- descriptions.put(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_SYSREF, XMLUIPlugin.getResourceString("%DOCTYPE_System_Reference_UI_")); //$NON-NLS-1$ = "DOCTYPE System Reference"
+ descriptions.put(IStyleConstantsXML.DOCTYPE_NAME, XMLUIMessages.DOCTYPE_Name_UI_); //$NON-NLS-1$ = "DOCTYPE Name"
+ descriptions.put(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID, XMLUIMessages.DOCTYPE_SYSTEM_PUBLIC_Keyw_UI_); //$NON-NLS-1$ = "DOCTYPE SYSTEM/PUBLIC Keyword"
+ descriptions.put(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_PUBREF, XMLUIMessages.DOCTYPE_Public_Reference_UI_); //$NON-NLS-1$ = "DOCTYPE Public Reference"
+ descriptions.put(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_SYSREF, XMLUIMessages.DOCTYPE_System_Reference_UI_); //$NON-NLS-1$ = "DOCTYPE System Reference"
}
protected void initDocTypeStyleList(ArrayList list) {
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/XMLFilesPreferencePage.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/XMLFilesPreferencePage.java
index 8cbbd6a..63d2f2d 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/XMLFilesPreferencePage.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/XMLFilesPreferencePage.java
@@ -15,7 +15,6 @@
import java.util.Vector;
import org.eclipse.core.runtime.Preferences;
-import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
@@ -24,9 +23,9 @@
import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.wst.sse.core.internal.encoding.CommonEncodingPreferenceNames;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.preferences.ui.AbstractPreferencePage;
import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.eclipse.wst.xml.ui.internal.editor.IHelpContextIds;
public class XMLFilesPreferencePage extends AbstractPreferencePage {
@@ -49,30 +48,26 @@
protected void createContentsForCreatingGroup(Composite parent) {
Group creatingGroup = createGroup(parent, 1);
- creatingGroup.setText(SSEUIPlugin.getResourceString("%Creating_files")); //$NON-NLS-1$
+ creatingGroup.setText(XMLUIMessages.Creating_files);
- Label label = createLabel(creatingGroup, SSEUIPlugin.getResourceString("%Encoding_desc")); //$NON-NLS-1$
+ Label label = createLabel(creatingGroup, XMLUIMessages.Encoding_desc);
- fEncodingSettings = new EncodingSettings(creatingGroup, SSEUIPlugin.getResourceString("%Encoding")); //$NON-NLS-1$
+ fEncodingSettings = new EncodingSettings(creatingGroup, XMLUIMessages.Encoding);
}
protected void createContentsForCreatingOrSavingGroup(Composite parent) {
Group creatingOrSavingGroup = createGroup(parent, 2);
- creatingOrSavingGroup.setText(SSEUIPlugin.getResourceString("%Creating_or_saving_files")); //$NON-NLS-1$
+ creatingOrSavingGroup.setText(XMLUIMessages.Creating_or_saving_files);
- Label label = createLabel(creatingOrSavingGroup, SSEUIPlugin.getResourceString("%End-of-line_code_desc")); //$NON-NLS-1$
+ Label label = createLabel(creatingOrSavingGroup, XMLUIMessages.End_of_line_code_desc);
((GridData) label.getLayoutData()).horizontalSpan = 2;
((GridData) label.getLayoutData()).grabExcessHorizontalSpace = true;
- createLabel(creatingOrSavingGroup, SSEUIPlugin.getResourceString("%End-of-line_code")); //$NON-NLS-1$
+ createLabel(creatingOrSavingGroup, XMLUIMessages.End_of_line_code);
fEndOfLineCode = createDropDownBox(creatingOrSavingGroup);
populateLineDelimiters();
}
- protected IPreferenceStore doGetPreferenceStore() {
- return SSEUIPlugin.getDefault().getPreferenceStore();
- }
-
protected void doSavePreferenceStore() {
XMLCorePlugin.getDefault().savePluginPreferences(); // model
}
@@ -156,16 +151,16 @@
*/
private void populateLineDelimiters() {
fEOLCodes = new Vector();
- fEndOfLineCode.add(SSEUIPlugin.getResourceString("%EOL_Unix")); //$NON-NLS-1$
+ fEndOfLineCode.add(XMLUIMessages.EOL_Unix);
fEOLCodes.add(CommonEncodingPreferenceNames.LF);
- fEndOfLineCode.add(SSEUIPlugin.getResourceString("%EOL_Mac")); //$NON-NLS-1$
+ fEndOfLineCode.add(XMLUIMessages.EOL_Mac);
fEOLCodes.add(CommonEncodingPreferenceNames.CR);
- fEndOfLineCode.add(SSEUIPlugin.getResourceString("%EOL_Windows")); //$NON-NLS-1$
+ fEndOfLineCode.add(XMLUIMessages.EOL_Windows);
fEOLCodes.add(CommonEncodingPreferenceNames.CRLF);
- fEndOfLineCode.add(SSEUIPlugin.getResourceString("%EOL_NoTranslation")); //$NON-NLS-1$
+ fEndOfLineCode.add(XMLUIMessages.EOL_NoTranslation);
fEOLCodes.add(CommonEncodingPreferenceNames.NO_TRANSLATION);
}
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/XMLSourcePreferencePage.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/XMLSourcePreferencePage.java
index c2797a2..b77a1c1 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/XMLSourcePreferencePage.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/preferences/XMLSourcePreferencePage.java
@@ -27,9 +27,9 @@
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.wst.sse.core.preferences.CommonModelPreferenceNames;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.preferences.ui.AbstractPreferencePage;
import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.eclipse.wst.xml.ui.internal.XMLUIPlugin;
import org.eclipse.wst.xml.ui.internal.editor.IHelpContextIds;
import org.eclipse.wst.xml.ui.internal.preferences.XMLUIPreferenceNames;
@@ -63,43 +63,43 @@
protected void createContentsForContentAssistGroup(Composite parent) {
Group contentAssistGroup = createGroup(parent, 2);
- contentAssistGroup.setText(SSEUIPlugin.getResourceString("%Content_assist_UI_")); //$NON-NLS-1$ = "Content assist"
+ contentAssistGroup.setText(XMLUIMessages.Content_assist_UI_);
- fAutoPropose = createCheckBox(contentAssistGroup, SSEUIPlugin.getResourceString("%Automatically_make_suggest_UI_")); //$NON-NLS-1$ = "Automatically make suggestions"
+ fAutoPropose = createCheckBox(contentAssistGroup, XMLUIMessages.Automatically_make_suggest_UI_);
((GridData) fAutoPropose.getLayoutData()).horizontalSpan = 2;
fAutoPropose.addSelectionListener(this);
- fAutoProposeLabel = createLabel(contentAssistGroup, SSEUIPlugin.getResourceString("%Prompt_when_these_characte_UI_")); //$NON-NLS-1$ = "Prompt when these characters are inserted:"
+ fAutoProposeLabel = createLabel(contentAssistGroup, XMLUIMessages.Prompt_when_these_characte_UI_);
fAutoProposeText = createTextField(contentAssistGroup);
}
protected void createContentsForFormattingGroup(Composite parent) {
Group formattingGroup = createGroup(parent, 2);
- formattingGroup.setText(SSEUIPlugin.getResourceString("%Formatting_UI_")); //$NON-NLS-1$ = "Formatting"
+ formattingGroup.setText(XMLUIMessages.Formatting_UI_);
- fLineWidthLabel = createLabel(formattingGroup, SSEUIPlugin.getResourceString("%Line_width__UI_")); //$NON-NLS-1$ = "Line width:"
+ fLineWidthLabel = createLabel(formattingGroup, XMLUIMessages.Line_width__UI_);
fLineWidthText = new Text(formattingGroup, SWT.SINGLE | SWT.BORDER);
GridData gData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.BEGINNING);
gData.widthHint = 25;
fLineWidthText.setLayoutData(gData);
fLineWidthText.addModifyListener(this);
- fSplitMultiAttrs = createCheckBox(formattingGroup, SSEUIPlugin.getResourceString("%Split_&multiple_attributes_2")); //$NON-NLS-1$
+ fSplitMultiAttrs = createCheckBox(formattingGroup, XMLUIMessages.Split_multiple_attributes);
((GridData) fSplitMultiAttrs.getLayoutData()).horizontalSpan = 2;
- fIndentUsingTabs = createCheckBox(formattingGroup, SSEUIPlugin.getResourceString("%&Indent_using_tabs_3")); //$NON-NLS-1$
+ fIndentUsingTabs = createCheckBox(formattingGroup, XMLUIMessages.Indent_using_tabs);
((GridData) fIndentUsingTabs.getLayoutData()).horizontalSpan = 2;
- fClearAllBlankLines = createCheckBox(formattingGroup, SSEUIPlugin.getResourceString("%Clear_all_blank_lines_UI_")); //$NON-NLS-1$ = "Clear all blank lines"
+ fClearAllBlankLines = createCheckBox(formattingGroup, XMLUIMessages.Clear_all_blank_lines_UI_);
((GridData) fClearAllBlankLines.getLayoutData()).horizontalSpan = 2;
}
protected void createContentsForGrammarConstraintsGroup(Composite parent) {
Group grammarConstraintsGroup = createGroup(parent, 1);
- grammarConstraintsGroup.setText(SSEUIPlugin.getResourceString("%Grammar_Constraints")); //$NON-NLS-1$
+ grammarConstraintsGroup.setText(XMLUIMessages.Grammar_Constraints);
grammarConstraintsGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
- fUseInferredGrammar = createCheckBox(grammarConstraintsGroup, SSEUIPlugin.getResourceString("%Use_inferred_grammar_in_absence_of_DTD/Schema")); //$NON-NLS-1$
+ fUseInferredGrammar = createCheckBox(grammarConstraintsGroup, XMLUIMessages.Use_inferred_grammar_in_absence_of);
}
protected IPreferenceStore doGetPreferenceStore() {
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/reconcile/DelegatingSourceValidator.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/reconcile/DelegatingSourceValidator.java
index ae5130f..10cb49a 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/reconcile/DelegatingSourceValidator.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/reconcile/DelegatingSourceValidator.java
@@ -54,18 +54,18 @@
*/
public class DelegatingSourceValidator implements IValidator {
//the selection strategies:
- protected static final String ALL_ATTRIBUTES = "ALL_ATTRIBUTES";
- protected static final String ATTRIBUTE_NAME = "ATTRIBUTE_NAME";
- protected static final String ATTRIBUTE_VALUE = "ATTRIBUTE_VALUE";
- protected static final String START_TAG = "START_TAG";
- protected static final String TEXT = "TEXT";
- protected static final String FIRST_NON_WHITESPACE_TEXT = "FIRST_NON_WHITESPACE_TEXT";
- protected static final String TEXT_ENTITY_REFERENCE = "TEXT_ENTITY_REFERENCE";
- protected static final String VALUE_OF_ATTRIBUTE_WITH_GIVEN_VALUE = "VALUE_OF_ATTRIBUTE_WITH_GIVEN_VALUE";
+ protected static final String ALL_ATTRIBUTES = "ALL_ATTRIBUTES"; //$NON-NLS-1$
+ protected static final String ATTRIBUTE_NAME = "ATTRIBUTE_NAME"; //$NON-NLS-1$
+ protected static final String ATTRIBUTE_VALUE = "ATTRIBUTE_VALUE"; //$NON-NLS-1$
+ protected static final String START_TAG = "START_TAG"; //$NON-NLS-1$
+ protected static final String TEXT = "TEXT"; //$NON-NLS-1$
+ protected static final String FIRST_NON_WHITESPACE_TEXT = "FIRST_NON_WHITESPACE_TEXT"; //$NON-NLS-1$
+ protected static final String TEXT_ENTITY_REFERENCE = "TEXT_ENTITY_REFERENCE"; //$NON-NLS-1$
+ protected static final String VALUE_OF_ATTRIBUTE_WITH_GIVEN_VALUE = "VALUE_OF_ATTRIBUTE_WITH_GIVEN_VALUE"; //$NON-NLS-1$
- protected static final String COLUMN_NUMBER_ATTRIBUTE = "columnNumber";
- protected static final String SQUIGGLE_SELECTION_STRATEGY_ATTRIBUTE = "squiggleSelectionStrategy";
- protected static final String SQUIGGLE_NAME_OR_VALUE_ATTRIBUTE = "squiggleNameOrValue";
+ protected static final String COLUMN_NUMBER_ATTRIBUTE = "columnNumber"; //$NON-NLS-1$
+ protected static final String SQUIGGLE_SELECTION_STRATEGY_ATTRIBUTE = "squiggleSelectionStrategy"; //$NON-NLS-1$
+ protected static final String SQUIGGLE_NAME_OR_VALUE_ATTRIBUTE = "squiggleNameOrValue"; //$NON-NLS-1$
public DelegatingSourceValidator() {
super(); // constructor
@@ -86,14 +86,14 @@
}
public Object loadModel(String symbolicName, Object[] parms) {
- if (symbolicName.equals("getFile")) {
+ if (symbolicName.equals("getFile")) { //$NON-NLS-1$
return file;
}
return null;
}
public Object loadModel(String symbolicName) {
- if (symbolicName.equals("inputStream")) {
+ if (symbolicName.equals("inputStream")) { //$NON-NLS-1$
return inputStream;
}
return null;
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/reconcile/DelegatingSourceValidatorForXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/reconcile/DelegatingSourceValidatorForXML.java
index 0556e55..d822d50 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/reconcile/DelegatingSourceValidatorForXML.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/reconcile/DelegatingSourceValidatorForXML.java
@@ -19,7 +19,7 @@
*
*/
public class DelegatingSourceValidatorForXML extends DelegatingSourceValidator {
- private final static String VALIDATOR_CLASS = "org.eclipse.wst.xml.validation.internal.ui.eclipse.Validator";
+ private final static String VALIDATOR_CLASS = "org.eclipse.wst.xml.validation.internal.ui.eclipse.Validator"; //$NON-NLS-1$
public DelegatingSourceValidatorForXML() {
super();
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/reconcile/ReconcileStepForMarkup.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/reconcile/ReconcileStepForMarkup.java
index 18c29b8..04dc6a3 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/reconcile/ReconcileStepForMarkup.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/reconcile/ReconcileStepForMarkup.java
@@ -21,17 +21,18 @@
import org.eclipse.jface.text.reconciler.DirtyRegion;
import org.eclipse.jface.text.reconciler.IReconcileResult;
import org.eclipse.jface.text.reconciler.IReconcileStep;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.wst.sse.core.IStructuredModel;
import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.sse.core.text.IStructuredDocumentRegion;
import org.eclipse.wst.sse.core.text.ITextRegion;
import org.eclipse.wst.sse.core.text.ITextRegionList;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.sse.ui.internal.reconcile.ReconcileAnnotationKey;
import org.eclipse.wst.sse.ui.internal.reconcile.StructuredReconcileStep;
import org.eclipse.wst.sse.ui.internal.reconcile.TemporaryAnnotation;
import org.eclipse.wst.xml.core.document.IDOMNode;
import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.eclipse.wst.xml.ui.internal.correction.ProblemIDsXML;
import org.w3c.dom.Node;
@@ -94,7 +95,7 @@
// create one error for all attributes in the end tag
if (errorCount > 0) {
Position p = new Position(start, end - start);
- String message = SSEUIPlugin.getResourceString("%End_tag_has_attributes"); //$NON-NLS-1$
+ String message = XMLUIMessages.End_tag_has_attributes;
results.add(new TemporaryAnnotation(p, SEVERITY_GENERIC_ILLFORMED_SYNTAX, message, createKey(structuredDocumentRegion, getScope()), ProblemIDsXML.AttrsInEndTag));
}
}
@@ -119,7 +120,7 @@
}
if (!closed) {
- String message = SSEUIPlugin.getResourceString("%ReconcileStepForMarkup.6"); //$NON-NLS-1$
+ String message = XMLUIMessages.ReconcileStepForMarkup_6;
int start = structuredDocumentRegion.getStartOffset();
int length = structuredDocumentRegion.getText().trim().length();
@@ -141,7 +142,7 @@
if (regions.size() == 2) {
// missing name region
if (regions.get(0).getType() == DOMRegionContext.XML_TAG_OPEN && regions.get(1).getType() == DOMRegionContext.XML_TAG_CLOSE) {
- String message = SSEUIPlugin.getResourceString("%ReconcileStepForMarkup.3"); //$NON-NLS-1$
+ String message = XMLUIMessages.ReconcileStepForMarkup_3;
int start = structuredDocumentRegion.getStartOffset();
int length = structuredDocumentRegion.getLength();
Position p = new Position(start, length);
@@ -173,7 +174,7 @@
// create annotation
ITextRegion nameRegion = textRegions.get(i - 2);
Object[] args = {structuredDocumentRegion.getText(nameRegion)};
- String message = SSEUIPlugin.getResourceString("%Attribute_{0}_is_missing_a_value", args);
+ String message = NLS.bind(XMLUIMessages.Attribute__is_missing_a_value, args);
int start = structuredDocumentRegion.getStartOffset(nameRegion);
int end = structuredDocumentRegion.getTextEndOffset(nameRegion);
Position p = new Position(start, end - start);
@@ -193,7 +194,7 @@
// create annotation
ITextRegion previousRegion = textRegions.get(i - 1);
Object[] args = {structuredDocumentRegion.getText(previousRegion)};
- String message = SSEUIPlugin.getResourceString("%Attribute_{0}_has_no_value", args);
+ String message = NLS.bind(XMLUIMessages.Attribute__has_no_value, args);
int start = structuredDocumentRegion.getStartOffset(previousRegion);
int end = structuredDocumentRegion.getTextEndOffset(previousRegion);
Position p = new Position(start, end - start);
@@ -227,7 +228,7 @@
// this is possibly the case of "< tag"
if (prev.getRegions().size() == 1 && isStartTag(prev)) {
// add the error for preceding space in tag name
- String message = SSEUIPlugin.getResourceString("%ReconcileStepForMarkup.2"); //$NON-NLS-1$
+ String message = XMLUIMessages.ReconcileStepForMarkup_2;
int start = structuredDocumentRegion.getStartOffset();
// find length of whitespace
int length = sdRegionText.trim().equals("") ? sdRegionText.length() : sdRegionText.indexOf(sdRegionText.trim()); //$NON-NLS-1$
@@ -257,7 +258,7 @@
String piText = structuredDocumentRegion.getText(r);
int index = piText.indexOf(":"); //$NON-NLS-1$
if (index != -1) {
- String message = SSEUIPlugin.getResourceString("%ReconcileStepForMarkup.4"); //$NON-NLS-1$
+ String message = XMLUIMessages.ReconcileStepForMarkup_4;
int start = structuredDocumentRegion.getStartOffset(r) + index;
int length = piText.trim().length() - index;
Position p = new Position(start, length);
@@ -308,19 +309,19 @@
if (size == 1) {
if (one.equals(DQUOTE) || one.equals(SQUOTE)) {
// missing closing quote
- String message = SSEUIPlugin.getResourceString("%ReconcileStepForMarkup.0"); //$NON-NLS-1$
+ String message = XMLUIMessages.ReconcileStepForMarkup_0;
addAttributeError(message, attrValueText, structuredDocumentRegion.getStartOffset(r), attrValueText.trim().length(), ProblemIDsXML.Unclassified, structuredDocumentRegion, results);
errorCount++;
} else {
// missing both
- String message = SSEUIPlugin.getResourceString("%ReconcileStepForMarkup.1"); //$NON-NLS-1$
+ String message = XMLUIMessages.ReconcileStepForMarkup_1;
addAttributeError(message, attrValueText, structuredDocumentRegion.getStartOffset(r), attrValueText.trim().length(), ProblemIDsXML.AttrValueNotQuoted, structuredDocumentRegion, results);
errorCount++;
}
} else if (size == 2) {
if (one.equals(SQUOTE) && !two.equals(SQUOTE) || one.equals(DQUOTE) && !two.equals(DQUOTE)) {
// missing closing quote
- String message = SSEUIPlugin.getResourceString("%ReconcileStepForMarkup.0"); //$NON-NLS-1$
+ String message = XMLUIMessages.ReconcileStepForMarkup_0;
addAttributeError(message, attrValueText, structuredDocumentRegion.getStartOffset(r), attrValueText.trim().length(), ProblemIDsXML.Unclassified, structuredDocumentRegion, results);
errorCount++;
}
@@ -366,7 +367,7 @@
if (!selfClosed && tagName != null) {
Object[] args = {tagName};
- String message = SSEUIPlugin.getResourceString("%Missing_end_tag_{0}", args);
+ String message = NLS.bind(XMLUIMessages.Missing_end_tag_, args);
int start = sdRegion.getStart();
Position p = new Position(start, length);
@@ -407,7 +408,7 @@
if (prev != null && !prev.isDeleted()) {
String prevText = prev.getFullText();
if (prev.getType() == DOMRegionContext.XML_CONTENT && prevText.endsWith(" ")) { //$NON-NLS-1$
- String message = SSEUIPlugin.getResourceString("%ReconcileStepForMarkup.5"); //$NON-NLS-1$
+ String message = XMLUIMessages.ReconcileStepForMarkup_5;
int start = prev.getStartOffset();
int length = prev.getLength();
Position p = new Position(start, length);
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/taginfo/MarkupTagInfoProvider.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/taginfo/MarkupTagInfoProvider.java
index 31ada2d..e61242c 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/taginfo/MarkupTagInfoProvider.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/taginfo/MarkupTagInfoProvider.java
@@ -12,7 +12,6 @@
*******************************************************************************/
package org.eclipse.wst.xml.ui.taginfo;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
import org.eclipse.wst.xml.core.internal.contentmodel.CMDocumentation;
@@ -20,6 +19,7 @@
import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
import org.eclipse.wst.xml.core.internal.contentmodel.CMNodeList;
import org.eclipse.wst.xml.core.internal.contentmodel.util.CMDescriptionBuilder;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
/**
* Provides basic tag information such as element/attribute name, data type,
@@ -70,13 +70,13 @@
protected void printDataTypeInfo(StringBuffer sb, CMDataType dataType) {
String dataTypeName = dataType.getNodeName();
if ((dataTypeName != null) && (dataTypeName.length() > 0)) {
- sb.append(PARAGRAPH_START + BOLD_START + SSEUIPlugin.getResourceString("%Data_Type____4") + SPACE + BOLD_END); //$NON-NLS-1$
+ sb.append(PARAGRAPH_START + BOLD_START + XMLUIMessages.Data_Type____4 + SPACE + BOLD_END);
sb.append(dataTypeName);
sb.append(PARAGRAPH_END);
}
String[] enumeratedValue = dataType.getEnumeratedValues();
if (enumeratedValue != null && enumeratedValue.length > 0) {
- sb.append(PARAGRAPH_START + BOLD_START + SSEUIPlugin.getResourceString("%Enumerated_Values____5") + SPACE + BOLD_END); //$NON-NLS-1$
+ sb.append(PARAGRAPH_START + BOLD_START + XMLUIMessages.Enumerated_Values____5 + SPACE + BOLD_END);
sb.append(LIST_BEGIN);
for (int i = 0; i < enumeratedValue.length; i++) {
sb.append(LIST_ELEMENT + enumeratedValue[i]);
@@ -95,7 +95,7 @@
if (node.getNodeType() == CMNode.ELEMENT_DECLARATION) {
CMElementDeclaration ed = (CMElementDeclaration) node;
- sb.append(PARAGRAPH_START + BOLD_START + SSEUIPlugin.getResourceString("%Element____1") + SPACE + BOLD_END); //$NON-NLS-1$
+ sb.append(PARAGRAPH_START + BOLD_START + XMLUIMessages.Element____1 + SPACE + BOLD_END);
sb.append(node.getNodeName());
sb.append(PARAGRAPH_END);
if (ed.getContentType() == CMElementDeclaration.PCDATA) {
@@ -107,14 +107,14 @@
CMDescriptionBuilder builder = new CMDescriptionBuilder();
String description = builder.buildDescription(node);
if ((description != null) && (description.length() > 0)) {
- sb.append(PARAGRAPH_START + BOLD_START + SSEUIPlugin.getResourceString("%Content_Model____2") + SPACE + BOLD_END); //$NON-NLS-1$
+ sb.append(PARAGRAPH_START + BOLD_START + XMLUIMessages.Content_Model____2 + SPACE + BOLD_END);
sb.append(description + PARAGRAPH_END);
}
}
printDocumentation(sb, node);
} else if (node.getNodeType() == CMNode.ATTRIBUTE_DECLARATION) {
CMAttributeDeclaration ad = (CMAttributeDeclaration) node;
- sb.append(PARAGRAPH_START + BOLD_START + SSEUIPlugin.getResourceString("%Attribute____3") + SPACE + BOLD_END); //$NON-NLS-1$
+ sb.append(PARAGRAPH_START + BOLD_START + XMLUIMessages.Attribute____3 + SPACE + BOLD_END);
sb.append(node.getNodeName());
sb.append(PARAGRAPH_END);
CMDataType dataType = ad.getAttrType();
@@ -123,7 +123,7 @@
}
printDocumentation(sb, node);
} else if (node.getNodeType() == CMNode.DATA_TYPE) {
- sb.append(PARAGRAPH_START + BOLD_START + SSEUIPlugin.getResourceString("%Data_Type____4") + SPACE + BOLD_END); //$NON-NLS-1$
+ sb.append(PARAGRAPH_START + BOLD_START + XMLUIMessages.Data_Type____4 + SPACE + BOLD_END);
sb.append(node.getNodeName());
sb.append(PARAGRAPH_END);
printDocumentation(sb, node);