io.sarl.lang.extralanguage.compiler
Interface IExtraLanguageGeneratorContext
All Superinterfaces:
org.eclipse.xtext.generator.IGeneratorContext
All Known Implementing Classes:
ExtraLanguageGeneratorContext
interface IExtraLanguageGeneratorContext
implements org.eclipse.xtext.generator.IGeneratorContext
The generator from SARL to the Python language.
Maven Group Identifier:
io.sarl.lang
Maven Artifact Identifier:
compiler
Since:
0.6
Property Summary
Modifier and type Property and description
org.eclipse.xtext.generator.IGeneratorContext delegate
Replies the delegate.
org.eclipse.xtext.xbase.typesystem.references.LightweightTypeReference expectedExpressionType
Replies the expected expression type in the context of a returnable expression
org.eclipse.xtext.generator.IFileSystemAccess2 fileSystemAccess
Replies the file system access.
java.util.Date generationDate
Replies the date of the generation.
java.util.UUID generationID
Replies an identifier for the generation.
java.lang.String preferenceID
Replies an identifier for the container of the generator's preferences.
org.eclipse.emf.ecore.resource.Resource resource
Replies the resource from which the generation is done.
IRootGenerator rootGenerator
Replies the root generator.
Action Summary
Modifier and type Action and description
abstract void clearData
Clear all stored data.
abstract IActionPrototypeContext getActionPrototypeContext(IActionPrototypeProvider)
Replies the context for the action prototype provider.
abstract T getData(String,Class<T>)
Replies the stored data with the given identifier.
abstract T getData(String,Class<T>,T)
Replies the stored data with the given identifier.
abstract org.eclipse.xtext.generator.IGeneratorContext getDelegate
Replies the delegate.
abstract org.eclipse.xtext.xbase.typesystem.references.LightweightTypeReference getExpectedExpressionType
Replies the expected expression type in the context of a returnable expression
abstract org.eclipse.xtext.generator.IFileSystemAccess2 getFileSystemAccess
Replies the file system access.
abstract java.util.Date getGenerationDate
Replies the date of the generation.
abstract java.util.UUID getGenerationID
Replies an identifier for the generation.
abstract java.util.List<E> getListData(String)
Replies the stored data with the given identifier.
abstract java.util.Map<K,V> getMapData(String)
Replies the stored data with the given identifier.
abstract java.util.Map<K,V> getMultimapData(String)
Replies the stored data with the given identifier.
abstract java.util.List<E> getMultimapValues(String,K)
Replies the stored data with the given identifier.
abstract java.lang.String getPreferenceID
Replies an identifier for the container of the generator's preferences.
abstract org.eclipse.emf.ecore.resource.Resource getResource
Replies the resource from which the generation is done.
abstract IRootGenerator getRootGenerator
Replies the root generator.
abstract java.util.Set<E> getSetData(String)
Replies the stored data with the given identifier.
abstract void setData(String,Object)
Store data with the given identifier.
abstract org.eclipse.xtext.xbase.typesystem.references.LightweightTypeReference setExpectedExpressionType(LightweightTypeReference)
Set the expected expression type in the context of a returnable expression
Property Details
delegate
val delegate : org.eclipse.xtext.generator.IGeneratorContext
Replies the delegate.

This property is an alias for the action: getDelegate

Returns:
the delegate.
expectedExpressionType
val expectedExpressionType : org.eclipse.xtext.xbase.typesystem.references.LightweightTypeReference
Replies the expected expression type in the context of a returnable expression

If the given generated expression should be the expression to be returned by a function, this function replies a type, otherwise null.

This property is an alias for the action: getExpectedExpressionType

Returns:
the expected type.
fileSystemAccess
val fileSystemAccess : org.eclipse.xtext.generator.IFileSystemAccess2
Replies the file system access.

This property is an alias for the action: getFileSystemAccess

Returns:
the file system access.
generationDate
val generationDate : java.util.Date
Replies the date of the generation.

This property is an alias for the action: getGenerationDate

Returns:
the date.
generationID
val generationID : java.util.UUID
Replies an identifier for the generation.

This property is an alias for the action: getGenerationID

Returns:
the identifier.
preferenceID
val preferenceID : java.lang.String
Replies an identifier for the container of the generator's preferences.

This property is an alias for the action: getPreferenceID

Returns:
the identifier.
Since:
0.8
resource
val resource : org.eclipse.emf.ecore.resource.Resource
Replies the resource from which the generation is done.

