Class BslCachedScopeProvider

java.lang.Object
com._1c.g5.v8.dt.bsl.scoping.BslCachedScopeProvider

public class BslCachedScopeProvider extends Object
Special provider for caching values of IScope getting from BslScopeProvider.
This class provides only values of IScope depending from Module
  • Constructor Details

    • BslCachedScopeProvider

      public BslCachedScopeProvider()
  • Method Details

    • clearTypeItemsScopes

      public void clearTypeItemsScopes(org.eclipse.core.resources.IProject project)
      Clear type items scope for project
      Parameters:
      project - IProject for clearing cached scope, can't be null
    • clearPropertyScopes

      public void clearPropertyScopes(org.eclipse.core.resources.IProject project)
      Clear property scope for project
      Parameters:
      project - IProject for clearing cached scope, can't be null
    • addTypeItemScope

      public void addTypeItemScope(org.eclipse.core.resources.IProject project, org.eclipse.xtext.scoping.IScope typeItemScope)
      Adds new value of IScope corresponding to the TypeItem
      Parameters:
      project - actual project, can't be null
      typeItemScope - IScope corresponding to the TypeItem, can't be null
    • addPropertyScope

      public void addPropertyScope(org.eclipse.core.resources.IProject project, org.eclipse.xtext.scoping.IScope propertyScope)
      Adds new value of IScope corresponding to the Property
      Parameters:
      project - actual project, can't be null
      propertyScope - IScope corresponding to the Property, can't be null
    • getTypeItemScope

      public org.eclipse.xtext.scoping.IScope getTypeItemScope(org.eclipse.core.resources.IProject project)
      Gets actual IScope corresponding to the TypeItem by IProject
      Parameters:
      project - actual IProject, can't be null
      Returns:
      IScope corresponding to the TypeItem or null if scope wasn't cached for this project
    • getPropertyScope

      public org.eclipse.xtext.scoping.IScope getPropertyScope(org.eclipse.core.resources.IProject project)
      Gets actual IScope corresponding to the Property by IProject
      Parameters:
      project - actual IProject, can't be null
      Returns:
      IScope corresponding to the Property or null if scope wasn't cached for this project
    • addScope

      public void addScope(Block block, Environments envs, BslCachedScopeProvider.BslCachedScopeType scopeType, org.eclipse.xtext.scoping.IScope scope)
      Add new value of IScope
      Parameters:
      block - corresponding Block, can't be null
      envs - actual Environments of scope, can't be null
      scopeType - type of the adding scope, see BslCachedScopeProvider.BslCachedScopeType, can't be null
      scope - computing IScope by Module, can't be null
    • getScope

      public org.eclipse.xtext.scoping.IScope getScope(Block block, Environments envs, BslCachedScopeProvider.BslCachedScopeType scopeType)
      Gets cached value of IScope by Module
      Parameters:
      block - actual Bsl Block for getting cached IScope, can't be null
      envs - actual Environments of scope, can't be null
      scopeType - type of getting scope, see BslCachedScopeProvider.BslCachedScopeType, can't be null
      Returns:
      caching value of IScope by Module, can be null in case when there is no anything cached values
    • clearScopes

      public void clearScopes(Module module)
      Deletes all cached values of IScope by Module
      Parameters:
      module - actual Bsl Module for deleting cached IScope, can't be null