Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Papyrus for Real Time » Can´t create a diagram for a package(Papyrus RT is disabling the "New Diagram" menu option for packages)
Can´t create a diagram for a package [message #1837479] Sun, 31 January 2021 13:32 Go to next message
Ramiro Carvalho is currently offline Ramiro CarvalhoFriend
Messages: 19
Registered: January 2021
Junior Member
I have a Papyrus RT project and I intended to create a "regular" package with classes that are not capsules but which are to be used in the project.
I created a new package in the model but when I try to create a diagram for it, Papyrus RT is disabling the "New Diagram" option when the cursor reaches it (please see figure attached).
I tried to create the package by both regular "New child" and "New UML-RT Child" and in both cases, the result is the same: it is not possible to create a diagram for the new package.
Is it supposed to be like this or is it a bug?
If it is not a bug, how do a create class diagrams in the RT IDE?

Re: Can´t create a diagram for a package [message #1837524 is a reply to message #1837479] Mon, 01 February 2021 18:31 Go to previous messageGo to next message
Ernesto Posse is currently offline Ernesto PosseFriend
Messages: 438
Registered: March 2011
Senior Member
This depends on the "Architecture Viewpoint" used. To create these diagrams you need the "Advanced Architecture Viewpoint". This is selected in the "New Papyrus Model" wizard, or, if you already created the model, right-click the root model element, and select "Switch Architecture Viewpoints > Advanced Architecture Viewpoint". See the attached screenshots.

PS: In UML-RT, just like in plain UML, you don't draw classes in a package diagram, but in a class diagram.
Re: Can´t create a diagram for a package [message #1837527 is a reply to message #1837524] Mon, 01 February 2021 19:30 Go to previous messageGo to next message
Ramiro Carvalho is currently offline Ramiro CarvalhoFriend
Messages: 19
Registered: January 2021
Junior Member
Thanks for the quick response Ernesto.

I did not mention but I am trying to create a class diagram, as I usually have done when working with Papyrus Designer and after some time, it was no longer possible to do in Papyrus RT.
I tried the viewpoint change as you instructed but it had no effect on the issue.
Besides that, I can notice that the "New UML-RT Child" context menu for Capsules is missing the State Machine creation option which was there when I began working on the project.
Other aspect that I noticed is that when creating a trigger for a transition in a state chart, the dialog that appears is the regular "Create a New Trigger" dialog from Papyrus and not the trigger creation dialog from Papyrus-RT (so, I don´t know how to associate a transition to a protocol message by using the "regular" trigger creation dialog). I don´t know if these discrepancies are inter-related.

Since the project file is still small, I attached it here in case you want to try it by yourself.

Well, anyway I will keep exploring the tool here to see if it fits my needs for this software project.

Thanks.
  • Attachment: PPM_RT.rar
    (Size: 16.31KB, Downloaded 55 times)
Re: Can´t create a diagram for a package [message #1837771 is a reply to message #1837527] Fri, 05 February 2021 20:35 Go to previous message
Ernesto Posse is currently offline Ernesto PosseFriend
Messages: 438
Registered: March 2011
Senior Member
Well, it works for me. After importing your project, I did as I described in the original message, right-click on the root, then enabled "Switch Architecture Viewpoints > Advanced UML-RT Architecture Viewpoint" (and leave the Basic viewpoint enabled as well), and then I can create both class diagrams and package diagrams, as the screenshot below shows. There does seem to be a bug in that the palette in package diagrams is empty, but I can drag and drop packages from the Model Explorer into the diagram.

index.php/fa/39944/0/

I noticed that you project doesn't include any of the required model libraries. note that when creating a project, you should select an appropriate template in the New Papyrus Wizard: (see the screenshot)

1) Ensure you select the UML-RT ADL Architecture Context and both the Basic and Advanced Architecture viewpoints. Click [Next]

index.php/fa/39947/0/

2) Select the name and location. Click [Next]

index.php/fa/39948/0/

3) Unfold the selection drop-down list under "You can load a template", and select one of these. I strongly recommend the last one "UML-RT for C++", if you plan to generate code. Click [Finish].

index.php/fa/39949/0/

Then you can see in the Model Explorer that the model includes the UML-RT Runtime System Library (UML-RT RTS) and UML-RT AnsiCLibrary.

index.php/fa/39950/0/

It will also support additional stereotypes for more customized C++ code generation.

And if you select the root element, in the Properties View, under "Profiles", you will see the UML-RT profile (structure), the UML-RT State Machines profile, and the RtCppProperties profile.

You are unable to see the New State Machine option because your model didn't have the UML-RT State Machines profile.

If you don't want to create a new model, you can add it by selecting the root element, in the Properties View, under "Profiles", click the "Apply registered profile" button in the top right (you might have to extend the right margin of the Properties view; it looks like a little plug, to the right of the red [x] button), and then select the UML-RT State Machines profile and click [OK] and save.

Once you have the UML-RT State Machines profile, editing transition triggers should work.

Please note that both capsule structure diagrams and state machine diagrams in Papyrus RT are not the same as those in plain Papyrus or Papyrus Designer, so you shouldn't expect the same functionality. Papyrus RT was heavily customized for UML-RT, so many of the dialogs and editing functionality is not the same as the "regular" Papyrus editing.

Previous Topic:Unexpected message to capsule Instance Top
Next Topic:UML RT metamodel
Goto Forum:
  


Current Time: Tue Feb 27 01:07:22 GMT 2024

Powered by FUDForum. Page generated in 0.03034 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top