public Expression createSingleDocumentInitialContentScriptExpression(final ContractInput input) {
   final Expression groovyScriptExpression =
       ExpressionHelper.createGroovyScriptExpression(
           fileContractInputAccessorScript(input), FileInputValue.class.getName());
   groovyScriptExpression.setName("Single document initial value script");
   addInputDependency(input, groovyScriptExpression);
   return groovyScriptExpression;
 }
 private Expression createExpression(final Data d) {
   final Expression exp = ExpressionFactory.eINSTANCE.createExpression();
   exp.setType(ExpressionConstants.VARIABLE_TYPE);
   exp.setContent(d.getName());
   exp.setName(d.getName());
   exp.setReturnType(org.bonitasoft.studio.common.DataUtil.getTechnicalTypeFor(d));
   exp.getReferencedElements().add(ExpressionHelper.createDependencyFromEObject(d));
   return exp;
 }
  private DiffNode buildPathNodes(EObject container, DiffNode node) {
    DiffNode parentNode = new DiffNode(Differencer.NO_CHANGE);
    node.setParent(parentNode);
    parentNode.add(node);
    CompareScript ancestor = null;
    String name = adapterFactoryLabelProvider.getText(container);
    Expression expr = ExpressionHelper.createConstantExpression(name, String.class.getName());
    expr.setName(name);
    ancestor = new CompareScript(expr.getName(), expr);
    ancestor.setElement(container);
    ancestor.setImage(adapterFactoryLabelProvider.getImage(container));
    parentNode.setAncestor(ancestor);

    if (insertParentNode(parentNode)) {
      return parentNode;
    }
    if (container instanceof Pool) {
      return parentNode;
    }
    if (container instanceof ConnectorParameter) {
      return buildPathNodes(container.eContainer().eContainer(), parentNode);
    }
    return buildPathNodes(container.eContainer(), parentNode);
  }
 private void addInputDependency(
     final ContractInput input, final Expression groovyScriptExpression) {
   groovyScriptExpression
       .getReferencedElements()
       .add(ExpressionHelper.createDependencyFromEObject(rootInput(input)));
 }