Closed nixonad closed 5 months ago
I have found that changing the Intent attributes as follows works:
[IntentManaged(Mode.Merge, Signature = Mode.Fully)]
[DefaultIntentManaged(Mode.Fully, Targets = Targets.Properties, **Comments = Mode.Ignore**)]
[DefaultIntentManaged(Mode.Fully, Targets = Targets.Methods | Targets.Constructors, **Comments = Mode.Ignore**, Body = Mode.Ignore, AccessModifiers = AccessModifiers.Public)]
I had thought that changing the IntentManaged attribute on the class would work but it does not.
Is there then a way to make Comments = Mode.Ignore
the default for generated code?
Thanks
Hi @nixonad,
Glad to see you came right.
In regard to the [IntentManaged(…)]
attribute not having an effect in this case, this is to be expected as they don't apply to descendant syntax nodes (members in this case) except when they are [IntentManaged(Mode.Ignore)]
, so updating the [DefaultIntentManaged(…)]
attribute was the way to go.
There is no global setting to make Comments globally ignored, however, we've logged an issue on our side about possibly making attributes like [IntentManaged(Mode.Fully, Comments = Mode.ignore)]
also apply the ignoring of Comments to descendant nodes.
Hi @nixonad,
I wanted to add some additional feedback that we are looking into methods to globally control code management behaviour and are keeping in mind this kind of request as part of that feature.
Also, just as a reminder, these comments can also be captured in designers in Intent Architect in which case it will generate them for you:
Hi @nixonad,
To come back to this, we have since added an application setting to make this the default everywhere if you want to try this out:
I'm closing this issue, but happy to reopen it if you have any comments or questions.
Ask a question
How can I stop Intent from removing miscellaneous comments in my code? I have a domain entity created using the std modules, it has the default generated Intent headers:
My comments which I added in the class are removed by Intent on running the Software Factory. Making the whole class IntentIgnore stops it from removing my comments but that's not ideal.