Class FeatureIndexer
java.lang.Object
com.arc_e_tect.gradle.gherkin.indexing.FeatureIndexer
Numbers
Feature/Scenario titles directly in the source .feature files
according to a configured IndexingMode.
Every run first strips any numbering left over from a previous run (recognised by the
<number> - prefix this class itself adds), then - unless the mode is
IndexingMode.OFF - applies fresh numbering. This makes the operation idempotent and
makes switching between modes (including back to OFF) simply undo the previous
numbering rather than requiring any state to be tracked between runs.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidreindex(List<File> featureFiles, IndexingMode mode) Rewrites every file infeatureFilesin place: strips anyFeature/Scenarionumbering added by a previous run, then applies numbering permode.
-
Constructor Details
-
FeatureIndexer
public FeatureIndexer()Creates a newFeatureIndexer.
-
-
Method Details
-
reindex
Rewrites every file infeatureFilesin place: strips anyFeature/Scenarionumbering added by a previous run, then applies numbering permode. Files are numbered in the order they appear infeatureFiles- the caller is responsible for ordering that list the way numbers should be assigned. A file is only rewritten on disk when its content actually changes.- Parameters:
featureFiles- the feature files collected for this run, in the order to number them inmode- the indexing mode to apply
-