Package com._1c.g5.v8.dt.bsl.bm
Class BslBmLinkProvider
java.lang.Object
com._1c.g5.v8.dt.bm.xtext.XtextBmLinkProvider
com._1c.g5.v8.dt.bsl.bm.BslBmLinkProvider
- All Implemented Interfaces:
IBmExternalUriResolver
Special
XtextBmLinkProvider for Bsl module. The class provides and contains resources for bsl modules-
Field Summary
Fields inherited from class com._1c.g5.v8.dt.bm.xtext.XtextBmLinkProvider
extension, resourceSetProvider -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.eclipse.emf.ecore.resource.ResourcecheckResourceInResourceSet(org.eclipse.emf.common.util.URI uri, org.eclipse.emf.ecore.resource.Resource loadedResource) Additional checking for resource - is it contained in resource set or notprotected booleanfileExist(org.eclipse.emf.common.util.URI uriTrim) Checks that file for reading content of the resource existprotected intgetCacheEntryWeight(org.eclipse.emf.common.util.URI uri, org.eclipse.emf.ecore.resource.Resource loadedResource) Calculates the cache entry weight.protected voidinitResource(org.eclipse.emf.ecore.resource.Resource newResource) Initialize resourceprotected booleanneedCacheResource(org.eclipse.emf.common.util.URI uri) Checks that resource creating by thisfileneed to be cachedbooleansupports(org.eclipse.emf.common.util.URI uri) Checks if the specified URI is supported.Methods inherited from class com._1c.g5.v8.dt.bm.xtext.XtextBmLinkProvider
cleanUp, clear, createCache, createResource, getObject, getProject, getResource, isPassthrough, isResourceLoaded, loadResource, onRemoval, remove, resetCaches, toResourceFileName, update
-
Constructor Details
-
BslBmLinkProvider
public BslBmLinkProvider()
-
-
Method Details
-
supports
public boolean supports(org.eclipse.emf.common.util.URI uri) Description copied from interface:IBmExternalUriResolverChecks if the specified URI is supported.- Specified by:
supportsin interfaceIBmExternalUriResolver- Overrides:
supportsin classXtextBmLinkProvider- Parameters:
uri- The URI to run the check against. May not benull.- Returns:
trueif the URI is supported by this resolver, otherwisefalse.
-
initResource
protected void initResource(org.eclipse.emf.ecore.resource.Resource newResource) Description copied from class:XtextBmLinkProviderInitialize resource- Overrides:
initResourcein classXtextBmLinkProvider- Parameters:
newResource- initializing resource, can't benull
-
needCacheResource
protected boolean needCacheResource(org.eclipse.emf.common.util.URI uri) Description copied from class:XtextBmLinkProviderChecks that resource creating by thisfileneed to be cached- Specified by:
needCacheResourcein classXtextBmLinkProvider- Returns:
trueif resource should be cached,falseotherwise
-
fileExist
protected boolean fileExist(org.eclipse.emf.common.util.URI uriTrim) Description copied from class:XtextBmLinkProviderChecks that file for reading content of the resource exist- Specified by:
fileExistin classXtextBmLinkProvider- Parameters:
uriTrim- uri of the reading resource, can't benull- Returns:
trueif file for reading content of the resource exist,falseotherwise
-
checkResourceInResourceSet
protected org.eclipse.emf.ecore.resource.Resource checkResourceInResourceSet(org.eclipse.emf.common.util.URI uri, org.eclipse.emf.ecore.resource.Resource loadedResource) Description copied from class:XtextBmLinkProviderAdditional checking for resource - is it contained in resource set or not- Overrides:
checkResourceInResourceSetin classXtextBmLinkProvider- Parameters:
uri- uri of the checking resource, can't benullloadedResource- loaded resource, can't benull- Returns:
- new loaded resource if needed or
loadedResouce, nevernull
-
getCacheEntryWeight
protected int getCacheEntryWeight(org.eclipse.emf.common.util.URI uri, org.eclipse.emf.ecore.resource.Resource loadedResource) Description copied from class:XtextBmLinkProviderCalculates the cache entry weight.- Overrides:
getCacheEntryWeightin classXtextBmLinkProvider- Parameters:
uri- the URI of resource, cannot benull.loadedResource- the loaded resource, cannot benull.- Returns:
- the cache entry weight, When the weight of an entry is zero it will not be considered for size-based eviction(though it still may be evicted by other means).
- See Also:
-
CacheBuilder.weigher(com.google.common.cache.Weigher)
-