Book a Demo

Author Topic: Hide initial field values?  (Read 5392 times)

cnahr

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Hide initial field values?
« on: February 16, 2009, 12:47:38 am »
When reverse-engineering C# source code that contains fields with initialization expressions, EA always shows these expressions whenever the fields themselves are shown.  This is also the case in EA 7.5 beta.

Example: public static readonly MyField = new MyType(...);

In this case the whole "new MyType(...)" expression (or as much as will fit in the box) always shows up in any diagram that shows MyField.

Question: Is there an option somewhere to suppress this display?  Currently, my recourse is to simply delete this expression when generating UML diagrams for documentation, but of course that's rather laborious.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Hide initial field values?
« Reply #1 on: February 16, 2009, 03:38:45 am »
I believe you need to update your diagram properties.

Open your diagram and invoke the Properties dialog (F5). Click the Features tab and clear the Show Property String option. This should do what you need.

Here are some things you might want to keep in mind...
This will affect the current diagram, but will not retroactively change diagrams you have already created. You will need to go back and tweak each one.

For elements you have already created, you might find the width of the element on the diagram is now larger than necessary. You might want to resize the elements (manually, or with Alt-Z) before incorporating the diagram in a presentation. You should only have to do this once.

EA should remember this setting and use it as the default for diagrams you create in future. If you need to reverse this for a future diagram, this will also reverse the default.

HTH, David
No, you can't have it!

cnahr

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: Hide initial field values?
« Reply #2 on: February 16, 2009, 07:12:22 pm »
Quote
Open your diagram and invoke the Properties dialog (F5). Click the Features tab and clear the Show Property String option. This should do what you need.

Thanks for your reply, but unfortunately this option does not do what I need.

"Show Property String" only controls display of the {readOnly} modifier, not of the initial property value.  The initial value is always shown, regardless of whether this option is checked or not.  I don't really care about the {readOnly} tag, it's the initial value I want to hide...

Any other ideas?

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Hide initial field values?
« Reply #3 on: February 17, 2009, 03:00:21 am »
You're right, it doesn't!

I think this is a bug. Will you report it or shall I?

[There's a chance I got around to reporting this some time ago, and then forgot. In any case it seems not to have been addressed.]

David
No, you can't have it!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Hide initial field values?
« Reply #4 on: February 17, 2009, 08:24:33 am »
Quote
"Show Property String" only controls display of the {readOnly} modifier, not of the initial property value.

That is the property string.

There is not currently any option for hiding the initial value.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Hide initial field values?
« Reply #5 on: February 17, 2009, 08:28:28 am »
Could we add such an option Simon?

And could that be done for 7.5 production?
No, you can't have it!

cnahr

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: Hide initial field values?
« Reply #6 on: February 17, 2009, 08:49:26 pm »
Yes, please!  I would even say that such an option should default to hiding the initial value since it's rarely useful -- typically the diagram just shows the first couple of character followed by an ellipsis anyway.