com.japisoft.xmlpad.helper.handler
Class AbstractHelperHandler

java.lang.Object
  extended bycom.japisoft.xmlpad.helper.handler.AbstractHelperHandler
Direct Known Subclasses:
AbstractEntityHandler, com.japisoft.xmlpad.helper.handler.system.AbstractSystemHandler, AbstractTagHandler, AttributeHandler, AttributeValueHandler

public abstract class AbstractHelperHandler
extends java.lang.Object

Common class for building an helper


Field Summary
protected  java.util.ArrayList descriptors
           
 
Constructor Summary
AbstractHelperHandler()
           
 
Method Summary
protected  Descriptor addDescriptor(Descriptor d)
           
 void dispose()
           
protected  void flushDescriptors()
           
protected abstract  java.lang.String getActivatorSequence()
           
protected  javax.swing.Icon getDefaultIcon()
           
 java.lang.String getName()
           
 int getPriority()
          Here a way to change the order of the handler
abstract  java.lang.String getTitle()
           
 java.lang.String getType()
           
 boolean hasDelegateForInsertingResult()
          Give information if this helper can managed the result inserting.
abstract  boolean haveDescriptors(SimpleNode currentNode, XMLDocument document, boolean insertBefore, int offset, java.lang.String activatorString)
           
 void insertResult(XMLDocument document, int offset, java.lang.String result)
          Only if the hasDelegateForInsertingResult is true
protected  void installDescriptors(XMLDocument document, int offset, java.lang.String activatorString)
           
 boolean isEnabled()
           
protected  boolean match(XMLDocument document, int offset, java.lang.String addedPart, java.lang.String mustMatch)
           
 boolean mustBeJobSynchronized()
          If the assistant must be called a a job for being synchronized with parsing...
protected  void removeDescriptor(Descriptor d)
           
 Descriptor[] resolveContentAssistant(SimpleNode currentNode, XMLDocument document, boolean insertBefore, int offset, java.lang.String activatorString)
          This is activated each time the user insert a special key (like ctrl-space) or for some special inserted caracters like '<'...
 void setEnabled(boolean enabled)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

descriptors

protected java.util.ArrayList descriptors
Constructor Detail

AbstractHelperHandler

public AbstractHelperHandler()
Method Detail

resolveContentAssistant

public Descriptor[] resolveContentAssistant(SimpleNode currentNode,
                                            XMLDocument document,
                                            boolean insertBefore,
                                            int offset,
                                            java.lang.String activatorString)
This is activated each time the user insert a special key (like ctrl-space) or for some special inserted caracters like '<'...

Returns:
the part of the content assistant

getActivatorSequence

protected abstract java.lang.String getActivatorSequence()

getDefaultIcon

protected javax.swing.Icon getDefaultIcon()

match

protected boolean match(XMLDocument document,
                        int offset,
                        java.lang.String addedPart,
                        java.lang.String mustMatch)

haveDescriptors

public abstract boolean haveDescriptors(SimpleNode currentNode,
                                        XMLDocument document,
                                        boolean insertBefore,
                                        int offset,
                                        java.lang.String activatorString)

getTitle

public abstract java.lang.String getTitle()

installDescriptors

protected void installDescriptors(XMLDocument document,
                                  int offset,
                                  java.lang.String activatorString)

addDescriptor

protected Descriptor addDescriptor(Descriptor d)

removeDescriptor

protected void removeDescriptor(Descriptor d)

flushDescriptors

protected void flushDescriptors()

dispose

public void dispose()

getName

public java.lang.String getName()

getType

public java.lang.String getType()

hasDelegateForInsertingResult

public boolean hasDelegateForInsertingResult()
Give information if this helper can managed the result inserting. Only for particular case like attribute value


insertResult

public void insertResult(XMLDocument document,
                         int offset,
                         java.lang.String result)
Only if the hasDelegateForInsertingResult is true


mustBeJobSynchronized

public boolean mustBeJobSynchronized()
If the assistant must be called a a job for being synchronized with parsing...


isEnabled

public boolean isEnabled()

setEnabled

public void setEnabled(boolean enabled)

getPriority

public int getPriority()
Here a way to change the order of the handler



Copyright © 2006 JAPISoft. All Rights Reserved.