Agenpro 5.0.0 breaks lines in generated files

Hello,

I switch to the newest version of AgentPro 5.0.0 and generated files get line breaks on very strange places like shown here:

`int socomec_diris_products_mib_loadCurvesLoadRowStatus::set(const Vbx& vb)
{
//–AgentGen BEGIN=loadCurvesLoadRowStatus::set
//–AgentGen END
return snmpRowStatus
::set(vb);
}

int socomec_diris_products_mib_loadCurvesLoadRowStatus::commit_set_request(Request* req, int ind)
{
//–AgentGen BEGIN=loadCurvesLoadRowStatus::commit_set_request
//–AgentGen END
int status = snmpRowStatus
::commit_set_request(req, ind);
//–AgentGen BEGIN=loadCurvesLoadRowStatus::commit_set_request2
//–AgentGen END
return status;
}`

Is this something that can be fixed by changing some of setting in AgentPro?

Regards,
Safet

Hi Safet,

That is indeed a regression in 5.0.0 which will be fixed tomorrow with version 5.0.1. This was caused by changed Velocity template property names in Velocity version 2.1 (AgenPro uses now 2.2). This has been fixed.

You can (partly) workaround this issue by configuring a code formatter in the projects menu. First you need to install clang-format (this most likely works on Linux and MacOS only) and then configure the code formatter in the AgenPro’s Tools menu as follows:

Name: clang-format
Shell Command: /usr/local/bin/clang-format --style="{BasedOnStyle: llvm, IndentWidth: 4}"

When. this code formatter is configured, you can select it in the project editor for the .h and .cpp file generation in the Code Formatter column.

Best regards,
Frank

Hello Frank,

Thank you for your explanation and help. I will follow the instruction you provided here and fix the source files.

Regards,
Safet

Hello Safet,

AgenPro version 5.0.1 is now available for download from https://agentpp.com/download.html

Best regards,
Frank

Thank you Frank.

You saved me some precious time.
I appreciate it.

Regards,
Safet