Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.eclipse.jface.text.contentassist
Interface IContentAssistant  view IContentAssistant download IContentAssistant.java

All Known Implementing Classes:
ContentAssistant

public interface IContentAssistant

An IContentAssistant provides support on interactive content completion. The content assistant is a org.eclipse.jface.text.ITextViewer add-on. Its purpose is to propose, display, and insert completions of the content of the text viewer's document at the viewer's cursor position. In addition to handle completions, a content assistant can also be requested to provide context information. Context information is shown in a tool tip like popup. As it is not always possible to determine the exact context at a given document offset, a content assistant displays the possible contexts and requests the user to choose the one whose information should be displayed.

A content assistant has a list of IContentAssistProcessor objects each of which is registered for a particular document content type. The content assistant uses the processors to react on the request of completing documents or presenting context information.

In order to provide backward compatibility for clients of IContentAssistant, extension interfaces are used to provide a means of evolution. The following extension interfaces exist:

The interface can be implemented by clients. By default, clients use ContentAssistant as the standard implementer of this interface.


Field Summary
static int CONTEXT_INFO_ABOVE
          Context info will be shown above the location it has been requested for without hiding the location.
static int CONTEXT_INFO_BELOW
          Context info will be shown below the location it has been requested for without hiding the location.
static int PROPOSAL_OVERLAY
          The context info list will overlay the list of completion proposals.
static int PROPOSAL_REMOVE
          The completion proposal list will be removed before the context info list will be shown.
static int PROPOSAL_STACKED
          The context info list will be presented without hiding or overlapping the completion proposal list.
 
Method Summary
 IContentAssistProcessor getContentAssistProcessor(java.lang.String contentType)
          Returns the content assist processor to be used for the given content type.
 void install(org.eclipse.jface.text.ITextViewer textViewer)
          Installs content assist support on the given text viewer.
 java.lang.String showContextInformation()
          Shows context information for the content at the viewer's cursor position.
 java.lang.String showPossibleCompletions()
          Shows all possible completions of the content at the viewer's cursor position.
 void uninstall()
          Uninstalls content assist support from the text viewer it has previously be installed on.
 

Field Detail

PROPOSAL_OVERLAY

public static final int PROPOSAL_OVERLAY
The context info list will overlay the list of completion proposals.

See Also:
Constant Field Values

PROPOSAL_REMOVE

public static final int PROPOSAL_REMOVE
The completion proposal list will be removed before the context info list will be shown.

See Also:
Constant Field Values

PROPOSAL_STACKED

public static final int PROPOSAL_STACKED
The context info list will be presented without hiding or overlapping the completion proposal list.

See Also:
Constant Field Values

CONTEXT_INFO_ABOVE

public static final int CONTEXT_INFO_ABOVE
Context info will be shown above the location it has been requested for without hiding the location.

See Also:
Constant Field Values

CONTEXT_INFO_BELOW

public static final int CONTEXT_INFO_BELOW
Context info will be shown below the location it has been requested for without hiding the location.

See Also:
Constant Field Values
Method Detail

install

public void install(org.eclipse.jface.text.ITextViewer textViewer)
Installs content assist support on the given text viewer.


uninstall

public void uninstall()
Uninstalls content assist support from the text viewer it has previously be installed on.


showPossibleCompletions

public java.lang.String showPossibleCompletions()
Shows all possible completions of the content at the viewer's cursor position.


showContextInformation

public java.lang.String showContextInformation()
Shows context information for the content at the viewer's cursor position.


getContentAssistProcessor

public IContentAssistProcessor getContentAssistProcessor(java.lang.String contentType)
Returns the content assist processor to be used for the given content type.