Package org.intellij.plugins.junitgen

Examples of org.intellij.plugins.junitgen.JUnitGeneratorContext


            return;
        }

        for (PsiClass psiClass : psiClasses) {
            if ((psiClass != null) && (psiClass.getQualifiedName() != null)) {
                final JUnitGeneratorContext genCtx = new JUnitGeneratorContext(dataContext, file, psiClass);
                final List<TemplateEntry> entryList = new ArrayList<TemplateEntry>();

                try {

                    if (!psiClass.isInterface()) {
                        boolean getPrivate = true;

                        List<PsiMethod> methodList = new ArrayList<PsiMethod>();
                        List<PsiMethod> pMethodList = new ArrayList<PsiMethod>();
                        List<String> fieldList = new ArrayList<String>();

                        List<MethodComposite> methodCompositeList = new ArrayList<MethodComposite>();
                        List<MethodComposite> privateMethodCompositeList = new ArrayList<MethodComposite>();

                        buildMethodList(psiClass.getMethods(), methodList, !getPrivate);
                        buildMethodList(psiClass.getMethods(), pMethodList, getPrivate);
                        buildFieldList(psiClass.getFields(), fieldList);
                        PsiClass[] innerClass = psiClass.getAllInnerClasses();

                        for (PsiClass innerClas : innerClass) {
                            buildMethodList(innerClas.getMethods(), methodList, !getPrivate);
                            buildMethodList(innerClas.getMethods(), pMethodList, getPrivate);
                            buildFieldList(psiClass.getFields(), fieldList);
                        }

                        processMethods(genCtx, methodList, methodCompositeList);
                        processMethods(genCtx, pMethodList, privateMethodCompositeList);

                        entryList.add(new TemplateEntry(genCtx.getClassName(false),
                                genCtx.getPackageName(),
                                methodCompositeList,
                                privateMethodCompositeList,
                                fieldList));
                        process(genCtx, entryList);
                    }
View Full Code Here

TOP

Related Classes of org.intellij.plugins.junitgen.JUnitGeneratorContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.