Book a Demo

Author Topic: EA11 shows cnnctr labels that weren't shown before  (Read 7172 times)

JReed

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
EA11 shows cnnctr labels that weren't shown before
« on: May 02, 2014, 01:59:12 am »
I installed the newly-released version 11, and then I opened a project with it that I created with a previous version of EA.  In the activity diagrams, all of the connectors now show the Middle Bottom Label ("<<flow>>"), where they were not shown before.  Is there a simple way to  hide just these labels (and not any of the others, e.g., Middle Top Label) globally without going into the properties for each individual connector?

skiwi

  • EA Expert
  • ****
  • Posts: 2081
  • Karma: +46/-82
    • View Profile
Re: EA11 shows cnnctr labels that weren't shown be
« Reply #1 on: May 02, 2014, 06:38:28 am »
I would love to have the means, on a per diagram basis, the ability to set
the label visibility for all connectors in a diagram


Of course if we could select multiple connectors ...
Orthogonality rules
Position and Team disestablished, thanks austerity.
Now itinerant.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: EA11 shows cnnctr labels that weren't shown be
« Reply #2 on: May 05, 2014, 09:14:48 am »
Quote
I installed the newly-released version 11, and then I opened a project with it that I created with a previous version of EA.  In the activity diagrams, all of the connectors now show the Middle Bottom Label ("<<flow>>"), where they were not shown before.  Is there a simple way to  hide just these labels (and not any of the others, e.g., Middle Top Label) globally without going into the properties for each individual connector?
What kind of connectors are they? If they are UML InformationFlow, then the «flow» keyword is as much part of the notation as the dashed line and arrowhead and it would be wrong to hide it. Or could they be some other kind of connector to which you had added a stereotype with a shape script? In which case, perhaps the profile with the stereotype is disabled or missing?
« Last Edit: May 05, 2014, 09:15:09 am by KP »
The Sparx Team
[email protected]

