Package org.eclipse.wst.xsl.ui.provisional.contentassist


org.eclipse.wst.xsl.ui.provisional.contentassist
Class AbstractXSLContentAssistProcessor



public class AbstractXSLContentAssistProcessor
extends java.lang.Object
This is an Abstract class that implementors should extend for implementing XSL Content Assist Processors. It provides common convience methods for information that is needed to construct a content assist processor.


Field Summary

protected ITextRegioncompletionRegion
    
protected intcursorPosition
    
protected java.lang.StringerrorMessage
    
protected java.lang.StringmatchString
    
protected IStructuredDocumentRegionsdRegion
    
protected ITextViewertextViewer
    
protected IDOMNodexmlNode
    

Constructor Summary

AbstractXSLContentAssistProcessor()

Method Summary

public char[]getCompletionProposalAutoActivationCharacters()
     Returns the characters which when entered by the user should automatically trigger the presentation of possible completions. the auto activation characters for completion proposal or null if no auto activation is desired
protected ITextRegiongetCompletionRegion(int documentPosition , org.w3c.dom.Node domnode)
     Return the region whose content's require completion. This is something of a misnomer as sometimes the user wants to be prompted for contents of a non-existent ITextRegion, such as for enumerated attribute values following an '=' sign. Copied from AbstractContentAssist Processor.
protected ITextRegiongetCompletionRegion(int offset , IStructuredDocumentRegion sdRegion)
    
public java.lang.StringgetErrorMessage()
     (non-Javadoc)
protected voidinitializeProposalVariables(ITextViewer textViewer , int documentPosition)
    
public voidsetErrorMessage(java.lang.String errorMessage)
     Sets the error message for why content assistance didn't complete.

Field Detail

completionRegion

protected ITextRegion completionRegion


cursorPosition

protected int cursorPosition


errorMessage

protected java.lang.String errorMessage


matchString

protected java.lang.String matchString


sdRegion

protected IStructuredDocumentRegion sdRegion


textViewer

protected ITextViewer textViewer


xmlNode

protected IDOMNode xmlNode


Constructor Detail

AbstractXSLContentAssistProcessor

public AbstractXSLContentAssistProcessor()


Methods Detail

getCompletionProposalAutoActivationCharacters

public char[] getCompletionProposalAutoActivationCharacters()

Returns the characters which when entered by the user should automatically trigger the presentation of possible completions. the auto activation characters for completion proposal or null if no auto activation is desired

Returns

char[] - an array of activation characters


getCompletionRegion

protected ITextRegion getCompletionRegion(int documentPosition , org.w3c.dom.Node domnode)

Return the region whose content's require completion. This is something of a misnomer as sometimes the user wants to be prompted for contents of a non-existent ITextRegion, such as for enumerated attribute values following an '=' sign. Copied from AbstractContentAssist Processor.

Parameters

documentPosition

domnode

Returns

ITextRegion


getCompletionRegion

protected ITextRegion getCompletionRegion(int offset , IStructuredDocumentRegion sdRegion)

Parameters

offset

sdRegion

Returns

ITextRegion


getErrorMessage

public java.lang.String getErrorMessage()

(non-Javadoc)

Returns

java.lang.String


initializeProposalVariables

protected void initializeProposalVariables(ITextViewer textViewer , int documentPosition)

Parameters

textViewer

documentPosition


setErrorMessage

public void setErrorMessage(java.lang.String errorMessage)

Sets the error message for why content assistance didn't complete.

Parameters

errorMessage