Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Thomas H.

Pages: [1] 2
1
Suggestions and Requests / Icons for stereotypes in project browser
« on: November 26, 2008, 04:09:32 am »
I defined my own stereotypes in an UML profile with specific shapes.
(in the uml profile the attribute "_image" is used for defining own shapes for a stereotype).

I wanted to know if it is possible to define shapes for the icons that are shown in the project browser.
According to an answer in the user forum this is currently not supported.

The URL for the forum message with the same content is
http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1227620390

2
Bugs and Issues / Re: Display tagged value content
« on: December 02, 2008, 09:01:17 pm »
Thank you for all your answers, I think it is important to add some complete examples for shape scripting as long as the documentation doesn't contain a "complete" description for all shape scripting features.

I will try to add an example whenever I found out something (for example by receiving an answer in this forum) that is not included in the documentation.

3
Bugs and Issues / Re: Display tagged value content
« on: November 28, 2008, 02:03:51 am »
OK, I made a mistake by placing the code you linked to.

It has to be used as a separate shape, not inside the - for example - start shape:

shape main
{
    noshadow=true;
    setlinestyle("SOLID");
    moveto(0,0);
    lineto(100,0);
}

shape middletoplabel
{
    h_align= "center";
    v_align= "center";
    println("#TAG:MyTag#");
}

 
shape target
{
    rotatable = true;
    startpath();
    setfillcolor(255,255,255);
    setpencolor(0,0,0);
    moveto(0,0);
    lineto(16,6);
    lineto(16,-6);
    endpath();
    fillandstrokepath();
}



Thank you very much :)

4
Bugs and Issues / Re: Display tagged value content
« on: November 28, 2008, 01:21:27 am »
Quote
Not intuitive maybe, but not really illogical either. If it wasn't like this, how would you go about graphical elements which you actually want to be repeated in each line segment (like a small circle  in the middle or whatever)?

The only solution I found so far is printing the tagged value in a label; shape scripting allows to redefine the labels for the connector, though this still seems to be undocumented.

http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1227491116

Thank you for the link information there. Now I can display the tag information, but still it is repeated if there is an angle.

Maybe a boolean flag like "repeatForEveryLinePart" (default=false) would be nice ;)


And some effect that I would not expect as well:

shape main
{
  noshadow=true;
  setlinestyle("SOLID");
  moveto(0,0);
  lineto(100,0);
  print("#TAG:MyTag#");
}

The result:
whenever you add a point (Ctrl+left mouse click) you get the information repeated as follows:

initial: information is shown once

1st extra angle:
- initial information in one line
- second: the information is shown twice

2nd extra angle:
- initial information in one line
- second: the information is shown twice
- third: information is shown three times

Would not expect that.

5
Bugs and Issues / Re: Display tagged value content
« on: November 27, 2008, 11:16:54 pm »
I reported a bug about repeating the content of the subshape with every new angle.

