Closed ghentschke closed 5 months ago
Are we fixing a problem with ProjectionAnnotationModel.modifyAnnotations? Or how is it that "On large annotations the positions won't get updated properly which leads to removed folding annotations"?
Are we fixing a problem with ProjectionAnnotationModel.modifyAnnotations?
Not really. IMO we haven't used the proper method. And theProjectionAnnotationModel.modifyAnnotationPosition(foldingAnnotation, newPos)
does exactly what we want: update the position of a Annotation.
Are we fixing a problem with ProjectionAnnotationModel.modifyAnnotations?
Not really. IMO we haven't used the proper method. And
theProjectionAnnotationModel.modifyAnnotationPosition(foldingAnnotation, newPos)
does exactly what we want: update the position of a Annotation.
I guess that you mean that call projectionAnnotationModel.modifyAnnotations(deletions.toArray(new Annotation[1]), additions, modifications.toArray(new Annotation[0]))
is not the proper method. Why not?
I guess that you mean that call projectionAnnotationModel.modifyAnnotations(deletions.toArray(new Annotation[1]), additions, modifications.toArray(new Annotation[0])) is not the proper method. Why not?
That was my assumption I made after some debugging to determine why the folding annotations disappear as described in my issue #934.
Unfortunately, I had not the time to determine the root cause why the previous method does not work on large files. The theProjectionAnnotationModel.modifyAnnotationPosition(foldingAnnotation, newPos)
seems to be more appropriate for what we wanted and it works as expected also on large files.
@rubenporras thank you for quick review!
The method ProjectionAnnotationModel.modifyAnnotations(Annotation[], Map<? extends Annotation, ? extends Position>, Annotation[]) does not consider Position changes in any cases. On large annotations the positions won't get updated properly which leads to removed folding annotations.
fixes #934