@@ -463,7 +463,24 @@ protected void onScopeChanged(ScopeAction action, String str, int start) {
463
463
*/
464
464
protected boolean onFilteredSymbolMatched (String str , int start ,
465
465
Set <String > keywords ) {
466
- return onFilteredSymbolMatched (str , start , keywords , true );
466
+ return onFilteredSymbolMatched (str , str , start , keywords , true );
467
+ }
468
+
469
+ /**
470
+ * Calls
471
+ * {@link #onFilteredSymbolMatched(java.lang.String, int, java.util.Set, boolean)}
472
+ * with {@code str}, {@code start}, {@code keywords}, and {@code true}.
473
+ * @param literal the literal representation of the symbol
474
+ * @param str the text string
475
+ * @param start the text start position
476
+ * @param keywords an optional set to search for {@code str} as a member to
477
+ * indicate a keyword
478
+ * @return true if the {@code str} was not in {@code keywords} or if
479
+ * {@code keywords} was null
480
+ */
481
+ protected boolean onFilteredSymbolMatched (String literal , String str , int start ,
482
+ Set <String > keywords ) {
483
+ return onFilteredSymbolMatched (literal , str , start , keywords , true );
467
484
}
468
485
469
486
/**
@@ -483,15 +500,36 @@ protected boolean onFilteredSymbolMatched(String str, int start,
483
500
*/
484
501
protected boolean onFilteredSymbolMatched (String str , int start ,
485
502
Set <String > keywords , boolean caseSensitive ) {
503
+ return onFilteredSymbolMatched (str , str , start , keywords , caseSensitive );
504
+ }
505
+
506
+ /**
507
+ * Raises {@link #onKeywordMatched(java.lang.String, int)} if
508
+ * {@code keywords} is not null and {@code str} is found as a member (in a
509
+ * case-sensitive or case-less search per {@code caseSensitive}); otherwise
510
+ * raises {@link #onSymbolMatched(java.lang.String, int)}.
511
+ * @param literal the literal representation of the symbol
512
+ * @param str the text string
513
+ * @param start the text start position
514
+ * @param keywords an optional set to search for {@code str} as a member to
515
+ * indicate a keyword
516
+ * @param caseSensitive a value indicating if {@code keywords} should be
517
+ * searched for {@code str} as-is ({@code true}) or if the lower-case
518
+ * equivalent of {@code str} should be used ({@code false}).
519
+ * @return true if the {@code str} was not in {@code keywords} or if
520
+ * {@code keywords} was null
521
+ */
522
+ protected boolean onFilteredSymbolMatched (String literal , String str , int start ,
523
+ Set <String > keywords , boolean caseSensitive ) {
486
524
487
525
if (keywords != null ) {
488
- String check = caseSensitive ? str : str .toLowerCase (Locale .ROOT );
526
+ String check = caseSensitive ? literal : literal .toLowerCase (Locale .ROOT );
489
527
if (keywords .contains (check )) {
490
- onKeywordMatched (str , start );
528
+ onKeywordMatched (literal , start );
491
529
return false ;
492
530
}
493
531
}
494
- onSymbolMatched (str , start );
532
+ onSymbolMatched (literal , str , start );
495
533
return true ;
496
534
}
497
535
0 commit comments