Author Topic: Show class attributes  (Read 10626 times)

EA_enthusiast

  • EA User
  • **
  • Posts: 172
  • Karma: +0/-0
  • I'm a lifelong learner
    • View Profile
Show class attributes
« on: December 02, 2020, 08:51:19 am »
Hello members,

I need your help please to figure out how to show the attributes of a class.

In the diagram attached, I copied a class that has a number of attributes. The copied class does not show those attributes. I edited those attributes but I could not show them on the diagram. I can see them in the project browser but not in the class on the diagram.

I used compartment visibility and I checked attributes but that did not work.

Also, how can I add more attributes to the class.

Thank you,
Mo

P.S: I am not sure why I am unable to attach an image to my message?
Thank you to all the contributors who spread their knowledge and experience!

qwerty

  • EA Guru
  • *****
  • Posts: 13525
  • Karma: +395/-300
  • I'm no guru at all
    • View Profile
Re: Show class attributes
« Reply #1 on: December 02, 2020, 11:32:27 am »
You need to place the image on a public server and use a link. Wellcome to the future...

Your description is vague. You copied a class? How? (And why?) How does the copy look like in the project browser?

q.

EA_enthusiast

  • EA User
  • **
  • Posts: 172
  • Karma: +0/-0
  • I'm a lifelong learner
    • View Profile
Re: Show class attributes
« Reply #2 on: December 03, 2020, 04:17:50 pm »
Thank you for your response.

My problem is solved. I dropped the element again onto a different diagram (i.e. drop as link, then the attributes finally appeared.

Thank you for the tip regarding adding an imge to a public server. I will make sure to do this next time  :)

Thank you to all the contributors who spread their knowledge and experience!

qwerty

  • EA Guru
  • *****
  • Posts: 13525
  • Karma: +395/-300
  • I'm no guru at all
    • View Profile
Re: Show class attributes
« Reply #3 on: December 03, 2020, 09:13:34 pm »
Probably you had played around with the settings for the other diagram. There's a way to show/hide certain details.

q.

EA_enthusiast

  • EA User
  • **
  • Posts: 172
  • Karma: +0/-0
  • I'm a lifelong learner
    • View Profile
Re: Show class attributes
« Reply #4 on: December 04, 2020, 07:20:08 am »
Hello,

I need your help again, please. The attributes disappeared again. When I drop a class from the toolbox then add an attribute, could not display the attributes compartment.

I can see the attribute in the project browser but not on the diagram.

Please see the embedded screesnshot.

https://ibb.co/Zd9HGV7
« Last Edit: December 04, 2020, 07:22:56 am by Mo »
Thank you to all the contributors who spread their knowledge and experience!

qwerty

  • EA Guru
  • *****
  • Posts: 13525
  • Karma: +395/-300
  • I'm no guru at all
    • View Profile
