Get packet name of a non-java PsiElement
Hi
I got a non-java element selected in a java module. This element is of type PsiElement. Now I want to optain the package name.
With java files I got a solution: ((PsiJavaFile) element.getContainingFile()).getPackageName()
But with a non java file (XML for instance), I got no clue, how to get the package name...
What's the best way to proceed?
Thanks in advance
Stefan
Please sign in to leave a comment.
I just found it by myself: