Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: MikiNanuk on September 14, 2004, 09:56:41 am

Title: Unwanted private variables
Post by: MikiNanuk on September 14, 2004, 09:56:41 am
When we sync up our C# code with the EA model (using MDG Link), a lot of private const variables get pulled into the model.  This clutters the model without adding value.  Is there a way to prevent certain variables (or methods for that matter) from becoming part of the model?

::MikiNanuk
Title: Re: Unwanted private variables
Post by: TrtnJohn on September 17, 2004, 11:38:57 am
Right click the class and select Element Features-Specify Feature Visibility...
Title: Re: Unwanted private variables
Post by: MikiNanuk on September 17, 2004, 01:31:59 pm
We still want to show private variables that are an important part of the class design (such as the ones that provide the storage for properties), just not certain supporting private variables.

If we could specify not to show "private const" vs. "private" that would solve our issue.

::MikiNanuk
Title: Re: Unwanted private variables
Post by: sargasso on September 23, 2004, 12:12:25 am
Miki,

You could stereotype the ones that are trivial  as <<privconst>> and then use the hide seterotypes parts of specify feature visibility.

What intrigues me is why you have "lots" of private consts?  Are they enums? Are they resource values?

hth
Bruce
Title: Re: Unwanted private variables
Post by: MikiNanuk on September 23, 2004, 08:05:06 am
These classes form our data access layer.  In some of them, we construct a SQL command object that can be quite complex, so there are lots of fragments defined as private const in the class, e.g.

private const string WHERE_IF_CONDITION_A_TRUE = "SOMEVAL >= @someval"

::MikiNanuk