Book a Demo

Author Topic: Setting _lineStyle has no effect  (Read 9085 times)

PeterHeintz

  • EA Practitioner
  • ***
  • Posts: 1001
  • Karma: +59/-18
    • View Profile
Setting _lineStyle has no effect
« on: June 06, 2016, 07:39:07 pm »
On meta class “Association I set _lineStype to treeV but when using my stereotype extending the meta class the line style Orthogonal-Square is used instead.
Best regards,

Peter Heintz

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Setting _lineStyle has no effect
« Reply #1 on: June 07, 2016, 09:46:01 am »
On meta class “Association I set _lineStype to treeV but when using my stereotype extending the meta class the line style Orthogonal-Square is used instead.
Hi Peter,

Try setting it on the actual stereotype.  See if that works.  If it does, then you may have found a specialization bug.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Setting _lineStyle has no effect
« Reply #2 on: June 07, 2016, 04:32:32 pm »
Are you sure that you don't have a script or something that changes the linestyle?
Orthogonal-square is not one of the defaults you can set, so it seems weird that EA would do that on it's own.

Geert

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Setting _lineStyle has no effect
« Reply #3 on: June 07, 2016, 05:11:41 pm »
Are you sure that you don't have a script or something that changes the linestyle?
Orthogonal-square is not one of the defaults you can set, so it seems weird that EA would do that on it's own.

Geert
Yes it is
<Property name="_lineStyle" value="orthogonalS"/>

But your point is taken...

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

PeterHeintz

  • EA Practitioner
  • ***
  • Posts: 1001
  • Karma: +59/-18
    • View Profile
Re: Setting _lineStyle has no effect
« Reply #4 on: June 07, 2016, 06:09:48 pm »
Ok!
Setting the attribute on the stereotype rather than on the meta class works.

I will issue a bug because neither user guide not profile helper does what is implemented at the end.
Best regards,

Peter Heintz

PeterHeintz

  • EA Practitioner
  • ***
  • Posts: 1001
  • Karma: +59/-18
    • View Profile
Re: Setting _lineStyle has no effect
« Reply #5 on: June 07, 2016, 08:04:33 pm »
Now I realized the _lineStyle attribute is represented as a tag as expected/ as I was afraid?.
However now I cannot change the the line style with the context menu any more, only by changing the attribute value I can do that. :'(
Best regards,

Peter Heintz

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Setting _lineStyle has no effect
« Reply #6 on: June 07, 2016, 09:12:55 pm »
Now I realized the _lineStyle attribute is represented as a tag as expected/ as I was afraid?.
However now I cannot change the the line style with the context menu any more, only by changing the attribute value I can do that. :'(
You must be doing something wrong, Peter.

I have no tagged value for my line style setting.

Here is an extract of my MDG
Code: [Select]
<Apply type="Composition">
<Property name="compositionKind" value="Composite at Target"/>
<Property name="direction" value="Source -&gt; Destination"/>
<Property name="_SourceMultiplicity" value="1..*"/>
<Property name="_TargetMultiplicity" value="1"/>
<Property name="_lineStyle" value="orthogonalS"/>
</Apply>
Here I am setting the default aggregation type, direction, multiplicities and line styles for my Composition relationships.

The created relationships is correctly set up and doesn't create any extra tagged values.

Why not post your equivalent?

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

PeterHeintz

  • EA Practitioner
  • ***
  • Posts: 1001
  • Karma: +59/-18
    • View Profile
