Time for action – error markers if file is empty

Errors and warning markers are used to indicate if there are problems in the source files. These are used by the Eclipse compiler to indicate Java compile errors, but they are also used for non-Java errors. For example, text editors also show warnings when words are misspelled. A warning can be shown if the .minimark file is empty and the title is missing.

There isn't a simple way of accessing the file's size in Eclipse, so one heuristic is that if the generated HTML file is less than about 100 bytes then there probably wasn't much to start with anyway.

  1. Open the MinimarkVisitor class and go to the processResource method.
  2. When the HTML file is generated, put in a test to determine if the size is less ...

Get Eclipse Plug-in Development Beginner's Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.