Eclipse Platform
2.0

org.eclipse.jface.text.contentassist
Interface IContentAssistProcessor


public interface IContentAssistProcessor

A content assist processor proposes completions and computes context information for a particular content type. A content assist processor is an IContentAssistant-plug-ins. This interface must be implemented by clients. Implementers should be registered with a content assistant in order to get involved in the assisting process.


Method Summary
 ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset)
          Returns a list of completion proposals based on the specified location within the document that corresponds to the current cursor position within the text viewer.
 IContextInformation[] computeContextInformation(ITextViewer viewer, int documentOffset)
          Returns information about possible contexts based on the specified location within the document that corresponds to the current cursor position within the text viewer.
 char[] getCompletionProposalAutoActivationCharacters()
          Returns the characters which when entered by the user should automatically trigger the presentation of possible completions.
 char[] getContextInformationAutoActivationCharacters()
          Returns the characters which when entered by the user should automatically trigger the presentation of context information.
 IContextInformationValidator getContextInformationValidator()
          Returns a validator used to determine when displayed context information should be dismissed.
 String getErrorMessage()
          Returns the reason why this content assist processor was unable to produce any completion proposals or context information.
 

Method Detail

computeCompletionProposals

public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer,
                                                        int documentOffset)
Returns a list of completion proposals based on the specified location within the document that corresponds to the current cursor position within the text viewer.

Parameters:
viewer - the viewer whose document is used to compute the proposals
Returns:
an array of completion proposals or null if no proposals are possible

computeContextInformation

public IContextInformation[] computeContextInformation(ITextViewer viewer,
                                                       int documentOffset)
Returns information about possible contexts based on the specified location within the document that corresponds to the current cursor position within the text viewer.

Parameters:
viewer - the viewer whose document is used to compute the possible contexts
Returns:
an array of context information objects or null if no context could be found

getCompletionProposalAutoActivationCharacters

public char[] getCompletionProposalAutoActivationCharacters()
Returns the characters which when entered by the user should automatically trigger the presentation of possible completions.

Returns:
the auto activation characters for completion proposal or null if no auto activation is desired

getContextInformationAutoActivationCharacters

public char[] getContextInformationAutoActivationCharacters()
Returns the characters which when entered by the user should automatically trigger the presentation of context information.

Returns:
the auto activation characters for presenting context information or null if no auto activation is desired

getErrorMessage

public String getErrorMessage()
Returns the reason why this content assist processor was unable to produce any completion proposals or context information.

Returns:
an error message or null if no error occurred

getContextInformationValidator

public IContextInformationValidator getContextInformationValidator()
Returns a validator used to determine when displayed context information should be dismissed. May only return null if the processor is incapable of computing context information.

Because of http://dev.eclipse.org/bugs/show_bug.cgi?id=13926 the object returned by this method should also implement IContextInformationPresenter.

Returns:
a context information validator, or null if the processor is incapable of computing context information
See Also:
IContextInformationPresenter

Eclipse Platform
2.0

Copyright (c) IBM Corp. and others 2000, 2002. All Rights Reserved.