Hopefully someone can help me with this one, as I've been scouring the docs, this forum and the net for most of the afternoon.
Using EA build 8.0.864 (trial version till the company finishes purchasing the real licenses). Hopefully I am just doing something inane and someone can guide me to the correct methodology.
C# Property generation problems When generating the code for an Operation tagged with the 'property' stereotype, it should produce the proper get/set arguments. This part is working fine.
However according to the C# Conventions help file, when I add a tagged value to the operation called 'attributeName' it should use the value as the variable behind the Property. Other tagged values seem to work. For example I am able to generate
public static virtual AddInManager AddIns{
get;
}
So the 'virtual' and 'readonly' tags are working...just not the 'attributeName'. I've confirmed all tags are present in an XMI export.
I attempted to see if I could find the Code Template responsible for the generation, and while I was able to change the Operations and Attributes code templates and have it reflect in the code, I could not find the code template responsible for the get/set code. The one labeled Property Declaration is not it either.
This might be livable (kind of) since the code compiles but it is also happening with the 'event' stereotype, and the code it produces has inherent compilation errors. For example
public event void FireFoo{
add{
<unknown> += value;
}
remove{
<unknown> -= value;
}
}is not reflecting the local attribute specified in the class, even though the name is listed with the 'attributeName' in the tagged values.
C# Collections problems In following both
http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1289484389/3#3and
http://www.sparxsystems.com/enterprise_architect_user_guide/8.0/software_development/settingcollectionclasses.htmlI am unable to generate anything with the List<FOO> code. I have set all the collection classes under Tools:Options:SCE:C#:CollectionsClasses to be List<#TYPE#> as per the links above. However, no matter what multiplicity values I set (1-2, 1-*, Ordered, Allow Duplicates, Collection etc...) the code generated does not use List<#TYPE#>
For example, I have an interface elsewhere in the model (different package, same model project) called INotfiy.
The line '- notifyAddIns: INotify [1..5] {sequence}' always produces
private INotify notifyAddIns = new List<INotify>(); and not the desired
private List<INotify> notifyAddIns = new List<INotify>(); The trailing List<INotify> is from hardcoding it in the 'initialValue' field.
I have been making sure all my generated code uses the 'Overwrite Code' to prevent local .cs changes to be erroneously synced.
Is there something I'm doing wrong or are these two legit bugs? Anyone else with some thoughts on the matter?