MCPcopy Create free account
hub / github.com/XUANXUQAQ/File-Engine / quickJump

Method quickJump

src/main/java/file/engine/frames/SearchBar.java:710–729  ·  view source on GitHub ↗
(String result)

Source from the content-addressed store, hash-verified

708
709 //在explorer attach模式时操作鼠标和键盘以快速跳转到文件位置
710 private void quickJump(String result) {
711 closeWithoutHideSearchBar();
712 String jumpLocation;
713 String fileName;
714 if (FileUtil.isFile(result)) {
715 jumpLocation = FileUtil.getParentPath(result);
716 fileName = FileUtil.getFileName(result);
717 } else {
718 jumpLocation = result;
719 fileName = "";
720 }
721 saveCache(result);
722 jumpLocation = new String(jumpLocation.getBytes(StandardCharsets.UTF_8), StandardCharsets.UTF_8);
723 fileName = new String(fileName.getBytes(StandardCharsets.UTF_8), StandardCharsets.UTF_8);
724 try {
725 GetHandle.INSTANCE.setEditPath(jumpLocation, fileName);
726 } catch (Exception e) {
727 log.error(e.getMessage(), e);
728 }
729 }
730
731 /**
732 * 复制信息到系统剪贴板

Callers 1

handleEnterKeyMethod · 0.95

Calls 7

isFileMethod · 0.95
getParentPathMethod · 0.95
getFileNameMethod · 0.95
saveCacheMethod · 0.95
setEditPathMethod · 0.80
getMessageMethod · 0.80

Tested by

no test coverage detected