mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
ability to create psitype with jvmfactory
This commit is contained in:
@@ -320,7 +320,7 @@ public class GenerateMembersUtil {
|
||||
super.visitReferenceElement(reference);
|
||||
final PsiElement resolve = reference.resolve();
|
||||
if (resolve instanceof PsiTypeParameter) {
|
||||
replacementMap.put(reference, factory.createReferenceElementByType((PsiClassType)substitutor.substitute((PsiTypeParameter)resolve)));
|
||||
replacementMap.put(reference, factory.createReferenceElementByType((PsiClassType)substituteType(substitutor, factory.createType((PsiTypeParameter)resolve))));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -136,4 +136,13 @@ public interface JVMElementFactory {
|
||||
|
||||
@NotNull
|
||||
PsiTypeParameter createTypeParameter(String name, PsiClassType[] superTypes);
|
||||
|
||||
/**
|
||||
* Creates a class type for the specified class.
|
||||
*
|
||||
* @param aClass the class for which the class type is created.
|
||||
* @return the class type instance.
|
||||
*/
|
||||
@NotNull
|
||||
PsiClassType createType(@NotNull PsiClass aClass);
|
||||
}
|
||||
|
||||
@@ -154,14 +154,6 @@ public interface PsiElementFactory extends PsiJavaParserFacade, JVMElementFactor
|
||||
*/
|
||||
@NotNull PsiCodeBlock createCodeBlock();
|
||||
|
||||
/**
|
||||
* Creates a class type for the specified class.
|
||||
*
|
||||
* @param aClass the class for which the class type is created.
|
||||
* @return the class type instance.
|
||||
*/
|
||||
@NotNull PsiClassType createType(@NotNull PsiClass aClass);
|
||||
|
||||
/**
|
||||
* Creates a class type for the specified class, using the specified substitutor
|
||||
* to replace generic type parameters on the class.
|
||||
|
||||
Reference in New Issue
Block a user