Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: dubem1 on December 15, 2003, 08:32:14 am

Title: Code Generation MustOverride
Post by: dubem1 on December 15, 2003, 08:32:14 am
Hello,

In a class, I have a method that should be MustOverride.  So I add a tagged Value MustOverride =True.

When I Generate the code in VB.Net,  the MustOverride keyWord is there but the method also have a "End Function".
In fact, when a method is MustOverride, there is no code in it and adding a "end function" line cause a syntax Error.  Is there a way to tell the generation code to not add the "End function" line when a method is MustOverride?

Thank you
Martin Dube
Title: Re: Code Generation MustOverride
Post by: jkorman on December 15, 2003, 09:13:44 pm
I think that the Sparx folks may have to have a go at this. It appears that the

  Operation Body

template substitution macro doesn't check for MustOverride when it is generating
the body. I'm thinking that if MustOverride is specified then the entire body generation
should be aborted!?

Jim
Title: Re: Code Generation MustOverride
Post by: Sam_Mancarella on December 21, 2003, 07:56:57 pm
Yes this is correct.

The modified Operation Body template should appear as follows at the end of this post. We shall make this template available in the default templates in the next immediate build (657)

Seasons Greetings & many thanks for your support
Sam Mancarella

--== Begin ==--
%PI=""%
%if opTag:"delegate" == "true"%
%endTemplate%

%if opTag:"MustOverride" == "true"%
%endTemplate%

%if opAbstract == "T"%
%endTemplate%

..... remainder of template....