org.jcoderz.phoenix.report
Class SyntaxModeCatalogHandler

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by org.jcoderz.phoenix.report.SyntaxModeCatalogHandler
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler

public final class SyntaxModeCatalogHandler
extends DefaultHandler

Responsible to load the catalog file that bundles the jEdit mode files. Inspired by the ModeCatalogHandler that comes with jEdit. The mode files and the catalog are expected to be packed as resources with the jEdit class in a modes package to be found. There s no additional flexibility to provide own or modified modes files. Currently with jEdit4.3pre16 there is no way to use a own ModeProvider to be able to overload the loadMode(String) method because the ModeProvider is hard linked in the Mode class. So we can not use our own XModeHandler and overload error handling there. Use loadModes() to load the catalog and all modes.

Author:
Andreas Mandel

Method Summary
static void loadModes()
          Load all modes referred by the catalog file provided.
 InputSource resolveEntity(String publicId, String systemId)
          Takes care to find the jEdit catalog.dtd.
 void startElement(String uri, String localName, String qName, Attributes attrs)
          Handles the mode elements in the catalog and loads the modes listed there.
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

loadModes

public static void loadModes()
Load all modes referred by the catalog file provided.


resolveEntity

public InputSource resolveEntity(String publicId,
                                 String systemId)
Takes care to find the jEdit catalog.dtd.

Specified by:
resolveEntity in interface EntityResolver
Overrides:
resolveEntity in class DefaultHandler

startElement

public void startElement(String uri,
                         String localName,
                         String qName,
                         Attributes attrs)
Handles the mode elements in the catalog and loads the modes listed there.

Specified by:
startElement in interface ContentHandler
Overrides:
startElement in class DefaultHandler


Copyright 2007 The jCoderZ Project.