But I still have no idea how I could display specific tagged value content...
It seems that this is currently not possible  :(

6
Bugs and Issues / Display tagged value content
« on: November 27, 2008, 09:35:50 pm »
Is it possible to modify the shape script for a stereotyped association so that the content of a tagged value is shown?

Currently it is possible to show the following standard attributes in an editable field: alias, name, note, stereotype

Example:
Stereotype "MyAssociation" extends Metaclass "Association" with the
   attribute/tag: CurrentState, type String

the shape script:

shape main
{
    noshadow=true;
    addsubshape("currentstatecompartment", 100, 100);
    setlinestyle("SOLID");
    moveto(0,0);
    lineto(100,0);

    shape currentstatecompartment
    {
         h_align = "center";
         editablefield = "CurrentState";
         println("Z: #CurrentState#");
    }
}
 
shape target
{
  rotatable = true;
  startpath();
  setfillcolor(255,255,255);
  setpencolor(0,0,0);
  moveto(0,0);
  lineto(16,6);
  lineto(16,-6);
  endpath();
  fillandstrokepath();
}




Maybe the following is a bug:
If you use this and make a recursive association the text is written four times.
Or if you have an association between two elements: With every angle in an association between these elements the text is written again.

I would expect that it is written only one time, no matter how many angles are used?

7
Bugs and Issues / Interface based stereotype: child diagr, not below
« on: November 26, 2008, 04:27:26 am »
I created a stereotype "MyIF-Stereotype" that extends the metaclass "Interface" and added the following attributes to the metaclass:

 _defaultDiagramType string = UML Structural::Class
  _makeComposite      boolean = true


When I use the new profile to create an element with my stereotype "MyIF-Stereotype" the child class diagram is created at the same level where the new element is created.

I would expect that the automatically created child class diagram is placed below a newly created element?

8
Bugs and Issues / Re: UML Profile: Stereotype&use of
« on: October 23, 2008, 09:11:51 pm »
Hello Midnight,

the problem is "solved" by adding the following elements and stereotypes to my profile:

- defined the stereotype "Example1" <<extends>> Class
- defined the stereotype "Example2" <<extends>> Class

- defined the stereotype "Example1usesExample2"
   (extends Association)  that I want to use for the association
  "Ex1" (stereotype Example1) -> "Ex2" (stereotype Example2)
  where "->" shall be the "Example1usesExample2" association.

- defined a "QuickLink" entity with the stereotype "document" and
  - added "QuickLink rules" as described in the EA online help

The result: when I use the quicklink feature to "draw" an
association between the entities "Ex1" and "Ex2"
then I get the an entry "Add Ex uses" (as defined in the "QuickLink" entity in the profile) in the context menu. Using this entry means to create a new association with the stereotype "Example1usesExample2" between Ex1 and Ex2.

The "QuickLink" feature is well described in the EA online help.

midnight: Thank you for the hint. One thing I have to mention:
the "realtionship matrix" (Menu "View" -> "Relationship Matrix") and the "QuickLink" feature seem to be independent.

Thomas

9
Bugs and Issues / UML Profile: Stereotype&use of "Default Direction"
« on: October 22, 2008, 11:07:50 pm »
Hello,

I would like to create an UML Profile that includes a specific associations "MyAssociation" between the two stereotypes "ExampleStereotype1" and "ExampleStereotype2".

  Stereotype 1: ExampleStereotype1 extends Class
  Stereotype 2: ExampleStereotype2 extends Class
  Stereotype 3: MyAssociation extends Association
                The metaclass "Association" defines
                a standard direction "Source -> Destination".

1. Import Profile into an EA project
2. Create Ex1 (Stereotype "ExampleStereotype1")
3. Create Ex2 (Stereotype "ExampleStereotype1")
4. Create Assoc1 (Stereotype "MyAssociation") between
    "Ex1" -> "Ex2"

Result: The "Default Direction" as defined by the Metaclass is not used, meaning EA shows only
    "Ex" -- "Ex2"
instead of
    "Ex" -> "Ex2"

Am I making a mistake?

Thomas

10
Automation Interface, Add-Ins and Tools / Re: Shape Script for dependency
« on: November 25, 2008, 03:08:37 am »
Maybe the following helps (please adjust the color RGB values):

shape main
{
  // draw a dashed line
  noshadow=true;
  setpencolor(100,100,100);
  setlinestyle("DASH");
  moveto(0,0);
  lineto(100,0);
}
 
shape source
{
  rotatable = true;

  if(HasProperty("Direction","Bi-Directional")) {
    startpath();
    setfillcolor(100,100,100);
    setpencolor(100,100,100);
    moveto(0,0);
    lineto(16,6);
    lineto(16,-6);
    endpath();
    fillandstrokepath();
  }

  if(HasProperty("Direction","Destination -> Source")) {
    startpath();
    setfillcolor(100,100,100);
    setpencolor(100,100,100);
    moveto(0,0);
    lineto(16,6);
    lineto(16,-6);
    endpath();
    fillandstrokepath();
  }
}

shape target
{
  rotatable = true;

  if(HasProperty("Direction","Bi-Directional")) {
    startpath();
    setfillcolor(100,100,100);
    setpencolor(100,100,100);
    moveto(0,0);
    lineto(16,6);
    lineto(16,-6);
    endpath();
    fillandstrokepath();
  }

  if(HasProperty("Direction","Source -> Destination")) {
    startpath();
    setfillcolor(100,100,100);
    setpencolor(100,100,100);
    moveto(0,0);
    lineto(16,6);
    lineto(16,-6);
    endpath();
    fillandstrokepath();
  }
}

11
Quote
The problem is that diagrams aren't model elements and can't own tagged values.

If you have a look at our BPMN profile, you will see the work around that we came up with. The BPMN specification defines a number of properties of business process diagrams but we couldn't attach those properties to each diagram in the form of tagged values, so we create a "Business Process" element that owns each diagram and hang the tagged values on that instead. You might like to use a similar solution.

Thank you for the answer!

it is good to know what is not possible so I won't try to fix a a mistake I could have made :)

Having the opportunity to use tagged values in a diagram would be very good i believe.
I was just surprised because when you create a profile for custom diagrams tagged values are exported as well. So I actually see no reason why EA should not support this in future versions :)

