Class BslElementRegionProvider
java.lang.Object
com.e1c.g5.v8.dt.internal.check.bsl.BslElementRegionProvider
- All Implemented Interfaces:
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.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.e1c.g5.v8.dt.check.settings.IBslElementRegionProvider
IBslElementRegionProvider.BslSuppressionsCheckResult
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionProcesses storage and provides result which is pair of check id sets: live (or not suppressed) check ids not processed check idsgetSuppressedCheckIds
(org.eclipse.xtext.nodemodel.INode node) Gets all check suppressions applicable to the given syntax model node.boolean
isSuppressed
(org.eclipse.xtext.nodemodel.INode node, String checkId) Requests the check suppression status for the given checkvoid
saveAllowedRegion
(org.eclipse.xtext.nodemodel.INode node, Set<String> checkIds) Saves allowed checks with mapped line ranges to the storage.void
saveSuppressedRegion
(int startLine, int endLine, Set<String> checkIds) Saves suppressed checks with mapped line ranges to the storage.void
saveSuppressedRegion
(org.eclipse.xtext.nodemodel.INode node, Set<String> checkIds) Saves suppressed checks with mapped line ranges to the storage.
-
Constructor Details
-
BslElementRegionProvider
public BslElementRegionProvider()
-
-
Method Details
-
saveSuppressedRegion
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 interfaceIBslElementRegionProvider
- Parameters:
node
- the node of the semantic element, cannot benull
checkIds
- the set of check ids to map and save to the storage, cannot benull
-
saveSuppressedRegion
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 interfaceIBslElementRegionProvider
- Parameters:
startLine
- The start line of the regionendLine
- The end line of the regioncheckIds
- the set of check ids to map and save to the storage, cannot benull
-
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 interfaceIBslElementRegionProvider
- Parameters:
node
- the node of the semantic element, cannot benull
checkIds
- the check ids to examine, cannot benull
- Returns:
IBslElementRegionProvider.BslSuppressionsCheckResult
, nevernull
-
saveAllowedRegion
Description copied from interface:IBslElementRegionProvider
Saves allowed checks with mapped line ranges to the storage.- Specified by:
saveAllowedRegion
in interfaceIBslElementRegionProvider
- Parameters:
node
- the node of the semantic element, cannot benull
checkIds
- the set of check ids to map and save to the storage, cannot benull
-
isSuppressed
Description copied from interface:IBslElementRegionProvider
Requests the check suppression status for the given check- Specified by:
isSuppressed
in interfaceIBslElementRegionProvider
- Parameters:
node
- The target syntax model node. May not benull
checkId
- the check id to examine, cannot benull
- Returns:
- True if the given check is suppressed
-
getSuppressedCheckIds
Description copied from interface:IBslElementRegionProvider
Gets all check suppressions applicable to the given syntax model node.- Specified by:
getSuppressedCheckIds
in interfaceIBslElementRegionProvider
- Parameters:
node
- The target syntax model node. May not benull
- Returns:
- The collection of check ids. May not be
null
. May be empty
-