Class BslElementRegionProvider

java.lang.Object
com.e1c.g5.v8.dt.internal.check.bsl.BslElementRegionProvider
All Implemented Interfaces:
IBslElementRegionProvider

public class BslElementRegionProvider extends Object implements IBslElementRegionProvider
Default implementation of the IBslElementRegionProvider Suppressed and allowed checks are collected in two maps. Each time the region comes into provider's storage the existing ranges are removed if they are subsets of a newcomer.
  • Constructor Details

    • BslElementRegionProvider

      public BslElementRegionProvider()
  • Method Details

    • saveSuppressedRegion

      public void saveSuppressedRegion(org.eclipse.xtext.nodemodel.INode node, Set<String> checkIds)
      Description copied from interface: IBslElementRegionProvider
      Saves suppressed checks with mapped line ranges to the storage. Rewrites line ranges for existing ids if the existing mapped range is a subset of a new range.
      Specified by:
      saveSuppressedRegion in interface IBslElementRegionProvider
      Parameters:
      node - the node of the semantic element, cannot be null
      checkIds - the set of check ids to map and save to the storage, cannot be null
    • saveSuppressedRegion

      public void saveSuppressedRegion(int startLine, int endLine, Set<String> checkIds)
      Description copied from interface: IBslElementRegionProvider
      Saves suppressed checks with mapped line ranges to the storage. Rewrites line ranges for existing ids if the existing mapped range is a subset of a new range.
      Specified by:
      saveSuppressedRegion in interface IBslElementRegionProvider
      Parameters:
      startLine - The start line of the region
      endLine - The end line of the region
      checkIds - the set of check ids to map and save to the storage, cannot be null
    • getResult

      public IBslElementRegionProvider.BslSuppressionsCheckResult getResult(org.eclipse.xtext.nodemodel.INode node, Set<String> checkIds)
      Description copied from interface: IBslElementRegionProvider
      Processes storage and provides result which is pair of check id sets:
      • live (or not suppressed) check ids
      • not processed check ids
      Specified by:
      getResult in interface IBslElementRegionProvider
      Parameters:
      node - the node of the semantic element, cannot be null
      checkIds - the check ids to examine, cannot be null
      Returns:
      IBslElementRegionProvider.BslSuppressionsCheckResult, never null
    • saveAllowedRegion

      public void saveAllowedRegion(org.eclipse.xtext.nodemodel.INode node, Set<String> checkIds)
      Description copied from interface: IBslElementRegionProvider
      Saves allowed checks with mapped line ranges to the storage.
      Specified by:
      saveAllowedRegion in interface IBslElementRegionProvider
      Parameters:
      node - the node of the semantic element, cannot be null
      checkIds - the set of check ids to map and save to the storage, cannot be null
    • isSuppressed

      public boolean isSuppressed(org.eclipse.xtext.nodemodel.INode node, String checkId)
      Description copied from interface: IBslElementRegionProvider
      Requests the check suppression status for the given check
      Specified by:
      isSuppressed in interface IBslElementRegionProvider
      Parameters:
      node - The target syntax model node. May not be null
      checkId - the check id to examine, cannot be null
      Returns:
      True if the given check is suppressed
    • getSuppressedCheckIds

      public Collection<String> getSuppressedCheckIds(org.eclipse.xtext.nodemodel.INode node)
      Description copied from interface: IBslElementRegionProvider
      Gets all check suppressions applicable to the given syntax model node.
      Specified by:
      getSuppressedCheckIds in interface IBslElementRegionProvider
      Parameters:
      node - The target syntax model node. May not be null
      Returns:
      The collection of check ids. May not be null. May be empty