Hi Nils,
I think the upcoming changes are easier to discuss and verify if you
just push the patch to Gerrit so we can continue the discussion in the
patch set.
BR,
Stefan
On 12.11.2013 12:58, Nils Bussas wrote:
Hi Stefan,
if the number of lines displayed varied on both sides, it wouldn't be
smart to display the first line of the followee (Alice) as the first
line of the follower (Bob). I've thought of that.
My solution would be to display Alice's middle line in the middle of
Bob's screen. (But still using ITextViewer.setTopIndex since it's the
only exact method.)
e.g. Alice's screen displays 20 lines starting with line 38, Bob's
screen displays 16 lines. I would set Bob's top line index to 40.
(First and last two lines are not displayed.)
Your idea of the "heuristics" is good. I'm going to test that.
If it works, I'm going to include this in my commit.
Regards,
Nils
On 07.11.2013 20:25, Stefan Rossbach wrote:
Hi Nils,
the problem you are facing is:
You have a set of lines which are equal on both side but the subset
of both sides are not equal regarding their cardinality (the lines
that are actually displayed) .
If you ensure that always the first line is "displayed" then this
will result in the same behavior as described in the bug but for
scrolling to the bottom of the editor. Maybe this can be "solved"
(not really) with some heuristics
e.g if we now the user scrolled up then it may be a good hint to use
setTopIndex otherwise if the user scrolled down we should ensure that
the last line of the current viewport is visible on the remote side.
Franz your opinion(s) ?
BR,
Stefan
On 07.11.2013 11:53, Nils Bussas wrote:
Hi all,
I want to solve Bug #802 <https://sourceforge.net/p/dpp/bugs/802/>,
but first I wanted to ask you whether my approach makes sense.
It looks like the Saros instance of the one being followed sends
correct data to the person following, but Saros doesn't allways
scroll to the right position.
In EditorAPI.reveal(IEditorPart, ILineRange) the method
ITextViewer.revealRange is used to scroll to the right position.
This isn't optimal since it can only be used to ensure that one
particular line is visible on the screen, not where exactly it
should be shown.
I would use a different method (ITextViewer.setTopIndex) which can
be used more exactly.
Does this sound like a reasonable approach to you?
Regards,
Nils Bussas
------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
DPP-Devel mailing list
DPP-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dpp-devel
------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
DPP-Devel mailing list
DPP-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dpp-devel