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

## org.eclipse.wst.xsl.ui.provisional.contentassist
Class AbstractXSLContentAssistRequest

    public class AbstractXSLContentAssistRequest
    extends java.lang.Object

An 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

## documentRegion

`protected IStructuredDocumentRegion documentRegion`

## macros

`protected java.util.ArrayList macros`

## matchString

`protected java.lang.String matchString`

## node

`protected org.w3c.dom.Node node`

## proposals

`protected java.util.ArrayList proposals`

## region

`protected ITextRegion region`

## replacementBeginPosition

`protected int replacementBeginPosition`

## replacementLength

`protected int replacementLength`

## textViewer

`protected ITextViewer textViewer`

## Constructor Detail

## AbstractXSLContentAssistRequest

`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

## addMacro

`protected void addMacro(ICompletionProposal newProposal)`

### Parameters

`newProposal`

## addProposal

`protected void addProposal(ICompletionProposal newProposal)`

### Parameters

`newProposal`

## getAllCompletionProposals

`protected java.util.ArrayList getAllCompletionProposals()`

### Returns

`java.util.ArrayList`

## getCompletionProposals

`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.

### Returns

`java.util.ArrayList`

## getCursorPosition

`protected int getCursorPosition()`

Get the cursor position within the Text Viewer

### Returns

`int` - An int value containing the cursor position

## getDocumentRegion

`protected IStructuredDocumentRegion getDocumentRegion()`

### Returns

`IStructuredDocumentRegion`

## getLocation

`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.

### Returns

`java.lang.String`

## getMacros

`protected java.util.List getMacros()`

### Returns

`java.util.List`

## getMatchString

`protected java.lang.String getMatchString()`

### Returns

`java.lang.String`

## getNamespaces

`protected java.util.Collection getNamespaces(IDOMElement element)`

### Parameters

`element`

### Returns

`java.util.Collection`

## getNode

`protected org.w3c.dom.Node getNode()`

### Returns

`org.w3c.dom.Node`

## getParent

`protected org.w3c.dom.Node getParent()`

### Returns

`org.w3c.dom.Node`

## getProposals

`protected java.util.List getProposals()`

### Returns

`java.util.List`

## getRegion

`protected ITextRegion getRegion()`

### Returns

`ITextRegion`

## getReplacementBeginPosition

`protected int getReplacementBeginPosition()`

### Returns

`int`

## getReplacementLength

`protected int getReplacementLength()`

### Returns

`int`

## getStartOffset

`protected int getStartOffset()`

### Returns

`int`

## getStylesheetModel

`protected org.eclipse.wst.xsl.core.model.StylesheetModel getStylesheetModel()`

### Returns

`org.eclipse.wst.xsl.core.model.StylesheetModel`

## getText

`protected java.lang.String getText()`

### Returns

`java.lang.String`

## getTextEndOffset

`protected int getTextEndOffset()`

### Returns

`int`

## hasNodes

`protected boolean hasNodes(org.w3c.dom.NodeList nodes)`

Checks to make sure that the NodeList has data

### Parameters

`nodes` - A NodeList object

### Returns

`boolean` - True if has data, false if empty

## setDocumentRegion

`protected void setDocumentRegion(IStructuredDocumentRegion region)`

### Parameters

`region`

## setMatchString

`protected void setMatchString(java.lang.String newMatchString)`

### Parameters

`newMatchString`

## setNode

`protected void setNode(org.w3c.dom.Node newNode)`

### Parameters

`newNode`

## setRegion

`protected void setRegion(ITextRegion newRegion)`

### Parameters

`newRegion`

## setReplacementBeginPosition

`protected void setReplacementBeginPosition(int newReplacementBeginPosition)`

### Parameters

`newReplacementBeginPosition`

## setReplacementLength

`protected void setReplacementLength(int newReplacementLength)`

### Parameters

`newReplacementLength`

## sortProposals

`protected java.util.ArrayList sortProposals(java.util.ArrayList proposalsIn)`

### Parameters

`proposalsIn`

### Returns

`java.util.ArrayList`

## toString

`public java.lang.String toString()`

### Returns

`java.lang.String` - java.lang.String