Class AbstractVariable
- java.lang.Object
-
- com.e1c.g5.v8.dt.lcore.ui.templates.contentassist.variable.AbstractVariable
-
- All Implemented Interfaces:
IVariable
- Direct Known Subclasses:
CreateMethodAndInvocationVariable
,CursorVariable
,DateVariable
,EditVariable
,EnumerationValueVariable
,FormatStringVariable
,InsertMetadataObjectNameVariable
,MetadataObjectPredefinedItemVariable
,ProposalsVariable
,QueryTextVariable
,SelectionVariable
,TypeDescriptionBuilderVariable
,TypeSelectionVariable
,UserVariable
public abstract class AbstractVariable extends Object implements IVariable
Abstract implementation of a variable without special linking inApplyResult
-
-
Constructor Summary
Constructors Constructor Description AbstractVariable(org.eclipse.jface.text.IRegion region)
Creates new instance of this with given region
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ApplyResult
apply(String indentation)
Performs apply creating replace edits for template.IVariableDialogProvider
getDialogProvider()
Gets special provider for open dialog for editing value after apllying variableIVariableProposalProvider
getProposalProvider()
Creates proposal provider that can create proposals for linked position.org.eclipse.jface.text.IRegion
getRegion()
Returns region of the entry of this variable inside templateprotected abstract String
getVariableText()
Returns text of the variable for the given region
-
-
-
Method Detail
-
apply
public ApplyResult apply(String indentation)
Description copied from interface:IVariable
Performs apply creating replace edits for template. Do not shift for template's offset
-
getRegion
public org.eclipse.jface.text.IRegion getRegion()
Description copied from interface:IVariable
Returns region of the entry of this variable inside template
-
getProposalProvider
public IVariableProposalProvider getProposalProvider()
Description copied from interface:IVariable
Creates proposal provider that can create proposals for linked position.- Specified by:
getProposalProvider
in interfaceIVariable
- Returns:
- Proposal provider for this variable, can be
null
if no proposals can be created by this variable and it does not need linked mode. Linked mode created for non-null providers
-
getDialogProvider
public IVariableDialogProvider getDialogProvider()
Description copied from interface:IVariable
Gets special provider for open dialog for editing value after apllying variable- Specified by:
getDialogProvider
in interfaceIVariable
- Returns:
- special provider for open dialog for editing value after apllying variable, can be
null
-
getVariableText
protected abstract String getVariableText()
Returns text of the variable for the given region- Returns:
- The text of the variable for the given region, can be
null
-
-