Package de.gebit.integrity.scoping
Class DSLScopeProvider
- java.lang.Object
-
- org.eclipse.xtext.scoping.impl.AbstractScopeProvider
-
- org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider
-
- de.gebit.integrity.scoping.DSLScopeProvider
-
- All Implemented Interfaces:
org.eclipse.xtext.scoping.impl.IDelegatingScopeProvider,org.eclipse.xtext.scoping.IScopeProvider
public class DSLScopeProvider extends org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProviderThis class contains custom scoping description. see : http://www.eclipse.org/Xtext/documentation/latest/xtext.html#scoping on how and when to use it- Author:
- Rene Schneider - initial API and implementation
-
-
Constructor Summary
Constructors Constructor Description DSLScopeProvider()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.eclipse.xtext.scoping.IScopedetermineDefaultResultEnumValueScope(MethodReference aMethodRef)Determine valid enumeration values for the default result type of the provided fixture method reference.protected org.eclipse.xtext.scoping.IScopedetermineNamedResultEnumValueScope(MethodReference aMethodRef, org.eclipse.xtext.common.types.JvmField aField)Determine valid enumeration values for the default result type of the provided fixture method reference.protected org.eclipse.xtext.scoping.IScopedetermineParameterEnumValueScope(MethodReference aMethodRef, ParameterName aParameterName)Determine valid enumeration values for the provided parameter name of the provided fixture method reference.static voidendFullBuildCycle()SeestartFullBuildCycle(), just in reverse.protected org.eclipse.xtext.scoping.IScopefilterPrivateElements(org.eclipse.xtext.scoping.IScope aScope, org.eclipse.emf.ecore.EObject aStatement)Filters all private elements out of a scope.protected List<org.eclipse.xtext.resource.IEObjectDescription>generateImportDescriptions(List<String> someImports, Map<String,List<org.eclipse.xtext.resource.IEObjectDescription>> anEntitiesPerPackageMap)Generates a list of import entity descriptions from a list of package imports and a map of descriptions per package.org.eclipse.xtext.scoping.IScopescope_EnumValue_enumValue(NamedResult aNamedResult, org.eclipse.emf.ecore.EReference aRef)Limit enum values in named test results to actually existent enumeration literals.org.eclipse.xtext.scoping.IScopescope_EnumValue_enumValue(Parameter aParameter, org.eclipse.emf.ecore.EReference aRef)Limits enumeration values in parameters to actually existent enumeration literals.org.eclipse.xtext.scoping.IScopescope_EnumValue_enumValue(ParameterTableValue aParameter, org.eclipse.emf.ecore.EReference aRef)Lists enumeration values in tabletest parameters (which can be actual parameters or results, depending on the header of the column).org.eclipse.xtext.scoping.IScopescope_EnumValue_enumValue(Test aTest, org.eclipse.emf.ecore.EReference aRef)Limit enum values in test results to actually existent enumeration literals.org.eclipse.xtext.scoping.IScopescope_FixedParameterName_annotation(FixedParameterName aParameterName, org.eclipse.emf.ecore.EReference aRef)Limits the fixed parameter names to those defined in a fixture method signature.org.eclipse.xtext.scoping.IScopescope_FixedResultName_field(Call aCall, org.eclipse.emf.ecore.EReference aRef)Limit named test results to actually existing fields in the result container object.org.eclipse.xtext.scoping.IScopescope_FixedResultName_field(TableTest aTableTest, org.eclipse.emf.ecore.EReference aRef)Limit named test results to actually existing fields in the result container object.org.eclipse.xtext.scoping.IScopescope_FixedResultName_field(Test aTest, org.eclipse.emf.ecore.EReference aRef)Limit named test results to actually existing fields in the result container object.org.eclipse.xtext.scoping.IScopescope_JavaConstantReference_constant(JavaConstantReference aConstantRef, org.eclipse.emf.ecore.EReference aRef)Limits Java constant references to "public static final" ones.org.eclipse.xtext.scoping.IScopescope_MethodReference_method(MethodReference aMethodRef, org.eclipse.emf.ecore.EReference aRef)Limits the fixture method references to actually existing methods with the necessary annotation.org.eclipse.xtext.scoping.IScopescope_Suite_definition(Suite aSuite, org.eclipse.emf.ecore.EReference aRef)>>>>>>> v0.15.x_bugfix This basically performs a default import on everything in the local file by adding another scope entry for all suite definitions in the current file.org.eclipse.xtext.scoping.IScopescope_Suite_fork(Suite aSuite, org.eclipse.emf.ecore.EReference aRef)Filters out private forks.org.eclipse.xtext.scoping.IScopescope_SuiteParameter_name(SuiteParameter aParameter, org.eclipse.emf.ecore.EReference aRef)Limits suite parameters to actually defined parameters.org.eclipse.xtext.scoping.IScopescope_SuiteReturn_name(Suite aSuite, org.eclipse.emf.ecore.EReference aRef)Determines the scope of SuiteReturns.org.eclipse.xtext.scoping.IScopescope_Variable_name(ConstantDefinition aConstantDefinition, org.eclipse.emf.ecore.EReference aRef)Determines variables/constants in scope for constant definitions.org.eclipse.xtext.scoping.IScopescope_Variable_name(Parameter aParam, org.eclipse.emf.ecore.EReference aRef)Prevents variables in parameters from being influenced by#scope_Variable_name(Call, EReference), and filters out variables defined as suite parameters in other suites.org.eclipse.xtext.scoping.IScopescope_Variable_name(Suite aSuite, org.eclipse.emf.ecore.EReference aRef)Determines variables/constants in scope for suite parameters.org.eclipse.xtext.scoping.IScopescope_Variable_name(TableTest aTableTest, org.eclipse.emf.ecore.EReference aRef)Determines variables/constants in scope for table test parameters or results.org.eclipse.xtext.scoping.IScopescope_Variable_name(Test aTest, org.eclipse.emf.ecore.EReference aRef)Determines variables/constants in scope for test parameters or results.org.eclipse.xtext.scoping.IScopescope_Variable_name(VariableDefinition aVariableDefinition, org.eclipse.emf.ecore.EReference aRef)<<<<<<< HEAD ======= Determines variables/constants in scope for variable definitions.org.eclipse.xtext.scoping.IScopescope_VariableVariable_name(Call aCall, org.eclipse.emf.ecore.EReference aRef)Limit result variables for calls to actual variables.static voidstartFullBuildCycle()Can be called to signify the start of a full build cycle.-
Methods inherited from class org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider
delegateGetScope, getDelegate, getErrorHandler, getPredicate, getPredicate, getScope, polymorphicFindScopeForClassName, polymorphicFindScopeForReferenceName, setDelegate, setErrorHandler
-
-
-
-
Method Detail
-
scope_FixedParameterName_annotation
public org.eclipse.xtext.scoping.IScope scope_FixedParameterName_annotation(FixedParameterName aParameterName, org.eclipse.emf.ecore.EReference aRef)
Limits the fixed parameter names to those defined in a fixture method signature.- Parameters:
aParameterName-aRef-- Returns:
-
scope_MethodReference_method
public org.eclipse.xtext.scoping.IScope scope_MethodReference_method(MethodReference aMethodRef, org.eclipse.emf.ecore.EReference aRef)
Limits the fixture method references to actually existing methods with the necessary annotation.- Parameters:
aMethodRef-aRef-- Returns:
-
scope_JavaConstantReference_constant
public org.eclipse.xtext.scoping.IScope scope_JavaConstantReference_constant(JavaConstantReference aConstantRef, org.eclipse.emf.ecore.EReference aRef)
Limits Java constant references to "public static final" ones.- Parameters:
aConstantRef-aRef-- Returns:
-
scope_SuiteParameter_name
public org.eclipse.xtext.scoping.IScope scope_SuiteParameter_name(SuiteParameter aParameter, org.eclipse.emf.ecore.EReference aRef)
Limits suite parameters to actually defined parameters.- Parameters:
aParameter-aRef-- Returns:
-
determineParameterEnumValueScope
protected org.eclipse.xtext.scoping.IScope determineParameterEnumValueScope(MethodReference aMethodRef, ParameterName aParameterName)
Determine valid enumeration values for the provided parameter name of the provided fixture method reference.- Parameters:
aMethodRef-aParameterName-- Returns:
-
determineDefaultResultEnumValueScope
protected org.eclipse.xtext.scoping.IScope determineDefaultResultEnumValueScope(MethodReference aMethodRef)
Determine valid enumeration values for the default result type of the provided fixture method reference.- Parameters:
aMethodRef-- Returns:
-
determineNamedResultEnumValueScope
protected org.eclipse.xtext.scoping.IScope determineNamedResultEnumValueScope(MethodReference aMethodRef, org.eclipse.xtext.common.types.JvmField aField)
Determine valid enumeration values for the default result type of the provided fixture method reference.- Parameters:
aMethodRef-- Returns:
-
scope_EnumValue_enumValue
public org.eclipse.xtext.scoping.IScope scope_EnumValue_enumValue(Parameter aParameter, org.eclipse.emf.ecore.EReference aRef)
Limits enumeration values in parameters to actually existent enumeration literals.- Parameters:
aParameter-aRef-- Returns:
-
scope_EnumValue_enumValue
public org.eclipse.xtext.scoping.IScope scope_EnumValue_enumValue(ParameterTableValue aParameter, org.eclipse.emf.ecore.EReference aRef)
Lists enumeration values in tabletest parameters (which can be actual parameters or results, depending on the header of the column).- Parameters:
aParameter-aRef-- Returns:
-
scope_EnumValue_enumValue
public org.eclipse.xtext.scoping.IScope scope_EnumValue_enumValue(Test aTest, org.eclipse.emf.ecore.EReference aRef)
Limit enum values in test results to actually existent enumeration literals.- Parameters:
aTest-aRef-- Returns:
-
scope_EnumValue_enumValue
public org.eclipse.xtext.scoping.IScope scope_EnumValue_enumValue(NamedResult aNamedResult, org.eclipse.emf.ecore.EReference aRef)
Limit enum values in named test results to actually existent enumeration literals.- Parameters:
aNamedResult-aRef-- Returns:
-
scope_FixedResultName_field
public org.eclipse.xtext.scoping.IScope scope_FixedResultName_field(Test aTest, org.eclipse.emf.ecore.EReference aRef)
Limit named test results to actually existing fields in the result container object.- Parameters:
aTest-aRef-- Returns:
-
scope_FixedResultName_field
public org.eclipse.xtext.scoping.IScope scope_FixedResultName_field(Call aCall, org.eclipse.emf.ecore.EReference aRef)
Limit named test results to actually existing fields in the result container object.- Parameters:
aCall-aRef-- Returns:
-
scope_FixedResultName_field
public org.eclipse.xtext.scoping.IScope scope_FixedResultName_field(TableTest aTableTest, org.eclipse.emf.ecore.EReference aRef)
Limit named test results to actually existing fields in the result container object.- Parameters:
aTableTest-aRef-- Returns:
-
scope_VariableVariable_name
public org.eclipse.xtext.scoping.IScope scope_VariableVariable_name(Call aCall, org.eclipse.emf.ecore.EReference aRef)
Limit result variables for calls to actual variables.- Parameters:
aCall-aRef-- Returns:
-
scope_Variable_name
public org.eclipse.xtext.scoping.IScope scope_Variable_name(Parameter aParam, org.eclipse.emf.ecore.EReference aRef)
Prevents variables in parameters from being influenced by#scope_Variable_name(Call, EReference), and filters out variables defined as suite parameters in other suites.- Parameters:
aParam-aRef-- Returns:
-
scope_Variable_name
public org.eclipse.xtext.scoping.IScope scope_Variable_name(TableTest aTableTest, org.eclipse.emf.ecore.EReference aRef)
Determines variables/constants in scope for table test parameters or results.- Parameters:
aTableTestRow-aRef-- Returns:
-
scope_Variable_name
public org.eclipse.xtext.scoping.IScope scope_Variable_name(Test aTest, org.eclipse.emf.ecore.EReference aRef)
Determines variables/constants in scope for test parameters or results.- Parameters:
aTest-aRef-- Returns:
-
scope_Variable_name
public org.eclipse.xtext.scoping.IScope scope_Variable_name(Suite aSuite, org.eclipse.emf.ecore.EReference aRef)
Determines variables/constants in scope for suite parameters.- Returns:
-
scope_Variable_name
public org.eclipse.xtext.scoping.IScope scope_Variable_name(VariableDefinition aVariableDefinition, org.eclipse.emf.ecore.EReference aRef)
<<<<<<< HEAD ======= Determines variables/constants in scope for variable definitions.- Returns:
-
scope_Variable_name
public org.eclipse.xtext.scoping.IScope scope_Variable_name(ConstantDefinition aConstantDefinition, org.eclipse.emf.ecore.EReference aRef)
Determines variables/constants in scope for constant definitions.- Returns:
-
scope_Suite_definition
public org.eclipse.xtext.scoping.IScope scope_Suite_definition(Suite aSuite, org.eclipse.emf.ecore.EReference aRef)
>>>>>>> v0.15.x_bugfix This basically performs a default import on everything in the local file by adding another scope entry for all suite definitions in the current file.- Parameters:
aSuite-aRef-- Returns:
-
scope_Suite_fork
public org.eclipse.xtext.scoping.IScope scope_Suite_fork(Suite aSuite, org.eclipse.emf.ecore.EReference aRef)
Filters out private forks.- Parameters:
aSuite-aRef-- Returns:
-
scope_SuiteReturn_name
public org.eclipse.xtext.scoping.IScope scope_SuiteReturn_name(Suite aSuite, org.eclipse.emf.ecore.EReference aRef)
Determines the scope of SuiteReturns.- Parameters:
aSuite-aRef-- Returns:
-
startFullBuildCycle
public static void startFullBuildCycle()
Can be called to signify the start of a full build cycle. Must be done from the Xtext builder, which cannot be a dependency of this scope provider, thus this is exported as an API for the .ui package to be used.
-
endFullBuildCycle
public static void endFullBuildCycle()
SeestartFullBuildCycle(), just in reverse.
-
generateImportDescriptions
protected List<org.eclipse.xtext.resource.IEObjectDescription> generateImportDescriptions(List<String> someImports, Map<String,List<org.eclipse.xtext.resource.IEObjectDescription>> anEntitiesPerPackageMap)
Generates a list of import entity descriptions from a list of package imports and a map of descriptions per package.- Parameters:
someImports-anEntitiesPerPackageMap-- Returns:
-
filterPrivateElements
protected org.eclipse.xtext.scoping.IScope filterPrivateElements(org.eclipse.xtext.scoping.IScope aScope, org.eclipse.emf.ecore.EObject aStatement)Filters all private elements out of a scope. This wraps the given scope in aFilteringScope.- Parameters:
aScope-aStatement-- Returns:
-
-