I think for the beginning I will use my own stereotype to store information for a diagram. I suppose this is what you did for BPMN.

Thomas

12
Using the MDG Technology I
 - created a Custom Diagram "MyDiagramType" extending an Component Diagram, defined an attributes "LevelX"

I expected this tagged value to be available when I create a new Diagram of my custom diagram "MyDiagramType".

1. I created a MTS file using

  "Tools" -> "Create MDG Technology File..."


2. "Create a new MTS file"
    MTS-File: "C:\Temp\EA-MDG\my-mdg-technology.mts"
    XML-File: "C:\Temp\EA-MDG\my-mdg-technology.xml"

    and included two profiles:

    - profile: my stereotypes
      File: "C:\Temp\EA-MDG\profiles\stereotype.xml"

    - profile: my "Custom Diagrams"
      File: "C:\Temp\EA-MDG\profiles\diagrams.xml"

3. Imported the MDG Technology


As a result my Custom Diagram is available via "Add" -> "Add Diagram" as desired.


Problem: The tagged value I defined is not available.

My diagram profile file
  "C:\Temp\EA-MDG\profiles\diagrams.xml"
looks similar like the following:

<?xml version="1.0" encoding="windows-1252"?>
<UMLProfile profiletype="uml2">

  <Documentation id="F7DBDC51-8"
                 name="My Diagrams"
                 version="1.0"
                 notes="My Diagrams V1.0 for testing purpose"/>

<Content>
  <Stereotypes>
     <Stereotype name="Level-1"
                 alias="Level 1"
                 notes=""
                 cx="90"
                 cy="70"
                 bgcolor="-1"
                 fontcolor="-1"
                 bordercolor="-1"
                 borderwidth="-1"
                 hideicon="0">

        <AppliesTo>
          <Apply type="Diagram_Component">
            <Property name="diagramID" value="MyDiagramType"/>
            <Property name="toolbox" value="ToolboxProfile"/>
            <Property name="alias" value="Level 1: My Diagram Type"/>
            <Property name="frameString" value="#DGMTYPE#: #DGMNAME#"/>
            <Property name="Level" value=""/>
          </Apply>
        </AppliesTo>

        <TaggedValues>
          <Tag name="LevelX"
               type="int"
               description=""
               unit=""
               values=""
               default="1"/>
        </TaggedValues>
      </Stereotype>
    </Stereotypes>

    <TaggedValueTypes/>
    
  </Content>
</UMLProfile>


Has someone an idea why the defined tagged value/attribute "LevelX" is not available?

Thanks in advance,

Thomas

13
I am using a profile with my own stereotypes and specific shapes using the EA shape script feature ("_image" attribute in profile).

Some of the stereotypes generate automatically child diagrams using the stereotype attributes "_defaultDiagramType" and "_makeComposite").

I would like to enable the feature "show composite diagram" as it is available for normal composite structures.

The problem is that the content of the child diagram is never visible.

Maybe the solution is to make the "fillcolor" of my shape invisible, but I have found no way to do this.


Has anyonye an idea how I could display this "Diagram Frame"?

Thomas


That far my shape scrips displays only some details of the shape including the subtype that seems to indicate that the current element is a composite structure.

shape main{

        setFillcolor(255, 255, 255);
  
       if(hasproperty("iscomposite","true"))
       {
              setFillcolor(255, 100, 100);
            println("iscomposite=true");  
      }

       if(hasproperty("isembedded","true"))
       {
              setFillcolor(100, 255, 100);
            println("isembedded=true");  
      }

       if(hasproperty("isroot","true"))
       {
            println("isroot=true");  
      }

       if(hasproperty("isleaf","true"))
       {
            println("isleaf=true");  
      }

       if(hasproperty("diagramframe","true"))
       {
            println("diagramframe=true");  
      }

      println("stereotype: #stereotype#");
      println("Subtype: #Subtype#");
      println("Type: #Type#");

      if (hasproperty("Subtype", "8")){
            setfillcolor(getuserfillcolor());
      }

      rectangle(0,0,100,100);

}



After some time without an answer/a solution I will try to use the MDG Technology to add custom diagrams and use them.

As soon I have informations about doing this I will place it here.

Thomas

14
Thank you all for your answers!

I added a feature request using the above mentioned link.

15
Thank you for the answer.

I tried several things with the Toolbox feature but this did not help.

I added a feature request with the same content:
http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1227632972

Pages: [1] 2