EA-33373 - IOE: PsiElementFactoryImpl.createField
authorAnna Kozlova <anna.kozlova@jetbrains.com>
Wed, 1 Feb 2012 07:24:29 +0000 (11:24 +0400)
committerAnna Kozlova <anna.kozlova@jetbrains.com>
Wed, 1 Feb 2012 07:59:37 +0000 (11:59 +0400)
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;