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.booleanisSuppressed(org.eclipse.xtext.nodemodel.INode node, String checkId) Requests the check suppression status for the given checkvoidsaveAllowedRegion(org.eclipse.xtext.nodemodel.INode node, Set<String> checkIds) Saves allowed checks with mapped line ranges to the storage.voidsaveSuppressedRegion(int startLine, int endLine, Set<String> checkIds) Saves suppressed checks with mapped line ranges to the storage.voidsaveSuppressedRegion(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:IBslElementRegionProviderSaves 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:
saveSuppressedRegionin interfaceIBslElementRegionProvider- Parameters:
node- the node of the semantic element, cannot benullcheckIds- the set of check ids to map and save to the storage, cannot benull
-
saveSuppressedRegion
Description copied from interface:IBslElementRegionProviderSaves 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:
saveSuppressedRegionin 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:IBslElementRegionProviderProcesses storage and provides result which is pair of check id sets:- live (or not suppressed) check ids
- not processed check ids
- Specified by:
getResultin interfaceIBslElementRegionProvider- Parameters:
node- the node of the semantic element, cannot benullcheckIds- the check ids to examine, cannot benull- Returns:
IBslElementRegionProvider.BslSuppressionsCheckResult, nevernull
-
saveAllowedRegion
Description copied from interface:IBslElementRegionProviderSaves allowed checks with mapped line ranges to the storage.- Specified by:
saveAllowedRegionin interfaceIBslElementRegionProvider- Parameters:
node- the node of the semantic element, cannot benullcheckIds- the set of check ids to map and save to the storage, cannot benull
-
isSuppressed
Description copied from interface:IBslElementRegionProviderRequests the check suppression status for the given check- Specified by:
isSuppressedin interfaceIBslElementRegionProvider- Parameters:
node- The target syntax model node. May not benullcheckId- the check id to examine, cannot benull- Returns:
- True if the given check is suppressed
-
getSuppressedCheckIds
Description copied from interface:IBslElementRegionProviderGets all check suppressions applicable to the given syntax model node.- Specified by:
getSuppressedCheckIdsin interfaceIBslElementRegionProvider- Parameters:
node- The target syntax model node. May not benull- Returns:
- The collection of check ids. May not be
null. May be empty
-