Class TemplateContentAssistProcessor
- java.lang.Object
-
- com.e1c.g5.v8.dt.lcore.ui.templates.preferences.TemplateContentAssistProcessor
-
- All Implemented Interfaces:
org.eclipse.jface.text.contentassist.IContentAssistProcessor
public class TemplateContentAssistProcessor extends Object implements org.eclipse.jface.text.contentassist.IContentAssistProcessor
Default content assist processor for preference page used for pattern editor. Can create proposals of the variables provided byIFactoryServiceProvider
-
-
Constructor Summary
Constructors Constructor Description TemplateContentAssistProcessor(String languages, boolean isRu)Creates new instance of this processor to process variables, available the given language
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.jface.text.contentassist.ICompletionProposal[]computeCompletionProposals(org.eclipse.jface.text.ITextViewer viewer, int offset)org.eclipse.jface.text.contentassist.IContextInformation[]computeContextInformation(org.eclipse.jface.text.ITextViewer viewer, int offset)protected org.eclipse.jface.text.contentassist.ICompletionProposalcreateProposal(org.eclipse.jface.text.ITextViewer viewer, IVariablePresentation presentation, org.eclipse.jface.text.IRegion region)Creates variable proposal from given parameters.protected IVariableStartFindercreateVariableStartFinder()Creates newIVariableStartFinderchar[]getCompletionProposalAutoActivationCharacters()char[]getContextInformationAutoActivationCharacters()org.eclipse.jface.text.contentassist.IContextInformationValidatorgetContextInformationValidator()StringgetErrorMessage()protected IFactoryServiceProvidergetFactoryServiceProvider()Returns the factory service provider to get factories and presentations from
-
-
-
Constructor Detail
-
TemplateContentAssistProcessor
public TemplateContentAssistProcessor(String languages, boolean isRu)
Creates new instance of this processor to process variables, available the given language- Parameters:
languages- The language of the variables that can be provided to the preference page
-
-
Method Detail
-
computeCompletionProposals
public org.eclipse.jface.text.contentassist.ICompletionProposal[] computeCompletionProposals(org.eclipse.jface.text.ITextViewer viewer, int offset)- Specified by:
computeCompletionProposalsin interfaceorg.eclipse.jface.text.contentassist.IContentAssistProcessor
-
getCompletionProposalAutoActivationCharacters
public char[] getCompletionProposalAutoActivationCharacters()
- Specified by:
getCompletionProposalAutoActivationCharactersin interfaceorg.eclipse.jface.text.contentassist.IContentAssistProcessor
-
getContextInformationAutoActivationCharacters
public char[] getContextInformationAutoActivationCharacters()
- Specified by:
getContextInformationAutoActivationCharactersin interfaceorg.eclipse.jface.text.contentassist.IContentAssistProcessor
-
getErrorMessage
public String getErrorMessage()
- Specified by:
getErrorMessagein interfaceorg.eclipse.jface.text.contentassist.IContentAssistProcessor
-
getContextInformationValidator
public org.eclipse.jface.text.contentassist.IContextInformationValidator getContextInformationValidator()
- Specified by:
getContextInformationValidatorin interfaceorg.eclipse.jface.text.contentassist.IContentAssistProcessor
-
computeContextInformation
public org.eclipse.jface.text.contentassist.IContextInformation[] computeContextInformation(org.eclipse.jface.text.ITextViewer viewer, int offset)- Specified by:
computeContextInformationin interfaceorg.eclipse.jface.text.contentassist.IContentAssistProcessor
-
getFactoryServiceProvider
protected IFactoryServiceProvider getFactoryServiceProvider()
Returns the factory service provider to get factories and presentations from- Returns:
- The factory service provider, cannot be
null
-
createProposal
protected org.eclipse.jface.text.contentassist.ICompletionProposal createProposal(org.eclipse.jface.text.ITextViewer viewer, IVariablePresentation presentation, org.eclipse.jface.text.IRegion region)Creates variable proposal from given parameters. Proposals should implementComparable- Parameters:
viewer- The viewer that called for proposal, cannot benullpresentation- The presentation of the called proposal, cannot benullregion- The region to create proposal, cannot benull- Returns:
- The newly created proposal, cannot be
null
-
createVariableStartFinder
protected IVariableStartFinder createVariableStartFinder()
Creates newIVariableStartFinder- Returns:
- The newly created
IVariableStartFinder, cannot benull
-
-