[115727] externalize strings that need them or mark them as non-nls
diff --git a/bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/Catalog.java b/bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/Catalog.java index 1c8c0bb..a946840 100644 --- a/bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/Catalog.java +++ b/bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/Catalog.java
@@ -124,7 +124,7 @@ // TODO CS : do we really want to resolve these here? // I'm guessing we should return the 'platform:' form of the URI // to the caller. - if (uri.startsWith("platform:")) + if (uri.startsWith("platform:")) //$NON-NLS-1$ { URL entryURL = new URL(entry.getAbsolutePath(uri)); uri = Platform.resolve(entryURL).toString(); @@ -132,10 +132,10 @@ // we need to ensure URI's are of form "file:///D:/XXX" and NOT // "file:D:/XXX". Otherwise the EMF URI class gets confused // (see bug 103607) - String FILE_SCHEME = "file:"; - if (uri.startsWith(FILE_SCHEME) && !uri.startsWith(FILE_SCHEME + "/")) + String FILE_SCHEME = "file:"; //$NON-NLS-1$ + if (uri.startsWith(FILE_SCHEME) && !uri.startsWith(FILE_SCHEME + "/")) //$NON-NLS-1$ { - uri = FILE_SCHEME + "///" + uri.substring(FILE_SCHEME.length()); + uri = FILE_SCHEME + "///" + uri.substring(FILE_SCHEME.length()); //$NON-NLS-1$ } } return uri; @@ -243,11 +243,11 @@ } } - public static final String DEFAULT_CATALOG_FILE = "default_catalog.xml"; + public static final String DEFAULT_CATALOG_FILE = "default_catalog.xml"; //$NON-NLS-1$ - public static final String SYSTEM_CATALOG_FILE = "system_catalog.xml"; + public static final String SYSTEM_CATALOG_FILE = "system_catalog.xml"; //$NON-NLS-1$ - public static final String USER_CATALOG_FILE = "user_catalog.xml"; + public static final String USER_CATALOG_FILE = "user_catalog.xml"; //$NON-NLS-1$ protected String base; @@ -308,7 +308,7 @@ } } else { - Logger.log(Logger.ERROR, "argument was null in Catalog.addEntriesFromCatalog"); + Logger.log(Logger.ERROR, "argument was null in Catalog.addEntriesFromCatalog"); //$NON-NLS-1$ } } finally {
diff --git a/bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/CatalogContributorRegistryReader.java b/bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/CatalogContributorRegistryReader.java index 2961389..13c6d25 100644 --- a/bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/CatalogContributorRegistryReader.java +++ b/bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/CatalogContributorRegistryReader.java
@@ -31,8 +31,8 @@ public class CatalogContributorRegistryReader { - protected static final String EXTENSION_POINT_ID = "catalogContributions"; - protected static final String TAG_CONTRIBUTION = "catalogContribution"; + protected static final String EXTENSION_POINT_ID = "catalogContributions"; //$NON-NLS-1$ + protected static final String TAG_CONTRIBUTION = "catalogContribution"; //$NON-NLS-1$ /* * this is a sample exptension * <extension point="org.eclipse.wst.xml.core.catalogContributions"> @@ -77,7 +77,7 @@ public static String resolvePath(URL platformURL, String path) { - if (path.startsWith("platform:/plugin")) + if (path.startsWith("platform:/plugin")) //$NON-NLS-1$ { // this is the speclial case, where the resource is located relative // to another plugin (not the one that declares the extension point) @@ -109,7 +109,7 @@ Bundle bundle = Platform.getBundle(pluginId); if (bundle != null) { - URL bundleEntry = bundle.getEntry("/"); + URL bundleEntry = bundle.getEntry("/"); //$NON-NLS-1$ if(bundleEntry != null){ try @@ -184,13 +184,13 @@ processNextCatalogElements(new IConfigurationElement[]{childElement}); continue; } - if (key == null || key.equals("")) + if (key == null || key.equals("")) //$NON-NLS-1$ { Logger.log(Logger.ERROR, XMLCoreMessages.Catalog_entry_key_not_set); continue; } String entryURI = childElement.getAttribute(OASISCatalogConstants.ATTR_URI); // mandatory - if (entryURI == null || entryURI.equals("")) + if (entryURI == null || entryURI.equals("")) //$NON-NLS-1$ { Logger.log(Logger.ERROR, XMLCoreMessages.Catalog_entry_uri_not_set); continue; @@ -203,7 +203,7 @@ String resolvedPath = resolvePath(entryURI); entry.setURI(resolvedPath); String id = childElement.getAttribute(OASISCatalogConstants.ATTR_ID); // optional - if (id != null && !id.equals("")) + if (id != null && !id.equals("")) //$NON-NLS-1$ { entry.setId(id); } @@ -217,7 +217,7 @@ && !attrName.equals(OASISCatalogConstants.ATTR_BASE)) { String attrValue = childElement.getAttribute(attrName); - if (attrValue != null && !attrValue.equals("")) + if (attrValue != null && !attrValue.equals("")) //$NON-NLS-1$ { catalogElement.setAttributeValue(attrName, attrValue); } @@ -235,7 +235,7 @@ { IConfigurationElement childElement = childElementList[i]; String location = childElement.getAttribute(OASISCatalogConstants.ATTR_CATALOG); // mandatory - if (location == null || location.equals("")) + if (location == null || location.equals("")) //$NON-NLS-1$ { Logger.log(Logger.ERROR, XMLCoreMessages.Catalog_next_catalog_location_uri_not_set); continue; @@ -244,7 +244,7 @@ String resolvedPath = resolvePath(location); nextCatalog.setCatalogLocation(resolvedPath); String id = childElement.getAttribute(OASISCatalogConstants.ATTR_ID); - if (id != null && !id.equals("")) + if (id != null && !id.equals("")) //$NON-NLS-1$ { nextCatalog.setId(id); }
diff --git a/bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/CatalogElement.java b/bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/CatalogElement.java index 2c2bb7c..61e6631 100644 --- a/bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/CatalogElement.java +++ b/bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/CatalogElement.java
@@ -110,7 +110,7 @@ if (catalog != null) { String base = catalog.getBase(); - if (base == null || base.equals("")) + if (base == null || base.equals("")) //$NON-NLS-1$ { base = catalog.getLocation(); }
diff --git a/bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/CatalogReader.java b/bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/CatalogReader.java index b875041..2bd4837 100644 --- a/bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/CatalogReader.java +++ b/bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/CatalogReader.java
@@ -55,8 +55,8 @@ public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { // set base - String base = attributes.getValue("", OASISCatalogConstants.ATTR_BASE); - if (base != null && !base.equals("")) + String base = attributes.getValue("", OASISCatalogConstants.ATTR_BASE); //$NON-NLS-1$ + if (base != null && !base.equals("")) //$NON-NLS-1$ { baseURIStack.push(base); } @@ -65,10 +65,10 @@ if (localName.equals(CompatabilityConstants.TAG_USER_ENTRY)) { int type = ICatalogEntry.ENTRY_TYPE_PUBLIC; - String typeName = attributes.getValue("", CompatabilityConstants.ATT_TYPE); + String typeName = attributes.getValue("", CompatabilityConstants.ATT_TYPE); //$NON-NLS-1$ if (typeName != null) { - if (typeName.compareToIgnoreCase("SYSTEM") == 0) + if (typeName.compareToIgnoreCase("SYSTEM") == 0) //$NON-NLS-1$ { type = ICatalogEntry.ENTRY_TYPE_SYSTEM; } @@ -77,11 +77,11 @@ if (catalogElement instanceof CatalogEntry) { CatalogEntry catalogEntry = (CatalogEntry) catalogElement; - String key = attributes.getValue("", CompatabilityConstants.ATT_ID); + String key = attributes.getValue("", CompatabilityConstants.ATT_ID); //$NON-NLS-1$ catalogEntry.setKey(key); - String entryUri = attributes.getValue("", CompatabilityConstants.ATT_URI); + String entryUri = attributes.getValue("", CompatabilityConstants.ATT_URI); //$NON-NLS-1$ catalogEntry.setURI(entryUri); - String webURL = attributes.getValue("", CompatabilityConstants.ATT_WEB_URL); + String webURL = attributes.getValue("", CompatabilityConstants.ATT_WEB_URL); //$NON-NLS-1$ if (webURL != null) { catalogEntry.setAttributeValue( @@ -98,23 +98,23 @@ //dw String catalogId = attributes.getValue("", OASISCatalogConstants.ATTR_ID); if (OASISCatalogConstants.TAG_PUBLIC.equals(localName)) { - key = attributes.getValue("", OASISCatalogConstants.ATTR_PUBLIC_ID); + key = attributes.getValue("", OASISCatalogConstants.ATTR_PUBLIC_ID); //$NON-NLS-1$ } else if (OASISCatalogConstants.TAG_SYSTEM.equals(localName)) { - key = attributes.getValue("", OASISCatalogConstants.ATTR_SYSTEM_ID); + key = attributes.getValue("", OASISCatalogConstants.ATTR_SYSTEM_ID); //$NON-NLS-1$ type = ICatalogEntry.ENTRY_TYPE_SYSTEM; } else if (OASISCatalogConstants.TAG_URI.equals(localName)) { - key = attributes.getValue("", OASISCatalogConstants.ATTR_NAME); + key = attributes.getValue("", OASISCatalogConstants.ATTR_NAME); //$NON-NLS-1$ type = ICatalogEntry.ENTRY_TYPE_URI; } else if (OASISCatalogConstants.TAG_NEXT_CATALOG.equals(localName)) { - String nextCatalogId = attributes.getValue("", OASISCatalogConstants.ATTR_ID); + String nextCatalogId = attributes.getValue("", OASISCatalogConstants.ATTR_ID); //$NON-NLS-1$ - String location = attributes.getValue("", OASISCatalogConstants.ATTR_CATALOG); + String location = attributes.getValue("", OASISCatalogConstants.ATTR_CATALOG); //$NON-NLS-1$ NextCatalog delegate = new NextCatalog(); delegate.setCatalogLocation(location); delegate.setId(nextCatalogId); @@ -125,13 +125,13 @@ // do not handle other entries return; } - if (key == null || key.equals("")) + if (key == null || key.equals("")) //$NON-NLS-1$ { Logger.log(Logger.ERROR, XMLCoreMessages.Catalog_entry_key_not_set); return; } - String entryURI = attributes.getValue("", OASISCatalogConstants.ATTR_URI); // mandatory - if (entryURI == null || entryURI.equals("")) + String entryURI = attributes.getValue("", OASISCatalogConstants.ATTR_URI); // mandatory //$NON-NLS-1$ + if (entryURI == null || entryURI.equals("")) //$NON-NLS-1$ { Logger.log(Logger.ERROR, XMLCoreMessages.Catalog_entry_uri_not_set); return; @@ -153,7 +153,7 @@ && !attrName.equals(OASISCatalogConstants.ATTR_BASE)) { String attrValue = attributes.getValue(attrName); - if (attrValue != null && !attrValue.equals("")) + if (attrValue != null && !attrValue.equals("")) //$NON-NLS-1$ { catalogElement.setAttributeValue(attrName, attrValue); } @@ -176,12 +176,12 @@ // for backward compatability interface CompatabilityConstants{ - public static final String TAG_ID_XML_CATALOG_SETTINGS = "XMLCatalogSettings"; - public static final String TAG_ID_USER_ENTRIES = "UserEntries"; - public static final String TAG_USER_ENTRY = "UserEntry"; - public static final String ATT_TYPE = "TYPE"; - public static final String ATT_ID = "ID"; - public static final String ATT_URI = "URI"; - public static final String ATT_WEB_URL = "WEB_URL"; + public static final String TAG_ID_XML_CATALOG_SETTINGS = "XMLCatalogSettings"; //$NON-NLS-1$ + public static final String TAG_ID_USER_ENTRIES = "UserEntries"; //$NON-NLS-1$ + public static final String TAG_USER_ENTRY = "UserEntry"; //$NON-NLS-1$ + public static final String ATT_TYPE = "TYPE"; //$NON-NLS-1$ + public static final String ATT_ID = "ID"; //$NON-NLS-1$ + public static final String ATT_URI = "URI"; //$NON-NLS-1$ + public static final String ATT_WEB_URL = "WEB_URL"; //$NON-NLS-1$ } }
diff --git a/bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/CatalogSet.java b/bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/CatalogSet.java index f0587df..58f943b 100644 --- a/bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/CatalogSet.java +++ b/bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/CatalogSet.java
@@ -31,7 +31,7 @@ ok = false; // we catch and log all exceptions, to disallow // one bad extension interfering with others - Logger.logException("error loading catalog: " + id + " " + uri, e); + Logger.logException("error loading catalog: " + id + " " + uri, e); //$NON-NLS-1$ //$NON-NLS-2$ } if (ok) { uriResourceMap.put(uri, catalog);
diff --git a/bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/CatalogWriter.java b/bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/CatalogWriter.java index bfeef82..e477628 100644 --- a/bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/CatalogWriter.java +++ b/bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/CatalogWriter.java
@@ -105,7 +105,7 @@ default : break; } - if(childElement != null && id != null && !id.equals("")){ + if(childElement != null && id != null && !id.equals("")){ //$NON-NLS-1$ childElement.setAttribute(OASISCatalogConstants.ATTR_ID, id); } @@ -113,7 +113,7 @@ for (int j = 0; j < attributes.length; j++) { String attrName = attributes[j]; - if (attrName != null && !attrName.equals("")) + if (attrName != null && !attrName.equals("")) //$NON-NLS-1$ { String attrValue = entry.getAttributeValue(attrName); if (childElement != null && attrValue != null) @@ -164,16 +164,16 @@ { TransformerFactory transformerFactory = TransformerFactory.newInstance(); Transformer transformer = transformerFactory.newTransformer(); - transformer.setOutputProperty(OutputKeys.INDENT, "yes"); - transformer.setOutputProperty(OutputKeys.METHOD, "xml"); + transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$ + transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$ // Unless a width is set, there will be only line breaks but no // indentation. // The IBM JDK and the Sun JDK don't agree on the property name, // so we set them both. // - transformer.setOutputProperty("{http://xml.apache.org/xalan}indent-amount", "2"); - transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2"); - String encoding = "UTF-8"; // TBD + transformer.setOutputProperty("{http://xml.apache.org/xalan}indent-amount", "2"); //$NON-NLS-1$ //$NON-NLS-2$ + transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2"); //$NON-NLS-1$ //$NON-NLS-2$ + String encoding = "UTF-8"; // TBD //$NON-NLS-1$ if (encoding != null) { transformer.setOutputProperty(OutputKeys.ENCODING, encoding); @@ -214,7 +214,7 @@ protected static String removeProtocol(String uri) { String result = uri; - String protocol_pattenrn = ":"; + String protocol_pattenrn = ":"; //$NON-NLS-1$ if (uri != null) { int index = uri.indexOf(protocol_pattenrn);
diff --git a/bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/OASISCatalogConstants.java b/bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/OASISCatalogConstants.java index d2ad8f3..06e8941 100644 --- a/bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/OASISCatalogConstants.java +++ b/bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/OASISCatalogConstants.java
@@ -2,70 +2,70 @@ public interface OASISCatalogConstants { - public static final String namespaceName = "urn:oasis:names:tc:entity:xmlns:xml:catalog"; + public static final String namespaceName = "urn:oasis:names:tc:entity:xmlns:xml:catalog"; //$NON-NLS-1$ /** Types of the catalog entries */ /** The CATALOG element name. */ - public static final String TAG_CATALOG = "catalog"; + public static final String TAG_CATALOG = "catalog"; //$NON-NLS-1$ /** The GROUP catalog entry. */ - public static final String TAG_GROUP = "group"; + public static final String TAG_GROUP = "group"; //$NON-NLS-1$ /** The PUBLIC catalog entry. */ - public static final String TAG_PUBLIC = "public"; + public static final String TAG_PUBLIC = "public"; //$NON-NLS-1$ /** The SYSTEM catalog etnry. */ - public static final String TAG_SYSTEM = "system"; + public static final String TAG_SYSTEM = "system"; //$NON-NLS-1$ /** The URI catalog entry. */ - public static final String TAG_URI = "uri"; + public static final String TAG_URI = "uri"; //$NON-NLS-1$ /** The REWRITE_SYSTEM catalog entry. */ - public static final String TAG_REWRITE_SYSTEM = "rewriteSystem"; + public static final String TAG_REWRITE_SYSTEM = "rewriteSystem"; //$NON-NLS-1$ /** The REWRITE_URI catalog entry. */ - public static final String TAG_REWRITE_URI = "rewritePublic"; + public static final String TAG_REWRITE_URI = "rewritePublic"; //$NON-NLS-1$ /** The DELEGATE_PUBLIC catalog entry. */ - public static final String TAG_DELEGATE_PUBLIC = "delegatePublic"; + public static final String TAG_DELEGATE_PUBLIC = "delegatePublic"; //$NON-NLS-1$ /** The DELEGATE_SYSTEM catalog entry. */ - public static final String TAG_DELEGATE_SYSTEM = "delegateSystem"; + public static final String TAG_DELEGATE_SYSTEM = "delegateSystem"; //$NON-NLS-1$ /** The DELEGATE_URI catalog entry. */ - public static final String TAG_DELEGATE_URI = "delegateUri"; + public static final String TAG_DELEGATE_URI = "delegateUri"; //$NON-NLS-1$ /** The NEXT_CATALOG catalog entry. */ - public static final String TAG_NEXT_CATALOG = "nextCatalog"; + public static final String TAG_NEXT_CATALOG = "nextCatalog"; //$NON-NLS-1$ /** Attributes */ /** Attribute id used in all catalog entries */ - public static final String ATTR_ID = "id"; + public static final String ATTR_ID = "id"; //$NON-NLS-1$ /** Attribute id base in all catalog entries */ - public static final String ATTR_BASE = "xml:base"; + public static final String ATTR_BASE = "xml:base"; //$NON-NLS-1$ /** Attribute id prefere in catalog entries: CATALOG, GROUP */ - public static final String ATTR_PREFERE = "prefere"; + public static final String ATTR_PREFERE = "prefere"; //$NON-NLS-1$ /** Attribute used in catalog entries of type: PUBLIC */ - public static final String ATTR_PUBLIC_ID = "publicId"; + public static final String ATTR_PUBLIC_ID = "publicId"; //$NON-NLS-1$ /** * Attribute used in catalog entries of type: SYSTEM */ - public static final String ATTR_SYSTEM_ID = "systemId"; + public static final String ATTR_SYSTEM_ID = "systemId"; //$NON-NLS-1$ /** * Attribute used in catalog entries of type: URI */ - public static final String ATTR_NAME = "name"; + public static final String ATTR_NAME = "name"; //$NON-NLS-1$ /** * Attribute used in catalog entries of type: PUBLIC, URI */ - public static final String ATTR_URI = "uri"; + public static final String ATTR_URI = "uri"; //$NON-NLS-1$ /** * Attribute used in catalog entries of type: REWRITE_SYSTEM, DELEGATE_SYSTEM */ - public static final String ATTR_SYSTEM_ID_START_STRING = "systemIdStartString"; + public static final String ATTR_SYSTEM_ID_START_STRING = "systemIdStartString"; //$NON-NLS-1$ /** * Attribute used in catalog entries of type: REWRITE_SYSTEM, REWRITE_URI */ - public static final String ATTR_REWRITE_PREFIX = "rewritePrefix"; + public static final String ATTR_REWRITE_PREFIX = "rewritePrefix"; //$NON-NLS-1$ /** * Attribute used in catalog entries of type: DELEGATE_PUBLIC */ - public static final String ATTR_PUBLIC_ID_START_STRING = "publicIdStartString"; + public static final String ATTR_PUBLIC_ID_START_STRING = "publicIdStartString"; //$NON-NLS-1$ /** * Attribute used in catalog entries of type: DELEGATE_PUBLIC, * DELEGATE_SYSTEM, DELEGATE_URI, NEXT_CATALOG */ - public static final String ATTR_CATALOG = "catalog"; + public static final String ATTR_CATALOG = "catalog"; //$NON-NLS-1$ /** * Attribute used in catalog entries of type: REWRITE_URI, DELEGATE_URI */ - public static final String ATTR_URI_START_STRING = "uriStartString"; + public static final String ATTR_URI_START_STRING = "uriStartString"; //$NON-NLS-1$ }
diff --git a/bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/XMLCatalogURIResolverExtension.java b/bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/XMLCatalogURIResolverExtension.java index 0bc4555..268a8f7 100644 --- a/bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/XMLCatalogURIResolverExtension.java +++ b/bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/XMLCatalogURIResolverExtension.java
@@ -74,7 +74,7 @@ // TODO (bug 103243) remove this lame test once we move to the new URIResolver API // since the new API is explicit about namespace and publicId // - if (!(systemId != null && systemId.endsWith(".xsd"))) + if (!(systemId != null && systemId.endsWith(".xsd"))) //$NON-NLS-1$ { try {
diff --git a/bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/provisional/ICatalogEntry.java b/bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/provisional/ICatalogEntry.java index 80e220a..3e90cb8 100644 --- a/bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/provisional/ICatalogEntry.java +++ b/bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/provisional/ICatalogEntry.java
@@ -19,7 +19,7 @@ public static final int ENTRY_TYPE_URI = 4; /** Attribute name for Web address of catalog entry */ - public static final String ATTR_WEB_URL = "webURL"; + public static final String ATTR_WEB_URL = "webURL"; //$NON-NLS-1$ /** *
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 599439b..f07e8dd 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
@@ -167,7 +167,7 @@ // for now I'm setting the encoding to UTF-8 just incase this code path is used somewhere // String piValue = "version=\"1.0\""; //$NON-NLS-1$ - String encoding = "UTF-8"; + String encoding = "UTF-8"; //$NON-NLS-1$ piValue += " encoding=\"" + encoding + "\""; //$NON-NLS-1$ //$NON-NLS-2$ ProcessingInstruction pi = document.createProcessingInstruction("xml", piValue); //$NON-NLS-1$ document.appendChild(pi);
diff --git a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/ValidatorHelper.java b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/ValidatorHelper.java index 37febb0..d7c0b7a 100644 --- a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/ValidatorHelper.java +++ b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/ValidatorHelper.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. + * Copyright (c) 2001, 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 @@ -35,15 +35,14 @@ */ public class ValidatorHelper { - public static final String copyright = "(c) Copyright IBM Corporation 2002."; public List namespaceURIList = new Vector(); public boolean isGrammarEncountered = false; public boolean isDTDEncountered = false; public boolean isNamespaceEncountered = false; - public String schemaLocationString = ""; + public String schemaLocationString = ""; //$NON-NLS-1$ public int numDTDElements = 0; - public static final boolean IS_LINUX = java.io.File.separator.equals("/"); + public static final boolean IS_LINUX = java.io.File.separator.equals("/"); //$NON-NLS-1$ /** * Constructor. @@ -64,10 +63,10 @@ reader = new org.apache.xerces.parsers.SAXParser(); - reader.setFeature("http://apache.org/xml/features/continue-after-fatal-error", false); - reader.setFeature("http://xml.org/sax/features/namespace-prefixes", true); - reader.setFeature("http://xml.org/sax/features/namespaces", false); - reader.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false); + reader.setFeature("http://apache.org/xml/features/continue-after-fatal-error", false); //$NON-NLS-1$ + reader.setFeature("http://xml.org/sax/features/namespace-prefixes", true); //$NON-NLS-1$ + reader.setFeature("http://xml.org/sax/features/namespaces", false); //$NON-NLS-1$ + reader.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false); //$NON-NLS-1$ reader.setContentHandler(new MyContentHandler()); reader.setErrorHandler(new InternalErrorHandler()); @@ -103,7 +102,7 @@ { } }; - reader.setProperty("http://xml.org/sax/properties/lexical-handler", lexicalHandler); + reader.setProperty("http://xml.org/sax/properties/lexical-handler", lexicalHandler); //$NON-NLS-1$ return reader; } @@ -178,7 +177,7 @@ public 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); @@ -188,7 +187,7 @@ public String getUnprefixedName(String name) { - int index = name.indexOf(":"); + int index = name.indexOf(":"); //$NON-NLS-1$ if (index != -1) { name = name.substring(index + 1); @@ -198,7 +197,7 @@ public String getPrefixedName(String prefix, String localName) { - return prefix != null && prefix.length() > 0 ? prefix + ":" + localName : localName; + return prefix != null && prefix.length() > 0 ? prefix + ":" + localName : localName; //$NON-NLS-1$ } public void startElement(String namespaceURI, String localName, String rawName, Attributes atts) @@ -213,19 +212,19 @@ for (int i =0; i < nAtts; i++) { String attributeName = atts.getQName(i); - if (attributeName.equals("xmlns") || attributeName.startsWith("xmlns:")) + if (attributeName.equals("xmlns") || attributeName.startsWith("xmlns:")) //$NON-NLS-1$ //$NON-NLS-2$ { isNamespaceEncountered = true; String value = atts.getValue(i); - if (value.startsWith("http://www.w3.org/") && value.endsWith("/XMLSchema-instance")) + if (value.startsWith("http://www.w3.org/") && value.endsWith("/XMLSchema-instance")) //$NON-NLS-1$ //$NON-NLS-2$ { - schemaInstancePrefix = attributeName.equals("xmlns") ? "" : getUnprefixedName(attributeName); + schemaInstancePrefix = attributeName.equals("xmlns") ? "" : getUnprefixedName(attributeName); //$NON-NLS-1$ //$NON-NLS-2$ } } } String prefix = getPrefix(rawName); - String rootElementNamespaceDeclarationName = (prefix != null && prefix.length() > 0) ? "xmlns:" + prefix : "xmlns"; + String rootElementNamespaceDeclarationName = (prefix != null && prefix.length() > 0) ? "xmlns:" + prefix : "xmlns"; //$NON-NLS-1$ //$NON-NLS-2$ String rootElementNamespace = rootElementNamespaceDeclarationName != null ? atts.getValue(rootElementNamespaceDeclarationName) : null; String location = null; @@ -234,10 +233,10 @@ // to determine a location if (schemaInstancePrefix != null) { - location = atts.getValue(getPrefixedName(schemaInstancePrefix, "noNamespaceSchemaLocation")); + location = atts.getValue(getPrefixedName(schemaInstancePrefix, "noNamespaceSchemaLocation")); //$NON-NLS-1$ if (location == null) { - String schemaLoc = atts.getValue(getPrefixedName(schemaInstancePrefix, "schemaLocation")); + String schemaLoc = atts.getValue(getPrefixedName(schemaInstancePrefix, "schemaLocation")); //$NON-NLS-1$ StringTokenizer st = new StringTokenizer(schemaLoc); while(st.hasMoreTokens()) {
diff --git a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/XMLValidationMessages.java b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/XMLValidationMessages.java new file mode 100644 index 0000000..77c6683 --- /dev/null +++ b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/XMLValidationMessages.java
@@ -0,0 +1,35 @@ +/* + * Copyright (c) 2005 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v10.html + * + * Contributors: + * IBM - Initial API and implementation + * + */ +package org.eclipse.wst.xml.core.internal.validation; + +import org.eclipse.osgi.util.NLS; + +/** + * Strings used by XML Validation + */ +public class XMLValidationMessages extends NLS { + private static final String BUNDLE_NAME = "org.eclipse.wst.xml.core.internal.validation.xmlvalidation";//$NON-NLS-1$ + + public static String _UI_PROBLEMS_VALIDATING_UNKNOWN_HOST; + public static String _UI_PROBLEMS_VALIDATING_FILE_NOT_FOUND; + public static String _UI_PROBLEMS_CONNECTION_REFUSED; + public static String _UI_REF_FILE_ERROR_MESSAGE; + + static { + // load message values from bundle file + NLS.initializeMessages(BUNDLE_NAME, XMLValidationMessages.class); + } + + private XMLValidationMessages() { + // cannot create new instance + } +}
diff --git a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/XMLValidator.java b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/XMLValidator.java index 90ee2b6..a8bc261 100644 --- a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/XMLValidator.java +++ b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/XMLValidator.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. + * Copyright (c) 2001, 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 @@ -20,11 +20,9 @@ import java.io.StringReader; import java.net.ConnectException; import java.net.UnknownHostException; -import java.text.MessageFormat; import java.util.ArrayList; import java.util.Hashtable; import java.util.List; -import java.util.ResourceBundle; import org.apache.xerces.impl.XMLErrorReporter; import org.apache.xerces.parsers.StandardParserConfiguration; @@ -34,6 +32,7 @@ import org.apache.xerces.xni.XNIException; import org.apache.xerces.xni.parser.XMLEntityResolver; import org.apache.xerces.xni.parser.XMLInputSource; +import org.eclipse.osgi.util.NLS; import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolver; import org.eclipse.wst.xml.core.internal.validation.core.LazyURLInputStream; import org.eclipse.wst.xml.core.internal.validation.core.logging.LoggerFactory; @@ -51,31 +50,23 @@ */ public class XMLValidator { - public static final String copyright = "(c) Copyright IBM Corporation 2002."; protected URIResolver uriResolver = null; //protected MyEntityResolver entityResolver = null; protected Hashtable ingoredErrorKeyTable = new Hashtable(); - - protected ResourceBundle resourceBundle; - protected static final String IGNORE_ALWAYS = "IGNORE_ALWAYS"; - protected static final String IGNORE_IF_DTD_WITHOUT_ELEMENT_DECL = "IGNORE_IF_DTD_WITHOUT_ELEMENT_DECL"; - protected static final String PREMATURE_EOF = "PrematureEOF"; - protected static final String ROOT_ELEMENT_TYPE_MUST_MATCH_DOCTYPEDECL = "RootElementTypeMustMatchDoctypedecl"; - protected static final String MSG_ELEMENT_NOT_DECLARED = "MSG_ELEMENT_NOT_DECLARED"; + protected static final String IGNORE_ALWAYS = "IGNORE_ALWAYS"; //$NON-NLS-1$ + protected static final String IGNORE_IF_DTD_WITHOUT_ELEMENT_DECL = "IGNORE_IF_DTD_WITHOUT_ELEMENT_DECL"; //$NON-NLS-1$ + protected static final String PREMATURE_EOF = "PrematureEOF"; //$NON-NLS-1$ + protected static final String ROOT_ELEMENT_TYPE_MUST_MATCH_DOCTYPEDECL = "RootElementTypeMustMatchDoctypedecl"; //$NON-NLS-1$ + protected static final String MSG_ELEMENT_NOT_DECLARED = "MSG_ELEMENT_NOT_DECLARED"; //$NON-NLS-1$ - private static final String _UI_PROBLEMS_VALIDATING_FILE_NOT_FOUND = "_UI_PROBLEMS_VALIDATING_FILE_NOT_FOUND"; - private static final String _UI_PROBLEMS_VALIDATING_UNKNOWN_HOST = "_UI_PROBLEMS_VALIDATING_UNKNOWN_HOST"; - private static final String _UI_PROBLEMS_CONNECTION_REFUSED = "_UI_PROBLEMS_CONNECTION_REFUSED"; - - private static final String FILE_NOT_FOUND_KEY = "FILE_NOT_FOUND"; + private static final String FILE_NOT_FOUND_KEY = "FILE_NOT_FOUND"; //$NON-NLS-1$ /** * Constructor. */ public XMLValidator() { - resourceBundle = ResourceBundle.getBundle("org.eclipse.wst.xml.core.internal.validation.xmlvalidation"); // Here we add some error keys that we need to filter out when we're validation // against a DTD without any element declarations. ingoredErrorKeyTable.put(PREMATURE_EOF, IGNORE_ALWAYS); @@ -119,18 +110,18 @@ } }; - reader.setFeature("http://apache.org/xml/features/continue-after-fatal-error", false); - reader.setFeature("http://xml.org/sax/features/namespace-prefixes", valinfo.isNamespaceEncountered()); - reader.setFeature("http://xml.org/sax/features/namespaces", valinfo.isNamespaceEncountered()); - reader.setFeature("http://xml.org/sax/features/validation", valinfo.isGrammarEncountered()); - reader.setFeature("http://apache.org/xml/features/validation/schema", valinfo.isGrammarEncountered()); + reader.setFeature("http://apache.org/xml/features/continue-after-fatal-error", false); //$NON-NLS-1$ + reader.setFeature("http://xml.org/sax/features/namespace-prefixes", valinfo.isNamespaceEncountered()); //$NON-NLS-1$ + reader.setFeature("http://xml.org/sax/features/namespaces", valinfo.isNamespaceEncountered()); //$NON-NLS-1$ + reader.setFeature("http://xml.org/sax/features/validation", valinfo.isGrammarEncountered()); //$NON-NLS-1$ + reader.setFeature("http://apache.org/xml/features/validation/schema", valinfo.isGrammarEncountered()); //$NON-NLS-1$ // MH make sure validation works even when a customer entityResolver is note set (i.e. via setURIResolver()) if (entityResolver != null) { - reader.setProperty("http://apache.org/xml/properties/internal/entity-resolver", entityResolver); + reader.setProperty("http://apache.org/xml/properties/internal/entity-resolver", entityResolver); //$NON-NLS-1$ } - reader.setProperty("http://xml.org/sax/properties/declaration-handler", new MyDeclHandler()); + reader.setProperty("http://xml.org/sax/properties/declaration-handler", new MyDeclHandler()); //$NON-NLS-1$ } catch(Exception e) { @@ -257,15 +248,15 @@ { if (cause instanceof FileNotFoundException) { - validationMessageStr = MessageFormat.format(resourceBundle.getString(_UI_PROBLEMS_VALIDATING_FILE_NOT_FOUND), new Object [] { validationMessageStr }); + validationMessageStr = NLS.bind(XMLValidationMessages._UI_PROBLEMS_VALIDATING_FILE_NOT_FOUND, new Object [] { validationMessageStr }); } else if (cause instanceof UnknownHostException) { - validationMessageStr = MessageFormat.format(resourceBundle.getString(_UI_PROBLEMS_VALIDATING_UNKNOWN_HOST), new Object [] { validationMessageStr }); + validationMessageStr = NLS.bind(XMLValidationMessages._UI_PROBLEMS_VALIDATING_UNKNOWN_HOST, new Object [] { validationMessageStr }); } else if(cause instanceof ConnectException) { - validationMessageStr = resourceBundle.getString(_UI_PROBLEMS_CONNECTION_REFUSED); + validationMessageStr = XMLValidationMessages._UI_PROBLEMS_CONNECTION_REFUSED; } } @@ -517,7 +508,7 @@ reportError = false; } } - if ("schema_reference.4".equals(key) && arguments.length > 0) + if ("schema_reference.4".equals(key) && arguments.length > 0) //$NON-NLS-1$ { Object location = arguments[0]; if (location != null)
diff --git a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/Helper.java b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/Helper.java index 29bd919..d9497af 100644 --- a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/Helper.java +++ b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/Helper.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. + * Copyright (c) 2001, 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 @@ -37,12 +37,11 @@ */ public class Helper extends WorkbenchContext { - public static final String copyright = "(c) Copyright IBM Corporation 2000, 2002."; - public static final String GET_PROJECT_FILES = "getAllFiles"; - public static final String GET_FILE = "getFile"; + public static final String GET_PROJECT_FILES = "getAllFiles"; //$NON-NLS-1$ + public static final String GET_FILE = "getFile"; //$NON-NLS-1$ //dw private static final IContainer[] NO_CONTAINERS = new IContainer[0]; - public static final String VALIDATION_MARKER = "org.eclipse.wst.validation.problemmarker"; - public static final String VALIDATION_MARKER_OWNER = "owner"; + public static final String VALIDATION_MARKER = "org.eclipse.wst.validation.problemmarker"; //$NON-NLS-1$ + public static final String VALIDATION_MARKER_OWNER = "owner"; //$NON-NLS-1$ /** * Constructor.
diff --git a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/LazyURLInputStream.java b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/LazyURLInputStream.java index cb5dbf5..834cb0b 100644 --- a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/LazyURLInputStream.java +++ b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/LazyURLInputStream.java
@@ -69,7 +69,7 @@ { if (pretendFileIsStillOpen) return 0; createInnerStreamIfRequired(); - if (inner == null) throw new IOException("Stream not available"); + if (inner == null) throw new IOException("Stream not available"); //$NON-NLS-1$ return inner.available(); } @@ -117,7 +117,7 @@ { if (pretendFileIsStillOpen) return -1; createInnerStreamIfRequired(); - if (inner == null) throw new IOException("Stream not available"); + if (inner == null) throw new IOException("Stream not available"); //$NON-NLS-1$ int bytesRead = inner.read(); if (bytesRead == -1 && !hasMarks) closeStream(); return bytesRead; @@ -127,7 +127,7 @@ public int read(byte[] b) throws IOException { if (pretendFileIsStillOpen) return -1; createInnerStreamIfRequired(); - if (inner == null) throw new IOException("Stream not available"); + if (inner == null) throw new IOException("Stream not available"); //$NON-NLS-1$ int bytesRead = inner.read(b); if (bytesRead == -1 && !hasMarks) closeStream(); return bytesRead; @@ -137,7 +137,7 @@ { if (pretendFileIsStillOpen) return -1; createInnerStreamIfRequired(); - if (inner == null) throw new IOException("Stream not available"); + if (inner == null) throw new IOException("Stream not available"); //$NON-NLS-1$ int bytesRead = inner.read(b, off, len); if (bytesRead == -1 && !hasMarks) closeStream(); return bytesRead; @@ -147,7 +147,7 @@ { if (pretendFileIsStillOpen) return; createInnerStreamIfRequired(); - if (inner == null) throw new IOException("Stream not available"); + if (inner == null) throw new IOException("Stream not available"); //$NON-NLS-1$ inner.reset(); } @@ -155,7 +155,7 @@ { if (pretendFileIsStillOpen) return 0; createInnerStreamIfRequired(); - if (inner == null) throw new IOException("Stream not available"); + if (inner == null) throw new IOException("Stream not available"); //$NON-NLS-1$ return inner.skip(n); } }
diff --git a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/ValidationInfo.java b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/ValidationInfo.java index 378dbf2..fa2e1a5 100644 --- a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/ValidationInfo.java +++ b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/ValidationInfo.java
@@ -12,11 +12,12 @@ import java.net.MalformedURLException; import java.net.URL; -import java.text.MessageFormat; import java.util.ArrayList; import java.util.HashMap; import java.util.List; -import java.util.ResourceBundle; + +import org.eclipse.osgi.util.NLS; +import org.eclipse.wst.xml.core.internal.validation.XMLValidationMessages; /** * This class handles messages from a validator. This class can handle @@ -29,14 +30,11 @@ public static int SEV_ERROR = 0; public static int SEV_WARNING = 1; - private static String _UI_REF_FILE_ERROR_MESSAGE = "_UI_REF_FILE_ERROR_MESSAGE"; private String validating_file_uri = null; private URL validating_file_url = null; private boolean valid = true; private List messages = new ArrayList(); private HashMap nestedMessages = new HashMap(); - - protected ResourceBundle resourceBundle; /** * Constructor. @@ -46,7 +44,6 @@ */ public ValidationInfo(String uri) { - resourceBundle = ResourceBundle.getBundle("org.eclipse.wst.xml.core.internal.validation.xmlvalidation"); if(uri != null) { this.validating_file_uri = uri; @@ -200,7 +197,7 @@ ValidationMessage container = (ValidationMessage) nestedMessages.get(nesteduri); if(container == null) { - container = new ValidationMessage(MessageFormat.format(resourceBundle.getString(_UI_REF_FILE_ERROR_MESSAGE), new Object [] { nesteduri }), 1, 0, nesteduri); + container = new ValidationMessage(NLS.bind(XMLValidationMessages._UI_REF_FILE_ERROR_MESSAGE, new Object [] { nesteduri }), 1, 0, nesteduri); // Initially set the nested error to a warning. This will automatically be changed // to an error if a nested message has a severity of error. @@ -279,8 +276,8 @@ // { // } // } - uri = uri.replaceAll("%20"," "); - uri = uri.replaceAll("%5E", "^"); + uri = uri.replaceAll("%20"," "); //$NON-NLS-1$ //$NON-NLS-2$ + uri = uri.replaceAll("%5E", "^"); //$NON-NLS-1$ //$NON-NLS-2$ uri = uri.replace('\\','/'); return uri;
diff --git a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/ValidationMessage.java b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/ValidationMessage.java index eb66b20..807ea9a 100644 --- a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/ValidationMessage.java +++ b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/ValidationMessage.java
@@ -24,7 +24,7 @@ */ public class ValidationMessage { - public static final QualifiedName ERROR_MESSAGE_MAP_QUALIFIED_NAME = new QualifiedName("org.eclipse.wst.xml.validation", "errorMessageMap"); + public static final QualifiedName ERROR_MESSAGE_MAP_QUALIFIED_NAME = new QualifiedName("org.eclipse.wst.xml.validation", "errorMessageMap"); //$NON-NLS-1$ //$NON-NLS-2$ protected String message; protected int lineNumber; protected int columnNumber;
diff --git a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/logging/LoggerFactory.java b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/logging/LoggerFactory.java index 4d11843..9a49c5d 100644 --- a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/logging/LoggerFactory.java +++ b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/logging/LoggerFactory.java
@@ -22,8 +22,8 @@ private static ILogger logger = null; private static ClassLoader classloader = null; private static String loggerClass = null; - private static final String commandlinelogger = "org.eclipse.wst.xml.validation.internal.core.logging.CommandLineLogger"; - private static final String eclipselogger = "org.eclipse.wst.xml.validation.internal.core.logging.EclipseLogger"; + private static final String commandlinelogger = "org.eclipse.wst.xml.validation.internal.core.logging.CommandLineLogger"; //$NON-NLS-1$ + private static final String eclipselogger = "org.eclipse.wst.xml.validation.internal.core.logging.EclipseLogger"; //$NON-NLS-1$ private static String defaultlogger = commandlinelogger; /**
diff --git a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/AdvancedOptionsDialog.java b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/AdvancedOptionsDialog.java index 701bfd8..068e243 100644 --- a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/AdvancedOptionsDialog.java +++ b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/AdvancedOptionsDialog.java
@@ -91,10 +91,10 @@ buttonGroup.setLayoutData(createGridData()); Button importButton = new Button(buttonGroup, SWT.PUSH | SWT.CENTER); - importButton.setText(" " + XMLCatalogMessages.UI_BUTTON_IMPORT + " "); + importButton.setText(" " + XMLCatalogMessages.UI_BUTTON_IMPORT + " "); //$NON-NLS-1$ //$NON-NLS-2$ Button exportButton = new Button(buttonGroup, SWT.PUSH | SWT.CENTER); - exportButton.setText(" " + XMLCatalogMessages.UI_BUTTON_EXPORT + " "); + exportButton.setText(" " + XMLCatalogMessages.UI_BUTTON_EXPORT + " "); //$NON-NLS-1$ //$NON-NLS-2$ placeHolder = new Composite(buttonComposite, SWT.NONE); placeHolder.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); @@ -134,7 +134,7 @@ protected void invokeImportDialog() { SelectSingleFileDialog dialog = new SelectSingleFileDialog(getShell(), null, true); - String[] extensions = {".xmlcatalog", ".xml"}; + String[] extensions = {".xmlcatalog", ".xml"}; //$NON-NLS-1$ //$NON-NLS-2$ dialog.addFilterExtensions(extensions); dialog.create(); dialog.getShell().setText(XMLCatalogMessages.UI_LABEL_IMPORT_DIALOG_TITLE); @@ -151,7 +151,7 @@ try { CatalogSet tempResourceSet = new CatalogSet(); - ICatalog newCatalog = tempResourceSet.lookupOrCreateCatalog("temp", fileName); + ICatalog newCatalog = tempResourceSet.lookupOrCreateCatalog("temp", fileName); //$NON-NLS-1$ workingUserCatalog.addEntriesFromCatalog(newCatalog); } catch (Exception e) @@ -170,7 +170,7 @@ IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects(); if (projects.length > 0) { - originalFilePath = projects[0].getFullPath().append(".xmlcatalog"); + originalFilePath = projects[0].getFullPath().append(".xmlcatalog"); //$NON-NLS-1$ } SaveAsDialog dialog = new SaveAsDialog(getShell());
diff --git a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/CatalogFileTypeRegistryReader.java b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/CatalogFileTypeRegistryReader.java index 83456f0..ce4a8d8 100644 --- a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/CatalogFileTypeRegistryReader.java +++ b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/CatalogFileTypeRegistryReader.java
@@ -23,17 +23,17 @@ public class CatalogFileTypeRegistryReader { private static CatalogFileTypeRegistryReader _instance; - static final String ATT_DESCRIPTION = "description"; + static final String ATT_DESCRIPTION = "description"; //$NON-NLS-1$ - static final String ATT_EXTENSIONS = "extensions"; + static final String ATT_EXTENSIONS = "extensions"; //$NON-NLS-1$ - static final String ATT_ICON = "icon"; + static final String ATT_ICON = "icon"; //$NON-NLS-1$ - static final String ATT_ID = "id"; + static final String ATT_ID = "id"; //$NON-NLS-1$ - static final String EXTENSION_POINT_ID = "catalogFileType"; + static final String EXTENSION_POINT_ID = "catalogFileType"; //$NON-NLS-1$ - static final String TAG_NAME = "fileType"; + static final String TAG_NAME = "fileType"; //$NON-NLS-1$ private static CatalogFileTypeRegistryReader getInstance() { if (_instance == null)
diff --git a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/EditCatalogEntryDialog.java b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/EditCatalogEntryDialog.java index 68e9b11..de0af20 100644 --- a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/EditCatalogEntryDialog.java +++ b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/EditCatalogEntryDialog.java
@@ -56,9 +56,9 @@ import org.eclipse.wst.xml.core.internal.catalog.provisional.INextCatalog; public class EditCatalogEntryDialog extends Dialog { - protected static Image borwseImage = ImageFactory.INSTANCE.getImage("icons/obj16/file_expand.gif"); - protected static Image catalogEntryToolBarImage = ImageFactory.INSTANCE.getImage("icons/etool50/catalogEntry.gif"); - protected static Image nextCatalogToolBarImage = ImageFactory.INSTANCE.getImage("icons/etool50/nextCatalog.gif"); + protected static Image borwseImage = ImageFactory.INSTANCE.getImage("icons/obj16/file_expand.gif"); //$NON-NLS-1$ + protected static Image catalogEntryToolBarImage = ImageFactory.INSTANCE.getImage("icons/etool50/catalogEntry.gif"); //$NON-NLS-1$ + protected static Image nextCatalogToolBarImage = ImageFactory.INSTANCE.getImage("icons/etool50/nextCatalog.gif"); //$NON-NLS-1$ protected class CatalogEntryPage extends CatalogElementPage { @@ -86,7 +86,7 @@ if (errorMessage == null) { String fileName = resourceLocationField.getText(); if (fileName.trim().length() > 0) { - if (fileName.indexOf("..") != -1 || fileName.indexOf("./") != -1 || fileName.indexOf("/.") != -1 || fileName.indexOf(".\\") != -1 || fileName.indexOf("\\.") != -1) { + if (fileName.indexOf("..") != -1 || fileName.indexOf("./") != -1 || fileName.indexOf("/.") != -1 || fileName.indexOf(".\\") != -1 || fileName.indexOf("\\.") != -1) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ errorMessage = XMLCatalogMessages.UI_WARNING_URI_MUST_NOT_HAVE_DOTS; } @@ -100,21 +100,22 @@ } } else { - errorMessage = ""; // this an error that is not actaully + // this an error that is not actaully // reported ... OK is just disabled + errorMessage = ""; //$NON-NLS-1$ } } if (errorMessage == null && checkboxButton.getSelection() && webAddressField.getText().trim().length() == 0) { - errorMessage = ""; // this an error that is not actually - // reported - // ... OK is just disabled + // this an error that is not actaully + // reported ... OK is just disabled + errorMessage = ""; //$NON-NLS-1$ } if (errorMessage == null && keyField.getText().trim().length() == 0) { - errorMessage = ""; // this an error that is not actually - // reported - // ... OK is just disabled + // this an error that is not actaully + // reported ... OK is just disabled + errorMessage = ""; //$NON-NLS-1$ } } @@ -125,7 +126,7 @@ if (e.widget == resourceLocationField) { if (keyField.getText().length() == 0) { String uri = resourceLocationField.getText(); - if (uri.endsWith("xsd") && !URIHelper.hasProtocol(uri)) { + if (uri.endsWith("xsd") && !URIHelper.hasProtocol(uri)) { //$NON-NLS-1$ uri = URIHelper.isAbsolute(uri) ? URIHelper.prependFileProtocol(uri) : URIHelper.prependPlatformResourceProtocol(uri); String namespaceURI = XMLQuickScan.getTargetNamespaceURIForSchema(uri); if (namespaceURI != null) { @@ -289,7 +290,7 @@ protected int getKeyType() { switch (keyTypeCombo.getSelectionIndex()) { case 0 : - if ("schema".equals(keyTypeCombo.getData("keyType"))) { + if ("schema".equals(keyTypeCombo.getData("keyType"))) { //$NON-NLS-1$ //$NON-NLS-2$ return ICatalogEntry.ENTRY_TYPE_URI; // xsd namespace is URI type key } return ICatalogEntry.ENTRY_TYPE_PUBLIC; @@ -321,12 +322,12 @@ for (Iterator j = theFileType.extensions.iterator(); j.hasNext();) { String extension = (String) j.next(); if (resourceLocationField.getText().endsWith(extension)) { - if (theFileType.description.equals("XSD Files")) { + if (theFileType.description.equals("XSD Files")) { //$NON-NLS-1$ keyTypeCombo.add(XMLCatalogMessages.UI_KEY_TYPE_DESCRIPTION_XSD_PUBLIC); keyTypeCombo.add(XMLCatalogMessages.UI_KEY_TYPE_DESCRIPTION_XSD_SYSTEM); - keyTypeCombo.setData("keyType", "schema"); + keyTypeCombo.setData("keyType", "schema"); //$NON-NLS-1$ //$NON-NLS-2$ } - else if (theFileType.description.equals("DTD Files")) { + else if (theFileType.description.equals("DTD Files")) { //$NON-NLS-1$ keyTypeCombo.add(XMLCatalogMessages.UI_KEY_TYPE_DESCRIPTION_DTD_PUBLIC); keyTypeCombo.add(XMLCatalogMessages.UI_KEY_TYPE_DESCRIPTION_DTD_SYSTEM); keyTypeCombo.add(XMLCatalogMessages.UI_KEY_TYPE_DESCRIPTION_URI); @@ -357,7 +358,7 @@ keyTypeCombo.select(1); break; case ICatalogEntry.ENTRY_TYPE_URI: // handle XML Schema, where namespace name is mapped to URI situation - if ("schema".equals(keyTypeCombo.getData("keyType"))) { + if ("schema".equals(keyTypeCombo.getData("keyType"))) { //$NON-NLS-1$ //$NON-NLS-2$ keyTypeCombo.select(0); // namespace name as URI key type } else { @@ -494,7 +495,7 @@ if (errorMessage == null) { String fileName = catalogLocationField.getText(); if (fileName.trim().length() > 0) { - if (fileName.indexOf("..") != -1 || fileName.indexOf("./") != -1 || fileName.indexOf("/.") != -1 || fileName.indexOf(".\\") != -1 || fileName.indexOf("\\.") != -1) { + if (fileName.indexOf("..") != -1 || fileName.indexOf("./") != -1 || fileName.indexOf("/.") != -1 || fileName.indexOf(".\\") != -1 || fileName.indexOf("\\.") != -1) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ errorMessage = XMLCatalogMessages.UI_WARNING_URI_MUST_NOT_HAVE_DOTS; } @@ -508,8 +509,9 @@ } } else { - errorMessage = ""; // this an error that is not actaully + // this an error that is not actually // reported ... OK is just disabled + errorMessage = ""; //$NON-NLS-1$ } } @@ -630,7 +632,7 @@ // ambiguity problem // if (uri != null) { - while (uri.startsWith("/") || uri.startsWith("\\")) { + while (uri.startsWith("/") || uri.startsWith("\\")) { //$NON-NLS-1$ //$NON-NLS-2$ uri = uri.substring(1); } } @@ -802,7 +804,7 @@ } protected String getDisplayValue(String string) { - return string != null ? string : ""; + return string != null ? string : ""; //$NON-NLS-1$ } protected XMLCatalogFileType getMatchingFileType(String description) { @@ -828,7 +830,7 @@ } protected void updateErrorMessageLabel(Label errorMessageLabel) { - errorMessageLabel.setText(errorMessage != null ? errorMessage : ""); + errorMessageLabel.setText(errorMessage != null ? errorMessage : ""); //$NON-NLS-1$ } protected void updateOKButtonState() { @@ -926,7 +928,7 @@ // whole leading slash ambiguity problem // String uri = file.getFullPath().toString(); - while (uri.startsWith("/") || uri.startsWith("\\")) { + while (uri.startsWith("/") || uri.startsWith("\\")) { //$NON-NLS-1$ //$NON-NLS-2$ uri = uri.substring(1); } if (control instanceof Text) {
diff --git a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/ImageFactory.java b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/ImageFactory.java index b6c2a4b..46cc060 100644 --- a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/ImageFactory.java +++ b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/ImageFactory.java
@@ -1,5 +1,5 @@ /* -* Copyright (c) 2002 IBM Corporation and others. +* Copyright (c) 2002, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public License v1.0 * which accompanies this distribution, and is available at @@ -24,7 +24,6 @@ public class ImageFactory { - public static final String copyright = "(c) Copyright IBM Corporation 2000, 2002."; public static final int TOP_LEFT = 1; public static final int TOP_RIGHT = 2; public static final int BOTTOM_LEFT = 3; @@ -58,7 +57,7 @@ public Image createCompositeImage(Image base, Image overlay, int overlayPosition) { - String key = base + "*" + overlay + "*" + overlayPosition; + String key = base + "*" + overlay + "*" + overlayPosition; //$NON-NLS-1$ //$NON-NLS-2$ Image result = (Image)compositeImageTable.get(key); if (result == null) {
diff --git a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogEntriesView.java b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogEntriesView.java index 14fdbc6..5d0be8c 100644 --- a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogEntriesView.java +++ b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogEntriesView.java
@@ -1,5 +1,5 @@ /* -* Copyright (c) 2002 IBM Corporation and others. +* Copyright (c) 2002, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public License v1.0 * which accompanies this distribution, and is available at @@ -38,7 +38,6 @@ public class XMLCatalogEntriesView extends Composite { - public static final String copyright = "(c) Copyright IBM Corporation 2002."; protected Button newButton; protected Button editButton; protected Button deleteButton; @@ -58,7 +57,7 @@ tableViewer = createTableViewer(this); tableViewer.getControl().setLayoutData(new GridData(GridData.FILL_BOTH)); - tableViewer.setInput("dummy"); + tableViewer.setInput("dummy"); //$NON-NLS-1$ tableViewer.expandToLevel(2); tableViewer.reveal(XMLCatalogTreeViewer.USER_SPECIFIED_ENTRIES_OBJECT); @@ -80,7 +79,7 @@ // if (uri != null) { - while (uri.startsWith("/") || uri.startsWith("\\")) + while (uri.startsWith("/") || uri.startsWith("\\")) //$NON-NLS-1$ //$NON-NLS-2$ { uri = uri.substring(1); }
diff --git a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogEntryDetailsView.java b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogEntryDetailsView.java index 844b83f..6c5fbc6 100644 --- a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogEntryDetailsView.java +++ b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogEntryDetailsView.java
@@ -1,5 +1,5 @@ /* -* Copyright (c) 2002 IBM Corporation and others. +* Copyright (c) 2002, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public License v1.0 * which accompanies this distribution, and is available at @@ -27,7 +27,6 @@ public class XMLCatalogEntryDetailsView { - public static final String copyright = "(c) Copyright IBM Corporation 2002."; protected Text detailsText; protected ScrollBar verticalScroll, horizontalScroll; @@ -50,37 +49,37 @@ public void setCatalogElement(ICatalogEntry entry) { - String value = getDisplayValue(entry != null ? entry.getURI() : ""); - String line1 = XMLCatalogMessages.UI_LABEL_DETAILS_URI_COLON + "\t\t" + value; + String value = getDisplayValue(entry != null ? entry.getURI() : ""); //$NON-NLS-1$ + String line1 = XMLCatalogMessages.UI_LABEL_DETAILS_URI_COLON + "\t\t" + value; //$NON-NLS-1$ - value = entry != null ? getKeyTypeValue(entry) : ""; - String line2 = XMLCatalogMessages.UI_KEY_TYPE_DETAILS_COLON + "\t" + value; + value = entry != null ? getKeyTypeValue(entry) : ""; //$NON-NLS-1$ + String line2 = XMLCatalogMessages.UI_KEY_TYPE_DETAILS_COLON + "\t" + value; //$NON-NLS-1$ - value = getDisplayValue(entry != null ? entry.getKey() : ""); - String line3 = XMLCatalogMessages.UI_LABEL_DETAILS_KEY_COLON + "\t\t" + value; + value = getDisplayValue(entry != null ? entry.getKey() : ""); //$NON-NLS-1$ + String line3 = XMLCatalogMessages.UI_LABEL_DETAILS_KEY_COLON + "\t\t" + value; //$NON-NLS-1$ - String entireString = "\n" + line1 + "\n" + line2 + "\n" + line3; + String entireString = "\n" + line1 + "\n" + line2 + "\n" + line3; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ detailsText.setText(entireString); } public void setCatalogElement(INextCatalog nextCatalog) { - String value = getDisplayValue(nextCatalog != null ? nextCatalog.getCatalogLocation() : ""); - String line1 = XMLCatalogMessages.UI_LABEL_DETAILS_URI_COLON + "\t\t" + value; + String value = getDisplayValue(nextCatalog != null ? nextCatalog.getCatalogLocation() : ""); //$NON-NLS-1$ + String line1 = XMLCatalogMessages.UI_LABEL_DETAILS_URI_COLON + "\t\t" + value; //$NON-NLS-1$ - String entireString = "\n" + line1; + String entireString = "\n" + line1; //$NON-NLS-1$ detailsText.setText(entireString); } protected String getDisplayValue(String string) { - return string != null ? string : ""; + return string != null ? string : ""; //$NON-NLS-1$ } protected String getKeyTypeValue(ICatalogEntry entry) { String result = null; - if (entry.getURI() != null && entry.getURI().endsWith("xsd")) + if (entry.getURI() != null && entry.getURI().endsWith("xsd")) //$NON-NLS-1$ { result = (entry.getEntryType() == ICatalogEntry.ENTRY_TYPE_URI) ? XMLCatalogMessages.UI_KEY_TYPE_DESCRIPTION_XSD_PUBLIC :
diff --git a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogFileType.java b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogFileType.java index 2787912..61fe779 100644 --- a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogFileType.java +++ b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogFileType.java
@@ -43,7 +43,7 @@ protected List parseExtensions(String string) { List list = new ArrayList(); - for (StringTokenizer st = new StringTokenizer(string, ", "); st.hasMoreTokens(); ) + for (StringTokenizer st = new StringTokenizer(string, ", "); st.hasMoreTokens(); ) //$NON-NLS-1$ { String token = st.nextToken(); if (token != null)
diff --git a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogPreferencePage.java b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogPreferencePage.java index 611fac4..f474f57 100644 --- a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogPreferencePage.java +++ b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogPreferencePage.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2002 IBM Corporation and others. + * Copyright (c) 2002, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public License v1.0 * which accompanies this distribution, and is available at @@ -41,7 +41,6 @@ public class XMLCatalogPreferencePage extends PreferencePage implements IWorkbenchPreferencePage, ICatalogListener { - public static final String copyright = "(c) Copyright IBM Corporation 2002."; protected XMLCatalogEntriesView catalogEntriesView; @@ -103,7 +102,7 @@ // we create a working copy of the 'User Settings' for the Catalog // that we can modify CatalogSet tempCatalogSet = new CatalogSet(); - workingUserCatalog = tempCatalogSet.lookupOrCreateCatalog("working", ""); + workingUserCatalog = tempCatalogSet.lookupOrCreateCatalog("working", ""); //$NON-NLS-1$ //$NON-NLS-2$ // TODO: add entries from the nested catalogs as well workingUserCatalog.addEntriesFromCatalog(userCatalog); @@ -134,10 +133,10 @@ // wide enough to show // the rather long uri and key fields of a catalog entry. Label widthFudger = new Label(panel, SWT.NONE); - String widthFudgerString = ""; + String widthFudgerString = ""; //$NON-NLS-1$ for (int i = 0; i < 55; i++) { - widthFudgerString += "x"; + widthFudgerString += "x"; //$NON-NLS-1$ } widthFudger.setText(widthFudgerString); widthFudger.setVisible(false);
diff --git a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogTreeViewer.java b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogTreeViewer.java index 9c8c9a1..10321af 100644 --- a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogTreeViewer.java +++ b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogTreeViewer.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2002 IBM Corporation and others. + * Copyright (c) 2002, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public License v1.0 * which accompanies this distribution, and is available at @@ -40,13 +40,12 @@ public class XMLCatalogTreeViewer extends TreeViewer { - public static final String copyright = "(c) Copyright IBM Corporation 2000, 2002."; - protected static Image xmlCatalogImage = ImageFactory.INSTANCE.getImage("icons/obj16/xmlcatalog_obj.gif"); - protected static Image errorImage = ImageFactory.INSTANCE.getImage("icons/ovr16/error-overlay.gif"); - protected static Image entryImage = ImageFactory.INSTANCE.getImage("icons/obj16/entry_obj.gif"); - protected static Image nextCatalogImage = ImageFactory.INSTANCE.getImage("icons/obj16/nextCatalog_obj.gif"); + protected static Image xmlCatalogImage = ImageFactory.INSTANCE.getImage("icons/obj16/xmlcatalog_obj.gif"); //$NON-NLS-1$ + protected static Image errorImage = ImageFactory.INSTANCE.getImage("icons/ovr16/error-overlay.gif"); //$NON-NLS-1$ + protected static Image entryImage = ImageFactory.INSTANCE.getImage("icons/obj16/entry_obj.gif"); //$NON-NLS-1$ + protected static Image nextCatalogImage = ImageFactory.INSTANCE.getImage("icons/obj16/nextCatalog_obj.gif"); //$NON-NLS-1$ - protected static String ERROR_STATE_KEY = "errorstatekey"; + protected static String ERROR_STATE_KEY = "errorstatekey"; //$NON-NLS-1$ protected ICatalog fWorkingUserCatalog; protected ICatalog fSystemCatalog; @@ -204,9 +203,9 @@ public void menuAboutToShow(IMenuManager menuManager) { - Action action = new Action("hello") { + Action action = new Action("hello") { //$NON-NLS-1$ public void run() { - System.out.println("run!"); + System.out.println("run!"); //$NON-NLS-1$ } }; menuManager.add(action);
diff --git a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLQuickScan.java b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLQuickScan.java index f0bcf9d..d574006 100644 --- a/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLQuickScan.java +++ b/bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLQuickScan.java
@@ -1,5 +1,5 @@ /* -* Copyright (c) 2002 IBM Corporation and others. +* Copyright (c) 2002, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public License v1.0 * which accompanies this distribution, and is available at @@ -28,7 +28,6 @@ */ public class XMLQuickScan { - public static final String copyright = "(c) Copyright IBM Corporation 2002."; public static String getTargetNamespaceURIForSchema(String uri) { String result = null; @@ -72,12 +71,12 @@ public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { - if (localName.equals("schema")) + if (localName.equals("schema")) //$NON-NLS-1$ { int nAttributes = attributes.getLength(); for (int i = 0; i < nAttributes; i++) { - if (attributes.getLocalName(i).equals("targetNamespace")) + if (attributes.getLocalName(i).equals("targetNamespace")) //$NON-NLS-1$ { targetNamespaceURI = attributes.getValue(i); break;
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLMultiPageEditorPart.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLMultiPageEditorPart.java index d1940ea..d6bea0a 100644 --- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLMultiPageEditorPart.java +++ b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLMultiPageEditorPart.java
@@ -693,7 +693,7 @@ fActivationListener = new ActivationListener(site.getWorkbenchWindow().getPartService()); } catch (Exception e) { - Logger.logException("exception initializing " + getClass().getName(), e); + Logger.logException("exception initializing " + getClass().getName(), e); //$NON-NLS-1$ } setPartName(input.getName()); }
diff --git a/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/ValidateAction.java b/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/ValidateAction.java index f5aaa73..6cd89e8 100644 --- a/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/ValidateAction.java +++ b/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/ValidateAction.java
@@ -36,14 +36,6 @@ */ public class ValidateAction extends org.eclipse.wst.xml.ui.internal.validation.core.ValidateAction { - private static final String _UI_VALIDATION_FAILED = "_UI_VALIDATION_FAILED"; - private static final String _UI_THE_XML_FILE_IS_NOT_VALID = "_UI_THE_XML_FILE_IS_NOT_VALID"; - private static final String _UI_VALIDATION_SUCEEDED = "_UI_VALIDATION_SUCEEDED"; - private static final String _UI_THE_XML_FILE_IS_VALID_WITH_WARNINGS = "_UI_THE_XML_FILE_IS_VALID_WITH_WARNINGS"; - private static final String _UI_THE_XML_FILE_IS_WELL_FORMED_WITH_WARNINGS = "_UI_THE_XML_FILE_IS_WELL_FORMED_WITH_WARNINGS"; - private static final String _UI_NO_GRAMMAR_WARNING = "_UI_NO_GRAMMAR_WARNING"; - private static final String _UI_THE_XML_FILE_IS_VALID = "_UI_THE_XML_FILE_IS_VALID"; - private static final String _UI_THE_XML_FILE_IS_WELL_FORMED = "_UI_THE_XML_FILE_IS_WELL_FORMED"; //dw private static final String _UI_MESSAGE_LIMITE_EXCEEDED = "_UI_MESSAGE_LIMITE_EXCEEDED"; private InputStream inputStream; @@ -134,8 +126,8 @@ // The file is invalid. if (!valoutcome.isValid) { - String title = resourceBundle.getString(_UI_VALIDATION_FAILED); - String message = resourceBundle.getString(_UI_THE_XML_FILE_IS_NOT_VALID); + String title = XMLValidationUIMessages._UI_VALIDATION_FAILED; + String message = XMLValidationUIMessages._UI_THE_XML_FILE_IS_NOT_VALID; openErrorDialog(title, message); } else @@ -143,22 +135,22 @@ // The file is valid however warnings were issued. if(valoutcome.hasMessages) { - String title = resourceBundle.getString(_UI_VALIDATION_SUCEEDED); + String title = XMLValidationUIMessages._UI_VALIDATION_SUCEEDED; String message = valoutcome.isGrammarEncountered ? - resourceBundle.getString(_UI_THE_XML_FILE_IS_VALID_WITH_WARNINGS) : - resourceBundle.getString(_UI_THE_XML_FILE_IS_WELL_FORMED_WITH_WARNINGS) + - resourceBundle.getString(_UI_NO_GRAMMAR_WARNING); + XMLValidationUIMessages._UI_THE_XML_FILE_IS_VALID_WITH_WARNINGS : + XMLValidationUIMessages._UI_THE_XML_FILE_IS_WELL_FORMED_WITH_WARNINGS + + XMLValidationUIMessages._UI_NO_GRAMMAR_WARNING; openWarningDialog(title, message); } // The file is valid with no warnings. else { - String title = resourceBundle.getString(_UI_VALIDATION_SUCEEDED); + String title = XMLValidationUIMessages._UI_VALIDATION_SUCEEDED; String message = valoutcome.isGrammarEncountered ? - resourceBundle.getString(_UI_THE_XML_FILE_IS_VALID) : - resourceBundle.getString(_UI_THE_XML_FILE_IS_WELL_FORMED) + - resourceBundle.getString(_UI_NO_GRAMMAR_WARNING); + XMLValidationUIMessages._UI_THE_XML_FILE_IS_VALID : + XMLValidationUIMessages._UI_THE_XML_FILE_IS_WELL_FORMED + + XMLValidationUIMessages._UI_NO_GRAMMAR_WARNING; openValidDialog(title, message); }
diff --git a/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/ValidateXMLFileActionDelegate.java b/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/ValidateXMLFileActionDelegate.java index b4f57cd..4bd2d95 100644 --- a/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/ValidateXMLFileActionDelegate.java +++ b/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/ValidateXMLFileActionDelegate.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. + * Copyright (c) 2001, 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 @@ -27,7 +27,6 @@ */ public class ValidateXMLFileActionDelegate implements IActionDelegate { - public static final String copyright = "(c) Copyright IBM Corporation 2002."; protected ISelection selection; /* (non-Javadoc) @@ -41,10 +40,10 @@ // CS.. for now the following line tests to ensure the user has xerces jars installed // so that we can perform some 'fail fast' behaviour // - Class theClass = Class.forName("org.apache.xerces.xni.parser.XMLParserConfiguration", true, this.getClass().getClassLoader()); + Class theClass = Class.forName("org.apache.xerces.xni.parser.XMLParserConfiguration", true, this.getClass().getClassLoader()); //$NON-NLS-1$ if (theClass == null) { - throw(new Exception("Missing Xerces jars in plugin's 'jars' folder")); + throw(new Exception("Missing Xerces jars in plugin's 'jars' folder")); //$NON-NLS-1$ } if (!selection.isEmpty() && selection instanceof IStructuredSelection) @@ -79,10 +78,10 @@ { // CS... here's where we need to pop up a dialog to tell the user that xerces is not available // - String xercesLine1 = "Required files xercesImpl.jar and xmlParserAPIs.jar cannot be found.\n\n"; - String xercesLine2 = "Download Xerces 2.6.2 and place xercesImpl.jar and xmlParserAPIs.jar in a folder entitled jars in the org.eclipse.wst.xml.validation plugin.\n\n"; - String xercesLine3 = "For more information see www.eclipse.org/webtools/wst/components/xml/xercesInfo.xml."; - MessageDialog.openError(Display.getDefault().getActiveShell(), "Missing Xerces", xercesLine1 + xercesLine2 + xercesLine3); + String xercesLine1 = XMLValidationUIMessages.ValidateXMLFileActionDelegate_2; + String xercesLine2 = XMLValidationUIMessages.ValidateXMLFileActionDelegate_3; + String xercesLine3 = XMLValidationUIMessages.ValidateXMLFileActionDelegate_4; + MessageDialog.openError(Display.getDefault().getActiveShell(), XMLValidationUIMessages.ValidateXMLFileActionDelegate_5, xercesLine1 + xercesLine2 + xercesLine3); } }
diff --git a/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/Validator.java b/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/Validator.java index 95df5ed..c31ef45 100644 --- a/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/Validator.java +++ b/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/Validator.java
@@ -79,8 +79,8 @@ } } - private final String GET_FILE = "getFile"; - public final String GET_PROJECT_FILES = "getAllFiles"; + private final String GET_FILE = "getFile"; //$NON-NLS-1$ + public final String GET_PROJECT_FILES = "getAllFiles"; //$NON-NLS-1$ static boolean shouldValidate(IFile file) { IResource resource = file; @@ -134,9 +134,9 @@ IFile file = (IFile) helper.loadModel(GET_FILE, parms); if (file != null && shouldValidate(file)) { //the helper might not have the file stored in it. could have an InputStream - if (helper.loadModel("inputStream") instanceof InputStream) + if (helper.loadModel("inputStream") instanceof InputStream) //$NON-NLS-1$ { - validate(file, (InputStream)helper.loadModel("inputStream"), reporter); //do we need the fileName? what is int ruleGroup? + validate(file, (InputStream)helper.loadModel("inputStream"), reporter); //do we need the fileName? what is int ruleGroup? //$NON-NLS-1$ } else {
diff --git a/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/XMLMessageInfoHelper.java b/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/XMLMessageInfoHelper.java index 401f80f..c08b6dc 100644 --- a/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/XMLMessageInfoHelper.java +++ b/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/XMLMessageInfoHelper.java
@@ -38,55 +38,55 @@ String selectionStrategy = null; String nameOrValue = null; - if (errorKey.equals("cvc-complex-type.2.4.a") || errorKey.equals("cvc-complex-type.2.4.d") || errorKey.equals("cvc-complex-type.2.4.b") || errorKey.equals("MSG_CONTENT_INVALID") - | errorKey.equals("MSG_CONTENT_INCOMPLETE") || errorKey.equals("MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED") || errorKey.equals("cvc-complex-type.4")) + if (errorKey.equals("cvc-complex-type.2.4.a") || errorKey.equals("cvc-complex-type.2.4.d") || errorKey.equals("cvc-complex-type.2.4.b") || errorKey.equals("MSG_CONTENT_INVALID") //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + | errorKey.equals("MSG_CONTENT_INCOMPLETE") || errorKey.equals("MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED") || errorKey.equals("cvc-complex-type.4")) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ { - selectionStrategy = "START_TAG"; + selectionStrategy = "START_TAG"; //$NON-NLS-1$ } - else if (errorKey.equals("cvc-type.3.1.3")) + else if (errorKey.equals("cvc-type.3.1.3")) //$NON-NLS-1$ { - selectionStrategy = "TEXT"; + selectionStrategy = "TEXT"; //$NON-NLS-1$ } - else if (errorKey.equals("cvc-complex-type.2.3")) + else if (errorKey.equals("cvc-complex-type.2.3")) //$NON-NLS-1$ { - selectionStrategy = "FIRST_NON_WHITESPACE_TEXT"; + selectionStrategy = "FIRST_NON_WHITESPACE_TEXT"; //$NON-NLS-1$ } - else if (errorKey.equals("cvc-type.3.1.1")) + else if (errorKey.equals("cvc-type.3.1.1")) //$NON-NLS-1$ { - selectionStrategy = "ALL_ATTRIBUTES"; + selectionStrategy = "ALL_ATTRIBUTES"; //$NON-NLS-1$ } - else if (errorKey.equals("cvc-complex-type.3.2.2") || errorKey.equals("MSG_ATTRIBUTE_NOT_DECLARED")) + else if (errorKey.equals("cvc-complex-type.3.2.2") || errorKey.equals("MSG_ATTRIBUTE_NOT_DECLARED")) //$NON-NLS-1$ //$NON-NLS-2$ { - selectionStrategy = "ATTRIBUTE_NAME"; + selectionStrategy = "ATTRIBUTE_NAME"; //$NON-NLS-1$ //in this case we need nameOrValue to be the name of the attribute to underline nameOrValue = (String)messageArguments[1]; } - else if (errorKey.equals("cvc-attribute.3") || errorKey.equals("MSG_ATTRIBUTE_VALUE_NOT_IN_LIST") || errorKey.equals("cvc-complex-type.3.1")) + else if (errorKey.equals("cvc-attribute.3") || errorKey.equals("MSG_ATTRIBUTE_VALUE_NOT_IN_LIST") || errorKey.equals("cvc-complex-type.3.1")) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ { - selectionStrategy = "ATTRIBUTE_VALUE"; + selectionStrategy = "ATTRIBUTE_VALUE"; //$NON-NLS-1$ //in this case we need nameOrValue to be the name of the Attribute - if (errorKey.equals("cvc-attribute.3") || errorKey.equals("cvc-complex-type.3.1")) + if (errorKey.equals("cvc-attribute.3") || errorKey.equals("cvc-complex-type.3.1")) //$NON-NLS-1$ //$NON-NLS-2$ { nameOrValue = (String)messageArguments[1]; } - else if (errorKey.equals("MSG_ATTRIBUTE_VALUE_NOT_IN_LIST")) + else if (errorKey.equals("MSG_ATTRIBUTE_VALUE_NOT_IN_LIST")) //$NON-NLS-1$ { nameOrValue = (String)messageArguments[0]; } } - else if (errorKey.equals("cvc-elt.4.2")) - { selectionStrategy="VALUE_OF_ATTRIBUTE_WITH_GIVEN_VALUE"; + else if (errorKey.equals("cvc-elt.4.2")) //$NON-NLS-1$ + { selectionStrategy="VALUE_OF_ATTRIBUTE_WITH_GIVEN_VALUE"; //$NON-NLS-1$ //in this case we need nameOrValue to be the value of the attribute we want to unerline nameOrValue = (String)messageArguments[1]; } - else if (errorKey.equals("EntityNotDeclared")) - { selectionStrategy="TEXT_ENTITY_REFERENCE"; + else if (errorKey.equals("EntityNotDeclared")) //$NON-NLS-1$ + { selectionStrategy="TEXT_ENTITY_REFERENCE"; //$NON-NLS-1$ nameOrValue = (String)messageArguments[0]; } - else if (errorKey.equals("ElementUnterminated")) + else if (errorKey.equals("ElementUnterminated")) //$NON-NLS-1$ { - selectionStrategy = "ENTIRE_ELEMENT"; + selectionStrategy = "ENTIRE_ELEMENT"; //$NON-NLS-1$ } String messageInfo[] = new String[2]; - messageInfo[0] = selectionStrategy != null? selectionStrategy: ""; + messageInfo[0] = selectionStrategy != null? selectionStrategy: ""; //$NON-NLS-1$ messageInfo[1] = nameOrValue; return messageInfo; }
diff --git a/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/XMLValidationUIMessages.java b/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/XMLValidationUIMessages.java new file mode 100644 index 0000000..bdd6994 --- /dev/null +++ b/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/XMLValidationUIMessages.java
@@ -0,0 +1,55 @@ +/* + * Copyright (c) 2005 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v10.html + * + * Contributors: + * IBM - Initial API and implementation + * + */ +package org.eclipse.wst.xml.ui.internal.validation; + +import org.eclipse.osgi.util.NLS; + +/** + * Strings used by XML Validation + */ +public class XMLValidationUIMessages extends NLS { + private static final String BUNDLE_NAME = "org.eclipse.wst.xml.ui.internal.validation.xmlvalidation"; //$NON-NLS-1$ + + private XMLValidationUIMessages() { + // cannot create new instance + } + + static { + // initialize resource bundle + NLS.initializeMessages(BUNDLE_NAME, XMLValidationUIMessages.class); + } + public static String _UI_VALIDATION_INTERNAL_ERROR; + public static String _UI_VALIDATION_FAILED; + public static String _UI_VALIDATION_SUCEEDED; + public static String _UI_THE_XML_FILE_IS_NOT_VALID; + public static String _UI_THE_XML_FILE_IS_VALID; + public static String _UI_THE_XML_FILE_IS_VALID_WITH_WARNINGS; + public static String _UI_THE_XML_FILE_IS_WELL_FORMED; + public static String _UI_THE_XML_FILE_IS_WELL_FORMED_WITH_WARNINGS; + public static String _UI_NO_GRAMMAR_WARNING; + public static String _UI_MESSAGE_LIMITE_EXCEEDED; + public static String _UI_REF_FILE_ERROR_DESCRIPTION; + public static String _UI_REF_FILE_ERROR_MESSAGE; + public static String _UI_REF_FILE_ERROR_DETAILS; + public static String _UI_DETAILS_INFORMATION_UNAVAILABLE; + public static String _UI_DETAILS_INFO_REVALIDATE_TO_REGENERATE; + public static String _UI_SAVE_DIRTY_FILE_MESSAGE; + public static String _UI_SAVE_DIRTY_FILE_TITLE; + public static String ValidateXMLFileActionDelegate_2; + public static String ValidateXMLFileActionDelegate_3; + public static String ValidateXMLFileActionDelegate_4; + public static String ValidateXMLFileActionDelegate_5; + public static String TaskListTableViewer_0; + public static String TaskListTableViewer_1; + public static String TaskListTableViewer_2; + public static String TaskListTableViewer_3; +}
diff --git a/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/ValidateAction.java b/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/ValidateAction.java index 8273702..449ee12 100644 --- a/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/ValidateAction.java +++ b/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/ValidateAction.java
@@ -11,7 +11,6 @@ package org.eclipse.wst.xml.ui.internal.validation.core; import java.util.List; -import java.util.ResourceBundle; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IMarker; @@ -23,6 +22,7 @@ import org.eclipse.swt.widgets.Display; import org.eclipse.ui.IEditorInput; import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.IPageLayout; import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.IWorkbenchPart; import org.eclipse.ui.IWorkbenchWindow; @@ -37,7 +37,9 @@ import org.eclipse.wst.xml.core.internal.validation.core.ValidationMessage; import org.eclipse.wst.xml.core.internal.validation.core.logging.ILogger; import org.eclipse.wst.xml.core.internal.validation.core.logging.LoggerFactory; +import org.eclipse.wst.xml.ui.internal.Logger; import org.eclipse.wst.xml.ui.internal.XMLUIPlugin; +import org.eclipse.wst.xml.ui.internal.validation.XMLValidationUIMessages; /** * A general validate action class that can be extended by validators. This class @@ -48,23 +50,20 @@ public abstract class ValidateAction extends Action { // Locally used, non-UI strings. - private static final String REFERENCED_FILE_ERROR_OPEN = "referencedFileError("; + private static final String REFERENCED_FILE_ERROR_OPEN = "referencedFileError("; //$NON-NLS-1$ - private static final String REFERENCED_FILE_ERROR_CLOSE = ")"; + private static final String REFERENCED_FILE_ERROR_CLOSE = ")"; //$NON-NLS-1$ - private static final String REFERENCED_FILE_ERROR = "referencedFileError"; + private static final String REFERENCED_FILE_ERROR = "referencedFileError"; //$NON-NLS-1$ - private static final String GROUP_NAME = "groupName"; + private static final String GROUP_NAME = "groupName"; //$NON-NLS-1$ - private static final String _UI_SAVE_DIRTY_FILE_MESSAGE = "_UI_SAVE_DIRTY_FILE_MESSAGE"; - private static final String _UI_SAVE_DIRTY_FILE_TITLE = "_UI_SAVE_DIRTY_FILE_TITLE"; + private static final String FILE_PROTOCOL_NO_SLASH = "file:"; //$NON-NLS-1$ + private static final String FILE_PROTOCOL = "file:///"; //$NON-NLS-1$ - private static final String FILE_PROTOCOL_NO_SLASH = "file:"; - private static final String FILE_PROTOCOL = "file:///"; - - 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$ protected boolean showDialog = true; @@ -73,8 +72,6 @@ protected IReporter reporter; protected IValidator validator; - - protected ResourceBundle resourceBundle; /** * Constructor. @@ -88,7 +85,6 @@ { this.showDialog = showDialog; this.file = file; - resourceBundle = ResourceBundle.getBundle("org.eclipse.wst.xml.ui.internal.validation.xmlvalidation"); } /** @@ -191,7 +187,7 @@ // CS... a temporary test to avoid performing validation in the absence of xerces // //dw Class theClass = - Class.forName("org.apache.xerces.xni.parser.XMLParserConfiguration", true, this.getClass().getClassLoader()); + Class.forName("org.apache.xerces.xni.parser.XMLParserConfiguration", true, this.getClass().getClassLoader()); //$NON-NLS-1$ if (fileIsOK(file)) { @@ -208,7 +204,7 @@ catch (Exception e) { ILogger logger = LoggerFactory.getLoggerInstance(); - logger.logError("", e); + logger.logError("", e); //$NON-NLS-1$ // e.printStackTrace(); } } @@ -253,8 +249,8 @@ FileEditorInput fileEditorInput = (FileEditorInput) editorInput; if (fileEditorInput.getFile().equals(file)) { - String message = resourceBundle.getString(_UI_SAVE_DIRTY_FILE_MESSAGE); - String title = resourceBundle.getString(_UI_SAVE_DIRTY_FILE_TITLE); + String message = XMLValidationUIMessages._UI_SAVE_DIRTY_FILE_MESSAGE; + String title = XMLValidationUIMessages._UI_SAVE_DIRTY_FILE_TITLE; if (MessageDialog.openQuestion(Display.getDefault().getActiveShell(), title, message)) { dirtyEditors[i].doSave(null); @@ -386,11 +382,12 @@ { if (page != null) { - page.showView("org.eclipse.ui.views.ProblemView"); + page.showView(IPageLayout.ID_PROBLEM_VIEW); } } catch (PartInitException e) { + Logger.logException(e); } page.activate(activePart); } @@ -405,7 +402,7 @@ { if(!filename.startsWith(FILE_PROTOCOL_NO_SLASH)) { - while(filename.startsWith("/")) + while(filename.startsWith("/")) //$NON-NLS-1$ { filename = filename.substring(1); }
diff --git a/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/errorinfo/ReferencedFileErrorActionDelegate.java b/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/errorinfo/ReferencedFileErrorActionDelegate.java index fbc7e5c..96457cd 100644 --- a/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/errorinfo/ReferencedFileErrorActionDelegate.java +++ b/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/errorinfo/ReferencedFileErrorActionDelegate.java
@@ -13,7 +13,6 @@ import java.util.Collections; import java.util.List; import java.util.Map; -import java.util.ResourceBundle; import org.eclipse.core.resources.IMarker; import org.eclipse.core.runtime.CoreException; @@ -26,12 +25,11 @@ import org.eclipse.ui.IWorkbenchPart; import org.eclipse.ui.actions.ActionDelegate; import org.eclipse.wst.xml.core.internal.validation.core.ValidationMessage; +import org.eclipse.wst.xml.ui.internal.validation.XMLValidationUIMessages; public class ReferencedFileErrorActionDelegate extends ActionDelegate implements IObjectActionDelegate { protected IMarker selectedMarker; - - protected ResourceBundle resourceBundle; /** * @@ -39,7 +37,6 @@ public ReferencedFileErrorActionDelegate() { super(); - resourceBundle = ResourceBundle.getBundle("org.eclipse.wst.xml.ui.internal.validation.xmlvalidation"); } public void run(IAction action) @@ -52,19 +49,19 @@ Map map = (Map) selectedMarker.getResource().getSessionProperty(ValidationMessage.ERROR_MESSAGE_MAP_QUALIFIED_NAME); if (map == null) { - String infoUnavailable = resourceBundle.getString("_UI_DETAILS_INFORMATION_UNAVAILABLE"); - String revalidateToRegenerateErrors = resourceBundle.getString("_UI_DETAILS_INFO_REVALIDATE_TO_REGENERATE"); + String infoUnavailable = XMLValidationUIMessages._UI_DETAILS_INFORMATION_UNAVAILABLE; + String revalidateToRegenerateErrors = XMLValidationUIMessages._UI_DETAILS_INFO_REVALIDATE_TO_REGENERATE; MessageDialog.openInformation(Display.getCurrent().getActiveShell(), infoUnavailable, revalidateToRegenerateErrors); } else { String uri = null; - String groupName = (String) selectedMarker.getAttribute("groupName"); - if (groupName.startsWith("referencedFileError")) + String groupName = (String) selectedMarker.getAttribute("groupName"); //$NON-NLS-1$ + if (groupName.startsWith("referencedFileError")) //$NON-NLS-1$ { - int index1 = groupName.indexOf("("); - int index2 = groupName.lastIndexOf(")"); + int index1 = groupName.indexOf("("); //$NON-NLS-1$ + int index2 = groupName.lastIndexOf(")"); //$NON-NLS-1$ if (index1 != -1 && index2 > index1) { uri = groupName.substring(index1 + 1, index2); @@ -82,7 +79,7 @@ } String validatedFileURI = selectedMarker.getResource().getLocation().toOSString();//URIHelper.normalize(selectedMarker.getResource().getLocation().toOSString()); - validatedFileURI = "file:/" + validatedFileURI; + validatedFileURI = "file:/" + validatedFileURI; //$NON-NLS-1$ ReferencedFileErrorDialog dialog = new ReferencedFileErrorDialog(Display.getCurrent().getActiveShell(), list, validatedFileURI, uri); dialog.createAndOpen();
diff --git a/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/errorinfo/ReferencedFileErrorDialog.java b/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/errorinfo/ReferencedFileErrorDialog.java index 5f893e8..d8e37c4 100644 --- a/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/errorinfo/ReferencedFileErrorDialog.java +++ b/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/errorinfo/ReferencedFileErrorDialog.java
@@ -10,9 +10,7 @@ *******************************************************************************/ package org.eclipse.wst.xml.ui.internal.validation.core.errorinfo; -import java.text.MessageFormat; import java.util.List; -import java.util.ResourceBundle; import java.util.StringTokenizer; import org.eclipse.jface.dialogs.Dialog; @@ -20,6 +18,7 @@ import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.osgi.util.NLS; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.StyleRange; import org.eclipse.swt.custom.StyledText; @@ -33,6 +32,7 @@ import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Text; import org.eclipse.wst.xml.core.internal.validation.core.ValidationMessage; +import org.eclipse.wst.xml.ui.internal.validation.XMLValidationUIMessages; public class ReferencedFileErrorDialog extends Dialog @@ -44,14 +44,10 @@ protected String referencedFile; protected StyledText styledText; protected Text fullFileNameField; - - protected ResourceBundle resourceBundle; public ReferencedFileErrorDialog(Shell parentShell, List errorList, String contextFile, String referencedFile) { super(parentShell); - - resourceBundle = ResourceBundle.getBundle("org.eclipse.wst.xml.ui.internal.validation.xmlvalidation"); int styleBits = getShellStyle() | SWT.RESIZE; styleBits &= ~SWT.APPLICATION_MODAL; @@ -67,7 +63,7 @@ public int createAndOpen() { create(); - getShell().setText(resourceBundle.getString("_UI_REF_FILE_ERROR_DETAILS")); + getShell().setText(XMLValidationUIMessages._UI_REF_FILE_ERROR_DETAILS); setBlockOnOpen(false); return open(); @@ -117,7 +113,7 @@ String getFullURI(int offset) { - String uri = ""; + String uri = ""; //$NON-NLS-1$ int index = getIndex(offset); if (index != -1) { @@ -154,7 +150,7 @@ { public void mouseMove(MouseEvent event) { - String toolTipText = ""; + String toolTipText = ""; //$NON-NLS-1$ try { @@ -176,19 +172,19 @@ private String getMarkedUpDetailsMessage() { - String detailsMessage = ""; + String detailsMessage = ""; //$NON-NLS-1$ // TODO... need to move '_UI_REF_FILE_ERROR_DESCRIPTION' to this plugin's properties file // - String string = resourceBundle.getString("_UI_REF_FILE_ERROR_DESCRIPTION"); + String string = XMLValidationUIMessages._UI_REF_FILE_ERROR_DESCRIPTION; // TODO... need to edit the properties file to remove "'" characters from the string // I'm using these characters to markup the bold font. It's safer if I add these programtically. // - string = removePattern(string, "'"); + string = removePattern(string, "'"); //$NON-NLS-1$ - String c = "'" + getLastSegment(contextFile) + "'"; - String r = "'" + getLastSegment(referencedFile) + "'"; + String c = "'" + getLastSegment(contextFile) + "'"; //$NON-NLS-1$ //$NON-NLS-2$ + String r = "'" + getLastSegment(referencedFile) + "'"; //$NON-NLS-1$ //$NON-NLS-2$ - detailsMessage = MessageFormat.format(string, new Object[] { r, c, r, c }); + detailsMessage = NLS.bind(string, new Object[] { r, c, r, c }); return detailsMessage; } @@ -211,8 +207,8 @@ private void setStyledText(StyledText styledText, String text) { - String visibleMessage = ""; - for (StringTokenizer st = new StringTokenizer(markedUpDetailsMessage, "'", false); st.hasMoreTokens();) + String visibleMessage = ""; //$NON-NLS-1$ + for (StringTokenizer st = new StringTokenizer(markedUpDetailsMessage, "'", false); st.hasMoreTokens();) //$NON-NLS-1$ { String token = st.nextToken(); visibleMessage += token; @@ -223,11 +219,11 @@ boolean inQuote = false; int position = 0; - for (StringTokenizer st = new StringTokenizer(markedUpDetailsMessage, "'", true); st.hasMoreTokens();) + for (StringTokenizer st = new StringTokenizer(markedUpDetailsMessage, "'", true); st.hasMoreTokens();) //$NON-NLS-1$ { String token = st.nextToken(); - if (token.equals("'")) + if (token.equals("'")) //$NON-NLS-1$ { inQuote = !inQuote; } @@ -262,7 +258,7 @@ private static String getLastSegment(String uri) { String result = uri; - int index = Math.max(uri.lastIndexOf("/"), uri.lastIndexOf("\\")); + int index = Math.max(uri.lastIndexOf("/"), uri.lastIndexOf("\\")); //$NON-NLS-1$ //$NON-NLS-2$ if (index != -1) { result = uri.substring(index + 1);
diff --git a/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/errorinfo/ReferencedFileErrorUtility.java b/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/errorinfo/ReferencedFileErrorUtility.java index 6b75d6c..b30df8c 100644 --- a/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/errorinfo/ReferencedFileErrorUtility.java +++ b/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/errorinfo/ReferencedFileErrorUtility.java
@@ -42,12 +42,12 @@ URL uri = new URL(uristring); if (uri != null) { - if ("file".equals(uri.getProtocol())) + if ("file".equals(uri.getProtocol())) //$NON-NLS-1$ { String pathString = uri.getPath(); IPath path = new Path(pathString); String device = path.getDevice(); - if (device != null && device.startsWith("/")) + if (device != null && device.startsWith("/")) //$NON-NLS-1$ { path = path.setDevice(device.substring(1)); } @@ -75,13 +75,13 @@ } else { - editorId = XMLUIPlugin.getInstance().getWorkbench().getEditorRegistry().getDefaultEditor(iFile.getName() + ".txt").getId(); + editorId = XMLUIPlugin.getInstance().getWorkbench().getEditorRegistry().getDefaultEditor(iFile.getName() + ".txt").getId(); //$NON-NLS-1$ } workbenchWindow.getActivePage().openEditor(new FileEditorInput(iFile), editorId); } catch (PartInitException ex) { - LoggerFactory.getLoggerInstance().logError("Exception encountered when attempting to open file: " + iFile + "\n\n", ex); + LoggerFactory.getLoggerInstance().logError("Exception encountered when attempting to open file: " + iFile + "\n\n", ex); //$NON-NLS-1$ //$NON-NLS-2$ //B2BGUIPlugin.getPlugin().getMsgLogger().write("Exception encountered when attempting to open file: " + iFile + "\n\n" + ex); } }
diff --git a/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/errorinfo/TaskListTableViewer.java b/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/errorinfo/TaskListTableViewer.java index e616192..55a5610 100644 --- a/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/errorinfo/TaskListTableViewer.java +++ b/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/errorinfo/TaskListTableViewer.java
@@ -29,6 +29,7 @@ import org.eclipse.wst.validation.internal.provisional.core.IMessage; import org.eclipse.wst.xml.core.internal.validation.core.ValidationMessage; import org.eclipse.wst.xml.ui.internal.XMLUIPlugin; +import org.eclipse.wst.xml.ui.internal.validation.XMLValidationUIMessages; @@ -39,10 +40,10 @@ protected static final int COLUMN_RESOURCE = 3; protected static final int COLUMN_LOCATION = 2; - protected static final String LABEL_ICON = ""; - protected static final String LABEL_DESCRIPTION = "Description"; - protected static final String LABEL_RESOURCE = "Resource"; - protected static final String LABEL_LOCATION = "Location"; + protected static final String LABEL_ICON = ""; //$NON-NLS-1$ + protected static final String LABEL_DESCRIPTION = XMLValidationUIMessages.TaskListTableViewer_0; + protected static final String LABEL_RESOURCE = XMLValidationUIMessages.TaskListTableViewer_1; + protected static final String LABEL_LOCATION = XMLValidationUIMessages.TaskListTableViewer_2; protected int visibleRows = -1; @@ -161,7 +162,7 @@ public String getColumnText(Object object, int column) { ValidationMessage errorMessage = (ValidationMessage) object; - String result = ""; + String result = ""; //$NON-NLS-1$ switch (column) { case COLUMN_DESCRIPTION : @@ -171,7 +172,7 @@ } case COLUMN_LOCATION : { - result = "line " + errorMessage.getLineNumber(); + result = XMLValidationUIMessages.TaskListTableViewer_3 + errorMessage.getLineNumber(); break; } }
diff --git a/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/xmlvalidation.properties b/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/xmlvalidation.properties index 18f0bd2..3cdd57d 100644 --- a/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/xmlvalidation.properties +++ b/bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/xmlvalidation.properties
@@ -8,7 +8,7 @@ # Contributors: # IBM Corporation - initial API and implementation ############################################################################### -!-- Constants for strings +### Constants for strings providerName=Eclipse.org pluginName=XML Validator nlFeatureName=XML Validator NL Support @@ -24,9 +24,9 @@ _UI_NO_GRAMMAR_WARNING = Warning : No grammar constraints detected for the document. _UI_MESSAGE_LIMITE_EXCEEDED = The XML file is not valid. The message limit for the Problems view has been exceeded. To see all the messages increase the limit and validate again. -! -! Referenced File Dialog Related Message -! +# +# Referenced File Dialog Related Message +# _UI_REF_FILE_ERROR_DESCRIPTION = The errors below were detected when validating the file "{0}" via the file "{1}". In most cases these errors can be detected by validating "{2}" directly. However it is possible that errors will only occur when {2} is validated in the context of {3}. _UI_REF_FILE_ERROR_MESSAGE = Referenced file contains errors ({0}). For more information, right click on the message and select "Show Details..." _UI_REF_FILE_ERROR_DETAILS = Referenced File Error Details @@ -34,8 +34,16 @@ _UI_DETAILS_INFORMATION_UNAVAILABLE = Details Information Unavailable _UI_DETAILS_INFO_REVALIDATE_TO_REGENERATE = Details information currently unavailable. Please revalidate the file to regenerate the error details. -! -! Dirty File Dialog Related Messages -! +# +# Dirty File Dialog Related Messages +# _UI_SAVE_DIRTY_FILE_MESSAGE = An open editor contains changes to this file that have not been saved. Do you want to save the file before running validation? (If you do not save the file the previously saved version will be validated.) _UI_SAVE_DIRTY_FILE_TITLE = Save file? +ValidateXMLFileActionDelegate_2=Required files xercesImpl.jar and xmlParserAPIs.jar cannot be found.\n\n +ValidateXMLFileActionDelegate_3=Download Xerces 2.6.2 and place xercesImpl.jar and xmlParserAPIs.jar in a folder entitled jars in the org.eclipse.wst.xml.validation plugin.\n\n +ValidateXMLFileActionDelegate_4=For more information see www.eclipse.org/webtools/wst/components/xml/xercesInfo.xml. +ValidateXMLFileActionDelegate_5=Missing Xerces +TaskListTableViewer_0=Description +TaskListTableViewer_1=Resource +TaskListTableViewer_2=Location +TaskListTableViewer_3=line
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 42c8861..02e16c1 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
@@ -164,7 +164,7 @@ if (charset == null) { charset = getUserPreferredCharset(); if (charset == null) { - charset = "UTF-8"; + charset = "UTF-8"; //$NON-NLS-1$ } } CMDocument cmDocument = getCMDocument();
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/AttributeContextInformation.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/AttributeContextInformation.java index 52aeb4e..1987b65 100644 --- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/AttributeContextInformation.java +++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/AttributeContextInformation.java
@@ -47,7 +47,7 @@ * information, may not be <code>null</code> */ public AttributeContextInformation(Image image, String contextDisplayString, String informationDisplayString, HashMap attr2RangeMap) { - Assert.isNotNull(informationDisplayString, "illegal argument: informationDisplayString can not be null"); + Assert.isNotNull(informationDisplayString, "illegal argument: informationDisplayString can not be null"); //$NON-NLS-1$ fImage = image; fContextDisplayString = contextDisplayString;
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/NoRegionContentAssistProcessor.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/NoRegionContentAssistProcessor.java index 802d336..eaac54e 100644 --- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/NoRegionContentAssistProcessor.java +++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/NoRegionContentAssistProcessor.java
@@ -201,7 +201,7 @@ if (sdPrev != null) { if (DEBUG) { String prevRegionType = sdPrev.getType(); - System.out.println("previous region type is >> " + prevRegionType); + System.out.println("previous region type is >> " + prevRegionType); //$NON-NLS-1$ } } }
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/validation/DelegatingSourceValidator.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/validation/DelegatingSourceValidator.java index b7fee52..27ae4eb 100644 --- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/validation/DelegatingSourceValidator.java +++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/validation/DelegatingSourceValidator.java
@@ -447,7 +447,7 @@ * attributes to find the range of the undeclared * entity. */ - String entity = "&" + nameOrValue + ";"; + String entity = "&" + nameOrValue + ";"; //$NON-NLS-1$ //$NON-NLS-2$ NamedNodeMap attributes = node.getAttributes(); for (int i = 0; i < attributes.getLength(); i++) { IDOMAttr attr = (IDOMAttr) attributes.item(i);