Class VariableOccurrence
- java.lang.Object
-
- com.e1c.g5.v8.dt.lcore.ui.templates.contentassist.parsing.VariableOccurrence
-
- All Implemented Interfaces:
IVariableOccurrence
public class VariableOccurrence extends Object implements IVariableOccurrence
Default implementation of IVariableOccurrence
-
-
Constructor Summary
Constructors Constructor Description VariableOccurrence(String name, List<String> params, org.eclipse.jface.text.IRegion region, String text)
Creates new instance of this
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getName()
Returns name of the variable.String
getParameter(int i)
Returns the parameter with the given order.List<String>
getParameters()
Gets all variable invocation parametersint
getParametersCount()
Returns the number representing the amount of parameters this variable hasorg.eclipse.jface.text.IRegion
getRegion()
Returns the region occurrence of this variableString
getText()
Returns the text of the occurrence
-
-
-
Constructor Detail
-
VariableOccurrence
public VariableOccurrence(String name, List<String> params, org.eclipse.jface.text.IRegion region, String text)
Creates new instance of this- Parameters:
name
- variable name, cannot benull
params
- The params of this occurrence, cannot benull
region
- The region of this occurrence, cannot benull
text
- The text of the occurrence, cannot benull
-
-
Method Detail
-
getRegion
public org.eclipse.jface.text.IRegion getRegion()
Description copied from interface:IVariableOccurrence
Returns the region occurrence of this variable- Specified by:
getRegion
in interfaceIVariableOccurrence
- Returns:
- The region of this occurrence, cannot be
null
-
getParameter
public String getParameter(int i)
Description copied from interface:IVariableOccurrence
Returns the parameter with the given order. Counts from 0- Specified by:
getParameter
in interfaceIVariableOccurrence
- Parameters:
i
- The order of the parameter to be returned- Returns:
- The value of the parameter, can be
null
-
getText
public String getText()
Description copied from interface:IVariableOccurrence
Returns the text of the occurrence- Specified by:
getText
in interfaceIVariableOccurrence
- Returns:
- The text of the occurrence, cannot be
null
-
getName
public String getName()
Description copied from interface:IVariableOccurrence
Returns name of the variable. Name is variable's ID- Specified by:
getName
in interfaceIVariableOccurrence
- Returns:
- The name of the variable, cannot be
null
-
getParametersCount
public int getParametersCount()
Description copied from interface:IVariableOccurrence
Returns the number representing the amount of parameters this variable has- Specified by:
getParametersCount
in interfaceIVariableOccurrence
- Returns:
- The number of parameters held by this variable
-
getParameters
public List<String> getParameters()
Description copied from interface:IVariableOccurrence
Gets all variable invocation parameters- Specified by:
getParameters
in interfaceIVariableOccurrence
- Returns:
- all variable invocation parameters, never
null
-
-