Author Topic: Beginner questions about MDG creation  (Read 589 times)

Richard Freggi

  • EA User
  • **
  • Posts: 42
  • Karma: +1/-1
    • View Profile
Beginner questions about MDG creation
« on: May 23, 2017, 11:41:31 pm »
EA 13.10

Hello I am playing around with MDG to customise the toolboxes of standard UML profile (by removing the toolbox elements that I don't use).

I use the MDG Technology Builder to create the xmi files for toolboxes and diagram types for several UML diagrams (Class, Use Case etc.).  My MDG files create correctly and show in both the Resouces / MDG technologies / Import technology as well as in the Configure / Technology / Manage menus.  However sometimes the "Set active" button remains grayed out even if I restart EA.  In this case I cannot access the MDG.

Question 1. Does anyone have any good guess of common reasons why the enable button is grayed out?
Question 2. I assume that to change the toolboxes I don't need to redefine extensions of the UML standard elements / connectors and diagrams... just define the new toolboxes using the profile helper.  Is that correct?   
Question 3. When using the helper, is it better to have a separate eap project file for each toolbox or to have all in one eap file?  If all in one file, what is the right package structure (I remember the user manual saying stereotype packages cannot be nested)?  I am trying this package structure:
-  Model
  - Sparx Helper
     - Component profile
        - Component  diagram profile (I edit the toolbox attribute, then I save this package as a profile)
        - Component diagram toolbox (I edit this, then I save this package as a profile)
        - Component toolbox profile
     - Use Case profile
        - Use Case diagram profile (I edit the toolbox attribute, then I save this package as a profile)
        - Use Case diagram toolbox (this is the part I edit, then I save this package as a profile)
        - Use Case toolbox profile
      - Etc. etc.

Thank you very much!
   

Uffe

  • EA Practitioner
  • ***
  • Posts: 1072
  • Karma: +81/-5
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Beginner questions about MDG creation
« Reply #1 on: May 24, 2017, 03:01:31 am »
Hi Richard,


1) Don't know. I never use Set Active.

2) That is correct. However, if you want your adapted toolboxes to appear with the standard diagrams (as opposed to your own diagram types), you have to "override default toolboxes" (see help).

3) To each his own, but here's what I use.

MDG Technology development is always in its own project. Depending on the situation there may be one project per technology, or several technologies can share. Really the biggest decider is the number of document templates, because there's just no way of structuring them.

My basic setup has a root node with the same name as the technology, with three views for the different type of profile. So:
[Name of MDG Technology]
  - "Profiles"
  - "Toolboxes"
  - "Diagrams"

Each view has one or more «profile» packages. I use the following naming scheme:
- Profiles (actual UML profiles, that is): abbreviated names, in camel case with whitespaces replaced by underscores
- Toolboxes: Longer, more descriptive names, with some hierarchical naming if there are more than two or three; spaces allowed
- Diagram sets: short names but no abbreviations; whitespeces replaced by dashes

These rules are based on what EA shows where in the GUI, and work pretty well. Using dashes in one case and underscores in another makes things more consistent (hi, Paolo!) and helps you see what's in which XML file.

In true EA style, the diagram type doesn't matter: when EA sees the "profile" stereotype, it ignores its regular mechanism for opening the right toolbox and instead opens the profile toolbox regardless of diagram type.
I use this as a simple way of keeping track in the project: packages for actual UML profiles get class diagrams, toolbox profiles get component diagrams and diagram set profiles get deployment diagrams.

I don't use the profile helpers much, but if I did I still wouldn't add a package level for them. They're just a convenience to take some of the drudgery out of technology building, they don't add anything you can't do yourself. Put another way, they don't exist in the MDG Technology metamodel.

On disk I create a top level directory with the same name as the root node, then three subdirectories "Profiles", "Toolboxes" and "Diagrams". This is useful because the MDG Technology wizard stores the three directories in the registry, and also it doesn't check to make sure you don't add a toolbox to the diagram section, in which case the generation works but the resulting technology is borked.

So that's my basic setup. I also like to place any scripts and above all search definitions in document artifacts, to make sure they're stored with the rest of the source data and not just on a file in my home directory.

For the record: I don't have OCD. I just used to build military command and control systems for a living. :)


/Uffe
My theories are always correct, just apply them to the right reality.

qwerty

  • EA Guru
  • *****
  • Posts: 8961
  • Karma: +136/-123
  • I'm no guru at all
    • View Profile
Re: Beginner questions about MDG creation
« Reply #2 on: May 24, 2017, 06:35:11 am »
IIRC the Set Active is greyed out if the startup does not run error-free. That will EA make think that something is wrong with the add-in. Unfortunately (the Sparxians are deaf when people yell for better logging) you don't get any good feedback from EA. Just "doesn't work". Sigh.

q.
« Last Edit: May 24, 2017, 06:10:11 pm by qwerty »

Richard Freggi

  • EA User
  • **
  • Posts: 42
  • Karma: +1/-1
    • View Profile
Re: Beginner questions about MDG creation
« Reply #3 on: May 24, 2017, 11:26:44 am »
qwerty and uffe thank you VERY much!

Richard

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 7736
  • Karma: +165/-21
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Beginner questions about MDG creation
« Reply #4 on: May 24, 2017, 04:11:43 pm »
My 2 cents:

We have 3 different environments (EA databases) DEV, TEST and PROD.
We develop the UML profiles, templates and all other MDG stuff in the DEV environment, and then deploy that to the TEST environment to see if everything works as expected.
Only then we promote our MDG to PROD.

We also all put all of our MDG and development stuff in version control in order to have some kind of control of the development process.

Geert