Skip to content

Commit 7c9625e

Browse files
committed
refactor: rename AsyncAPISchemaIndexer to AsyncAPISpecificationIndexer
1 parent c5cd3c2 commit 7c9625e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/main/kotlin/com/asyncapi/plugin/idea/extensions/index/AsyncAPISpecificationIndex.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class AsyncAPISpecificationIndex: FileBasedIndexExtension<String, Set<String>>()
1818

1919
override fun getName(): ID<String, Set<String>> = asyncapiIndexId
2020

21-
override fun getIndexer(): DataIndexer<String, Set<String>, FileContent> = AsyncAPISchemaIndexer()
21+
override fun getIndexer(): DataIndexer<String, Set<String>, FileContent> = AsyncAPISpecificationIndexer()
2222

2323
override fun getKeyDescriptor(): KeyDescriptor<String> = EnumeratorStringDescriptor.INSTANCE
2424

src/main/kotlin/com/asyncapi/plugin/idea/extensions/index/AsyncAPISchemaIndexer.kt renamed to src/main/kotlin/com/asyncapi/plugin/idea/extensions/index/AsyncAPISpecificationIndexer.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import org.jetbrains.yaml.psi.YAMLFile
1010
/**
1111
* @author Pavel Bodiachevskii
1212
*/
13-
class AsyncAPISchemaIndexer: DataIndexer<String, Set<String>, FileContent> {
13+
class AsyncAPISpecificationIndexer: DataIndexer<String, Set<String>, FileContent> {
1414

1515
private val asyncAPISpecificationRecognizer = service<AsyncAPISpecificationRecognizer>()
1616

@@ -21,16 +21,16 @@ class AsyncAPISchemaIndexer: DataIndexer<String, Set<String>, FileContent> {
2121
return index
2222
}
2323

24-
val asyncapiSchema = when(inputData.psiFile) {
24+
val asyncapiSpecification = when(inputData.psiFile) {
2525
is JsonFile -> inputData.psiFile as JsonFile
2626
is YAMLFile -> inputData.psiFile as YAMLFile
2727
else -> null
2828
}
29-
asyncapiSchema ?: return index
29+
asyncapiSpecification ?: return index
3030

3131
index[AsyncAPISpecificationIndex.asyncapi] = setOf(inputData.file.path)
3232
var foundReferences = emptySet<String>()
33-
AsyncAPISpecificationReferencesCollector(asyncapiSchema, inputData.file.parent).collectFiles().forEach { (referenceType, references) ->
33+
AsyncAPISpecificationReferencesCollector(asyncapiSpecification, inputData.file.parent).collectFiles().forEach { (referenceType, references) ->
3434
index[referenceType] = references
3535

3636
foundReferences = foundReferences.plus(references)

0 commit comments

Comments
 (0)