# Class TextContentAssistSubjectAdapter

java.lang.Object
org.eclipse.jface.contentassist.AbstractControlContentAssistSubjectAdapter
org.eclipse.jface.contentassist.TextContentAssistSubjectAdapter

All Implemented Interfaces:
  `IContentAssistSubjectControl`

@Deprecated public class TextContentAssistSubjectAdapter extends AbstractControlContentAssistSubjectAdapter
Deprecated.
As of 3.2, replaced by Platform UI's field assist support
Adapts a `Text` to an `IContentAssistSubjectControl`.

Since:
  3.0
See Also:
  - `Text`
  - `IContentAssistSubjectControl`

## Field Summary

### Fields inherited from class AbstractControlContentAssistSubjectAdapter

`DEBUG`

## Constructor Summary

Constructors
Constructor
Description
`TextContentAssistSubjectAdapter(Text text)`
Deprecated.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`addSelectionListener(SelectionListener selectionListener)`
Deprecated.
`int`
`getCaretOffset()`
Deprecated.
`Control`
`getControl()`
Deprecated.
`IDocument`
`getDocument()`
Deprecated.
`int`
`getLineHeight()`
Deprecated.
`Point`
`getLocationAtOffset(int offset)`
Deprecated.
`Point`
`getSelectedRange()`
Deprecated.
`Point`
`getWidgetSelectionRange()`
Deprecated.
`void`
`removeSelectionListener(SelectionListener selectionListener)`
Deprecated.
`void`
`revealRange(int i, int j)`
Deprecated.
`void`
`setSelectedRange(int i, int j)`
Deprecated.

### Methods inherited from class AbstractControlContentAssistSubjectAdapter

`addKeyListener, appendVerifyKeyListener, getLineDelimiter, prependVerifyKeyListener, removeKeyListener, removeVerifyKeyListener, setContentAssistCueProvider, setEventConsumer, supportsVerifyKeyListener`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### TextContentAssistSubjectAdapter

@Deprecated public TextContentAssistSubjectAdapter(Text text)
Deprecated.
Creates a content assist subject control adapter for the given text widget.

Parameters:
  `text` - the text widget to adapt

## Method Details

### getControl

@Deprecated public Control getControl()
Deprecated.
Description copied from interface: `IContentAssistSubjectControl`
Returns the control of this content assist subject control.

Specified by:
  `getControl` in interface `IContentAssistSubjectControl`
Specified by:
  `getControl` in class `AbstractControlContentAssistSubjectAdapter`
Returns:
  the control of this content assist subject control

### getLineHeight

@Deprecated public int getLineHeight()
Deprecated.
Description copied from interface: `IContentAssistSubjectControl`
Returns the line height.

Returns:
  line height in pixel

### getCaretOffset

@Deprecated public int getCaretOffset()
Deprecated.
Description copied from interface: `IContentAssistSubjectControl`
Returns the caret position relative to the start of the text in widget coordinates.

Returns:
  the caret position relative to the start of the text in widget coordinates

### getLocationAtOffset

@Deprecated public Point getLocationAtOffset(int offset)
Deprecated.
Description copied from interface: `IContentAssistSubjectControl`
Returns the x, y location of the upper left corner of the character bounding box at the specified offset in the text. The point is relative to the upper left corner of the widget client area.

Parameters:
  `offset` - widget offset relative to the start of the content 0 <= offset >= getCharCount()
Returns:
  x, y location of the upper left corner of the character bounding box at the specified offset in the text

### getWidgetSelectionRange

@Deprecated public Point getWidgetSelectionRange()
Deprecated.
Description copied from interface: `IContentAssistSubjectControl`
Returns the selected range in the subject's widget.

Returns:
  start and length of the selection, x is the offset of the

### getSelectedRange

@Deprecated public Point getSelectedRange()
Deprecated.
Description copied from interface: `IContentAssistSubjectControl`
Returns the selected range.

Returns:
  start and length of the selection, x is the offset and y the length based on the subject's model (e.g. document)

### getDocument

@Deprecated public IDocument getDocument()
Deprecated.
Description copied from interface: `IContentAssistSubjectControl`
Returns this content assist subject control's document.

Returns:
  the viewer's input document

### setSelectedRange

@Deprecated public void setSelectedRange(int i, int j)
Deprecated.
Description copied from interface: `IContentAssistSubjectControl`
Sets the selected range. Offset and length based on the subject's model (e.g. document).

Parameters:
  `i` - the offset of the selection based on the subject's model e.g. document
  `j` - the length of the selection based on the subject's model e.g. document

### revealRange

@Deprecated public void revealRange(int i, int j)
Deprecated.
Description copied from interface: `IContentAssistSubjectControl`
Reveals the given region. Offset and length based on the subject's model (e.g. document).

Parameters:
  `i` - the offset of the selection based on the subject's model e.g. document
  `j` - the length of the selection based on the subject's model e.g. document

### addSelectionListener

@Deprecated public boolean addSelectionListener(SelectionListener selectionListener)
Deprecated.
Description copied from interface: `IContentAssistSubjectControl`
If supported, adds a selection listener. A Selection event is sent by the widget when the selection has changed.

Parameters:
  `selectionListener` - the listener
Returns:
  `true` if adding a selection listener is supported
  - `SWT.ERROR_WIDGET_DISPOSED` - if the receiver has been disposed
  - `SWT.ERROR_THREAD_INVALID_ACCESS` - if not called from the thread that created the receiver

### removeSelectionListener

@Deprecated public void removeSelectionListener(SelectionListener selectionListener)
Deprecated.
Description copied from interface: `IContentAssistSubjectControl`
Removes the specified selection listener.

Parameters:
  `selectionListener` - the listener