Book a Demo

Author Topic: How to add checkbox for a field in an UML diagram  (Read 12658 times)

Michael

  • EA Novice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
How to add checkbox for a field in an UML diagram
« on: October 10, 2014, 11:25:41 am »
I am going to allow use to select some items / methods from any class he want, so is there any way to allow him to select one or more method,
please see img to understand what I mean:



Thank you
« Last Edit: October 10, 2014, 11:26:20 am by MichaelRahn »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: How to add checkbox for a field in an UML diag
« Reply #1 on: October 10, 2014, 08:05:13 pm »
Not this way. You might consider to use a tagged value for that.

q.

Michael

  • EA Novice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: How to add checkbox for a field in an UML diag
« Reply #2 on: October 11, 2014, 04:00:59 am »
I know that feature, but I need more active interaction with user,
Because I am going to facilitate the input arguments taken from the user in order to send it back to the plugin I use by C#,
I need a User to just quickly determine which component/classes/method ,etc needed to be send quickly as possible to the plugin- Add-ins.

If there is any other quick way, just please let me know..

Regards,

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: How to add checkbox for a field in an UML diag
« Reply #3 on: October 11, 2014, 07:47:52 am »
Write an add-in to offer a context menu.

q.

Michael

  • EA Novice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: How to add checkbox for a field in an UML diag
« Reply #4 on: October 11, 2014, 10:58:18 am »
thank you qwerty

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: How to add checkbox for a field in an UML diag
« Reply #5 on: October 13, 2014, 09:36:33 am »
I'm not sure what you're actually trying to do with this selection. EA does offer selection of individual fields in terms of what is shown on the diagram. Look for Set Feature Visibility.

Michael co

  • EA User
  • **
  • Posts: 60
  • Karma: +0/-0
    • View Profile
Re: How to add checkbox for a field in an UML diag
« Reply #6 on: October 15, 2014, 10:01:46 pm »
Hello all,
I think for tagged value there is a problem because user every time must type the tagged value and name, and this will causes some mistakes if he/she typed wrong character(s) or missed some letters, I suggest to find a way to allow him to define the Tagged element once, and then allow him  to choose from drop-down menu/list !

Or What you suggest me please!

Once again my goal is to allow user to select some classes and some methods, because my Add-in will read only those are chosen by the user.


Regards,
« Last Edit: October 15, 2014, 10:04:40 pm by michael17 »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: How to add checkbox for a field in an UML diag
« Reply #7 on: October 15, 2014, 11:20:43 pm »
Are you the same Michael :-?

Anyhow, you can defined TVs as drop down quite easily. Either via the TV defaults or via a MDG. It would also be possible to define the drop down to from a set of stereotyped classes.

q.

Michael co

  • EA User
  • **
  • Posts: 60
  • Karma: +0/-0
    • View Profile
Re: How to add checkbox for a field in an UML diag
« Reply #8 on: October 16, 2014, 03:51:45 pm »
Actually I have done it using default TV.
but please how can I define context menu on components like(class) by usin Add-in plugin .

Thanks for all,

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to add checkbox for a field in an UML diag
« Reply #9 on: October 16, 2014, 04:43:47 pm »
Michael,

Your approach should depend on whether or not you want the user selection to be persistent.
If it is used to select items to be used in the add-in at that moment in time I would not bother with tagged values. Instead I would write a dialog that allows a user to select items from the model.

If you want to store the selection in the model (and use it later on) you might want to consider tagged values.

Defining context menu's in an add-in is probably the most basic add-in task.
Check my tutorial for an example.

Geert
« Last Edit: October 16, 2014, 04:44:40 pm by Geert.Bellekens »

Michael co

  • EA User
  • **
  • Posts: 60
  • Karma: +0/-0
    • View Profile
Re: How to add checkbox for a field in an UML diag
« Reply #10 on: October 17, 2014, 06:28:07 am »
I know the tutorial you send me, but this work in case of selecting packages or diagrams because it is available only in case of using Extension menu, but this menu 'Extension Menu' can be not displayed if you right click on class diagram for example.
Any way the point here is to simplify the process at end-user. to be more precise, for example if I add a TV for  each class then the user comes to type the value of that Tag, but he could provide wrong entries ex: if here type 0 instead of 1, then all of the plug-in functionality would be wrong,  that why I offer if we  could  add some drop down menu by somehow for each component / element and then the error rate will be 0, because of  no manual data to enter.

I am still thinking of that, because it is very important, I need more automated and precising mechanism....

once again thank you      Geert Bellekens a lot. but still need more suggestions .. :)

Regards,

« Last Edit: October 17, 2014, 06:33:09 am by michael17 »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: How to add checkbox for a field in an UML diag
« Reply #11 on: October 17, 2014, 09:11:24 am »
The menu appears in the very front in the context under Extensions.

What you're probably after is a context per attribute in a class. You'd need to navigate to the attribute in the project browser to see the context menu for that.

q.
« Last Edit: October 17, 2014, 09:13:07 am by qwerty »

Michael co

  • EA User
  • **
  • Posts: 60
  • Karma: +0/-0
    • View Profile
Re: How to add checkbox for a field in an UML diag
« Reply #12 on: October 17, 2014, 09:38:10 am »
I need to make control by allowing end-user to specify some extra information for each class or operator, like I want to give each class/operator an extra attribute like: Component_Type , this Component_Type must have 3 values : 1,2,null , so I need a strong mechanism to allow user to choose only one value of those values   instead of typing values, why? because if user by mistakes enters number like:0,4,-3, 5,.... which are not in my List of Component_Type, then my Add-in will not be able to recognize these strange numbers which entered by mistakes, so My Idea is to restrict the User to select from read only menu: which offers just only 3-read only values.
I would like user to specify what I need, this give more quality and more precision, my add-in can only classify each class or operator into 3 groups only, Group1 for value 0, and Group 2 for value 1, and Group 3 for null values, imagine if there is no read-only drop down list: then user can enter any wrong number which affect the whole process used by my add-in.

So again I am looking for a mechanism/way to prevent User from entering any arbitrary values.

Regards,
« Last Edit: October 17, 2014, 09:42:28 am by michael17 »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: How to add checkbox for a field in an UML diag
« Reply #13 on: October 17, 2014, 09:43:06 am »
You like it when then wind blows icy into your face?

Either you start digging very deep in writing add-ins or start looking for another tool --- or you start thinking of a methodology to achieve what you want with this tool's capabilities. I'd say that TVs and a little add-in could bring you on track.

q.
« Last Edit: October 17, 2014, 09:44:14 am by qwerty »

Michael co

  • EA User
  • **
  • Posts: 60
  • Karma: +0/-0
    • View Profile
Re: How to add checkbox for a field in an UML diag
« Reply #14 on: October 17, 2014, 10:14:32 am »
I would like to ask if possible to modify some EA-windows to add some programmable component(s) like the image below :



Thanks