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

Method update

src/main/java/matcher/gui/tab/BytecodeTab.java:64–85  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

62 }
63
64 private void update() {
65 if (selectedClass == null) {
66 displayText("no class selected");
67 } else {
68 StringWriter writer = new StringWriter();
69
70 try (PrintWriter pw = new PrintWriter(writer)) {
71 NameType nameType = gui.getNameType().withUnmatchedTmp(unmatchedTmp);
72 selectedClass.accept(new TraceClassVisitor(null, new HtmlTextifier(selectedClass, nameType), pw), nameType);
73 }
74
75 double prevScroll = updateNeeded == 2 ? getScrollTop() : 0;
76
77 displayHtml(writer.toString());
78
79 if (updateNeeded == 2 && prevScroll > 0) {
80 setScrollTop(prevScroll);
81 }
82 }
83
84 updateNeeded = 0;
85 }
86
87 @Override
88 public void onMethodSelect(MethodInstance method) {

Callers 4

BytecodeTabMethod · 0.95
onSelectStateChangeMethod · 0.95
onClassSelectMethod · 0.95
onViewChangeMethod · 0.95

Calls 8

displayTextMethod · 0.80
withUnmatchedTmpMethod · 0.80
getNameTypeMethod · 0.80
acceptMethod · 0.80
getScrollTopMethod · 0.80
displayHtmlMethod · 0.80
setScrollTopMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected