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
public class BslBmLinkProvider extends XtextBmLinkProvider
SpecialXtextBmLinkProvider
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 Constructor Description BslBmLinkProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.eclipse.emf.ecore.resource.Resource
checkResourceInResourceSet(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 boolean
fileExist(org.eclipse.emf.common.util.URI uriTrim)
Checks that file for reading content of the resource existprotected int
getCacheEntryWeight(org.eclipse.emf.common.util.URI uri, org.eclipse.emf.ecore.resource.Resource loadedResource)
Calculates the cache entry weight.protected void
initResource(org.eclipse.emf.ecore.resource.Resource newResource)
Initialize resourceprotected boolean
needCacheResource(org.eclipse.emf.common.util.URI uri)
Checks that resource creating by thisfile
need to be cachedboolean
supports(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, toResourceFileName, update
-
-
-
-
Method Detail
-
supports
public boolean supports(org.eclipse.emf.common.util.URI uri)
Description copied from interface:IBmExternalUriResolver
Checks if the specified URI is supported.- Specified by:
supports
in interfaceIBmExternalUriResolver
- Overrides:
supports
in classXtextBmLinkProvider
- Parameters:
uri
- The URI to run the check against. May not benull
.- Returns:
true
if the URI is supported by this resolver, otherwisefalse
.
-
initResource
protected void initResource(org.eclipse.emf.ecore.resource.Resource newResource)
Description copied from class:XtextBmLinkProvider
Initialize resource- Overrides:
initResource
in classXtextBmLinkProvider
- Parameters:
newResource
- initializing resource, can't benull
-
needCacheResource
protected boolean needCacheResource(org.eclipse.emf.common.util.URI uri)
Description copied from class:XtextBmLinkProvider
Checks that resource creating by thisfile
need to be cached- Specified by:
needCacheResource
in classXtextBmLinkProvider
- Returns:
true
if resource should be cached,false
otherwise
-
fileExist
protected boolean fileExist(org.eclipse.emf.common.util.URI uriTrim)
Description copied from class:XtextBmLinkProvider
Checks that file for reading content of the resource exist- Specified by:
fileExist
in classXtextBmLinkProvider
- Parameters:
uriTrim
- uri of the reading resource, can't benull
- Returns:
true
if file for reading content of the resource exist,false
otherwise
-
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:XtextBmLinkProvider
Additional checking for resource - is it contained in resource set or not- Overrides:
checkResourceInResourceSet
in classXtextBmLinkProvider
- Parameters:
uri
- uri of the checking resource, can't benull
loadedResource
- 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:XtextBmLinkProvider
Calculates the cache entry weight.- Overrides:
getCacheEntryWeight
in 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)
-
-