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 as well. 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 we'll use a heuristic that if the generated HTML file is less than about 100 bytes then there probably wasn't much to start with anyway. Perform the following steps:
Open
MinimarkVisitor
and go to theprocessResource()
method.When the HTML file is generated, put in a test to determine if the size is less than 100 bytes:
ByteArrayOutputStream baos = new ByteArrayOutputStream(); MinimarkTranslator.convert(new InputStreamReader(in),new OutputStreamWriter(baos)); ByteArrayInputStream contents = new ByteArrayInputStream...