Re: Setting _lineStyle has no effect
« Reply #7 on: June 07, 2016, 09:36:06 pm »
This is my generated stereotype fragment:
Code: [Select]
<Stereotype name="FTA Connector" metatype="FTA Connector" notes="" cx="90" cy="70" bgcolor="-1" fontcolor="-1" bordercolor="-1" borderwidth="-1" hideicon="0" strictness="profile">
<AppliesTo>
<Apply type="Association">
<Property name="compositionKind" value="none"/>
<Property name="direction" value="Source -&gt; Destination"/>
</Apply>
</AppliesTo>
<TaggedValues>
<Tag name="_lineStyle" type="" description="" unit="" values="" default="treeV"/>
<Tag name="_SourceNavigability" type="" description="" unit="" values="" default="Navigable"/>
<Tag name="_TargetNavigability" type="" description="" unit="" values="" default="Unspecified"/>
</TaggedValues>
</Stereotype>

In my  profile I added the attributes _lineStyle,... to the FTA Connector what leads to the generated tags.
Best regards,

Peter Heintz

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Setting _lineStyle has no effect
« Reply #8 on: June 08, 2016, 09:34:36 am »
Well, I'm hand-crafting my MDG by observing the Sparx MDGs.  It may be a bug in the generator.

However, before you call that, whatever you are doing to get the  CompositionKind and direction attributes, do the same with the other attributes.

Eventually, I will reverse engineer our MDG and try to generate going forward, but for the present, doing it by hand works for us.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

PeterHeintz

  • EA Practitioner
  • ***
  • Posts: 1001
  • Karma: +59/-18
    • View Profile
Re: Setting _lineStyle has no effect
« Reply #9 on: June 08, 2016, 04:52:39 pm »
This makes me crazy!
Now I removed all stuff from the stereotype and I used again the profile helper to get this:
Code: [Select]
<Stereotype name="FTA Connector" metatype="FTA Connector" notes="" cx="90" cy="70" bgcolor="-1" fontcolor="-1" bordercolor="-1" borderwidth="-1" hideicon="0" strictness="profile">
<AppliesTo>
<Apply type="Association">
<Property name="_lineStyle" value="treeV"/>
<Property name="_SourceNavigability" value="Navigable"/>
<Property name="_TargetNavigability" value="Non-Navigable"/>
<Property name="compositionKind" value="none"/>
<Property name="direction" value="Source -&gt; Destination"/>
</Apply>
</AppliesTo>
</Stereotype>
What leads to linestyle Orthogonal - Square and SourceNavigability = Non-Navigable and TargetNavigability = Navigable.
Changing the Navigability types in the configuration seem to have no effect at all.
So it is just what I had before.
The features that should work seem to do not work at all, and the features that should not be there (Stereotype-Tags) somehow works with side effects.
Best regards,

Peter Heintz

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Setting _lineStyle has no effect
« Reply #10 on: June 08, 2016, 04:58:26 pm »
Just to be sure, have you tried this on an empty model with all add-ins disabled?

It looks like there is something interfering with the relations.

Geert

PeterHeintz

  • EA Practitioner
  • ***
  • Posts: 1001
  • Karma: +59/-18
    • View Profile
Re: Setting _lineStyle has no effect
« Reply #11 on: June 08, 2016, 10:42:21 pm »
Now I changed my profile to generate this according to the comments of Paulo:
Code: [Select]
<Stereotype name="FTA Connector" metatype="FTA Connector" notes="" cx="90" cy="70" bgcolor="-1" fontcolor="-1" bordercolor="-1" borderwidth="-1" hideicon="0" strictness="profile">
<AppliesTo>
<Apply type="Association">
<Property name="_lineStyle" value="treeV"/>
<Property name="compositionKind" value="none"/>
<Property name="direction" value="Destination -&gt; Source"/>
</Apply>
</AppliesTo>
</Stereotype>

The remark of Geert helped me to get what I expected.

I tried it in several other projects and it worked.

The only difference I know with all that working projects to my trouble making project is, that the trouble making project contains my profile definition as well. In other words I imported the mdg in the project were I define the MDG. This I did all the time but maybe in this case there is some strange interference.!?!?
Thank you both!
In future I will separate my profile definition from my test environment in the hope to avoid such strange things.

Best regards,

Peter Heintz