com.japisoft.xmlpad.helper
Class SyntaxHelper

java.lang.Object
  |
  +--com.japisoft.xmlpad.helper.SyntaxHelper

public class SyntaxHelper
extends java.lang.Object

SyntaxHelper This classes is a method factory for finding helper for the current XMLPad context usage. This is for tags or entities.

Version:
1.2
Author:
(c) 2003 JAPISOFT

Constructor Summary
SyntaxHelper()
           
 
Method Summary
 void addTagDescriptor(TagDescriptor tag)
           
 void dispose()
           
 AttributeHelper getAttributeHelperForLocation(com.japisoft.fastparser.node.SimpleNode location)
           
 EntityHelper getEntityHelper()
           
 SystemHelper getSystemHelper()
           
 TagHelper getTagHelper()
           
 TagHelper getTagHelperForLocation(com.japisoft.fastparser.node.SimpleNode parent, int caret)
           
 boolean hasTagHelper()
           
 void setDefaultNamespace(java.lang.String namespace)
          Reset a default namespace for the content assistant
 void setDTDContent(java.lang.String rootElement, SchemaLocator locator)
          Reset the local DTD
 void setDTDContent(java.lang.String rootElement, java.lang.String dtdContent, int dtdDeclarationLine)
          Add support for completion using the DTD content
 void setDTDLocation(java.lang.String currentDocument, java.lang.String location, java.lang.String rootElement, int dtdDeclarationLine)
          Reset the current DTD location
 void setErrorListener(ErrorListener listener)
          For inner usage
 void setForcePrefix(java.lang.String prefix)
           
 void setRelaxNGLocation(SchemaLocator locator)
          Reset the current RelaxNGLocation
 void setSchemaLocation(java.lang.String currentDocument, java.lang.String[] namespaces, java.lang.String[] locations, java.lang.String rootElement, int documentLineForLocation)
          Reset the current Schema location
 void setSystemHelper(SystemHelper helper)
          Update the current system helper or reset it to null for the default one
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SyntaxHelper

public SyntaxHelper()
Method Detail

addTagDescriptor

public void addTagDescriptor(TagDescriptor tag)

setErrorListener

public void setErrorListener(ErrorListener listener)
For inner usage


dispose

public void dispose()

hasTagHelper

public boolean hasTagHelper()
Returns:
true if a tag helper is available

setRelaxNGLocation

public void setRelaxNGLocation(SchemaLocator locator)
Reset the current RelaxNGLocation


setSchemaLocation

public void setSchemaLocation(java.lang.String currentDocument,
                              java.lang.String[] namespaces,
                              java.lang.String[] locations,
                              java.lang.String rootElement,
                              int documentLineForLocation)
Reset the current Schema location


setDTDContent

public void setDTDContent(java.lang.String rootElement,
                          java.lang.String dtdContent,
                          int dtdDeclarationLine)
Add support for completion using the DTD content


setDTDContent

public void setDTDContent(java.lang.String rootElement,
                          SchemaLocator locator)
Reset the local DTD


setDTDLocation

public void setDTDLocation(java.lang.String currentDocument,
                           java.lang.String location,
                           java.lang.String rootElement,
                           int dtdDeclarationLine)
Reset the current DTD location


getTagHelperForLocation

public TagHelper getTagHelperForLocation(com.japisoft.fastparser.node.SimpleNode parent,
                                         int caret)
Returns:
set of Tags definition for a parent location and a location

getTagHelper

public TagHelper getTagHelper()
Returns:
the current tag helper

getAttributeHelperForLocation

public AttributeHelper getAttributeHelperForLocation(com.japisoft.fastparser.node.SimpleNode location)
Returns:
an helper for the following node

getEntityHelper

public EntityHelper getEntityHelper()
Returns:
a set of Entities definition

getSystemHelper

public SystemHelper getSystemHelper()
Returns:
a set of System element

setSystemHelper

public void setSystemHelper(SystemHelper helper)
Update the current system helper or reset it to null for the default one


setForcePrefix

public void setForcePrefix(java.lang.String prefix)

setDefaultNamespace

public void setDefaultNamespace(java.lang.String namespace)
Reset a default namespace for the content assistant