targetDefinition.addChild(copy);
targetNodeList.put(copy.getName(), copy);
if (node instanceof FormNode) {
FormNode formNode = (FormNode) node;
if (formNode.hasForm() || formNode.hasFormValidation()) {
CopyFormFilesAction copyAction = new CopyFormFilesAction(formNode, (FormNode) copy);
copyAction.setSourceFolder(copyBuffer.getSourceFolder());
copyAction.setTargetFolder(targetFolder);
elements.add(copyAction);
}
Map<String, Integer> variables = formNode.getFormVariables(copyBuffer.getSourceFolder());
for (String varName : variables.keySet()) {
Variable variable = copyBuffer.getSourceDefinition().getVariablesMap().get(varName);
if (variable != null) {
CopyVariableAction copyAction = new CopyVariableAction(variable);
elements.add(copyAction);