MCPcopy Create free account
hub / github.com/FabricMC/Matcher / init

Method init

src/main/java/matcher/gui/menu/UidMenu.java:44–72  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

42 }
43
44 private void init() {
45 MenuItem menuItem = new MenuItem("Setup");
46 getItems().add(menuItem);
47 menuItem.setOnAction(event -> setup());
48
49 getItems().add(new SeparatorMenuItem());
50
51 menuItem = new MenuItem("Import matches");
52 getItems().add(menuItem);
53 menuItem.setOnAction(event -> gui.runProgressTask(
54 "Importing matches...",
55 this::importMatches,
56 () -> gui.onMatchChange(EnumSet.allOf(MatchType.class)),
57 Throwable::printStackTrace));
58
59 menuItem = new MenuItem("Submit matches");
60 getItems().add(menuItem);
61 menuItem.setOnAction(event -> gui.runProgressTask(
62 "Submitting matches...",
63 this::submitMatches,
64 () -> { },
65 Throwable::printStackTrace));
66
67 getItems().add(new SeparatorMenuItem());
68
69 menuItem = new MenuItem("Assign missing");
70 getItems().add(menuItem);
71 menuItem.setOnAction(event -> assignMissing());
72 }
73
74 private void setup() {
75 Dialog<UidConfig> dialog = new Dialog<>();

Callers 1

UidMenuMethod · 0.95

Calls 4

setupMethod · 0.95
assignMissingMethod · 0.95
runProgressTaskMethod · 0.80
onMatchChangeMethod · 0.65

Tested by

no test coverage detected