changes for validation api - commit for vkb
diff --git a/tests/org.eclipse.jst.validation.sample/filesystemFWK/org/eclipse/wst/validation/sample/filesystem/IncrementalReporter.java b/tests/org.eclipse.jst.validation.sample/filesystemFWK/org/eclipse/wst/validation/sample/filesystem/IncrementalReporter.java index 1df04ef..dfd6f04 100644 --- a/tests/org.eclipse.jst.validation.sample/filesystemFWK/org/eclipse/wst/validation/sample/filesystem/IncrementalReporter.java +++ b/tests/org.eclipse.jst.validation.sample/filesystemFWK/org/eclipse/wst/validation/sample/filesystem/IncrementalReporter.java
@@ -28,7 +28,6 @@ import org.eclipse.wst.validation.core.IMessageAccess; import org.eclipse.wst.validation.core.IReporter; import org.eclipse.wst.validation.core.IValidator; -import org.eclipse.wst.validation.core.SeverityEnum; /** * This class is the file system specific implementation of an incremental IReporter. @@ -132,12 +131,12 @@ System.out.println(); System.out.println("Warning messages"); //$NON-NLS-1$ - messages = getMessages(SeverityEnum.NORMAL_SEVERITY); + messages = getMessages(IMessage.NORMAL_SEVERITY); report(messages); System.out.println(); System.out.println("Information messages"); //$NON-NLS-1$ - messages = getMessages(SeverityEnum.LOW_SEVERITY); + messages = getMessages(IMessage.LOW_SEVERITY); report(messages); }
diff --git a/tests/org.eclipse.jst.validation.sample/filesystemFWK/org/eclipse/wst/validation/sample/filesystem/MessageManager.java b/tests/org.eclipse.jst.validation.sample/filesystemFWK/org/eclipse/wst/validation/sample/filesystem/MessageManager.java index 0f05d6d..88252b5 100644 --- a/tests/org.eclipse.jst.validation.sample/filesystemFWK/org/eclipse/wst/validation/sample/filesystem/MessageManager.java +++ b/tests/org.eclipse.jst.validation.sample/filesystemFWK/org/eclipse/wst/validation/sample/filesystem/MessageManager.java
@@ -26,7 +26,6 @@ import org.eclipse.wst.validation.core.IMessage; import org.eclipse.wst.validation.core.IValidator; -import org.eclipse.wst.validation.core.SeverityEnum; /** * This class manages the validation messages for each validator. Each validator's @@ -152,13 +151,13 @@ break; } - case (SeverityEnum.LOW_SEVERITY) : + case (IMessage.LOW_SEVERITY) : { formattedMessage.append("Information: "); //$NON-NLS-1$ break; } - case (SeverityEnum.NORMAL_SEVERITY) : + case (IMessage.NORMAL_SEVERITY) : default : { formattedMessage.append("Warning: "); //$NON-NLS-1$
diff --git a/tests/org.eclipse.jst.validation.sample/propertiesValidator/org/eclipse/jst/validation/sample/PropertiesValidator.java b/tests/org.eclipse.jst.validation.sample/propertiesValidator/org/eclipse/jst/validation/sample/PropertiesValidator.java index 3c8f3b8..5829989 100644 --- a/tests/org.eclipse.jst.validation.sample/propertiesValidator/org/eclipse/jst/validation/sample/PropertiesValidator.java +++ b/tests/org.eclipse.jst.validation.sample/propertiesValidator/org/eclipse/jst/validation/sample/PropertiesValidator.java
@@ -28,7 +28,6 @@ import org.eclipse.wst.validation.core.IMessage; import org.eclipse.wst.validation.core.IReporter; import org.eclipse.wst.validation.core.IValidator; -import org.eclipse.wst.validation.core.SeverityEnum; import org.eclipse.wst.validation.core.ValidationException; import org.eclispe.wst.validation.internal.core.Message; @@ -78,7 +77,7 @@ // 1. The file doesn't exist or // 2. The file isn't a .properties file or // 3. The file can't be read - IMessage message = new Message(IValidationConstants.BUNDLENAME, SeverityEnum.NORMAL_SEVERITY, IValidationConstants.ABCD0090, new String[]{changedFiles[i].getFileName()}); + IMessage message = new Message(IValidationConstants.BUNDLENAME, IMessage.NORMAL_SEVERITY, IValidationConstants.ABCD0090, new String[]{changedFiles[i].getFileName()}); reporter.addMessage(this, message); continue; }
diff --git a/tests/org.eclipse.jst.validation.sample/propertiesValidator/org/eclipse/jst/validation/sample/ValidatorPropertyFile.java b/tests/org.eclipse.jst.validation.sample/propertiesValidator/org/eclipse/jst/validation/sample/ValidatorPropertyFile.java index 9f28a0c..3fbf32d 100644 --- a/tests/org.eclipse.jst.validation.sample/propertiesValidator/org/eclipse/jst/validation/sample/ValidatorPropertyFile.java +++ b/tests/org.eclipse.jst.validation.sample/propertiesValidator/org/eclipse/jst/validation/sample/ValidatorPropertyFile.java
@@ -90,11 +90,11 @@ } case(MessageMetaData.INFO): { - return IReporter.LOW_SEVERITY; + return IMessage.LOW_SEVERITY; } default: { - return IReporter.NORMAL_SEVERITY; + return IMessage.NORMAL_SEVERITY; } } }
diff --git a/tests/org.eclipse.jst.validation.test/test/org/eclipse/jst/validation/test/setup/TestCaseGeneratorOperation.java b/tests/org.eclipse.jst.validation.test/test/org/eclipse/jst/validation/test/setup/TestCaseGeneratorOperation.java index 65648eb..6dff6b0 100644 --- a/tests/org.eclipse.jst.validation.test/test/org/eclipse/jst/validation/test/setup/TestCaseGeneratorOperation.java +++ b/tests/org.eclipse.jst.validation.test/test/org/eclipse/jst/validation/test/setup/TestCaseGeneratorOperation.java
@@ -16,7 +16,7 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jst.validation.test.BVTValidationPlugin; import org.eclipse.jst.validation.test.internal.registry.MessageUtility; -import org.eclipse.wst.validation.core.SeverityEnum; +import org.eclipse.wst.validation.core.IMessage; import org.eclipse.wst.validation.internal.TaskListUtility; import org.eclipse.wst.validation.internal.ValidatorMetaData; @@ -82,7 +82,7 @@ // and group them by the validator. for(int i=0; i<projects.length; i++) { IProject project = projects[i]; - IMarker[] markers = TaskListUtility.getValidationTasks(project, SeverityEnum.ALL_MESSAGES); + IMarker[] markers = TaskListUtility.getValidationTasks(project, IMessage.ALL_MESSAGES); if((markers == null) || (markers.length == 0)){ getBuffer().write("Cannot generate a test case for project " + project.getName() + " until \"Run Validation\" has been run. Enable only the validator whose test case is to be generated, right-click, and \"Run Validation\". Once the validation messages have been reported, a test case can be generated from those messages."); //$NON-NLS-1$ //$NON-NLS-2$ continue;