Package org.eclipse.wst.xsl.ui.provisional.contentassist
public class AbstractXSLContentAssistRequest extends java.lang.ObjectAn extension of the XML ContentAssistRequest class. This provides a basis for the XSL content assistance. Classes may subclass this class and implement specific functionality.
Field Summary | |
protected IStructuredDocumentRegion | documentRegion |
protected java.util.ArrayList | macros |
protected java.lang.String | matchString |
protected org.w3c.dom.Node | node |
protected java.util.ArrayList | proposals |
protected ITextRegion | region |
protected int | replacementBeginPosition |
protected int | replacementLength |
protected ITextViewer | textViewer |
Constructor Summary |
AbstractXSLContentAssistRequest(org.w3c.dom.Node node
,
IStructuredDocumentRegion documentRegion
,
ITextRegion completionRegion
,
int begin
,
int length
,
java.lang.String filter
,
ITextViewer textViewer) |
Method Summary | |
protected void | addMacro(ICompletionProposal newProposal) |
protected void | addProposal(ICompletionProposal newProposal) |
protected java.util.ArrayList | getAllCompletionProposals() |
public java.util.ArrayList | getCompletionProposals() Returns a list of proposals. Implementations are to provide the appropriate implementation for the proposals they would like to return. Use of the getAllCompletionProposals should be used to return the actual proposals from this method. |
protected int | getCursorPosition() Get the cursor position within the Text Viewer |
protected IStructuredDocumentRegion | getDocumentRegion() |
protected java.lang.String | getLocation() Retrieves the base location for the IDOMDocument for this class. This is used to populate a new Path class for retrieving an IFile instance. |
protected java.util.List | getMacros() |
protected java.lang.String | getMatchString() |
protected java.util.Collection | getNamespaces(IDOMElement element) |
protected org.w3c.dom.Node | getNode() |
protected org.w3c.dom.Node | getParent() |
protected java.util.List | getProposals() |
protected ITextRegion | getRegion() |
protected int | getReplacementBeginPosition() |
protected int | getReplacementLength() |
protected int | getStartOffset() |
protected org.eclipse.wst.xsl.core.model.StylesheetModel | getStylesheetModel() |
protected java.lang.String | getText() |
protected int | getTextEndOffset() |
protected boolean | hasNodes(org.w3c.dom.NodeList nodes) Checks to make sure that the NodeList has data |
protected void | setDocumentRegion(IStructuredDocumentRegion region) |
protected void | setMatchString(java.lang.String newMatchString) |
protected void | setNode(org.w3c.dom.Node newNode) |
protected void | setRegion(ITextRegion newRegion) |
protected void | setReplacementBeginPosition(int newReplacementBeginPosition) |
protected void | setReplacementLength(int newReplacementLength) |
protected java.util.ArrayList | sortProposals(java.util.ArrayList proposalsIn) |
public java.lang.String | toString() |
Field Detail |
protected IStructuredDocumentRegion documentRegion
protected java.util.ArrayList macros
protected java.lang.String matchString
protected org.w3c.dom.Node node
protected java.util.ArrayList proposals
protected ITextRegion region
protected int replacementBeginPosition
protected int replacementLength
protected ITextViewer textViewer
Constructor Detail |
public AbstractXSLContentAssistRequest(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 addMacro(ICompletionProposal newProposal)
newProposal
protected void addProposal(ICompletionProposal newProposal)
newProposal
protected java.util.ArrayList getAllCompletionProposals()
java.util.ArrayList
public java.util.ArrayList getCompletionProposals()
Returns a list of proposals. Implementations are to provide the appropriate implementation for the proposals they would like to return. Use of the getAllCompletionProposals should be used to return the actual proposals from this method.
java.util.ArrayList
protected int getCursorPosition()
Get the cursor position within the Text Viewer
int
- An int value containing the cursor position
protected IStructuredDocumentRegion getDocumentRegion()
IStructuredDocumentRegion
protected java.lang.String getLocation()
Retrieves the base location for the IDOMDocument for this class. This is used to populate a new Path class for retrieving an IFile instance.
java.lang.String
protected java.util.List getMacros()
java.util.List
protected java.lang.String getMatchString()
java.lang.String
protected java.util.Collection getNamespaces(IDOMElement element)
element
java.util.Collection
protected org.w3c.dom.Node getNode()
org.w3c.dom.Node
protected org.w3c.dom.Node getParent()
org.w3c.dom.Node
protected java.util.List getProposals()
java.util.List
protected ITextRegion getRegion()
ITextRegion
protected int getReplacementBeginPosition()
int
protected int getReplacementLength()
int
protected int getStartOffset()
int
protected org.eclipse.wst.xsl.core.model.StylesheetModel getStylesheetModel()
org.eclipse.wst.xsl.core.model.StylesheetModel
protected java.lang.String getText()
java.lang.String
protected int getTextEndOffset()
int
protected boolean hasNodes(org.w3c.dom.NodeList nodes)
Checks to make sure that the NodeList has data
nodes
- A NodeList object
boolean
- True if has data, false if empty
protected void setDocumentRegion(IStructuredDocumentRegion region)
region
protected void setMatchString(java.lang.String newMatchString)
newMatchString
protected void setNode(org.w3c.dom.Node newNode)
newNode
protected void setRegion(ITextRegion newRegion)
newRegion
protected void setReplacementBeginPosition(int newReplacementBeginPosition)
newReplacementBeginPosition
protected void setReplacementLength(int newReplacementLength)
newReplacementLength
protected java.util.ArrayList sortProposals(java.util.ArrayList proposalsIn)
proposalsIn
java.util.ArrayList
public java.lang.String toString()
java.lang.String
- java.lang.String