Bug 452310 - Allow enabling GMF Avoid Obstructions setting in Edge style configuration in VSM
Summary: Allow enabling GMF Avoid Obstructions setting in Edge style configuration in VSM
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Diagram (show other bugs)
Version: 2.0.0   Edit
Hardware: PC Windows 7
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2014-11-19 11:21 EST by Stéphane Seyvoz CLA
Modified: 2016-09-13 15:25 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stéphane Seyvoz CLA 2014-11-19 11:21:06 EST
Overview:
Currently, it is possible to choose between Straight, Manhattan, and Tree for Edge Routing Style, but not to Avoid Obstructions.

Actual Results:
Ugly representations with edges crossing nodes and container nodes very disgracefully.

Remark:
I posted a message in the forums:
https://www.eclipse.org/forums/index.php/t/861646/
Behavior as stated in:
https://www.eclipse.org/forums/index.php/t/74589/

Expected Results:
Manhattan edges go around nodes / containers instead of above / across them, and straight edges force layout to adapt not to have edges above / across nodes/containers.

Propositions:

GMF allows triggering "Avoid Obstructions" on Connections thanks to ViewProviders (and the org.eclipse.gmf.runtime.diagram.core.viewProviders extension point).

Sirius has its own SiriusViewProvider which returns DEdgeViewFactory, that customizes RoutingStyle and maps the routing according to the Straight/Manhattan/Tree choice from the VSM.

1st possible solution:
Providing an "Avoid Obstructions" configuration field/checkbox in the VSM edge style, and calling setAvoidObstructions(true) in the DEdgeViewFactory according to user configuration would solve the problem.

2nd possible solution:
Allowing to externally customize the "org.eclipse.sirius.diagram.canonicalSynchronizerFactoryOverride" extension point to have a custom CanonicalSynchronizer overriding the AbstractCanonicalSynchronizer viewpointViewProvider field, hardcoded to use SiriusViewProvider would be a good solution as well for further customization.

Thanks !
Comment 1 Stéphane Seyvoz CLA 2014-11-19 16:10:19 EST
A Sirius "ViewProvider" extension point like what exists in GMF (as mentioned in my original message) could be an intermediate way, not as impacting as the CanonicalSynchronizerFactory one.