class VariablesEditorFieldRenderer extends FieldRenderer<VariablesEditorFieldDefinition, DefaultFormGroup> implements VariablesEditorWidgetView.Presenter {

    @Override
    public String serializeVariables(final List<VariableRow> variableRows) {
        List<Variable> variables = new ArrayList<>();
        for (VariableRow row : variableRows) {
            if (row.getName() != null && row.getName().length() > 0) {
                String dataType = getRowDataType(row);
                variables.add(new Variable(row.getName(),
                                           row.getVariableType(),
                                           dataType,
                                           row.getCustomDataType(),
                                           row.getTags()));
            }
        }

        return StringUtils.getStringForList(variables);
    }

    @Inject public  VariablesEditorFieldRenderer(final VariablesEditorWidgetView variablesEditor,
                                        final SessionManager sessionManager,
                                        final ErrorPopupPresenter errorPopupPresenter);

}