TheOpenCloudEngine / uEngine5-base

uEngine5 BPMS that totally re-written in Microservices architecture. uEngine5 can act as not only a conventional Workflow or BPMS but also as a REST api orchestrator or a BPaaS (Business process as a service) of members of OCE's MSA components.
MIT License
10 stars 13 forks source link

Source to model will not be working if there's existing field (only changing the type of field, that change will be ignored) #104

Open jinyoung opened 6 years ago

jinyoung commented 6 years ago

java-reverse/Application.java

                //update to model
                for (BodyDeclaration<?> member : members) {
                    if (member instanceof FieldDeclaration) {
                        FieldDeclaration field = (FieldDeclaration) member;

                        if (field.getVariables().size() > 0) {
                            VariableDeclarator variableDeclarator = field.getVariables().get(0);
                            if (!modelFieldManifest.contains(variableDeclarator.getName().getIdentifier())) {

                                Attribute attribute = new Attribute();
                                attribute.setName(variableDeclarator.getName().getIdentifier());
                                attribute.setClassName(variableDeclarator.getType().getElementType().asString());

                                classDefinition.addFieldDescriptor(attribute);

                            }
                        }

                    }
                }