Commit 98140e6
Add DescWindowVisibility (ALWAYS/ON_DEMAND/NEVER) for the description popup
Replaces the boolean setShowDescWindow()/getShowDescWindow() API with a
DescWindowVisibility enum, adding an ON_DEMAND mode where the description
window is only shown when explicitly toggled. The toggle keystroke is
customizable via the new setDescWindowToggleKey()/getDescWindowToggleKey()
wrapper around the text component's InputMap/ActionMap.
Also fixes a bug where a disposed description window could be silently
resurrected by the JDK: java.awt.Window#hide() cascades to owned windows
still visible at the moment their owner is hidden, hiding them too and
flagging them (via a package-private showWithParent field) to be
automatically re-shown the next time the owner is shown again - even if
that owned window was dispose()d in the meantime. Since
AutoCompletePopupWindow hid itself before explicitly hiding the
description window, a description window that was visible when the
choices popup lost focus would get this flag set; disposing it afterward
(e.g. by switching to NEVER) didn't clear it, so the next time the
choices popup reopened, the JDK silently recreated the disposed window's
native peer and showed it again with stale content, bypassing all of our
own visibility logic. Fixed by hiding the description window before
hiding the choices popup, so it's already invisible by the time the
JDK's cascade runs.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent 5cc2d2a commit 98140e6
7 files changed
Lines changed: 514 additions & 27 deletions
File tree
- AutoCompleteDemo/src/main/java/org/fife/ui/autocomplete/demo
- AutoComplete/src
- main/java/org/fife/ui/autocomplete
- test/java/org/fife/ui/autocomplete
- config/checkstyle
Lines changed: 137 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
77 | 85 | | |
78 | 86 | | |
79 | 87 | | |
| |||
271 | 279 | | |
272 | 280 | | |
273 | 281 | | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
274 | 391 | | |
275 | 392 | | |
276 | 393 | | |
| |||
316 | 433 | | |
317 | 434 | | |
318 | 435 | | |
319 | | - | |
| 436 | + | |
320 | 437 | | |
321 | 438 | | |
322 | 439 | | |
| |||
452 | 569 | | |
453 | 570 | | |
454 | 571 | | |
455 | | - | |
| 572 | + | |
456 | 573 | | |
457 | 574 | | |
458 | 575 | | |
| |||
703 | 820 | | |
704 | 821 | | |
705 | 822 | | |
706 | | - | |
| 823 | + | |
707 | 824 | | |
708 | 825 | | |
709 | 826 | | |
| |||
755 | 872 | | |
756 | 873 | | |
757 | 874 | | |
758 | | - | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
759 | 878 | | |
760 | 879 | | |
761 | 880 | | |
| |||
771 | 890 | | |
772 | 891 | | |
773 | 892 | | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
774 | 906 | | |
775 | 907 | | |
776 | 908 | | |
| |||
797 | 929 | | |
798 | 930 | | |
799 | 931 | | |
800 | | - | |
| 932 | + | |
801 | 933 | | |
802 | 934 | | |
803 | 935 | | |
| |||
Lines changed: 72 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
179 | 185 | | |
180 | 186 | | |
181 | 187 | | |
| |||
268 | 274 | | |
269 | 275 | | |
270 | 276 | | |
271 | | - | |
| 277 | + | |
| 278 | + | |
272 | 279 | | |
273 | 280 | | |
274 | 281 | | |
| |||
384 | 391 | | |
385 | 392 | | |
386 | 393 | | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
387 | 406 | | |
388 | 407 | | |
389 | 408 | | |
| |||
462 | 481 | | |
463 | 482 | | |
464 | 483 | | |
465 | | - | |
466 | | - | |
| 484 | + | |
467 | 485 | | |
468 | | - | |
469 | | - | |
| 486 | + | |
| 487 | + | |
470 | 488 | | |
471 | | - | |
472 | | - | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
473 | 502 | | |
474 | 503 | | |
475 | 504 | | |
| |||
665 | 694 | | |
666 | 695 | | |
667 | 696 | | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
668 | 700 | | |
669 | 701 | | |
670 | 702 | | |
| |||
1148 | 1180 | | |
1149 | 1181 | | |
1150 | 1182 | | |
1151 | | - | |
1152 | | - | |
| 1183 | + | |
1153 | 1184 | | |
1154 | | - | |
1155 | | - | |
| 1185 | + | |
| 1186 | + | |
1156 | 1187 | | |
1157 | | - | |
| 1188 | + | |
| 1189 | + | |
1158 | 1190 | | |
1159 | | - | |
| 1191 | + | |
1160 | 1192 | | |
1161 | 1193 | | |
1162 | 1194 | | |
1163 | 1195 | | |
1164 | | - | |
| 1196 | + | |
1165 | 1197 | | |
1166 | 1198 | | |
1167 | 1199 | | |
| |||
1186 | 1218 | | |
1187 | 1219 | | |
1188 | 1220 | | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
1189 | 1242 | | |
1190 | 1243 | | |
1191 | 1244 | | |
| |||
1238 | 1291 | | |
1239 | 1292 | | |
1240 | 1293 | | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
1241 | 1297 | | |
1242 | 1298 | | |
1243 | 1299 | | |
| |||
Lines changed: 38 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
0 commit comments