public abstract class AbstractEnvironmentFactory extends AbstractCustomizable implements EnvironmentFactoryInternal.EnvironmentFactoryInternalExtension
EnvironmentFactoryInternal interface, useful
for subclassing to define the Pivot binding for a metamodel.EnvironmentFactoryInternal.EnvironmentFactoryInternalExtensionEnvironmentFactory.EnvironmentFactoryExtension, EnvironmentFactory.EnvironmentFactoryExtension2| Modifier and Type | Field and Description |
|---|---|
static TracingOption |
ENVIRONMENT_FACTORY_ATTACH |
| Modifier and Type | Method and Description |
|---|---|
EnvironmentFactoryAdapter |
adapt(Notifier notifier) |
void |
addExternal2AS(External2AS external2as) |
void |
addExternalResources(ResourceSet resourceSet)
Add all resources in ResourceSet to the externalResourceSet.
|
void |
attach(Object object) |
void |
configureLoadFirstStrategy()
Configure the PackageRegistry associated with the (external) ResourceSet to use a load strategy that uses whichever of
the namespace or platform URI is first encountered and which suppresses diagnostics about subsequent use of the
other form of URI.
|
void |
configureLoadStrategy(ProjectManager.IResourceLoadStrategy packageLoadStrategy,
ProjectManager.IConflictHandler conflictHandler)
Configure the PackageRegistry associated with the (external) ResourceSet to use a packageLoadStrategy and conflictHandler when
resolving namespace and platform URIs.
|
ResourceSetImpl |
createASResourceSet()
Create and initialize the AS ResourceSet used by metamodelManager to contain the AS forms of CS and Ecore/UML resources.
|
CompleteEnvironmentInternal |
createCompleteEnvironment() |
EvaluationEnvironment |
createEvaluationEnvironment(EvaluationEnvironment parent,
NamedElement executableObject)
Deprecated.
no longer used
|
EvaluationEnvironment |
createEvaluationEnvironment(NamedElement executableObject,
ModelManager modelManager)
Creates a new evaluation environment to track the values of variables in
an OCL expression as it is evaluated.
|
EvaluationVisitor |
createEvaluationVisitor(EvaluationEnvironment evaluationEnvironment)
Creates a new evaluation visitor, for the evaluation of OCL expressions.
|
EvaluationVisitor |
createEvaluationVisitor(Object context,
ExpressionInOCL expression,
ModelManager modelManager)
Creates a new evaluation visitor, for the evaluation of an OCL expression on a context using an environment and a modelManager.
|
ExecutorInternal |
createExecutor(ModelManager modelManager)
Create an Executor for OCL evaluation.
|
IdResolver |
createIdResolver()
Create and initialize the IdResolver used by metamodelManager to convert Ids to Elements.
|
ImplementationManager |
createImplementationManager() |
PivotMetamodelManager |
createMetamodelManager() |
ModelManager |
createModelManager(Object object)
Creates an extent map for invocation of OclType.allInstances()
using the specified
object as a context from which to find
the scope in which OCL classifier extents are defined. |
OCLInternal |
createOCL()
Creates a new
OCL instance attached to this EnvironmentFactory. |
ParserContext |
createParserContext(EObject context)
Deprecated.
|
TemplateParameterSubstitutionVisitor |
createTemplateParameterSubstitutionVisitor(Type selfType,
Type selfTypeValue)
Create a visitor to resolve TemplateParameter specializations.
|
void |
detach(Object zobject) |
void |
dispose() |
<T> T |
getAdapter(Class<T> adapterType)
The abstract environment factory implementation is adaptable.
|
Class |
getASClass(String className)
Return the pivot model class for className with the Pivot Model.
|
<T extends Element> |
getASOf(Class<T> pivotClass,
EObject eObject) |
CompleteEnvironmentInternal |
getCompleteEnvironment()
Return the CompleteEnvironment that supervises the additional types need for collections specializations and tuples.
|
CompleteModelInternal |
getCompleteModel()
Return the CompleteModel that contains all the CompletePackages, which in turn contain all the CompleteClasses that
define the merge of individual Packages and Classes.
|
ICSI2ASMapping |
getCSI2ASMapping() |
String |
getDoSetupName(URI uri) |
IdResolver |
getIdResolver()
Return the IdResolver that performs the resolution of the lightweight usage-independent Ids of types and packages
into the full usage-specific equivalents.
|
PivotMetamodelManager |
getMetamodelManager()
Return the MetamodelManager used to supervise the normalized Abstract Syntax representations of the metamodels.
|
ProjectManager |
getProjectManager()
Return the ProjectMap used to resolve EPackages.
|
ResourceSet |
getResourceSet()
Return the external ResourceSet used to hold External Syntax (e.g.
|
StatusCodes.Severity |
getSeverity(Object validationKey)
Return the StatusCodes severity with which the validation identified by validationKey is reported.
|
StandardLibraryInternal |
getStandardLibrary()
Return the (OCL) Standard Library that provides the build-in language facilities such as the OclAny and Set types.
|
Technology |
getTechnology() |
boolean |
isDisposed()
Return true if this EnvironmentFactory's life cycle has completed.
|
boolean |
isEvaluationTracingEnabled()
Queries whether tracing of evaluation is enabled.
|
EPackage |
loadEPackage(EPackage ePackage)
Ensure that EPackage has been loaded in the externalResourceSet PackageRegistry.
|
Element |
loadResource(Resource resource,
URI uri) |
ExpressionInOCL |
parseSpecification(LanguageExpression specification)
Return the compiled query for a specification resolving a String body into a non-null bodyExpression.
|
void |
resetSeverities() |
void |
setCSI2ASMapping(ICSI2ASMapping csi2asMapping) |
void |
setEvaluationTracingEnabled(boolean b)
Sets whether tracing of evaluation is enabled.
|
void |
setProject(IProject project)
Specify an Eclipse project with respect to which project-specific preferences are resolved.
|
void |
setSafeNavigationValidationSeverity(StatusCodes.Severity severity)
Configure safe navigation validation severities.
|
StatusCodes.Severity |
setSeverity(Object validationKey,
StatusCodes.Severity severity)
Define the StatusCodes severity with which the validation identified by validationKey is reported.
|
clearOptions, getOptions, getValue, isEnabled, putOptions, removeOption, removeOptions, setOptionequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclearOptions, getOptions, getValue, isEnabled, putOptions, removeOption, removeOptions, setOptionpublic static final TracingOption ENVIRONMENT_FACTORY_ATTACH
public EnvironmentFactoryAdapter adapt(Notifier notifier)
adapt in interface EnvironmentFactorypublic void addExternal2AS(External2AS external2as)
addExternal2AS in interface EnvironmentFactoryInternalpublic void addExternalResources(ResourceSet resourceSet)
addExternalResources in interface EnvironmentFactoryInternalpublic void attach(Object object)
attach in interface EnvironmentFactoryInternalpublic void configureLoadFirstStrategy()
EnvironmentFactoryInternalconfigureLoadFirstStrategy in interface EnvironmentFactoryInternalpublic void configureLoadStrategy(ProjectManager.IResourceLoadStrategy packageLoadStrategy, ProjectManager.IConflictHandler conflictHandler)
EnvironmentFactoryInternalconfigureLoadStrategy in interface EnvironmentFactoryInternalpublic ResourceSetImpl createASResourceSet()
EnvironmentFactoryInternalcreateASResourceSet in interface EnvironmentFactoryInternalpublic CompleteEnvironmentInternal createCompleteEnvironment()
createCompleteEnvironment in interface EnvironmentFactoryInternalpublic EvaluationEnvironment createEvaluationEnvironment(NamedElement executableObject, ModelManager modelManager)
EnvironmentFactorycreateEvaluationEnvironment in interface EnvironmentFactory@Deprecated public EvaluationEnvironment createEvaluationEnvironment(EvaluationEnvironment parent, NamedElement executableObject)
createEvaluationEnvironment in interface EnvironmentFactorypublic EvaluationVisitor createEvaluationVisitor(Object context, ExpressionInOCL expression, ModelManager modelManager)
EnvironmentFactorycreateEvaluationVisitor in interface EnvironmentFactorypublic EvaluationVisitor createEvaluationVisitor(EvaluationEnvironment evaluationEnvironment)
EnvironmentFactorycreateEvaluationVisitor in interface EnvironmentFactoryevaluationEnvironment - the evaluation environment that the visitor is to use
for tracking variables, navigating properties, etc.public ExecutorInternal createExecutor(ModelManager modelManager)
EnvironmentFactory.EnvironmentFactoryExtensioncreateExecutor in interface EnvironmentFactory.EnvironmentFactoryExtensionpublic IdResolver createIdResolver()
EnvironmentFactoryInternalcreateIdResolver in interface EnvironmentFactoryInternalpublic ImplementationManager createImplementationManager()
createImplementationManager in interface EnvironmentFactoryInternalpublic PivotMetamodelManager createMetamodelManager()
createMetamodelManager in interface EnvironmentFactoryInternalpublic ModelManager createModelManager(Object object)
object as a context from which to find
the scope in which OCL classifier extents are defined. This scope may
be a resource, resource set, or some metamodel-specific scope. Note that
in the case that the object is not an
EObject but is, instead, some primitive
type, then this may be difficult to determine.
Clients are encouraged to do what they can to optimize this mapping, by
lazy initialization of key-value pairs, workspace indices, or whatever
means is available. Note that the map will only ever be accessed by
key (Map.get(java.lang.Object)); it will never be queried for
all entries, all keys, all values, etc. This knowledge could help
optimization.
createModelManager in interface EnvironmentFactoryobject - a context object in the scope that covers the OCL
classifier extentspublic OCLInternal createOCL()
EnvironmentFactoryCreates a new OCL instance attached to this EnvironmentFactory.
Clients should call OCL.dispose() to detach once they have no further use for
the OCL.
createOCL in interface EnvironmentFactoryInternalcreateOCL in interface EnvironmentFactoryOCL instance attached to this EnvironmentFactory@Deprecated public ParserContext createParserContext(EObject context) throws ParserException
EnvironmentFactoryInternalcreateParserContext in interface EnvironmentFactoryInternalcreateParserContext in interface EnvironmentFactory.EnvironmentFactoryExtension2ParserExceptionpublic TemplateParameterSubstitutionVisitor createTemplateParameterSubstitutionVisitor(Type selfType, Type selfTypeValue)
EnvironmentFactoryInternal.EnvironmentFactoryInternalExtensioncreateTemplateParameterSubstitutionVisitor in interface EnvironmentFactoryInternal.EnvironmentFactoryInternalExtensionpublic void detach(Object zobject)
detach in interface EnvironmentFactoryInternalpublic void dispose()
dispose in interface EnvironmentFactoryInternalpublic Class getASClass(String className)
getASClass in interface EnvironmentFactory.EnvironmentFactoryExtension2public <T extends Element> T getASOf(Class<T> pivotClass, EObject eObject) throws ParserException
getASOf in interface EnvironmentFactory.EnvironmentFactoryExtension2ParserExceptionpublic <T> T getAdapter(Class<T> adapterType)
Subclasses may override or extend this implementation.
getAdapter in interface AdaptablegetAdapter in class AbstractCustomizableT - the requested adapter interfaceadapterType - the requested adapter interfacenull
if this environment does not adapt to itpublic CompleteEnvironmentInternal getCompleteEnvironment()
EnvironmentFactorygetCompleteEnvironment in interface EnvironmentFactoryInternalgetCompleteEnvironment in interface EnvironmentFactorypublic CompleteModelInternal getCompleteModel()
EnvironmentFactorygetCompleteModel in interface EnvironmentFactoryInternalgetCompleteModel in interface EnvironmentFactorypublic ICSI2ASMapping getCSI2ASMapping()
getCSI2ASMapping in interface EnvironmentFactoryInternalpublic String getDoSetupName(URI uri)
getDoSetupName in interface EnvironmentFactoryInternalpublic IdResolver getIdResolver()
EnvironmentFactorygetIdResolver in interface EnvironmentFactorypublic PivotMetamodelManager getMetamodelManager()
EnvironmentFactorygetMetamodelManager in interface EnvironmentFactoryInternalgetMetamodelManager in interface EnvironmentFactorypublic ProjectManager getProjectManager()
getProjectManager in interface EnvironmentFactorypublic ResourceSet getResourceSet()
EnvironmentFactorygetResourceSet in interface EnvironmentFactorypublic StatusCodes.Severity getSeverity(Object validationKey)
EnvironmentFactorygetSeverity in interface EnvironmentFactorypublic StandardLibraryInternal getStandardLibrary()
EnvironmentFactorygetStandardLibrary in interface EnvironmentFactoryInternalgetStandardLibrary in interface EnvironmentFactorypublic Technology getTechnology()
getTechnology in interface EnvironmentFactoryInternalpublic boolean isDisposed()
EnvironmentFactory.EnvironmentFactoryExtension2isDisposed in interface EnvironmentFactory.EnvironmentFactoryExtension2public boolean isEvaluationTracingEnabled()
In an Eclipse environment, tracing is also enabled by turning on the org.eclipse.ocl/debug/evaluation debug option.
isEvaluationTracingEnabled in interface EnvironmentFactory.EnvironmentFactoryExtensionsetEvaluationTracingEnabled(boolean)public EPackage loadEPackage(EPackage ePackage)
EnvironmentFactoryInternalloadEPackage in interface EnvironmentFactoryInternalpublic Element loadResource(Resource resource, URI uri) throws ParserException
loadResource in interface EnvironmentFactoryInternalParserExceptionpublic ExpressionInOCL parseSpecification(LanguageExpression specification) throws ParserException
parseSpecification in interface EnvironmentFactory.EnvironmentFactoryExtension2ParserExceptionpublic void resetSeverities()
public void setCSI2ASMapping(ICSI2ASMapping csi2asMapping)
setCSI2ASMapping in interface EnvironmentFactoryInternalpublic void setEvaluationTracingEnabled(boolean b)
In an Eclipse environment, tracing is also enabled by turning on the org.eclipse.ocl/debug/evaluation debug option.
param b whether evaluation tracing is enabledsetEvaluationTracingEnabled in interface EnvironmentFactoryInternalisEvaluationTracingEnabled()public void setProject(IProject project)
EnvironmentFactoryInternalsetProject in interface EnvironmentFactoryInternalpublic void setSafeNavigationValidationSeverity(StatusCodes.Severity severity)
setSafeNavigationValidationSeverity in interface EnvironmentFactoryInternalpublic StatusCodes.Severity setSeverity(Object validationKey, StatusCodes.Severity severity)
EnvironmentFactorysetSeverity in interface EnvironmentFactoryCopyright © 2005, 2018 IBM Corporation and others. All Rights Reserved.