fix: Allow single Java files to be added to context (#420)

This commit is contained in:
Chris Campbell 2024-03-25 09:50:49 +00:00 committed by GitHub
parent c0c02d9afb
commit 8ccf331988
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -40,6 +40,9 @@ public class PsiElementCheckboxTree extends FileCheckboxTree {
}
private static CheckedTreeNode createNode(PsiElement element) {
if (element instanceof com.intellij.psi.PsiClass) {
element = element.getContainingFile();
}
if (!(element instanceof PsiDirectory || element instanceof PsiFile)) {
return null;
}