File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
core/src/main/kotlin/spp/jetbrains/artifact/service Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,14 @@ object ArtifactTypeService : AbstractSourceMarkerService<IArtifactTypeService>()
7272 return element is FunctionArtifact || getType(element) == ArtifactType .FUNCTION
7373 }
7474
75+ fun isClass (element : PsiElement ): Boolean {
76+ return getType(element) == ArtifactType .CLASS
77+ }
78+
79+ fun isFile (element : PsiElement ): Boolean {
80+ return getType(element) == ArtifactType .FILE
81+ }
82+
7583 fun isPython (element : PsiElement ): Boolean {
7684 return element.language.id == " Python"
7785 }
@@ -127,6 +135,14 @@ fun PsiElement.isFunction(): Boolean {
127135 return ArtifactTypeService .isFunction(this )
128136}
129137
138+ fun PsiElement.isClass (): Boolean {
139+ return ArtifactTypeService .isClass(this )
140+ }
141+
142+ fun PsiElement.isFile (): Boolean {
143+ return ArtifactTypeService .isFile(this )
144+ }
145+
130146fun PsiElement.isPython (): Boolean {
131147 return ArtifactTypeService .isPython(this )
132148}
You can’t perform that action at this time.
0 commit comments