/**
  * Set the file being edited. If a file is being edited this allows for validation to create
  * markers on the file. Some editors are not file-based and thus need not invoke this method.
  *
  * @param file the file, which may be null.
  */
 public void setFile(IFile file) {
   this.file = file;
   if (markupValidationReconcilingStrategy != null) {
     markupValidationReconcilingStrategy.setResource(file);
   }
   if (markupHyperlinkDetector != null) {
     markupHyperlinkDetector.setFile(file);
   }
 }
 @Override
 protected List<IHyperlinkDetector> createCustomHyperlinkDetectors(ISourceViewer sourceViewer) {
   List<IHyperlinkDetector> detectors = new ArrayList<IHyperlinkDetector>();
   if (markupHyperlinkDetector == null) {
     markupHyperlinkDetector = new MarkupHyperlinkDetector();
     markupHyperlinkDetector.setMarkupLanguage(markupLanguage);
     markupHyperlinkDetector.setFile(file);
   }
   detectors.add(markupHyperlinkDetector);
   detectors.addAll(super.createCustomHyperlinkDetectors(sourceViewer));
   return detectors;
 }