public class EMFModelProvider extends ModelProvider
ModelProvider
will be used to provide the logical model associated with
EMF models.
Concretely, an EMF model can span multiple physical resources (fragmented models); this model provider can be used to find all of these associated physical resources.
Modifier and Type | Field and Description |
---|---|
static long |
CACHE_EXPIRATION
The expiration timeout for our logical model cache values.
|
static String |
PROVIDER_ID
ID of this model provider.
|
RESOURCE_MODEL_PROVIDER_ID
Constructor and Description |
---|
EMFModelProvider()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the caches of this provider.
|
ResourceMapping[] |
getMappings(IResource resource,
ResourceMappingContext context,
IProgressMonitor monitor) |
equals, getDescriptor, getId, getMappings, getMappings, getModelProviderDescriptor, getModelProviderDescriptors, getTraversals, hashCode, init, initialize, validateChange
getAdapter
public static final String PROVIDER_ID
public static final long CACHE_EXPIRATION
returned mappings
might
reflect a stale view of the files' logical models, but we expect said logical traversals not to change
that often.
Basically, the mappings are used by the platform to determine whether a file can be moved, replaced or compared alone or if in the contrary the action's scope must be expanded, and thus we can cache the "local" computation (this model provider won't use remote context information). A more accurate mapping will be determined later on.
public ResourceMapping[] getMappings(IResource resource, ResourceMappingContext context, IProgressMonitor monitor) throws CoreException
public void clear()
Copyright (c) 2006, 2014 Obeo and others. All rights reserved.