/** * Return true if the last validation operation terminated due to the maximum number of messages * having already been reported. */ public boolean wasValidationTerminated(IProject project) { IMarker[] exceededMessage = getLimitMessage(project); return (exceededMessage != null); // Validation was terminated if the message exists. }
/** * This method should be called only by the validation framework. Return true if the message was * removed, false if the message didn't exist. * @deprecated This method should be not be used anymore as Message Limit is removed from * the framework - WTP1.5M5 */ public boolean removeMessageLimitExceeded(IProject project) { IMarker[] exceededMessage = getLimitMessage(project); if (exceededMessage != null) { try { ResourcesPlugin.getWorkspace().deleteMarkers(exceededMessage); return true; } catch (CoreException exc) { Logger logger = ValidationPlugin.getPlugin().getMsgLogger(); if (logger.isLoggingLevel(Level.SEVERE)) { LogEntry entry = ValidationPlugin.getLogEntry(); entry.setSourceID("ValidatorManager.removeMessageLimitExceeded(" + project.getName() + ")"); //$NON-NLS-1$ //$NON-NLS-2$ entry.setTargetException(exc); logger.write(Level.SEVERE, entry); } } } return false; }