/**
  * Restart the timer which starts the parser after the specified delay.
  *
  * @param onlyIfRunning Restarts the timer only if it is already running
  */
 public void restartTimer() {
   if (parsingDocumentTask == null
       || parsingDocumentTask.isFinished()
       || parsingDocumentTask.cancel()) {
     dataObject.setDocumentDirty(true);
     Runnable r =
         new Runnable() {
           public void run() {
             dataObject.parsingDocument();
           }
         };
     if (parsingDocumentTask != null)
       parsingDocumentTask = RequestProcessor.getDefault().post(r, AUTO_PARSING_DELAY);
     else parsingDocumentTask = RequestProcessor.getDefault().post(r, 100);
   }
 }