io.sarl.lang.codebuilder.builders
Interface IExpressionBuilder
All Known Implementing Classes:
ExpressionSourceAppender, ExpressionBuilderImpl
interface IExpressionBuilder
Builder of a Sarl XExpression.
Property Summary
Modifier and type Property and description
org.eclipse.xtext.common.types.access.IJvmTypeProvider typeResolutionContext
Replies the context for type resolution.
org.eclipse.xtext.xbase.XExpression xExpression
Replies the last created expression.
Action Summary
Modifier and type Action and description
abstract org.eclipse.xtext.xbase.XFeatureCall createReferenceToSuper
Create a reference to "super" object or to the super type.
abstract org.eclipse.xtext.xbase.XFeatureCall createReferenceToThis
Create a reference to "this" object or to the current type.
abstract void dispose
Dispose the resource.
abstract void eInit(EObject,Procedure1<Param>,IJvmTypeProvider)
Initialize the expression.
abstract org.eclipse.emf.ecore.resource.Resource eResource
Replies the resource to which the XExpression is attached.
abstract java.lang.String getDefaultValueForType(String)
Replies the default value for the given type.
abstract org.eclipse.xtext.xbase.XExpression getDefaultXExpressionForType(String)
Replies the XExpression for the default value associated to the given type.
abstract org.eclipse.xtext.common.types.access.IJvmTypeProvider getTypeResolutionContext
Replies the context for type resolution.
abstract org.eclipse.xtext.xbase.XExpression getXExpression
Replies the last created expression.
abstract org.eclipse.xtext.common.types.JvmParameterizedTypeReference newTypeRef(String)
Find the reference to the type with the given name.
abstract org.eclipse.xtext.common.types.JvmParameterizedTypeReference newTypeRef(Notifier,String)
Find the reference to the type with the given name.
abstract void setDocumentation(String)
Change the documentation of the element.
abstract void setExpression(String)
Change the expression in the container.
abstract void setXExpression(XExpression)
Change the expression in the container.
Property Details
typeResolutionContext
val typeResolutionContext : org.eclipse.xtext.common.types.access.IJvmTypeProvider
Replies the context for type resolution.

This property is an alias for the action: getTypeResolutionContext

Returns:
the context or null if the Ecore object is the context.
xExpression
var xExpression : org.eclipse.xtext.xbase.XExpression
Replies the last created expression.

This property is an alias for the action: getXExpression

Returns:
the last created expression.
Action Details
createReferenceToSuper
def createReferenceToSuper : org.eclipse.xtext.xbase.XFeatureCall
Create a reference to "super" object or to the super type.
Returns:
the reference.
createReferenceToThis
def createReferenceToThis : org.eclipse.xtext.xbase.XFeatureCall
Create a reference to "this" object or to the current type.
Returns:
the reference.
dispose
def dispose
Dispose the resource.
eInit(EObject,Procedure1<Param>,IJvmTypeProvider)
def eInit(EObject,Procedure1<Param>,IJvmTypeProvider)
Initialize the expression.
Parameters:
context - the context of the expressions.
setter - the object that permits to assign the expression to the context.
eResource
def eResource : org.eclipse.emf.ecore.resource.Resource
Replies the resource to which the XExpression is attached.
getDefaultValueForType(String)
def getDefaultValueForType(String) : java.lang.String
Replies the default value for the given type.
Parameters:
type - the type for which the default value should be determined.
Returns:
the default value.
getDefaultXExpressionForType(String)
def getDefaultXExpressionForType(String) : org.eclipse.xtext.xbase.XExpression
Replies the XExpression for the default value associated to the given type.
Parameters:
type - the type for which the default value should be determined.
Returns:
the default value.
getTypeResolutionContext
def getTypeResolutionContext : org.eclipse.xtext.common.types.access.IJvmTypeProvider
Replies the context for type resolution.
Returns:
the context or null if the Ecore object is the context.
getXExpression
def getXExpression : org.eclipse.xtext.xbase.XExpression
Replies the last created expression.
Returns:
the last created expression.
newTypeRef(String)
def newTypeRef(String) : org.eclipse.xtext.common.types.JvmParameterizedTypeReference
Find the reference to the type with the given name.
Parameters:
typeName - the fully qualified name of the type
Returns:
the type reference.
newTypeRef(Notifier,String)
def newTypeRef(Notifier,String) : org.eclipse.xtext.common.types.JvmParameterizedTypeReference
Find the reference to the type with the given name.
Parameters:
context - the context for the type reference use
typeName - the fully qualified name of the type
Returns:
the type reference.
setDocumentation(String)
def setDocumentation(String)
Change the documentation of the element.

The documentation will be displayed just before the element.
Parameters:
doc - the documentation.
setExpression(String)
def setExpression(String)
Change the expression in the container.
Parameters:
expression - the textual representation of the expression.
setXExpression(XExpression)
def setXExpression(XExpression)
Change the expression in the container.
Parameters:
expression - the expression.