Bug 451504 - [LinksLF] Display of links changes between an Papyrus without LinksLF and a Papyrus with LinksLF
Summary: [LinksLF] Display of links changes between an Papyrus without LinksLF and a P...
Status: REOPENED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Diagram (show other bugs)
Version: 1.1.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Michael Golubev CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 461918 424099 461719
Blocks: 442157
  Show dependency tree
 
Reported: 2014-11-14 05:23 EST by Vincent Lorenzo CLA
Modified: 2015-03-11 09:34 EDT (History)
3 users (show)

See Also:


Attachments
snapshot of the model without linkslf (196.21 KB, image/png)
2014-11-14 05:23 EST, Vincent Lorenzo CLA
no flags Details
the same model with LinksLF (194.01 KB, image/png)
2014-11-14 05:24 EST, Vincent Lorenzo CLA
no flags Details
the initial model (12.23 KB, application/octet-stream)
2014-11-14 05:25 EST, Vincent Lorenzo CLA
no flags Details
test4: Dashed line breakup (model bendpoints and anchors) (49.35 KB, image/png)
2014-12-01 03:57 EST, Michael Golubev CLA
no flags Details
test4: Solid line breakup (model bendpoints and anchors) (50.62 KB, image/png)
2014-12-01 03:57 EST, Michael Golubev CLA
no flags Details
Model showing that the issue is not fixed. (3.50 KB, application/x-zip-compressed)
2015-03-02 09:31 EST, Alain Le Guennec CLA
no flags Details
Model to reproduce anchor-less router issues with scrollbars (3.49 KB, application/x-zip-compressed)
2015-03-03 07:45 EST, Alain Le Guennec CLA
no flags Details
router-bug-step1 (114.48 KB, image/png)
2015-03-03 07:46 EST, Alain Le Guennec CLA
no flags Details
router-bug-step2 (116.96 KB, image/png)
2015-03-03 07:47 EST, Alain Le Guennec CLA
no flags Details
router-bug-step3 (116.16 KB, image/png)
2015-03-03 07:47 EST, Alain Le Guennec CLA
no flags Details
Model to reproduce spurious offset disruption (4.79 KB, application/x-zip-compressed)
2015-03-09 06:15 EDT, Alain Le Guennec CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Lorenzo CLA 2014-11-14 05:23:13 EST
For the feature desribed in the bug 424099, I developped JUnit tests to find common bendpoints between links (see class org.eclipse.papyrus.uml.diagram.common.tests.tests.CommonBendpointsTest)

