Home » Eclipse Projects » Sirius » Refresh diagram representation!(Refresh representation during simulation runtime!)
Refresh diagram representation! [message #1690119] |
Wed, 25 March 2015 12:02 |
Minh Hiep Pham 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.
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 #1690177 is a reply to message #1690144] |
Wed, 25 March 2015 15:04 |
Minh Hiep Pham 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 |
|
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 |
Minh Hiep Pham 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
|
|
|
Goto Forum:
Current Time: Fri Apr 26 22:59:13 GMT 2024
Powered by FUDForum. Page generated in 0.03270 seconds
|