File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
core/src/main/kotlin/spp/jetbrains/artifact/service Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ package spp.jetbrains.artifact.service
1818
1919import com.intellij.psi.PsiComment
2020import com.intellij.psi.PsiElement
21+ import com.intellij.psi.PsiFile
2122import spp.jetbrains.artifact.model.FunctionArtifact
2223import spp.jetbrains.artifact.service.define.AbstractSourceMarkerService
2324import spp.jetbrains.artifact.service.define.IArtifactTypeService
@@ -52,6 +53,10 @@ object ArtifactTypeService : AbstractSourceMarkerService<IArtifactTypeService>()
5253
5354 override fun getType (element : PsiElement ): ArtifactType ? {
5455 if (! isSupported(element)) return null
56+ // language-agnostic check
57+ if (element is PsiFile ) return ArtifactType .FILE
58+
59+ // language-specific check
5560 return getService(element.language).getType(element)
5661 }
5762
You can’t perform that action at this time.
0 commit comments