Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 115a0cb

Browse files
committed
Plugin method xref search hook
1 parent a5ab2af commit 115a0cb

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

‎src/main/java/club/bytecode/the/jda/JDA.java‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import java.net.MalformedURLException;
3232
import java.util.*;
3333
import java.util.concurrent.atomic.AtomicInteger;
34+
import java.util.function.Function;
3435
import java.util.function.Supplier;
3536

3637
public 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()) {

‎src/main/java/club/bytecode/the/jda/gui/fileviewer/JDATextArea.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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() {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /