mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-06 06:21:16 +07:00
Before, we used to build the simple type first, and then tried to annotate it. This was quite complex and fragile due to weird structure of PsiType (it's not always easily decomposable). Also, some operations like replacing parts of PSI tree require type resolution (via PsiType#getCanonicalText). It looks like, it's pretty possible to generate complete annotated type as text, and then parse it into PsiTypeElement generating final PsiType. This should not be slower, as the replacements are mostly doing similar things (e.g., see JavaTreeGenerator.generateTreeFor: it gets type's canonical text, then parses the type back from it). Fixes IDEA-370755 Avoid resolve when building method/variable return type from stub GitOrigin-RevId: 949d79a2044f78110ffd6f845ff9e2712b55a36f