Search in sources :

Example 1 with ClassProcessor

use of org.gsonformat.intellij.process.ClassProcessor in project GsonFormat by zzz40500.

the class DataWriter method run.

@Override
protected void run() {
    if (targetClass == null) {
        return;
    }
    generateClassList.clear();
    new ClassProcessor(factory, cls).generate(targetClass, new IProcessor() {

        @Override
        public void onStarProcess(ClassEntity classEntity, PsiElementFactory factory, PsiClass cls) {
            generateClassList.add(cls.getQualifiedName());
        }

        @Override
        public void onEndProcess(ClassEntity classEntity, PsiElementFactory factory, PsiClass cls) {
        }

        @Override
        public void onStartGenerateClass(PsiElementFactory factory, ClassEntity classEntity, PsiClass parentClass) {
        }

        @Override
        public void onEndGenerateClass(PsiElementFactory factory, ClassEntity classEntity, PsiClass parentClass, PsiClass generateClass) {
            generateClassList.add(generateClass.getQualifiedName());
        }
    });
}
Also used : ClassEntity(org.gsonformat.intellij.entity.ClassEntity) ClassProcessor(org.gsonformat.intellij.process.ClassProcessor) PsiElementFactory(com.intellij.psi.PsiElementFactory) PsiClass(com.intellij.psi.PsiClass) IProcessor(org.gsonformat.intellij.process.IProcessor)

Aggregations

PsiClass (com.intellij.psi.PsiClass)1 PsiElementFactory (com.intellij.psi.PsiElementFactory)1 ClassEntity (org.gsonformat.intellij.entity.ClassEntity)1 ClassProcessor (org.gsonformat.intellij.process.ClassProcessor)1 IProcessor (org.gsonformat.intellij.process.IProcessor)1