JReed

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: EA11 shows cnnctr labels that weren't shown be
« Reply #3 on: May 06, 2014, 12:22:48 am »
They are Information Flows.  Our team decided not to show the <<flow>> keyword to reduce clutter in the diagrams.  (They have other labels, so they wouldn't be left blank.)  I'm just trying to figure out a  way to avoid having to manually update hundreds of connectors to hide that label.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: EA11 shows cnnctr labels that weren't shown be
« Reply #4 on: May 06, 2014, 03:18:35 am »
You could create a MDG an write a shape script for the <<flow>>. In general it makes sense to use a dedicated profile for a larger project. So that would be the place.

q.

Mhatch

  • EA User
  • **
  • Posts: 27
  • Karma: +0/-0
    • View Profile
Re: EA11 shows cnnctr labels that weren't shown be
« Reply #5 on: May 09, 2014, 01:42:48 am »
I second this issue, which I would call a bug from previous versions, since you could go into Diagram Properties -> Connectors -> Show Stereotype Labels and deselect the option and the diagram would not display the connector stereotypes for Information Flow.  In V11 this no longer works, and there does not seem to be a way to hide the stereotype labels.

I don't accept the idea that "the <<flow>> keyword is ... part of the notation .. and it would be wrong to hide it".  The whole point of visualizations (diagrams) is being able to control the presentation according to different stakeholder needs, and sometimes it is appropriate to hide information.  And besides, sparx used to do this, and it obviously provides the feature in general, it just no longer works for Information Flow connectors specifically.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: EA11 shows cnnctr labels that weren't shown be
« Reply #6 on: May 09, 2014, 09:25:12 am »
Unfortunately, it's previous versions that had the bug.

UML defines the concept of keywords, they use the same notation as stereotypes1 but are required aspects for the rendering of certain types to allow them to be distinguished from other types with the same notation. There are a list of keywords in Annex B (UML 2.4.1) and Annex C (UML 2.5).

Prior to EA 11, EA handled the «flow» keyword as if it was a stereotype, which would be non-conformant with the specification.

1 In UML 2.4 a stereotype label is technically a keyword that denotes a stereotype of that name has been applied.  UML 2.5 has removed that usage of a keyword, which means I can no longer defend its usage of the same notation for two different meanings.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: EA11 shows cnnctr labels that weren't shown be
« Reply #7 on: May 09, 2014, 07:31:00 pm »
Those OMG guys really know how to spoil UML  :(

q.

Mhatch

  • EA User
  • **
  • Posts: 27
  • Karma: +0/-0
    • View Profile
Re: EA11 shows cnnctr labels that weren't shown be
« Reply #8 on: May 10, 2014, 02:06:54 am »
I really respect the complexity you're having to deal with.

At the same time, as the maker of the tool that provides the visualization, and control over the visualization, you've clearly heard from your users in the past that element visibility should be controllable since you have features to allow different elements to be toggled on/off.

I humbly request that the features controlling label visibility work for connectors, regardless of where the data comes from, and how it is managed within the model 'schema'.

I'm 70% done with a script that will toggle this for information flows, and will post it here when complete.

smendonc

  • EA User
  • **
  • Posts: 148
  • Karma: +5/-0
  • I love YaBB 1 Gold!
    • View Profile
Re: EA11 shows cnnctr labels that weren't shown be
« Reply #9 on: May 10, 2014, 07:59:21 am »
Mike (Mhatch) and I worked out the below to flip the <<flow>> connector off by diagram.  As this is a toggle if the stereotype is not displayed it will turn it on.

Stan.

----------
/*
 * Diagram Script main function
 */
function ToggleFlowStereotype()
{
      var currentDiagram as EA.Diagram;
      currentDiagram = Repository.GetCurrentDiagram();

      if ( currentDiagram != null )
      {
            links = currentDiagram.DiagramLinks;
            for (var i1=0; i1 < links.Count; i1++)
            {
                  // Only process InformationFlow links
                  link = links.GetAt(i1);
                  cnntr = Repository.GetConnectorByID(link.ConnectorID);
                  if (cnntr.Type == "InformationFlow")
                  {
                        // Only process the Middle Bottom label
                        geometry = link.Geometry;
                        properties = geometry.split(";");
                        arrayLength = properties.length;
                        geometry = "";
                        for (var i2=0; i2 < arrayLength; i2++)
                        {
                              if (properties[i2].match(/^LMB/))
                              {
                                    if (properties[i2].match(/HDN=0/))
                                    {
                                          properties[i2] = properties[i2].replace("HDN=0","HDN=1");
                                    }
                                    else if (properties[i2].match(/HDN=1/))
                                    {
                                          properties[i2] = properties[i2].replace("HDN=1","HDN=0");
                                    }
                              }
                              if (i2+1 == arrayLength)
                              {
                                    geometry += properties[i2];
                              }
                              else
                              {
                                    geometry += properties[i2] + ";";
                              }
                        }
                        link.Geometry = geometry;
                        link.Update();
                  }
                  Repository.ReloadDiagram(currentDiagram.DiagramID);
            }
      }
      else
      {
            Session.Prompt( "This script requires a diagram to be visible.", promptOK)
      }
}

ToggleFlowStereotype();

JReed

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: EA11 shows cnnctr labels that weren't shown be
« Reply #10 on: May 13, 2014, 12:44:01 am »
That worked!!  Thank you so much!  It required a little "nudging" though. It didn't work the first few times I tried it, but I went into the properties of one connector, hid the label manually, and saved the diagram.  I tried the script again and it worked.  That said, this will save me many hours of work. Thanks again!

JReed

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: EA11 shows cnnctr labels that weren't shown be
« Reply #11 on: May 13, 2014, 12:56:21 am »
A clarification to my previous post: The script only works after I make any change to the diagram and save it (not just a change to a connector).