[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools] Re: bug in DefaultPositionUpdater
|
Kim,
The DefaultPositionUpdater implements one specific position updating scheme.
So, e.g., it considers a position being deleted by a replace operation, if
the replaced text completely embraced the range covered by the position. As
it is always the case with default implementations, this might or might not
match your needs. If not, you can provide your own IPositionUpdater
implementation and install it for the position categories that rely on this
kind of update algorithm.
Kai
which might match your needs or not.
"Kim" <ktsao@xxxxxxxxxx> wrote in message
news:3B60A12E.D2D2E968@xxxxxxxxxxxxx
>
> The "notDeleted" method in the DefaultPositionUpdater class has the
> following condition:
>
> if (fOffset < fPosition.offset && (fPosition.offset +
> fPosition.length < fOffset + fLength)) {
> fPosition.delete();
> ....
>
> In the case where fOffset == fPosition.offset, this condition fails and
> the position is not deleted.
>
> The line should be changed to:
> if (fOffset < =fPosition.offset && (fPosition.offset +
> fPosition.length < fOffset + fLength)) {
> fPosition.delete();
> ....
>
>