MCPcopy
hub / github.com/Col-E/Recaf / applyTinyV2Map

Method applyTinyV2Map

src/main/java/me/coley/recaf/ui/MainMenu.java:390–404  ·  view source on GitHub ↗
(TinyV2Mappings.TinyV2SubType subType)

Source from the content-addressed store, hash-verified

388 }
389
390 private void applyTinyV2Map(TinyV2Mappings.TinyV2SubType subType) {
391 fcLoadMap.setInitialDirectory(config().getRecentLoadDir());
392 File file = fcLoadMap.showOpenDialog(null);
393 if (file != null) {
394 try {
395 Mappings mappings = new TinyV2Mappings(file.toPath(), controller.getWorkspace(), subType);
396 mappings.setCheckFieldHierarchy(true);
397 mappings.setCheckMethodHierarchy(true);
398 mappings.accept(controller.getWorkspace().getPrimary());
399 } catch (Exception ex) {
400 error(ex, "Failed to apply mappings: {}", file.getName());
401 ExceptionAlert.show(ex, "Failed to apply mappings: " + file.getName());
402 }
403 }
404 }
405
406 /**
407 * Display history window.

Callers 1

populateMappingMenusMethod · 0.95

Calls 11

configMethod · 0.95
showMethod · 0.95
getRecentLoadDirMethod · 0.80
toPathMethod · 0.80
acceptMethod · 0.80
getPrimaryMethod · 0.80
getNameMethod · 0.65
getWorkspaceMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected