[91563] commited for NA
diff --git a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ValidationOperation.java b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ValidationOperation.java
index cf4a52c..4c76254 100644
--- a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ValidationOperation.java
+++ b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ValidationOperation.java
@@ -1599,7 +1599,6 @@
// If user fixes problem, and limit exceeded, add "exceeded"
// message, or
// if limit not exceeded any more, remove "exceeded" message.
- ValidatorManager.getManager().checkMessageLimit(getProject(), true);
reporter.getProgressMonitor().done();
}
}
@@ -1642,7 +1641,8 @@
getLaunchedValidators().add(vmd);
}
- ValidatorJob validatorjob = new ValidatorJob( vmd.getValidatorUniqueName(), helper.getProject(), helper );
+ ValidatorJob validatorjob = new ValidatorJob( vmd.getValidatorDisplayName(), vmd.getValidatorUniqueName(),
+ helper.getProject(), helper );
ISchedulingRule schedulingRule = validator.getSchedulingRule(helper);
diff --git a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ValidatorJob.java b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ValidatorJob.java
index 1a368c5..4d3a748 100644
--- a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ValidatorJob.java
+++ b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ValidatorJob.java
@@ -21,7 +21,6 @@
import org.eclipse.wst.validation.internal.plugin.ValidationPlugin;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.eclipse.wst.validation.internal.provisional.core.IValidatorJob;
-import org.eclipse.wst.validation.internal.provisional.core.MessageLimitException;
public class ValidatorJob extends Job {
@@ -37,8 +36,8 @@
- public ValidatorJob(String name, IProject project, IWorkbenchContext aHelper ){
- super(name);
+ public ValidatorJob(String displayName, String name, IProject project, IWorkbenchContext aHelper ){
+ super(displayName);
validatorUniqueName = name;
this.project = project;
this.helper = aHelper;
@@ -102,10 +101,7 @@
// accidentally wrapped a MessageLimitException instead of
// propagating it.
if (exc.getAssociatedException() != null) {
- if (exc.getAssociatedException() instanceof MessageLimitException) {
- MessageLimitException mssgExc = (MessageLimitException) exc.getAssociatedException();
- throw mssgExc;
- } else if (exc.getAssociatedException() instanceof ValidationException) {
+ if (exc.getAssociatedException() instanceof ValidationException) {
ValidationException vexc = (ValidationException) exc.getAssociatedException();
vexc.setClassLoader(validator.getClass().getClassLoader());
}
@@ -117,7 +113,7 @@
if (logger.isLoggingLevel(Level.SEVERE)) {
LogEntry entry = ValidationPlugin.getLogEntry();
- entry.setSourceID("ValidationOperation.validate(WorkbenchMonitor)"); //$NON-NLS-1$
+ entry.setSourceID("ValidatorJob.run()"); //$NON-NLS-1$
entry.setTargetException(exc);
logger.write(Level.SEVERE, entry);
if (exc.getAssociatedException() != null) {
@@ -136,14 +132,12 @@
} catch (Throwable exc) {
if (logger.isLoggingLevel(Level.SEVERE)) {
LogEntry entry = ValidationPlugin.getLogEntry();
- entry.setSourceID("ValidationOperation.validate(WorkbenchMonitor)"); //$NON-NLS-1$
+ entry.setSourceID("ValidatorJob.run()"); //$NON-NLS-1$
entry.setTargetException(exc);
logger.write(Level.SEVERE, entry);
- IStatus stat = new Status(IStatus.ERROR,
+ IStatus stat = new Status(IStatus.ERROR,
ValidationPlugin.getPlugin().PLUGIN_ID, 0, "", exc );
-
-
- logger.write(Level.SEVERE, stat);
+ logger.write(Level.SEVERE, stat);
}
String mssg = ResourceHandler.getExternalizedMessage(
@@ -167,7 +161,7 @@
} catch (Throwable exc) {
if (logger.isLoggingLevel(Level.SEVERE)) {
LogEntry entry = ValidationPlugin.getLogEntry();
- entry.setSourceID("ValidationOperation::launchValidator"); //$NON-NLS-1$
+ entry.setSourceID("ValidatorJob.run()"); //$NON-NLS-1$
entry.setTargetException(exc);
logger.write(Level.SEVERE, entry);
}
@@ -189,7 +183,7 @@
} catch (Throwable exc) {
if (logger.isLoggingLevel(Level.SEVERE)) {
LogEntry entry = ValidationPlugin.getLogEntry();
- entry.setSourceID("ValidationOperation::launchValidator"); //$NON-NLS-1$
+ entry.setSourceID("ValidatorJob.run()"); //$NON-NLS-1$
entry.setTargetException(exc);
logger.write(Level.SEVERE, entry);
}
@@ -198,11 +192,8 @@
message.setSeverity(IMessage.NORMAL_SEVERITY);
message.setId(ResourceConstants.VBF_EXC_RUNTIME);
message.setParams(msgParm);
- try {
- reporter.addMessage(validator, message);
- } catch (MessageLimitException e) {
- throw e;
- }
+ reporter.addMessage(validator, message);
+
status = WTPCommonPlugin.createErrorStatus(message.getText());
return status;
} finally {
@@ -214,4 +205,7 @@
return status;
}
+ public boolean belongsTo(Object family) {
+ return (project.getName() + ValidatorManager.VALIDATOR_JOB_FAMILY).equals(family);
+ }
}
diff --git a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ValidatorManager.java b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ValidatorManager.java
index ebf1738..86b70bf 100644
--- a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ValidatorManager.java
+++ b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ValidatorManager.java
@@ -48,6 +48,7 @@
* This class is not intended to be subclassed outside of the validation framework.
*/
public final class ValidatorManager {
+ public static final String VALIDATOR_JOB_FAMILY = "validators"; //$NON-NLS-1$
private static ValidatorManager inst = null;
private static IResourceUtil _resourceUtil = null; // a common utility, different whether or not
// WSAD is running in headless or UI mode,
diff --git a/plugins/org.eclipse.wst.validation/validate_core/org/eclipse/wst/validation/internal/provisional/core/IValidatorJob.java b/plugins/org.eclipse.wst.validation/validate_core/org/eclipse/wst/validation/internal/provisional/core/IValidatorJob.java
index c9851ca..595151b 100644
--- a/plugins/org.eclipse.wst.validation/validate_core/org/eclipse/wst/validation/internal/provisional/core/IValidatorJob.java
+++ b/plugins/org.eclipse.wst.validation/validate_core/org/eclipse/wst/validation/internal/provisional/core/IValidatorJob.java
@@ -24,6 +24,7 @@
*/
public interface IValidatorJob extends IValidator{
+
public static IStatus OK_STATUS = new Status(IStatus.OK, "org.eclipse.wst.validation", 0, "OK", null); //$NON-NLS-1$ //$NON-NLS-2$