Book a Demo

Author Topic: Help with Profile  (Read 12001 times)

JohnDoe

  • EA User
  • **
  • Posts: 191
  • Karma: +0/-0
  • EA rocks !
    • View Profile
Help with Profile
« on: May 30, 2008, 08:35:04 am »
Hello,

I have started a small custom profile example with one class, two enumerations and a custom shape and it works in a exported/imported profile package. So far so good.

Now I wanted to alter the graphic of the actor shape using bmp or png files. No matter what I tried, I cant change the standard Actor icon to a custom icon.

I tried any variation of naming my elements according to this help pages: http://www.sparxsystems.com.au/EAUserGuide/index.html?toolbox_profiles.htm

Could someone please check my example files below ?
Is it because of wrong naming or because of wrong png/bmp files or am I totally wrong with my example ?

Could anyone provide me with a simple EAP file including a simple profile example, where I can see how to enable a custom image for an element ?

Greetings
Bernd

Here is the zipped EAP file, in which I would like to customize the picture of the actor to a custom image:
http://share-now.net/files/8764-eigeneToolbox.zip.html

Dave_Bullet

  • EA User
  • **
  • Posts: 295
  • Karma: +0/-0
    • View Profile
Re: Help with Profile
« Reply #1 on: May 30, 2008, 09:06:41 am »
I am struggling with the same thing and haven't solved it.

Personally - I would like to see Sparx ship a cutdown profile XMI that shows one instance of every feature possible, with toolboxes, custom diagrams, profile, classifier types, icons etc...  The help is not enough.

David.
"I know I'm close to a good design, but it's like the balloon animals, squeeze in one spot and the problem moves down the line"

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Help with Profile
« Reply #2 on: May 30, 2008, 10:17:32 am »
Here's an image of a setup that works.  (Ignore the isActive attribute on the toolbox metaclasses.  That's because I was copied the Class metatype from earlier and didn't see them until the image was already uploaded.)



