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
,IBmProjectAwareExternalUriResolver
public class BslBmLinkProvider extends XtextBmLinkProvider
SpecialXtextBmLinkProvider
for Bsl module. The class provides and contains resources for bsl modules
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com._1c.g5.v8.dt.bm.xtext.XtextBmLinkProvider
XtextBmLinkProvider.UriResourceContainerCache
-
-
Field Summary
-
Fields inherited from class com._1c.g5.v8.dt.bm.xtext.XtextBmLinkProvider
extension, readWriteLock, 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 org.eclipse.emf.ecore.resource.Resource
createResource(org.eclipse.emf.ecore.resource.ResourceSet resourceSet, org.eclipse.emf.common.util.URI uriTrim)
Creates resource by uriprotected XtextBmLinkProvider.UriResourceContainerCache
createUriResourceContainerCache()
Creates specialXtextBmLinkProvider.UriResourceContainerCache
for caching link provider resourcesprotected boolean
fileExist(org.eclipse.emf.common.util.URI uriTrim)
Checks that file for reading content of the resource existorg.eclipse.emf.ecore.resource.Resource
getResource(org.eclipse.emf.common.util.URI uri)
Ask link providers to obtain resource matched with specified URI.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
clear, getObject, getProject, getProject, isPassthrough, isResourceLoaded, remove, setProject, 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
.
-
getResource
public org.eclipse.emf.ecore.resource.Resource getResource(org.eclipse.emf.common.util.URI uri)
Description copied from interface:IBmExternalUriResolver
Ask link providers to obtain resource matched with specified URI. Used to provider resources for system types.- Specified by:
getResource
in interfaceIBmExternalUriResolver
- Overrides:
getResource
in classXtextBmLinkProvider
- Parameters:
uri
- The resource URI. May not benull
- Returns:
- the loaded resource if found, otherwise
null
.
-
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
-
createUriResourceContainerCache
protected XtextBmLinkProvider.UriResourceContainerCache createUriResourceContainerCache()
Description copied from class:XtextBmLinkProvider
Creates specialXtextBmLinkProvider.UriResourceContainerCache
for caching link provider resources- Specified by:
createUriResourceContainerCache
in classXtextBmLinkProvider
- Returns:
- special
XtextBmLinkProvider.UriResourceContainerCache
for caching link provider resources, nevernull
-
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
-
createResource
protected org.eclipse.emf.ecore.resource.Resource createResource(org.eclipse.emf.ecore.resource.ResourceSet resourceSet, org.eclipse.emf.common.util.URI uriTrim)
Description copied from class:XtextBmLinkProvider
Creates resource by uri- Overrides:
createResource
in classXtextBmLinkProvider
- Parameters:
resourceSet
-ResourceSet
for creating resource, can't benull
uriTrim
- uri of the resource, can't benull
- Returns:
- creating resource, never
null
-
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
-
-