ceylon-ide-intellij
ceylon-ide-intellij copied to clipboard
Consider simplifying our PSI classes
Most of the interfaces in CeylonPsi could be removed, and instead of doing:
if (is CeylonPsi.DeclarationPsi psiElement) {
Tree.Declaration decl = psiElement.ceylonNode;
}
we could simply do
if (is CeylonCompositeElement psiElement,
is Tree.Declaration decl = psiElement.ceylonNode) {
}
We could leave a few exceptions:
AnyMethodPsiwould satisfyPsiMethodAnyClassPsiwould satisfyPsiClass
to be able to use our own PSI elements in APIs that expect PsiClasses and PsiMethods (see https://github.com/ceylon/ceylon-ide-intellij/issues/418#issuecomment-245893644 for example).
+1.
All the value of the XxxxPsi classes is already available via the ElementType, AFAICT.