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