Re: Show class attributes
« Reply #5 on: December 04, 2020, 08:10:18 am »
A bit strange. There's also a setting in the context Feature&Properties/....Visibility... where you can tweak that. If that's not it it might be your installation is somehow corrupt. Or the DB for some reasons (run Configure/Check Integrity/Project Integrity and tick the repair button; don't let EA confuse you with that being bad or dangerous!). You could probably tell a bit more about your environment (single user, new setup, which exact EA versiiĆ³n, which DB) or else it's a lot guesswork here.

q.

EA_enthusiast

  • EA User
  • **
  • Posts: 172
  • Karma: +0/-0
  • I'm a lifelong learner
    • View Profile
Re: Show class attributes
« Reply #6 on: December 04, 2020, 08:23:28 am »
Thank you so much for your response. I've been pulling out my hair since yesterday!

This is a trial version. I am single user. In the welcoem screen, I choose "Ultimate".

I tried to drop the same class in (a) Class diagram (b) Custom Diagram Style Diagram (c) Strategy Map Diagram

In all these cases, I could not show the attributes. Please see the screenshots:

https://ibb.co/190Pn7r
https://ibb.co/WyWhFff
https://ibb.co/wRFGgfr

Please help!

« Last Edit: December 04, 2020, 08:51:51 am by Mo »
Thank you to all the contributors who spread their knowledge and experience!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8554
  • Karma: +254/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Show class attributes
« Reply #7 on: December 04, 2020, 09:10:04 am »
Hi Mo,

Check the diagram properties  <context menu> | Properties... | ELement | Show Compartments | [X] Attributes If that Checkbox is marked, then check the object Compartment Visibility [Ctrl+SHift+Y] settings.  You'll see Attribute Visibility section.

Lastly, check if the class is in "Rectangle Notation" (in V15 that's the new "Paintbrush" widget).  Many shapescriots will NOT show attributes is they are NOT in Rectangle Notation.

HTH,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

qwerty

  • EA Guru
  • *****
  • Posts: 13525
  • Karma: +395/-300
  • I'm no guru at all
    • View Profile
Re: Show class attributes
« Reply #8 on: December 04, 2020, 09:22:38 am »
Just noticed that you are using a MDG. Well, that might as well explain things. No idea about that Strategy map. Start with using simple UML classes first before reaching out to any MDG.

q.

EA_enthusiast

  • EA User
  • **
  • Posts: 172
  • Karma: +0/-0
  • I'm a lifelong learner
    • View Profile
Re: Show class attributes
« Reply #9 on: December 04, 2020, 09:27:29 am »
Hello, Paolo,

Thank you so much for your response.

I double-checked the 2 areas of settings and they are checked.

One thing I tried is to open the file on a nother computer. What I noticed that I can show the attribute of one class but not teh other, Both on the same diagram and both have the same settings <context menu> | Properties... | ELement | Show Compartments | [X] Attributes

Please see the screenshot

https://ibb.co/K60TpLf

Mo
Thank you to all the contributors who spread their knowledge and experience!

EA_enthusiast

  • EA User
  • **
  • Posts: 172
  • Karma: +0/-0
  • I'm a lifelong learner
    • View Profile
Re: Show class attributes
« Reply #10 on: December 04, 2020, 09:28:16 am »
Thank you, q.

What is MDG?

Mo
Thank you to all the contributors who spread their knowledge and experience!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8554
  • Karma: +254/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Show class attributes
« Reply #11 on: December 04, 2020, 09:52:09 am »
Thank you, q.

What is MDG?

Mo
What qwerty is saying that the Mission object is managed by a separate process.  The object may not be able to normally display attributes (see my point about shapescripts).

To my mind, it is one of those fallacies of many modelling methodologies that the item can't have features.  Usually what is conflated is that the item doesn't normally display them, therefore it can't have them.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

EA_enthusiast

  • EA User
  • **
  • Posts: 172
  • Karma: +0/-0
  • I'm a lifelong learner
    • View Profile
Re: Show class attributes
« Reply #12 on: December 04, 2020, 11:12:44 am »
Thank you, Paolo, for trying to clarify this mystery (at least t me, it is).

What does MDG stand for? Probably it's something I need to research to be aware of.

My interpretation for "the Mission object is managed by a separate process" is that the "Mission" object or class is created under the "Strategy Map Diagram" Perspective, and that could be the reason that it does not show attributes. Is my understanding correct?

If my understanding is correct, that could be why I have two classes on the same diagram. One of them displays attributes, and the other one does not display attributes.

Did I get it right?

Again, thank you so much for your time to explain this to me.

Mo
« Last Edit: December 04, 2020, 11:15:22 am by Mo »
Thank you to all the contributors who spread their knowledge and experience!

qwerty

  • EA Guru
  • *****
  • Posts: 13525
  • Karma: +395/-300
  • I'm no guru at all
    • View Profile
Re: Show class attributes
« Reply #13 on: December 04, 2020, 11:14:35 am »
MDG = Model Driven Generation (https://acronyms.thefreedictionary.com/MDG) in the Sparx universe. It offers different profiles and other stuff in a bundle. You are using the Strategy MDG. Better put that aside and start with plain UML. and no MDG at all You can turn them off under Specialize/Manage... (depending on your EA version). Turn everything off except for basic UML stuff. Heaven knows why Sparx splatters users with tons of these MDGs. Probably because its good marketing :-/

q.

EA_enthusiast

  • EA User
  • **
  • Posts: 172
  • Karma: +0/-0
  • I'm a lifelong learner
    • View Profile
Re: Show class attributes
« Reply #14 on: December 04, 2020, 11:30:35 am »
Thank you, qwerty for the further clarification.

I nderstood from your comment that MDG might (or do) behave differently than the standard UML and that is the reason for the inconsistent behavior that I encountered (one class shows attributes but the other is not).

I personally liked these ready-made patterns (MDG) and found them very useful and time-saving. It's unfortunate that I could not leverage them the way I was expecting.

These patterns are one of the reason that I am trying Sparx now and wanting to switch from Cameo to Sparx.

Thank you.
Mo
Thank you to all the contributors who spread their knowledge and experience!