Author Topic: Unwanted private variables  (Read 2976 times)

MikiNanuk

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Unwanted private variables
« 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

TrtnJohn

  • EA User
  • **
  • Posts: 176
  • Karma: +0/-0
    • View Profile
Re: Unwanted private variables
« Reply #1 on: September 17, 2004, 11:38:57 am »
Right click the class and select Element Features-Specify Feature Visibility...

MikiNanuk

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Unwanted private variables
« Reply #2 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

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: Unwanted private variables
« Reply #3 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
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.

MikiNanuk

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Unwanted private variables
« Reply #4 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