org.eclipse.mylyn.wikitext.core.validation
Class DocumentLocalReferenceValidationRule

java.lang.Object
  extended by org.eclipse.mylyn.wikitext.core.validation.ValidationRule
      extended by org.eclipse.mylyn.wikitext.core.validation.DocumentLocalReferenceValidationRule
Direct Known Subclasses:
ConfluenceReferenceValidationRule, MediaWikiReferenceValidationRule, TextileReferenceValidationRule, TracWikiReferenceValidationRule, TWikiReferenceValidationRule

public abstract class DocumentLocalReferenceValidationRule
extends ValidationRule

A validation rule that verifies that internal document links resolve to a document id.

Author:
David Green

Constructor Summary
DocumentLocalReferenceValidationRule()
           
 
Method Summary
protected abstract  MarkupLanguage createMarkupLanguage()
           
 ValidationProblem findProblem(String markup, int offset, int length)
          Starting at the given offset find the next validation problem.
 List<ValidationProblem> findProblems(String markup, int offset, int length)
          Find all validation problems that exist starting at the given offset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentLocalReferenceValidationRule

public DocumentLocalReferenceValidationRule()
Method Detail

createMarkupLanguage

protected abstract MarkupLanguage createMarkupLanguage()

findProblem

public ValidationProblem findProblem(String markup,
                                     int offset,
                                     int length)
Description copied from class: ValidationRule
Starting at the given offset find the next validation problem.

Specified by:
findProblem in class ValidationRule
Parameters:
markup - the markup content in which a validation problem should be found
offset - the offset at which to start looking for problems
length - the length at which to stop looking for problems
Returns:
the validation problem if found, or null if no validation problem was detected

findProblems

public List<ValidationProblem> findProblems(String markup,
                                            int offset,
                                            int length)
Description copied from class: ValidationRule
Find all validation problems that exist starting at the given offset

Overrides:
findProblems in class ValidationRule
Parameters:
markup - the markup content in which a validation problem should be found
offset - the offset at which to start looking for problems
length - the length at which to stop looking for problems
Returns:
the problems, or an empty list if there are none


Copyright © 2011 FuseSource, Corp.. All Rights Reserved.