This property is an alias for the action: getResource

Returns:
the resource.
rootGenerator
val rootGenerator : IRootGenerator
Replies the root generator.

This property is an alias for the action: getRootGenerator

Returns:
the root generator.
Action Details
clearData
def clearData
Clear all stored data.
getActionPrototypeContext(IActionPrototypeProvider)
def getActionPrototypeContext(IActionPrototypeProvider) : IActionPrototypeContext
Replies the context for the action prototype provider.
Parameters:
provider - the provider for creating the context if it was not created.
Returns:
the context.
Since:
0.10
getData(String,Class<T>)
def getData(String,Class<T>) : T

with T

Replies the stored data with the given identifier. If the data was not found, the default value is replied.
Parameters:
<T> - the type of the data.
id - the identifier.
type - the type of the data.
Returns:
the data or the default value.
getData(String,Class<T>,T)
def getData(String,Class<T>,T) : T

with T

Replies the stored data with the given identifier. If the data was not found, the default value is replied.
Parameters:
<T> - the type of the data.
id - the identifier.
type - the type of the data.
defaultValue - the default value.
Returns:
the data or the default value.
getDelegate
def getDelegate : org.eclipse.xtext.generator.IGeneratorContext
Replies the delegate.
Returns:
the delegate.
getExpectedExpressionType
def getExpectedExpressionType : org.eclipse.xtext.xbase.typesystem.references.LightweightTypeReference
Replies the expected expression type in the context of a returnable expression

If the given generated expression should be the expression to be returned by a function, this function replies a type, otherwise null.
Returns:
the expected type.
getFileSystemAccess
def getFileSystemAccess : org.eclipse.xtext.generator.IFileSystemAccess2
Replies the file system access.
Returns:
the file system access.
getGenerationDate
def getGenerationDate : java.util.Date
Replies the date of the generation.
Returns:
the date.
getGenerationID
def getGenerationID : java.util.UUID
Replies an identifier for the generation.
Returns:
the identifier.
getListData(String)
def getListData(String) : java.util.List<E>

with T

Replies the stored data with the given identifier. If the data was not found, the default value is replied.
Parameters:
<T> - the type of the data.
id - the identifier.
Returns:
the data or the default value.
getMapData(String)
def getMapData(String) : java.util.Map<K,V>

with K, V

Replies the stored data with the given identifier. If the data was not found, the default value is replied.
Parameters:
<K> - the type of the keys.
<V> - the type of the values.
id - the identifier.
Returns:
the data or the default value.
Since:
0.8
getMultimapData(String)
def getMultimapData(String) : java.util.Map<K,V>

with K, V

Replies the stored data with the given identifier. If the data was not found, the default value is replied.
Parameters:
<K> - the type of the keys.
<V> - the type of the values.
id - the identifier.
Returns:
the data or the default value.
Since:
0.8
getMultimapValues(String,K)
def getMultimapValues(String,K) : java.util.List<E>

with K, V

Replies the stored data with the given identifier. If the data was not found, the default value is replied.
Parameters:
<K> - the type of the keys.
<V> - the type of the values.
id - the identifier of the multimap.
multimapKey - the key within the multimap.
Returns:
the data or the default value.
Since:
0.8
getPreferenceID
def getPreferenceID : java.lang.String
Replies an identifier for the container of the generator's preferences.
Returns:
the identifier.
Since:
0.8
getResource
def getResource : org.eclipse.emf.ecore.resource.Resource
Replies the resource from which the generation is done.
Returns:
the resource.
getRootGenerator
def getRootGenerator : IRootGenerator
Replies the root generator.
Returns:
the root generator.
getSetData(String)
def getSetData(String) : java.util.Set<E>

with T

Replies the stored data with the given identifier. If the data was not found, the default value is replied.
Parameters:
<T> - the type of the data.
id - the identifier.
Returns:
the data or the default value.
Since:
0.8
setData(String,Object)
def setData(String,Object)
Store data with the given identifier.
Parameters:
id - the identifier.
value - the value.
setExpectedExpressionType(LightweightTypeReference)
def setExpectedExpressionType(LightweightTypeReference) : org.eclipse.xtext.xbase.typesystem.references.LightweightTypeReference
Set the expected expression type in the context of a returnable expression

If the given generated expression should be the expression to be returned by a function, this function replies a type, otherwise null.
Parameters:
expectedType - the expected type, or null if the expression is not expected to be returned by a function.
Returns:
the value of the property before the change.