Commit fc3d22c
committed
CodeMining: reuse existing inlined annotations when minings are
unchanged
Add getMinings() accessor methods to CodeMiningLineContentAnnotation and
CodeMiningLineHeaderAnnotation to expose their mining lists. Enhance
findExistingAnnotation() in InlinedAnnotationSupport to accept an
optional
minings parameter and compare existing annotations' minings with new
ones.
This allows reusing existing annotation instances when the mining
content
hasn't changed, avoiding unnecessary annotation recreation and improving
performance.
The change prevents flickering and reduces overhead by preserving
annotation
objects when only their position is being updated during reconciliation,
but
their actual mining data remains identical.
#2786 (comment)1 parent e15e9bf commit fc3d22c
File tree
5 files changed
+36
-3
lines changed- bundles/org.eclipse.jface.text
- META-INF
- src/org/eclipse/jface
- internal/text/codemining
- text/source/inlined
5 files changed
+36
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
219 | 223 | | |
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
293 | 297 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | | - | |
| 300 | + | |
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
| |||
Lines changed: 26 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| 62 | + | |
61 | 63 | | |
62 | 64 | | |
63 | 65 | | |
| |||
483 | 485 | | |
484 | 486 | | |
485 | 487 | | |
486 | | - | |
487 | 488 | | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
488 | 497 | | |
489 | 498 | | |
490 | 499 | | |
| |||
496 | 505 | | |
497 | 506 | | |
498 | 507 | | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
499 | 524 | | |
500 | 525 | | |
501 | 526 | | |
| |||
0 commit comments