EA-33373 - IOE: PsiElementFactoryImpl.createField
[idea/community.git] / java / java-impl / src / com / intellij / codeInsight / generation / GenerateDelegateHandler.java
index 06a1c85a69ad8d0b3d44fdd0357c4d884112e717..f7036b1646f341a024b5a0a17b60e5ed0aa7fefd 100644 (file)
@@ -374,7 +374,8 @@ public class GenerateDelegateHandler implements LanguageCodeInsightActionHandler
         for (int i = 0; i < proc.size(); i++) {
           final PsiVariable psiVariable = proc.getResult(i);
           final PsiElementFactory elementFactory = JavaPsiFacade.getElementFactory(aClass.getProject());
-          result.add(new PsiFieldMember(elementFactory.createField(psiVariable.getName(), psiVariable.getType())) {
+          final PsiType type = psiVariable.getType();
+          result.add(new PsiFieldMember(elementFactory.createField(psiVariable.getName(), type instanceof PsiEllipsisType ? ((PsiEllipsisType)type).toArrayType() : type)) {
             @Override
             protected PsiClass getContainingClass() {
               return aClass;