Package org.eclipse.wst.xsl.ui.internal.contentassist
public class SelectAttributeContentAssist extends org.eclipse.wst.xsl.ui.provisional.contentassist.AbstractXSLContentAssistRequestThis class provides content assistance for the XSL select attribute.
Field Summary | |
protected static java.lang.String | SELECT_ATTRIBUTE |
Constructor Summary |
SelectAttributeContentAssist(org.w3c.dom.Node node
,
IStructuredDocumentRegion documentRegion
,
ITextRegion completionRegion
,
int begin
,
int length
,
java.lang.String filter
,
ITextViewer textViewer) |
Method Summary | |
protected void | addSelectProposals(org.w3c.dom.Element rootElement
,
int offset) |
protected void | addTemplates(java.lang.String context
,
int startOffset) Adds XPath related templates to the list of proposals |
protected void | adjustXPathStart(java.lang.String attrName) This needs to setup the content assistance correctly. Here is what needs to happen: 1. Adjust the matchString (This should have been calculated earlier) 2. Get the current tokens offset position..this will be the starting offset. 3. Get the replacement length...this is the difference between the token offset and the next token or end of the string |
protected java.lang.String | extractXPathMatchString(IDOMAttr node
,
ITextRegion aRegion
,
int offset) |
protected IDOMAttr | getAttribute(java.lang.String attrName) |
public java.util.ArrayList | getCompletionProposals() (non-Javadoc) |
protected int | getXPathSeperatorPos(int column
,
java.lang.String nodeValue) |
Field Detail |
protected static java.lang.String SELECT_ATTRIBUTE
Constructor Detail |
public SelectAttributeContentAssist(org.w3c.dom.Node node
,
IStructuredDocumentRegion documentRegion
,
ITextRegion completionRegion
,
int begin
,
int length
,
java.lang.String filter
,
ITextViewer textViewer)
Handles Content Assistance requests for Select Attributes. This is called an instantiated through the use of the computeProposals method from the XSLContentAssistProcessor. It will calculate the available proposals that are available for the XSL select attribute.
Methods Detail |
protected void addSelectProposals(org.w3c.dom.Element rootElement
,
int offset)
rootElement
offset
protected void addTemplates(java.lang.String context
,
int startOffset)
Adds XPath related templates to the list of proposals
context
startOffset
protected void adjustXPathStart(java.lang.String attrName)
This needs to setup the content assistance correctly. Here is what needs to happen: 1. Adjust the matchString (This should have been calculated earlier) 2. Get the current tokens offset position..this will be the starting offset. 3. Get the replacement length...this is the difference between the token offset and the next token or end of the string
attrName
- The name of the attribute to use as the starting node.
protected java.lang.String extractXPathMatchString(IDOMAttr node
,
ITextRegion aRegion
,
int offset)
node
aRegion
offset
java.lang.String
protected IDOMAttr getAttribute(java.lang.String attrName)
attrName
IDOMAttr
public java.util.ArrayList getCompletionProposals()
(non-Javadoc)
java.util.ArrayList
protected int getXPathSeperatorPos(int column
,
java.lang.String nodeValue)
column
nodeValue
int