The things that I can see that I have done differently are:
  • Separating the your profile into two.  A base profile and a toolbox profile that uses it.
  • Fully describing the item in the toolbox in both the toolbox page and item image.
  • The icon attribute has a lower case 'I' in my example.  (Try this before fully specifying the stereotype.  If it works there is an error in the documentation that needs to be resolved.

JohnDoe

  • EA User
  • **
  • Posts: 191
  • Karma: +0/-0
  • EA rocks !
    • View Profile
Re: Help with Profile
« Reply #3 on: May 30, 2008, 03:59:07 pm »
Hello Simon,

what file format is the icon picture, you are referring to in your screenshot ? png, bmp, wmf, emf ?

Thanks in advance!!
bernd
« Last Edit: May 30, 2008, 04:45:07 pm by BerndWill »

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Help with Profile
« Reply #4 on: May 30, 2008, 04:19:20 pm »
Bitmap (8 bit color, although I don't know if that's important.)

JohnDoe

  • EA User
  • **
  • Posts: 191
  • Karma: +0/-0
  • EA rocks !
    • View Profile
Re: Help with Profile
« Reply #5 on: May 30, 2008, 04:45:16 pm »
And one more question: Could you please publish a hardcopy of your project browser, where I can see how you have nested the folders and which folder contains what element ?

Thanks in advance!!
bernd

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Help with Profile
« Reply #6 on: June 02, 2008, 08:47:48 am »
The above picture shows my package heirarchy.

Export both packages to profiles.
Use the MDG technology wizard to add the first as a profile.
Open the MTS file to add the UIToolboxes node for the second profile.
Generate the technology and copy it to your MDG Technologies directory in the EA install directory.
Restart EA.

Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • Aren´t we all in the model business ?
    • View Profile
    • Karl Storz homepage
Re: Help with Profile
« Reply #7 on: June 03, 2008, 01:09:48 am »
OK, I am jumping in here to Bernds help. I have also no luck with the following:

Quote
<?xml version="1.0" encoding="windows-1252"?>
<UMLProfile profiletype="uml2">
      <Documentation id="5C76528C-5" name="ContiPT" version="1" notes="ContiPT"/>
      <Content>
            <Stereotypes>
                  <Stereotype name="VLComponent" notes="" bgcolor="-1" fontcolor="-1" bordercolor="-1" borderwidth="-1" hideicon="0">
                    <AppliesTo>
                        <Apply type="Component">
                            <Property name="isActive" value=""/>
                        </Apply>
                    </AppliesTo>
                  </Stereotype>
            </Stereotypes>
      </Content>
</UMLProfile>

Toolbox profile:

Quote
<?xml version="1.0" encoding="windows-1252"?>
<UMLProfile profiletype="uml2">
      <Documentation id="C270F169-C" name="ContiPT Logic" version="1.0" notes="ContiPT Logic"/>
      <Content>
            <Stereotypes>
                  <Stereotype name="ContiPTLogic" notes="All logical components of VICOS LIO" cx="90" cy="70" bgcolor="-1" fontcolor="-1" bordercolor="-1" borderwidth="-1" hideicon="0">
                        <AppliesTo>
                              <Apply type="ToolboxPage">
                                    <Property name="isActive" value=""/>
                              </Apply>
                        </AppliesTo>
                        <TaggedValues>
                              <Tag name="ContiPT::VLComponent(UML::Component)" type="" description="" unit="" values="" default="VLComponent"/>
                        </TaggedValues>
                  </Stereotype>
            </Stereotypes>
            <TaggedValueTypes/>
      </Content>
</UMLProfile>


The first is a profile with just a component, the second tries to put the component in a seperate toolbox.
Whatever I do - putting it into a MDG technology, just use the profiles via import - the result is the same: The first profile is shown in the toolbox including the component, the second only shows some sort of open folder icon in the profile browser and a stereotype icon in the toolbox.

I agree, the process to work with the toolbox profiles and technologies is not very transparent, especially what has to be included in the mts, xml files with which consequences, etc.

Oliver

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Help with Profile
« Reply #8 on: June 03, 2008, 08:35:27 am »
To use a toolbox profile, you need to create an MDG technology.

My MTS file (which you could copy the structure of) looks like this.

Code: [Select]
<MDG.Selections model="C:\CutDownProfile\CutDownProfile.eap">
      <Technology id="CutDown" name="Cut Down Profile" version="1" notes="Small profile" filename="C:\CutDownProfile\CutDownProfile.xml"/>
      <Profiles directory="C:\CutDownProfile" files="profile.xml"/>
      <UIToolboxes directory="C:\CutDownProfile" files="toolbox.xml"/>
</MDG.Selections>

This produces this technology.
Code: [Select]
<MDG.Technology version="1.0"><Documentation id="CutDown" name="Cut Down Profile" version="1" notes="Small profile"/><UMLProfiles><UMLProfile profiletype="uml2">
                  <Documentation id="4725B7D4-A" name="CutDownProfile" version="1.0" notes="CutDownProfile"/>
                  <Content>
                        <Stereotypes>
                              <Stereotype name="MyStereotype" notes="">
                                    <AppliesTo>
                                          <Apply type="Class">
                                                <Property name="isActive" value=""/>
                                          </Apply>
                                    </AppliesTo>
                              </Stereotype>
                        </Stereotypes>
                        <TaggedValueTypes/>
                  </Content>
            </UMLProfile>
      </UMLProfiles><UIToolboxes><UMLProfile profiletype="uml2">
                  <Documentation id="50ABAD1C-1" name="CutDownProfile" version="1.0" notes="CutDownProfile"/>
                  <Content>
                        <Stereotypes>
                              <Stereotype name="CutDownProfile" notes="">
                                    <AppliesTo>
                                          <Apply type="ToolboxPage">
                                                <Property name="isActive" value=""/>
                                          </Apply>
                                    </AppliesTo>
                                    <TaggedValues>
                                          <Tag name="CutDownProfile::MyStereotype(UML::Class)" type="" description="" unit="" values="" default="My Stereotype"/>
                                    </TaggedValues>
                              </Stereotype>
                              <Stereotype name="CutDownProfile::MyStereotype(UML::Class)" notes="">
                                    <Icon type="bitmap" xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="bin.base64">Qk02BQAAAAAAADYEAAAoAAAAEAAAABAAAAABAAgAAAAAAAABAAAAAAAAAAAAAAABAAAAAAAA
AAAAAAAAgAAAgAAAAICAAIAAAACAAIAAgIAAAMDAwADA3MAA8MqmAAAgQAAAIGAAACCAAAAg
oAAAIMAAACDgAABAAAAAQCAAAEBAAABAYAAAQIAAAECgAABAwAAAQOAAAGAAAABgIAAAYEAA
AGBgAABggAAAYKAAAGDAAABg4AAAgAAAAIAgAACAQAAAgGAAAICAAACAoAAAgMAAAIDgAACg
AAAAoCAAAKBAAACgYAAAoIAAAKCgAACgwAAAoOAAAMAAAADAIAAAwEAAAMBgAADAgAAAwKAA
AMDAAADA4AAA4AAAAOAgAADgQAAA4GAAAOCAAADgoAAA4MAAAODgAEAAAABAACAAQABAAEAA
YABAAIAAQACgAEAAwABAAOAAQCAAAEAgIABAIEAAQCBgAEAggABAIKAAQCDAAEAg4ABAQAAA
QEAgAEBAQABAQGAAQECAAEBAoABAQMAAQEDgAEBgAABAYCAAQGBAAEBgYABAYIAAQGCg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+v////////aCZIHBwcH6//r6+vr6+vr6wmSBwcHB+v/////////
//8JkgcHBwfr6+vr6+vr6+vr6+sHBwcHBwcHBwcHBwcHBwcHBwc=</Icon>
                                    <AppliesTo>
                                          <Apply type="ToolboxItemImage">
                                                <Property name="isActive" value=""/>
                                          </Apply>
                                    </AppliesTo>
                              </Stereotype>
                        </Stereotypes>
                        <TaggedValueTypes/>
                  </Content>
            </UMLProfile>
      </UIToolboxes></MDG.Technology>

JohnDoe

  • EA User
  • **
  • Posts: 191
  • Karma: +0/-0
  • EA rocks !
    • View Profile
Re: Help with Profile
« Reply #9 on: June 03, 2008, 04:03:24 pm »
Quote
Here's an image of a setup that works.  

Hello Simon,

I have put some questions directly in your diagram. Maybe I am too stupid, but I can't create your example. Here are my problems:



Here is my example:



Thanks again
Bernd
« Last Edit: June 03, 2008, 04:09:14 pm by BerndWill »

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Help with Profile
« Reply #10 on: June 04, 2008, 07:50:53 am »
Quote
How did you create the "(Profile) ..." Prefix?
Diagram options - Use Alias if available.
Tools | Options | Diagram | Behavior | Alias Usage | Alias and Name.
Profile, and Toolbox are the Aliases of that package, intended to help see what the individual packages were intended for.

Quote
Did you name "MyStereotype" as "CutDownProfile::MyStereotype" or is this only a display option here?
Diagram options - Show Namespace.

Quote
How did you display the package contents?
I dropped the packages onto the diagram, then dropped the classes from the package onto the diagram too.  Finally, I laid it out as I wanted.

JohnDoe

  • EA User
  • **
  • Posts: 191
  • Karma: +0/-0
  • EA rocks !
    • View Profile
Re: Help with Profile
« Reply #11 on: June 04, 2008, 08:25:09 am »
Thank you Simon,

hopefully this will be my last question concerning this topic :-)
What does that "(UML Class)"  in your diagram mean ? Where does it come from ? Are these two classes somehow derived from "Class" !?



My folder hierarchie is as follows.



Greetings
Bernd

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Help with Profile
« Reply #12 on: June 04, 2008, 09:43:05 am »
The UML::Class comes from explicitly stating in the toolbox profile what the UML element the stereotype is.  In your case it would be UML::Actor.

I don't know if it is necessary or not, but it does need to be consistent.

JohnDoe

  • EA User
  • **
  • Posts: 191
  • Karma: +0/-0
  • EA rocks !
    • View Profile
Re: Help with Profile
« Reply #13 on: June 04, 2008, 05:21:37 pm »
Is there any EAP file available for download, that contains a working MDG technology example ?

Greetings
Bernd

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Help with Profile
« Reply #14 on: June 05, 2008, 08:30:19 am »
No, not that I'm aware of.