Systems-Modeling / SysML-v2-Pilot-Implementation

Proof-of-concept pilot implementation of the SysML v2 textual notation and visualization
GNU Lesser General Public License v3.0
114 stars 23 forks source link

ST6RI-744 Properly show ends in particular start or done actions (PlantUML) #537

Closed himi closed 3 months ago

himi commented 4 months ago

As the current visualizer uses textual notation to print ends in compartment, it may show cluttered text in ends such as start and done actions in successions. This PR fixes this issue by making proper names from the referenced features.

himi commented 4 months ago

I tested this PR with the example below:

package TestRefsInComp {
    action a1 {
        first start then cmdOnOff;
        action cmdOnOff;
        succession s1 first cmdOnOff then done;
    }

    part def B {
        part b;
        connection b1 connect B::b to C::h; 
    }

    part def C {
        part h;
        connection c1 connect h to a.f;
        part a {
            part f;
        }
    }

    part a0;

    package P1 {
        part a1 :> a0;
        part a11 :> a1;
    }

    part a2 :> P1::a1 {
        action a2;
        perform a1;
        perform action a22 ::> a2;
    }
}

The rendered result in Tree view with COMPMOST style is:

Screenshot 2024-02-17 at 12 57 28 PM

himi commented 4 months ago

In the textual notation, P1::a1 subsets a0 with no qualified name. However, in Graphical Notation, it is not so obvious that what a0 actually refers to. So I rendered the owning namespace as well (in this example, TestRefsInComp::a0).

seidewitz commented 3 months ago

Rendering the action a1 from your example with "Show inherited members" off results in a rendering as you should previously: image Both start and done are shown as inherited members. However, if "Show inherited members" is turned on, then the action is rendered without the inherited features: image I could reproduce this behavior when other features inherited from Action where used as connection ends, but not when using features inherited from other elements in the same file.

himi commented 3 months ago

Thank you for the report. The problem you reported is related to rendering standard library model element. The visualizer should not render the standard library element without SHOWLIB style. However, currently by default, it renders elements referred by connectors even they are the standard library elements. Anyway, this issue has nothing to do with this PR and I will make another JIRA issue to deal with it.

I'm afraid that I do not have enough time to solve this issue by 6th because I'm having a hard deadline on 5th.

seidewitz commented 3 months ago

OK, I have confirmed that the problem I reported existed before the changes in this PR. Please submit a bug issue for it. I will approve this PR.

himi commented 3 months ago

Thank you. I quickly made ST6RI-748 JIRA issue. I'll work on it possibly after the deadline...