Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: PiotrS24 on March 18, 2009, 09:51:50 pm

Title: where EA keep attribute from c#?
Post by: PiotrS24 on March 18, 2009, 09:51:50 pm
Hello,

I create class form source code, next I generated this class

In generated source code I have:
[Size(50)]
[DisplayName("Imi[ch281]")]
[RuleRequiredField("Wymagane pole dla AUTOR_IMIE", DefaultContexts.Save)]
public string AUTOR_IMIE{ ....


When I create new class in EA , where can I set this attribute ?
for property, field, methot and class ?

Regards
Piotr Such
Title: Re: where EA keep attribute from c#?
Post by: Eve on March 19, 2009, 08:33:41 am
It is in a tagged value.

Reverse engineer one to see the details.
Title: Re: where EA keep attribute from c#?
Post by: PiotrS24 on March 19, 2009, 06:56:10 pm
Ok, I found this, thanks for it.

But I have another problem with atribute:
In source I have:
[RuleRequiredField("Wymagane pole dla KATEGORIA_NAZWA", DefaultContexts.Save)]
        [DisplayName("Nazwa")]
        [Custom("PredefinedValues", "Akcja;Krymina[ch322];Dramat;Komedia")]
        public string KATEGORIA_NAZWA
When I revers to EA and generate I get:
[RuleRequiredField("Wymagane pole dla KATEGORIA_NAZWA", DefaultContexts.Save)]
            [DisplayName("Nazwa")]
            [Custom("PredefinedValues", "Akcja
            Krymina[ch322]
            Dramat
            Komedia")]
            public string KATEGORIA_NAZWA{

Problem is in brake lists of string "Akcja;Krymina[ch322];Dramat;Komedia"
Is posible to turn off this feature? :)

regards
Piotr Such
Title: Re: where EA keep attribute from c#?
Post by: Eve on March 20, 2009, 03:57:38 pm
You'll have to modify the code templates...

Look for a %REPLACE(";", "\n")%.

I'd try making it %REPLACE("];[", "]\n[")%.