Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Refresh diagram representation!(Refresh representation during simulation runtime!)
icon4.gif  Refresh diagram representation! [message #1690119] Wed, 25 March 2015 12:02 Go to next message
Minh Hiep Pham is currently offline Minh Hiep PhamFriend
Messages: 10
Registered: February 2015
Location: Hannover, Germany
Junior Member
Hi all,

i am doing a project, which contains a simulation ui and a runtime! The objects of the simulation used to use the resource from instance dynamic (.xmi)! During the simulation i want to represent new relationships between objects (MessageEvent). A Example for the work of the project is RailcabSystem, its objects and MessageEvent have view as in the picture Simulation_ui.png. index.php/fa/21310/0/
Meta-modell for the RailcabSystem is railcab_DriveOntoCrossing.ecore and railcab_DriveOntoCrossing.xmi . Ecore-file dont contain domain class for MessageEvent. I want to ask! Are there anyway to represent the relationships in the diagram during the launching of the simulation. Thanks so much!


Regards,


Minh Hiep Pham

[Updated on: Wed, 25 March 2015 13:12]

Report message to a moderator

Re: Refresh diagram representation! [message #1690144 is a reply to message #1690119] Wed, 25 March 2015 13:27 Go to previous messageGo to next message
Yvan Lussaud is currently offline Yvan LussaudFriend
Messages: 63
Registered: July 2009
Member
Hi,

Since you don't have model elements for the relation, you will have to use a service (maybe one for each end of the relation). Then you will have to refresh the diagram when the relation change.

You can find more information in this thread: https://www.eclipse.org/forums/index.php/t/981267/

regards,
Yvan.
Re: Refresh diagram representation! [message #1690177 is a reply to message #1690144] Wed, 25 March 2015 15:04 Go to previous messageGo to next message
Minh Hiep Pham is currently offline Minh Hiep PhamFriend
Messages: 10
Registered: February 2015
Location: Hannover, Germany
Junior Member
Hi,

thanks for your answer. When a new MessageEvent during simulation has been created, which will have source and target from MSDMessageEvent. Then i want to create a new Edge, which has been defined with Element-Based Edges. Because i can use Source Finder Expression to get source mapping, and Target Finder Expression to get target mapping, however i dont have Domain Class. Can i solve this problem with Relation-Based Edges? Do you have any example for this situation? The information in thread https://www.eclipse.org/forums/index.php/t/981267/ is low. I can understand the solution, however i cant understand about the service class.


Regards,


Minh Hiep Pham

[Updated on: Wed, 25 March 2015 15:04]

Report message to a moderator

Re: Refresh diagram representation! [message #1690260 is a reply to message #1690177] Thu, 26 March 2015 07:56 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 516
Registered: July 2009
Location: Nantes, France
Senior Member
Hi

Le 25/03/2015 16:04, Minh Hiep Pham a écrit :
> Hi,
>
> thanks for you answer. When a new MessageEvent during simulation has
> been created, which will have source and target from MSDMessageEvent.
> Then i want to create a new Edge, which has been defined with
> Element-Based Edges. Because i can use Source Finder Expression to get
> source mapping, and Target Finder Expression to get target mapping,
> however i dont have Domain Class. Can i solve this problem with
> Relation-Based Edges?

In your situation, a Relation based edge mapping could be a solution.
Like the Element based edge mapping, you have to define the source and
target mapping and the target finder expression but no domain class,
semantic candidates expression or source finder expression.

The target finder expression of a Relation based edge mapping is
computed from the source element. If the evaluation of the expression
return some elements represented on the diagram by a node whose mapping
is in the target mappings of the edge mapping, the corresponding edges
are created.

In your case, you should use a service in the target finder expression
to retrieve some MessageEvent/MSDMessageEvent from the source and return
the target(s) of the edge(s) you want to create for the current source.

Do you have any example for this situation? The
> information in thread https://www.eclipse.org/forums/index.php/t/981267/
> is low. I can understand the solution, however i cant understand about
> the service class.

Regards,

--
Maxime - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Refresh diagram representation! [message #1690281 is a reply to message #1690260] Thu, 26 March 2015 10:03 Go to previous message
Minh Hiep Pham is currently offline Minh Hiep PhamFriend
Messages: 10
Registered: February 2015
Location: Hannover, Germany
Junior Member
Hi,

thanks you very much for you advice! But i see a problem there, because when i double click a MessageEvent in the List 1, i can get a source object 2 and a target 3.(Picture Simulation-example.png)
For example:
When i click MessageEvent(RequestEnter), i will get source object (rc:Railcab) and target object(CrossingControl). Now i want to represent the Edge MessageEvent from Railcab to CrossingControl in my DRepresentation and refresh(Simulation-example-first-step.png). Next i want to represent my next MessageEvent(close)(Simulation-example-second-step.png), then i want only to change the Source(old: Railcab with new:CrossingControl) and Target(old:CrossingControl with new:Barrier) of the Edge MessageEvent, and not to show a new Edge in the DRepresentation.

If i used Relation-based Edge, i will set only the target object for the Relation-based Edge. So i cant solve my problem, right? Do you have any advice for this?


Regards,


Minh Hiep Pham
Previous Topic:How to provide feedback to the user for non creatable edges
Next Topic:Behavior Tool
Goto Forum:
  


Current Time: Thu Apr 25 10:27:34 GMT 2024

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

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

Back to the top