IntentArchitect / Support

A repository dedicated to handling issues and support queries
3 stars 0 forks source link

Java-File-Builder always add Template to the name of the class #37

Closed leonAtRain closed 1 year ago

leonAtRain commented 1 year ago

What happened?

When creating new class in Module Builder - the SF always adds an "AddClass" to the template, and also a class with the name "Template" added. For example - on the left is the Properties as they are in IA, and on the right what it adds to the file. image

What version of Intent Architect are you using?

4

Additional information

No response

dandrejvv commented 1 year ago

Hi @leonAtRain. As it stands if you were to call your template DroolRuleCompilerTemplate then it will add that string as-is to the AddClass like this AddClass("DroolRuleCompilerTemplate", ...). We can certainly make an enhancement to truncate the Template from the class name in that case.

dandrejvv commented 1 year ago

Hi @leonAtRain . Also please check your Template has the IntentManaged set to Merge which is why it didn't update the ClassName and why its attempting to add more code in the constructor. Change it to [IntentManaged(Mode.Fully, Body = Mode.Ignore)] to resolve your immediate issue.

dandrejvv commented 1 year ago

The Intent.ModuleBuilder.Java module (from 3.4.1-pre.0) has been updated so that adding a new Template that is Single File in nature with a name containing a suffix Template will no longer add Template as part of the Class name.