public class ASResourceFactoryRegistry
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ASResourceFactoryRegistry.ContributionFunction |
static class |
ASResourceFactoryRegistry.ExternalResourcePredicate |
static class |
ASResourceFactoryRegistry.LoadedResourcePredicate |
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,ASResourceFactoryContribution> |
contentType2resourceFactory |
protected java.util.Map<java.lang.String,ASResourceFactoryContribution> |
extension2resourceFactory |
static ASResourceFactoryRegistry |
INSTANCE |
protected java.util.Map<java.lang.String,ASResourceFactoryContribution> |
resourceClassName2resourceFactory |
Constructor and Description |
---|
ASResourceFactoryRegistry() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
addASResourceFactory(java.lang.String contentType,
java.lang.String oclasExtension,
java.lang.String resourceClassName,
ASResourceFactoryContribution asResourceFactory) |
void |
configureResourceSet(org.eclipse.emf.ecore.resource.ResourceSet resourceSet) |
EnvironmentFactoryInternal |
createEnvironmentFactory(ProjectManager projectManager,
org.eclipse.emf.ecore.resource.ResourceSet externalResourceSet)
Create a new EnvironmentFactory appropriate to the resources in ResourceSet.
|
ASResourceFactoryContribution |
get(java.lang.String contentType) |
ASResourceFactory |
getASResourceFactory(org.eclipse.emf.ecore.resource.Resource resource)
Return the ASResourceFactory to be used in association with a particular resource.
|
ASResourceFactory |
getASResourceFactoryForExtension(java.lang.String extension) |
java.lang.Iterable<ASResourceFactory> |
getExternalResourceFactories() |
java.lang.Iterable<ASResourceFactory> |
getLoadedResourceFactories() |
Technology |
getTechnology()
Determine the getTechnology appropriate to the registered ASResourceFactories.
|
void |
remove(java.lang.String contentType,
java.lang.String extension,
java.lang.String resourceClassName) |
@NonNull public static final ASResourceFactoryRegistry INSTANCE
@NonNull protected final java.util.Map<java.lang.String,ASResourceFactoryContribution> contentType2resourceFactory
@NonNull protected final java.util.Map<java.lang.String,ASResourceFactoryContribution> extension2resourceFactory
@NonNull protected final java.util.Map<java.lang.String,ASResourceFactoryContribution> resourceClassName2resourceFactory
public java.lang.Object addASResourceFactory(@Nullable java.lang.String contentType, @Nullable java.lang.String oclasExtension, @Nullable java.lang.String resourceClassName, @NonNull ASResourceFactoryContribution asResourceFactory)
public void configureResourceSet(@NonNull org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
@NonNull public EnvironmentFactoryInternal createEnvironmentFactory(@NonNull ProjectManager projectManager, @Nullable org.eclipse.emf.ecore.resource.ResourceSet externalResourceSet)
@Nullable public ASResourceFactoryContribution get(@NonNull java.lang.String contentType)
@Nullable public ASResourceFactory getASResourceFactory(@NonNull org.eclipse.emf.ecore.resource.Resource resource)
For an ASResource, the ASResourceFactory is directly accessible.
For a CSResource, the CSResourceFactory is directly related to the CSResource class.
For more general resources, inheritance from defined correspondences is used. Thus the UMLASResourceFactory is defined for the UMLResource interface and so is used for all variants of derived UMLResource class. Inheritance is determined by registered class name to avoid loading the UML support plugins when UML is not in use.
In the absence of a configured selection an EcoreASResourceFactory is used.
@Nullable public ASResourceFactory getASResourceFactoryForExtension(@Nullable java.lang.String extension)
public java.lang.Iterable<ASResourceFactory> getExternalResourceFactories()
public java.lang.Iterable<ASResourceFactory> getLoadedResourceFactories()
@NonNull public Technology getTechnology()
public void remove(@Nullable java.lang.String contentType, @Nullable java.lang.String extension, @Nullable java.lang.String resourceClassName)