|
iSeries Remote Systems v6.0.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.etools.iseries.editor.codeassist.cobol.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 static boolean |
fDebug
Flag if debug information is outputted. |
Constructor Summary | |
---|---|
CompletionProcessor(com.ibm.lpex.core.LpexParser iSeriesParser)
Construct an object of CompletionProcessor. |
Method Summary | |
---|---|
com.ibm.lpex.alef.contentassist.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. |
com.ibm.lpex.alef.contentassist.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. |
com.ibm.lpex.alef.contentassist.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
Constructor Detail |
public CompletionProcessor(com.ibm.lpex.core.LpexParser iSeriesParser)
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.
Method Detail |
public com.ibm.lpex.alef.contentassist.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.
computeCompletionProposals
in interface com.ibm.lpex.alef.contentassist.IContentAssistProcessor
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 com.ibm.lpex.alef.contentassist.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.
computeContextInformation
in interface com.ibm.lpex.alef.contentassist.IContentAssistProcessor
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
.
getCompletionProposalAutoActivationCharacters
in interface com.ibm.lpex.alef.contentassist.IContentAssistProcessor
null
if no auto activation is desired.IContentAssistProcessor.getCompletionProposalAutoActivationCharacters()
public char[] getContextInformationAutoActivationCharacters()
null
.
getContextInformationAutoActivationCharacters
in interface com.ibm.lpex.alef.contentassist.IContentAssistProcessor
null
if no auto activation is desired.IContentAssistProcessor.getContextInformationAutoActivationCharacters()
public String getErrorMessage()
getErrorMessage
in interface com.ibm.lpex.alef.contentassist.IContentAssistProcessor
null
if no error occurred.IContentAssistProcessor.getErrorMessage()
public com.ibm.lpex.alef.contentassist.IContextInformationValidator getContextInformationValidator()
null
if the processor is incapable of computing
context information.
Current implementation always returns null
.
getContextInformationValidator
in interface com.ibm.lpex.alef.contentassist.IContentAssistProcessor
null
if the processor is
incapable of computing context information.IContentAssistProcessor.getContextInformationValidator()
|
iSeries Remote Systems v6.0.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |