JXMLPad - Tutorial

Creating a JSP 1.1 editor

STEP 4 : Creating the XMLContainer and adding special syntax color for JSP tags

Version 1.0
http://www.japisoft.com

Inside the JSPEditor constructor after the previous parts : 

    XMLContainer container = new XMLContainer();
    // Specify the waited file ext.

    container.getDocumentInfo().addFileExt( "jsp" );
    container.getDocumentInfo().setDefaultFileExt( "jsp" );
    container.getDocumentInfo().setDocumentDescription( "JSP file" );

    // Colorize jsp prefix
    container.setColorForPrefix( "jsp", Color.red );
    // Colorize special tags
    container.setColorForTag( "root", Color.red );
    container.setColorForTag( "text", Color.red );
    container.setColorForTag( "include", Color.red );
    container.setColorForTag( "forward", Color.red );
    container.setColorForTag( "getProperty", Color.red );
    container.setColorForTag( "plugin", Color.red );
    container.setColorForTag( "setProperty", Color.red );
    container.setColorForTag( "useBean", Color.red );


Previous step