Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Papyrus for Real Time » Two bugs in papyrus-rt RCP on macOS?
Two bugs in papyrus-rt RCP on macOS? [message #1770723] Wed, 16 August 2017 13:40 Go to next message
reza ahmadi is currently offline reza ahmadiFriend
Messages: 47
Registered: September 2016
Member
Hi,

I see two bugs in papyrus-rt RCP 0.9 and 1.0 on macOS:

1- I cannot add Effect on a transition. e.g., adding an opaque behaviour on a transition. opaque behaviour is added but code snippet remains empty.
2- If I programmatically add, say, some transitions to a region, I cannot display them by dragging and dropping them on the state machine diagram.

#1 I guess is not too severe as there are some workarounds, e.g. by using code snippet view to add action code or code snippets.

Is there any workaround for #2?

I do not see any of these bugs on my Ubuntu machine. I have tried on papyrus-rt RCP 0.9.

Thanks.

[Updated on: Wed, 16 August 2017 13:43]

Report message to a moderator

Re: two bugs in papyrus-rt RCP on macOS? [message #1770725 is a reply to message #1770723] Wed, 16 August 2017 13:49 Go to previous messageGo to next message
Ernesto Posse is currently offline Ernesto PosseFriend
Messages: 438
Registered: March 2011
Senior Member
For #1, the right approach to add a transition's effect is using the code-snippet view directly. Are you adding the transition's effect as an OpaqueBehaviour programatically or manually?

The code snippet view is just that: a view. Semantically the model element's is what matters, so if you see it in the Model Explorer, it should be OK. Furthermore, you can always select in the Properties view the UML tab and see the UML element.

For #2, is it just transitions or any element that you add programmatically?

You says you tried the 0.9 RCP on Ubuntu. Did you try the 1.0 on Ubuntu?
Re: two bugs in papyrus-rt RCP on macOS? [message #1770730 is a reply to message #1770725] Wed, 16 August 2017 14:54 Go to previous messageGo to next message
reza ahmadi is currently offline reza ahmadiFriend
Messages: 47
Registered: September 2016
Member
For #2 it's transitions and states that I add programmatically. Basically my code fills an empty region with states and transitions.

No I have not tried 1.0 on Ubuntu.
Re: two bugs in papyrus-rt RCP on macOS? [message #1770731 is a reply to message #1770730] Wed, 16 August 2017 15:00 Go to previous messageGo to next message
Ernesto Posse is currently offline Ernesto PosseFriend
Messages: 438
Registered: March 2011
Senior Member
For #1, again, are you adding the transition's effect as an OpaqueBehaviour programatically or manually?

Can you try with 1.0 on Ubuntu? We are not going to maintain 0.9.
Re: two bugs in papyrus-rt RCP on macOS? [message #1770732 is a reply to message #1770731] Wed, 16 August 2017 15:10 Go to previous messageGo to next message
reza ahmadi is currently offline reza ahmadiFriend
Messages: 47
Registered: September 2016
Member
No it's manually. OK I'll try 1.0. on Ubuntu.

[Updated on: Wed, 16 August 2017 15:13]

Report message to a moderator

Re: two bugs in papyrus-rt RCP on macOS? [message #1770742 is a reply to message #1770732] Wed, 16 August 2017 16:04 Go to previous messageGo to next message
Ernesto Posse is currently offline Ernesto PosseFriend
Messages: 438
Registered: March 2011
Senior Member
For the OpaqueBehaviours, there's no point in adding them manually. Use the Code Snippet view instead. This will guarantee that the model has the right structure and is synchronized with the generated code, when you use the "Edit Code" option on a selected transition.
Re: two bugs in papyrus-rt RCP on macOS? [message #1770755 is a reply to message #1770742] Wed, 16 August 2017 19:51 Go to previous messageGo to next message
reza ahmadi is currently offline reza ahmadiFriend
Messages: 47
Registered: September 2016
Member
By manually I mean not programmatically. I use "New Opaque behaviour" window. But sure I'll use code snippet view. This fixes #1.

How about dragging and dropping transitions (issue #2). Do you have a workaround for that? I am generating states and transitions in a region. I drop transitions but they do not appear on the state machine diagram. States appear though by dragging and dropping.

Thanks Ernesto!
Re: two bugs in papyrus-rt RCP on macOS? [message #1770846 is a reply to message #1770755] Thu, 17 August 2017 15:19 Go to previous messageGo to next message
Ernesto Posse is currently offline Ernesto PosseFriend
Messages: 438
Registered: March 2011
Senior Member
When you create the states and transitions programatically which API are you using? Are you using the UML-RT façade I mentioned in my original answer or are you using the UML API directly?

I did some experiments with the 1.0 RCP. I created a single model with one capsule with one state machine, which creates by default an Initial Pseudostate, a state called State1 and a transition from the former to the later. Then, I tried to simulate adding elements programatically by editing the .uml file of a simple model directly in a text editor, adding a state State2 and a transition t1 from State1 to State2, and ensuring that they where both in the same RTRegion as State1 (if you use the UML-RT façade API this should have the same effect). Then I opened the model as a Papyrus model. When I opened the diagram for the state machine, and it automatically added State2 and t1 to the diagram without me having to drag them from the Model Explorer.

This experiment was carried out on mac, so it suggests that perhaps you are not adding the new model elements correctly. This is likely if you use the UML API, instead of the UML-RT façade API, which ensures the structural correctness of the model with respect to the UML-RT syntax. Several things could go wrong by using the UML API. For example, you could be adding elements to the wrong region, or forget adding the UML-RT stereotypes. If you use the façade API, you don't have to worry about those kinds of errors.

BTW, I do not recommend using 0.9 anymore. Version 1.0 fixed a lot of bugs, and 0.9 is no longer maintained.
Re: two bugs in papyrus-rt RCP on macOS? [message #1770850 is a reply to message #1770846] Thu, 17 August 2017 21:03 Go to previous messageGo to next message
reza ahmadi is currently offline reza ahmadiFriend
Messages: 47
Registered: September 2016
Member
I was not using facade utilities => I was using UML APIs. I'll use the facade and let you know if it resolves my issue.

Thanks.

[Updated on: Fri, 18 August 2017 05:25]

Report message to a moderator

Re: two bugs in papyrus-rt RCP on macOS? [message #1770851 is a reply to message #1770850] Thu, 17 August 2017 21:39 Go to previous messageGo to next message
Ernesto Posse is currently offline Ernesto PosseFriend
Messages: 438
Registered: March 2011
Senior Member
I realized I mentioned the façade in a different thread, so just for reference, you'll find it in the org.eclipse.papyrusrt.umlrt.uml plugin (in the git repo it's in the plugins/umlrt/profile folder). In that plugin, the sources that you should look at are in the src-facade folder. All the relevant classes have a name with UMLRT as prefix.
Re: two bugs in papyrus-rt RCP on macOS? [message #1771300 is a reply to message #1770851] Wed, 23 August 2017 19:12 Go to previous message
reza ahmadi is currently offline reza ahmadiFriend
Messages: 47
Registered: September 2016
Member
I switched to Papyrus-RT 1.0 and without any change the statemachine diagram gets updated correctly. (I did not touch the code => I was still using UML APIs to generate a state machine).
..So, you're right I should have indeed switched to 1.0, which is much nicer and easier to use.

Thanks.
Previous Topic:Constructing a state machine as part of the code generator
Next Topic:Problem setting up Papyrus-RT Dev Environment
Goto Forum:
  


Current Time: Thu Apr 25 23:33:07 GMT 2024

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

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

Back to the top