Currently a part of these tests are broken (see build result here https://hudson.eclipse.org/papyrus/job/Papyrus-Luna-Anchors-Tests/lastCompletedBuild/testReport/) 

After some investigation I found than the feature continues to work fine, but the existing diagram doesn't have the same display just after the opening of the diagram between old framework and new LinksLF framework.

I think than a part of the bugs comes from bug 443586: [LinksLF] routing of link moves applying Snap To Grid/Unapplying snap to grid and reopening the model. 
Another part of the bug should comes from the new router implementation.
Comment 1 Vincent Lorenzo CLA 2014-11-14 05:23:48 EST
Created attachment 248658 [details]
snapshot of the model without linkslf
Comment 2 Vincent Lorenzo CLA 2014-11-14 05:24:17 EST
Created attachment 248659 [details]
the same model with LinksLF
Comment 3 Vincent Lorenzo CLA 2014-11-14 05:25:32 EST
Created attachment 248660 [details]
the initial model
Comment 4 Vincent Lorenzo CLA 2014-11-14 05:26:31 EST
The label of the links move, but I think than it is not really a bug, it should come from the move on the anchor and the changes in the routing.
Comment 5 Michael Golubev CLA 2014-12-01 03:57:25 EST
Created attachment 249044 [details]
test4: Dashed line breakup (model bendpoints and anchors)
Comment 6 Michael Golubev CLA 2014-12-01 03:57:52 EST
Created attachment 249045 [details]
test4: Solid line breakup (model bendpoints and anchors)
Comment 7 Michael Golubev CLA 2014-12-01 04:17:00 EST
Hello, 

I just attached 2 detailed screenshots for the Test4 (top-right corner of diagram) to explain what happens. 

So here, as you can see the positions of the 2 link anchors differs a lot and only common point they have in the model is the green bendpoint at around [660,300]. 

Before LinksLF the default rectilinear router while drawing the last recti-segment  always prefers the last bendpoint position to anchor position, so the without linkLF the segment is always drawn from this green circle at [660, 300] to "somewhere at the bounds", ignoring position of the blue circle (anchor).

With LinksLF we have enforced the routing preference for anchor position to bendpoint position, so now the segment is drawn from the blue/red circle to "somewhere at the endless line containing the previous link segment". 

This change of behavior is required to preserve the relative anchor positions when we move the node. As the old routing completely ignores the position of the anchor for last segment, I don;t see how we can both respect the requirement of "draw to anchors" and keep the old routing at the same time.
Comment 8 Vincent Lorenzo CLA 2015-01-16 03:42:04 EST
This bug can be marked as closed fixed
Comment 9 Alain Le Guennec CLA 2015-03-02 09:31:41 EST
Created attachment 251216 [details]
Model showing that the issue is not fixed.

Actually, this bug is probably not closed.
We found some cases for which the display is different.
The model was created with 0.10.2, and still displays correctly in 1.0.x without LinksLF support, but is displayed wrong with LinksLF support.
Vincent, can you reopen this bug?
Comment 10 Alain Le Guennec CLA 2015-03-02 09:38:10 EST
(In reply to Alain Le Guennec from comment #9)
> Created attachment 251216 [details]
> Model showing that the issue is not fixed.
> 
> Actually, this bug is probably not closed.
> We found some cases for which the display is different.
> The model was created with 0.10.2, and still displays correctly in 1.0.x
> without LinksLF support, but is displayed wrong with LinksLF support.
> Vincent, can you reopen this bug?

I forgot to mention that this seems related to snap-to-grid
(the model is displayed wrong when snap-to-grid is active, but is fine without it).
Comment 11 Vincent Lorenzo CLA 2015-03-02 11:03:33 EST
I reopen the bug, according to Alain comment.
Comment 12 Alain Le Guennec CLA 2015-03-03 07:45:33 EST
Created attachment 251243 [details]
Model to reproduce anchor-less router issues with scrollbars

We just found another issue, even more impacting this time:
Rectilinear routers that have no specific source/target anchors (but just bendpoint(s)) are drawn incorrectly in presence of scrollbars when LinksLF support is enabled (it is ok without LinksLF).
To reproduce, open the attached model (see router-bug-step1.png),
and progressively move the scrollbar of the diagram downwards,
pressing F5 at intermediate positions to refresh.
You can see that the connector is progressively "drifting" towards the edges of the ports it is connected to  (see router-bug-step2.png),
and when it reaches those edges, it goes completely crazy because the router is starting vertically (see router-bug-step3.png)

Note that such "anchor-less" connectors can be created by D&D of a hidden connector from the browser, or using "show related links".
On big diagrams, where scrollbars are always present, this completely wreaks havoc.

Note also that this pb is not linked to snap-to-grid, contrary to the previous one, so there seems to be at least two different issues left.
Comment 13 Alain Le Guennec CLA 2015-03-03 07:46:50 EST
Created attachment 251244 [details]
router-bug-step1
Comment 14 Alain Le Guennec CLA 2015-03-03 07:47:11 EST
Created attachment 251245 [details]
router-bug-step2
Comment 15 Alain Le Guennec CLA 2015-03-03 07:47:32 EST
Created attachment 251246 [details]
router-bug-step3
Comment 16 Vincent Lorenzo CLA 2015-03-06 09:54:19 EST
(In reply to Alain Le Guennec from comment #15)
> Created attachment 251246 [details]
> router-bug-step3

FYI, these models have been created with a css stylesheet forcing the rectilinear style from the element creation.
Comment 17 Alain Le Guennec CLA 2015-03-09 05:03:06 EDT
(In reply to vincent lorenzo from comment #16)
> (In reply to Alain Le Guennec from comment #15)
> > Created attachment 251246 [details]
> > router-bug-step3
> 
> FYI, these models have been created with a css stylesheet forcing the
> rectilinear style from the element creation.

Actually, the CSS is irrelevant in the "anchorless rectilinear routing with scrollbars" issue.
You can reproduce it with the Papyrus-with-linkslf version trivially:
-Create a block with a part and a delegating connectors connecting a port of the block to a port of the part, and make sure the block symbol is big enough to have scrollbars
-Hide the connector
-Redrop the connector onto the IBD (that's for the anchorless part of the issue)
-move scrollbars and refresh the diagrams
=> You've got the same issue.

It's true that SCADE System comes with a default theme that switch connectors to rectilinear mode by default, but it is not necessary to reproduce the issue in Papyrus.
Comment 18 Alain Le Guennec CLA 2015-03-09 05:04:00 EDT
(In reply to Alain Le Guennec from comment #17)
> (In reply to vincent lorenzo from comment #16)
> > (In reply to Alain Le Guennec from comment #15)
> > > Created attachment 251246 [details]
> > > router-bug-step3
> > 
> > FYI, these models have been created with a css stylesheet forcing the
> > rectilinear style from the element creation.
> 
> Actually, the CSS is irrelevant in the "anchorless rectilinear routing with
> scrollbars" issue.
> You can reproduce it with the Papyrus-with-linkslf version trivially:
> -Create a block with a part and a delegating connectors connecting a port of
> the block to a port of the part, and make sure the block symbol is big
> enough to have scrollbars
> -Hide the connector
> -Redrop the connector onto the IBD (that's for the anchorless part of the
> issue)
> -move scrollbars and refresh the diagrams
> => You've got the same issue.
> 
> It's true that SCADE System comes with a default theme that switch
> connectors to rectilinear mode by default, but it is not necessary to
> reproduce the issue in Papyrus.

I forgot the step "turn to rectilinear routing style" after the drop of the connector.
Comment 19 Alain Le Guennec CLA 2015-03-09 06:15:50 EDT
Created attachment 251396 [details]
Model to reproduce spurious offset disruption

In reply to comment 9 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=451504#c9).
I managed to bug a small model with Papyrus 1.0.1 that,
when loaded with the LinksLF version, has its layout severely disrupted.
I think it is the same issue as in Comment #9, but it is clearer.
It is not related to snap-to-grid (I have it turned off), nor to scrollbars, nor to CSS (no stylesheet).
It seems related to the way the router eliminates superimposed segments in rectilinear mode.
For some reasons, the LinksLF router seems to be introducing a little offset when computing some of the segments, which causes them not to be superimposed anymore,
and so segment that were not displayed with stock 1.0.1 now wrongly get displayed with LinksLF.
The same offset introduction also causes some ugly "stairs" in edges that were completely straight in 1.0.1 (same diagram illustrates both issues).

FYI, the model was built with stock 1.0.1,
with connectors initially in oblique mode then changed to rectilinear.
You can turn them back to oblique mode in 1.0.1 to understand how they were built, purposely with superimposed segments that become invisible in rectilinear mode.