Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Routing problem between some nodes
Routing problem between some nodes [message #1731423] Thu, 05 May 2016 07:00 Go to next message
Martin Jedlicka is currently offline Martin JedlickaFriend
Messages: 122
Registered: January 2016
Senior Member
Hello,

I have a question about routing.

I use xText (with defined grammar, see below) as a text editor and Sirius as a graphic editor definition odesign (see attachment).
I have several nodes, which are defined in the same way (in grammar in odesign), but between some edge can be done and with certain do not.
It acts very rarely. Once the edge is successful, one not.

I tried to insert a breakpoint in the instance te edges (class Transition) and I found that for the elements between which may create edge method is called eSet(int featureID, Object newValue) and set the individual parameters (from and to), and the edge is displayed.

The elements between which the edges can not create too method is called eSet(int featureID, Object newValue) and set the individual parameters (from and to), but then the method is called eUnset(int featureID) posed by calling TransactionImpl.commit() line 417 and then TransactionImpl.doRollback() line 570 and edge do not see (or do not make changes in xtext).

Do you know where he might be the problem? Why method is called eUnset? The problem is in the model (grammar) or odesign?

The edge can be done between the StartProcess and EndProcess, but the other elements (eg. between StartProcess and Operation or BusinessFunction) can not.

Thanks so much for any advice.

Martin

Part of the grammar:

Process: 'Process' name=EString
elements += ProcessElement*
;

ProcessElement:
StartProcess | BusinessFunction | EndProcess
;

StartProcess:
{StartProcess} 'Start' name=EString
'code' code=EString
('description' description=EString)?
'component' component=EString
'type' type=ElementType
(transitions=Transition)?
;

EndProcess:
{EndProcess} 'End' name=EString
'code' code=EString
('description' description=EString)?
'component' component=EString
'type' type=ElementType
'version' version=EString
;

Operation:
{Operation} 'Operation' name=EString
'code' code=EString 
('description' description=EString)?
'component' component=EString
'type' type=ElementType
(transitions=Transition)?
;

BusinessFunction:
{BusinessFunction} 'Function' name=EString
'code' code=EString
('description' description=EString)?
'component' component=EString
'type' type=ElementType
(transitions=Transition)?
;

[Updated on: Thu, 05 May 2016 07:04]

Report message to a moderator

Re: Routing problem between some nodes [message #1731443 is a reply to message #1731423] Thu, 05 May 2016 10:26 Go to previous messageGo to next message
Martin Jedlicka is currently offline Martin JedlickaFriend
Messages: 122
Registered: January 2016
Senior Member
Update

So it is even more mysterious. If the node moving to one of the area so edge do not, but when the node moves away, so edge can do. When a node move back to its original position, so edges do not again.

Martin
Re: Routing problem between some nodes [message #1731492 is a reply to message #1731443] Fri, 06 May 2016 06:23 Go to previous messageGo to next message
Martin Jedlicka is currently offline Martin JedlickaFriend
Messages: 122
Registered: January 2016
Senior Member
I found out why it's behaving so strangely and say if uncheck Snap To Grid. When Snap To Grid is checked, and everything works fine. If not, it behaves as described above.

Does anyone know why?

Thanks.

Martin
Re: Routing problem between some nodes [message #1731995 is a reply to message #1731492] Wed, 11 May 2016 14:17 Go to previous messageGo to next message
Julien Dupont is currently offline Julien DupontFriend
Messages: 172
Registered: July 2009
Senior Member
Hi,

Could you send us a simple reproduction case (the metamodel .ecore)? We
have the .odesign.

Thanks.
Regards,


--
Julien - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Routing problem between some nodes [message #1732028 is a reply to message #1731995] Thu, 12 May 2016 05:34 Go to previous messageGo to next message
Martin Jedlicka is currently offline Martin JedlickaFriend
Messages: 122
Registered: January 2016
Senior Member
Hi,

I found the problem. If I'm set on edge Ends Centering (Both) and uncheck Snap To Grid and edge can not be created. If you check the Snap To Grid and edge can create.

Summary
- The edges are defined as type Manhattan
- edges are set to Ends Centering (Both)
- Is unchecked Snap To Grid, so edge is failing to create
- If you succeed in creating edge (sometimes several attempts) and the edge of the property can not be changed Centered
- If is checked Snap To Grid and everything works fine

It's a bug in the Sirius?

Martin
Re: Routing problem between some nodes [message #1732091 is a reply to message #1732028] Thu, 12 May 2016 13:48 Go to previous message
Julien Dupont is currently offline Julien DupontFriend
Messages: 172
Registered: July 2009
Senior Member
Hi Martin,

It's maybe a bug but I can't reproduce it!

Attached you can find a simple example to try to reproduce your problem.
If you succeed to reproduce your problem with this example you will be
able to create a bug.

What I did to try to reproduce your problem:
- Open the representation named new Diagram (the specification about
this representation have a Edge Mapping with center and end Label Style
defined and a Routing Style set to Manhattan)
- Unckek in properties view, tab Rulers&Grid the property "Snap to Grid'
- Use tool named "CreateRef" between 2 nodes. Edge created! Test successful.

Regards,


--
Julien - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Which popup menu
Next Topic:Passing multiple selected elements from a diagram editor to an external java action
Goto Forum:
  


Current Time: Fri Apr 26 03:57:05 GMT 2024

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

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

Back to the top