W3C home > Mailing lists > Public > www-validator-cvs@w3.org > April 2013

CVS 2002/css-validator/org/w3c/css/util

From: CVS User ylafon <cvsmail@w3.org>
Date: Tue, 09 Apr 2013 15:06:20 +0000
Message-Id: <E1UPa7o-0006dm-GE@roscoe.w3.org>
To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator/org/w3c/css/util
In directory roscoe:/tmp/cvs-serv25504/org/w3c/css/util

Modified Files:
	Warning.java 
Log Message:
make the warning type (used as they key to generate the message) accessible

--- /sources/public/2002/css-validator/org/w3c/css/util/Warning.java	2012/12/08 15:31:57	1.16
+++ /sources/public/2002/css-validator/org/w3c/css/util/Warning.java	2013/04/09 15:06:20	1.17
@@ -1,5 +1,5 @@
 //
-// $Id: Warning.java,v 1.16 2012/12/08 15:31:57 ylafon Exp $
+// $Id: Warning.java,v 1.17 2013/04/09 15:06:20 ylafon Exp $
 // From Philippe Le Hegaret (Philippe.Le_Hegaret@sophia.inria.fr)
 //
 // (c) COPYRIGHT MIT and INRIA, 1997.
@@ -12,7 +12,7 @@
 /**
  * This class is use to manage all warning every where
  *
- * @version $Revision: 1.16 $
+ * @version $Revision: 1.17 $
  */
 public class Warning implements Comparable<Warning> {
     String sourceFile;
@@ -21,6 +21,7 @@
     int line = 0;
     CssSelectors selector;
     String warningMessage;
+	String warningType = null;
 
     /**
      * Create a new Warning with message parameters.
@@ -37,6 +38,7 @@
         this.sourceFile = sourceFile;
         this.hashSource = sourceFile.hashCode() % 100;
         this.line = line;
+		this.warningType = warningMessage;
         this.warningMessage = warn(warningMessage, messages, ac);
         this.level = getLevel(warningMessage, level, ac);
     }
@@ -71,6 +73,7 @@
         if (sourceFile != null) {
             this.hashSource = sourceFile.hashCode() % 100;
         }
+		this.warningType = warningMessage;
         this.warningMessage = warn(warningMessage, new String[]{message1,
                 message2}, ac);
         this.level = getLevel(warningMessage, level, ac);
@@ -92,6 +95,7 @@
         if (sourceFile != null) {
             this.hashSource = sourceFile.hashCode() % 100;
         }
+		this.warningType = warningMessage;
         this.warningMessage = warn(warningMessage, messages, ac);
         this.level = getLevel(warningMessage, level, ac);
         this.line = property.getLine();
@@ -179,6 +183,13 @@
         return warningMessage;
     }
 
+	/**
+	 * Get the warning type
+	 */
+	public String getWarningType() {
+		return warningType;
+	}
+
     /**
      * Get the message.
      */
Received on Tuesday, 9 April 2013 15:06:21 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:17:54 UTC