Author Topic: Toolbox Profile Sample?  (Read 6617 times)

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Toolbox Profile Sample?
« on: November 26, 2007, 05:18:46 am »
Hello,

I have defined a little profile with stereotypes, and it works all right. Now a toolbox profile is called for, but I can't seem to get it to work. Is there a sample somewhere in Sparx's resources (I haven't found any).

EA help on this topic is a bit weird. I have to include my stereotypes profile as well as a new toolbox profile in an MDG definition, and therefore create an mts file. Now according to EA help I have to:

1. Use the MDG wizard to create an mts file with only the stereotypes profile.

2. Edit the new mts file by hand to insert a couple of tags

Quote
Once you have created the .MTS file, open it in a text editor. Cut and paste the following two lines before the last line of the file (i.e. between the <Technology... /> and </MDG.Selections> lines:

       <UIToolboxes directory="" files=""/>

       <DiagramProfile directory="" files=""/>

       <UITaskpanes directory="" files=""/>


3. Use the wizard again to create the MDG definition xml file defined by the manually manipulated mts file.

I've tried it, but I'm not sure about step 2.

The mts file created by the wizard has a <Profiles> tag where the three new tags are to be inserted, so do I overwrite it or add the new tags before or after it?

A working sample (with an xmi for a stereotypes profile, an xmi for the toolbox profile, and an mts for both) would be much more helpful.

Frank

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: Toolbox Profile Sample?
« Reply #1 on: November 26, 2007, 01:58:34 pm »
Quote
The mts file created by the wizard has a <Profiles> tag where the three new tags are to be inserted, so do I overwrite it or add the new tags before or after it?

The </MDG.Selections> line has to be the last line in the file. Insert the new stuff immediately before it.
The Sparx Team
[email protected]

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: Toolbox Profile Sample?
« Reply #2 on: November 26, 2007, 02:21:38 pm »
Sorry, this Help topic was a bit off the mark and I updated it only last week. The updated topic will be in the Help for EA 7.1, soon to be released.

To create the MTS file, go through the process in

http://www.sparxsystems.com.au/EAUserGuide/index.html?creatingmdgtechnologies.htm

At step 2 select the Create a new MTS file option. As you continue, include all the checkbox items that you want (step 6).

You can then go to the Working with MTS files topic and you can add:
  • Diagram Profiles
  • Tasks Pane profiles
  • Your own Enterprise Architect UML Toolbox profiles
  • Icons and logos for the technology
  • Model Validation configurations
  • Model Templates.

(You create the Toolbox profiles using this topic:

http://www.sparxsystems.com.au/EAUserGuide/index.html?toolbox_profiles.htm)

Open the .MTS file in a text editor. To make it easier for you, you can copy the following lines and paste them into the file before the last line of the file (i.e. between the <Technology... /> and </MDG.Selections> lines:
  • <UIToolboxes directory="" files=""/>
  • <DiagramProfile directory="" files=""/>
  • <UITaskpanes directory="" files=""/>
(The code for the icons, logos, model validation configurations and model templates is provided in later topics.)

You can, if necessary, have more than one line for each inclusion; for example, if your profiles are in different locations, more than one DiagramProfile.

For the directory attributes, enter the full path of the folder in which your Toolbox Profiles, Diagram Profiles, or Task Pane Profiles are kept.

For the files attributes, enter a comma-separated ordered list of profile filenames.

Save the .MTS file.

You then go into the MDG Technology Wizard again and run through the procedure, selecting Open an existing MTS file and clicking on Next until finished. This updates the MDG Technology file.

HTH
« Last Edit: November 26, 2007, 02:26:47 pm by RoyC »
Best Regards, Roy

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: Toolbox Profile Sample?
« Reply #3 on: November 27, 2007, 12:28:25 am »
Thank you, Roy.

I've got my technology xml file now, and it half works, though the xml looks strange to me for its redundancy (the UMLProfiles tag contains both profiles, and the DiagramProfile and UIToolboxes tags each contain one of them again), but maybe it has to be that way for backward compatibility.

Still my toolbox page does not come out as expected. It appears in the toolbox all right when I switch to a class diagram, but it does not show the elements. Instead it shows the name of the toolbox page as element.

That's why I was asking for a sample.

My diagram profile is called "Classification" and contains e.g. a stereotype "CLMClass".

In the toolbox profile I have a stereotype "ClassificationElements" with alias="Classification Elements", and it has

Code: [Select]

<TaggedValues>
   <Tag name="Classification::CLMClass(UML:Class)" type="" description="" unit="" values="" default="CLMClass"/>
   <Tag name="Classification::CLMFeature(UML:Object)" type="" description="" unit="" values="" default="CLMFeature"/>
</TaggedValues>


But the toolbox does not show CLMClass and CLMFeature as I expected, but it shows a single element named "Classification Elements".

So what have I done wrong? Do I need the attributes "type", "description", "unit" and "values" in the <Tag> tags? And where do I define them in the profile project?

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: Toolbox Profile Sample?
« Reply #4 on: November 27, 2007, 06:13:32 pm »
Frank,

It's hard to tell from your description what the problem might be. Could you e-mail a copy of your technology file to Sparx support please, and we will investigate further. Thanks.

Neil
The Sparx Team
[email protected]

BillW

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Toolbox Profile Sample?
« Reply #5 on: January 18, 2008, 07:00:14 am »
Roy, I've been playing with this & see something in your example:  You need double-colons after the technology name -- UML::Class (instead of UML:Class).  If that was the only problem, it should show up in the toolbox, but when you drag it on to a diagram, nothing happens.

I'm new to this tool & not sure where you got the "CODE" above.  These should be Attributes on the stereotype, not tagged values -- but perhaps they look the same in the "CODE"?

It took a while, but I got a toolbox working.  (If only I could say the same about a Diagram Profile! :-/ )

Tell me how you got the Code snippet & maybe I can post a sample.

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: Toolbox Profile Sample?
« Reply #6 on: January 20, 2008, 01:48:29 pm »
Williamewillis, perhaps you were directing your comments to Frank?
« Last Edit: January 20, 2008, 01:48:48 pm by RoyC »
Best Regards, Roy

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: Toolbox Profile Sample?
« Reply #7 on: January 20, 2008, 11:55:34 pm »
Looks like there can be more than one reason for nothing to happen when you drag a toolbox element to a diagram. The single instead of double colon was one of them.

Another pitfall:

Don't add your MDG technology XML file in the resources window (this seems to work only for pre 7.0 EA profiles), but copy it to <progam files>\Sparx Systems\EA\MDGTechnologies (or add it's path in the "Advanced" dialog of the "Settings- MDG Technologies" menu) and then restart EA.

As to the diagram profile: I got it to work defining it the way it's described in EA help. The problem with the whole profile thing is that it's hard to trace errors. One little typo and EA will give you no message or anything, but the profile will not work.

BillW

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Toolbox Profile Sample?
« Reply #8 on: January 22, 2008, 07:39:53 am »
Yes, I meant Frank.  Sorry!  :-[

I figured out my diagram profile problem as well, by carefully re-reading the instructions.  I had the attributes on the wrong object.

- Bill