|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.etools.iseries.edit.codeassist.cobol.CompletionProcessor
public abstract class CompletionProcessor
Abstract class for code assist on LPEX editor.
This class implements IContentAssistProcessor
, which prepares code assist
functions.
Subclass should be implemented for each language.
LPEX editor uses methods of this class or subclass's methods for code assist.
IContentAssistProcessor
Field Summary | |
---|---|
protected LpexParser |
_oldParser
|
protected boolean |
_parserChanged
|
protected static boolean |
fDebug
Flag if debug information is outputted. |
Constructor Summary | |
---|---|
CompletionProcessor(LpexSourceViewer sourceViewer)
Construct an object of CompletionProcessor. |
Method Summary | |
---|---|
ICompletionProposal[] |
computeCompletionProposals(ITextViewer viewer,
int documentOffset)
Return 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)
Return a list of 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()
Return the characters which, when entered by the user, should automatically trigger the presentation of possible completions. |
char[] |
getContextInformationAutoActivationCharacters()
Return the characters which, when entered by the user, should automatically trigger the presentation of context information. |
IContextInformationValidator |
getContextInformationValidator()
Return a validator used to determine when displayed context information should be dismissed. |
String |
getErrorMessage()
Return the reason why this content assist processor was unable to produce any completion proposals or context information. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static boolean fDebug
protected LpexParser _oldParser
protected boolean _parserChanged
Constructor Detail |
---|
public CompletionProcessor(LpexSourceViewer sourceViewer)
This method creates a new processor, and also creates a language parser used for parsing the source file and syntax libraries for check the language syntax.
lpexEditor
- - LPEX editor to use this processor.Method Detail |
---|
public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset)
When the user requests code assist, LPEX invokes this method and presents the returned proposals.
This method gets the current statement string from the parser, and gets the possible syntax elements by using syntax library, and then creats the proposals based on defined syntax elements in the source file.
viewer
- the LpexTextViewer requesting content-assist proposals.documentOffset
- ignored (LPEX's content assist will probably always
pass a -1 here anyway), content assist at the current
cursor position is assumed.
null
if no proposals are possible.IContentAssistProcessor#computeCompletionProposals(ITextViewer, int).
public IContextInformation[] computeContextInformation(ITextViewer viewer, int documentOffset)
null
.
When the user requests syntax assist, LPEX invokes this method and presents the returned information
This method will be implemented in the future.
viewer
- the LpexTextViewer requesting information about possible contexts.documentOffset
- ignored (LPEX's content assist will probably always
pass a -1 here anyway), content assist at the current
cursor position is assumed.
null
if no information are possible.IContentAssistProcessor#computeContextInformation(ITextViewer, int).
public char[] getCompletionProposalAutoActivationCharacters()
null
.
null
if no auto activation is desired.IContentAssistProcessor#getCompletionProposalAutoActivationCharacters()
public char[] getContextInformationAutoActivationCharacters()
null
.
null
if no auto activation is desired.IContentAssistProcessor#getContextInformationAutoActivationCharacters()
public String getErrorMessage()
null
if no error occurred.IContentAssistProcessor#getErrorMessage()
public IContextInformationValidator getContextInformationValidator()
null
if the processor is incapable of computing
context information.
Current implementation always returns null
.
null
if the processor is
incapable of computing context information.IContentAssistProcessor#getContextInformationValidator()
|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |