File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
src/main/java/club/bytecode/the/jda Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change 3131import java .net .MalformedURLException ;
3232import java .util .*;
3333import java .util .concurrent .atomic .AtomicInteger ;
34+ import java .util .function .Function ;
3435import java .util .function .Supplier ;
3536
3637public class JDA {
@@ -580,6 +581,8 @@ public String getDescription() {
580581 }
581582 }
582583
584+ public static Function <String , List <ViewerFile >> searchCallback = JDA ::search ;
585+
583586 public static List <ViewerFile > search (String needle ) {
584587 List <ViewerFile > matches = new ArrayList <>();
585588 for (FileContainer fc : JDA .getOpenFiles ()) {
Original file line number Diff line number Diff line change @@ -159,7 +159,7 @@ else if (isStringSelected()) {
159159 } else
160160 return ;
161161
162- new SearchDialog (tokenName , JDA .search (tokenName )).setVisible (true );
162+ new SearchDialog (tokenName , JDA .searchCallback . apply (tokenName )).setVisible (true );
163163 }
164164
165165 private void doRenameDialog () {
You can’t perform that action at this time.
0 commit comments