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

Method loadProject

src/main/java/matcher/gui/menu/FileMenu.java:106–120  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

104 }
105
106 private void loadProject() {
107 SelectedFile res = Gui.requestFile("Select matches file", gui.getScene().getWindow(), getMatchesLoadExtensionFilters(), true);
108 if (res == null) return;
109
110 ProjectLoadSettings newConfig = requestProjectLoadSettings();
111 if (newConfig == null) return;
112
113 gui.getMatcher().reset();
114 gui.onProjectChange();
115
116 gui.runProgressTask("Initializing files...",
117 progressReceiver -> MatchesIo.read(res.path, newConfig.paths, newConfig.verifyFiles, gui.getMatcher(), progressReceiver),
118 () -> gui.onProjectChange(),
119 Throwable::printStackTrace);
120 }
121
122 public ProjectLoadSettings requestProjectLoadSettings() {
123 Dialog<ProjectLoadSettings> dialog = new Dialog<>();

Callers 1

initMethod · 0.95

Calls 9

requestFileMethod · 0.95
readMethod · 0.95
getSceneMethod · 0.80
getMatcherMethod · 0.80
runProgressTaskMethod · 0.80
onProjectChangeMethod · 0.65
resetMethod · 0.45

Tested by

no test coverage detected