[430553] ElementInformation is missing resource information
diff --git a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/XMLValidationInfo.java b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/XMLValidationInfo.java
index 1113eb9..158c59d 100644
--- a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/XMLValidationInfo.java
+++ b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/XMLValidationInfo.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2001, 2009 IBM Corporation and others.
+ * Copyright (c) 2001, 2014 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
@@ -185,7 +185,7 @@
{
if(errorCustomizationManager == null)
{
- errorCustomizationManager = new ErrorCustomizationManager();
+ errorCustomizationManager = new ErrorCustomizationManager(getFileURI());
}
return errorCustomizationManager;
}
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 22f3d19..806f179 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, 2013 IBM Corporation and others.
+ * Copyright (c) 2001, 2014 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
diff --git a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ElementInformation.java b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ElementInformation.java
index 649c99e..46b8b20 100644
--- a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ElementInformation.java
+++ b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ElementInformation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2014 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,6 +20,7 @@
{
protected String localName;
protected String namespace;
+ protected String fileURI;
protected List children = new ArrayList();
/**
@@ -37,6 +38,20 @@
}
/**
+ * Constructor.
+ *
+ * @param uri
+ * The namespace URI of the element.
+ * @param localName
+ * The local name of the element.
+ * @param fileURI
+ * The URI of the file being validated
+ */
+ public ElementInformation(String uri, String localName, String fileURI) {
+ this(uri, localName);
+ this.fileURI = fileURI;
+ }
+ /**
* Get the namespace of this element.
*
* @return
@@ -69,4 +84,13 @@
{
return children;
}
+
+ /**
+ * Get the URI of the file that this element belongs to
+ * @return
+ * The URI of the file that this element belongs to
+ */
+ public String getFileURI() {
+ return fileURI;
+ }
}
\ No newline at end of file
diff --git a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorCustomizationManager.java b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorCustomizationManager.java
index 745acc0..34fbad0 100644
--- a/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorCustomizationManager.java
+++ b/bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorCustomizationManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2014 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
@@ -23,6 +23,15 @@
{
protected Stack elementInformationStack = new Stack();
protected ErrorMessageInformation messageForConsideration;
+ /** The uri of the file being validated */
+ protected String fileURI;
+
+ public ErrorCustomizationManager() {
+ }
+
+ public ErrorCustomizationManager(String fileURI) {
+ this.fileURI = fileURI;
+ }
/**
* This method should be called in the start element method of the XML validator's
@@ -35,7 +44,7 @@
*/
public void startElement(String uri, String localName)
{
- ElementInformation elementInformation = new ElementInformation(uri, localName);
+ ElementInformation elementInformation = new ElementInformation(uri, localName, fileURI);
if (elementInformationStack.size() > 0)
{
ElementInformation parent = (ElementInformation) elementInformationStack.peek();