mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-22 12:05:32 +00:00
#759 Decompilation § symbol supposed to be string but gets in class name fixed
This commit is contained in:
@@ -337,7 +337,12 @@ public class MethodInfo {
|
||||
public GraphTextWriter getReturnTypeStr(GraphTextWriter writer, AVM2ConstantPool constants, List<String> fullyQualifiedNames) {
|
||||
String rname = "*";
|
||||
if (ret_type > 0) {
|
||||
rname = IdentifiersDeobfuscation.printIdentifier(true, constants.getMultiname(ret_type).getName(constants, fullyQualifiedNames, true), "void");
|
||||
Multiname multiname = constants.getMultiname(ret_type);
|
||||
if (multiname.kind != Multiname.TYPENAME && multiname.name_index > 0 && constants.getString(multiname.name_index).equals("void")) {
|
||||
rname = "void";
|
||||
} else {
|
||||
rname = multiname.getName(constants, fullyQualifiedNames, false);
|
||||
}
|
||||
}
|
||||
return writer.hilightSpecial(rname, HighlightSpecialType.RETURNS);
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
package com.jpexs.decompiler.flash.gui.abc;
|
||||
|
||||
import com.jpexs.decompiler.flash.configuration.Configuration;
|
||||
import com.jpexs.decompiler.flash.gui.View;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.io.IOException;
|
||||
import java.io.Reader;
|
||||
@@ -36,10 +37,17 @@ import jsyntaxpane.SyntaxDocument;
|
||||
public class UndoFixedEditorPane extends JEditorPane {
|
||||
|
||||
private static final Object setTextLock = new Object();
|
||||
private String originalContentType;
|
||||
|
||||
@Override
|
||||
public void setText(String t) {
|
||||
setText(t, getContentType());
|
||||
public void setText(final String t) {
|
||||
View.execInEventDispatch(new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
setText(t, getContentType());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void setText(String t, String contentType) {
|
||||
@@ -48,12 +56,16 @@ public class UndoFixedEditorPane extends JEditorPane {
|
||||
boolean plain = t.length() > Configuration.syntaxHighlightLimit.get();
|
||||
if (plain) {
|
||||
contentType = "text/plain";
|
||||
originalContentType = getContentType();
|
||||
setContentType(contentType);
|
||||
} else {
|
||||
if (originalContentType != null) {
|
||||
setContentType(originalContentType);
|
||||
originalContentType = null;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
if (!getContentType().equals(contentType)) {
|
||||
setContentType(contentType);
|
||||
}
|
||||
Document doc = getDocument();
|
||||
setDocument(new SyntaxDocument(null));
|
||||
doc.remove(0, doc.getLength());
|
||||
|
||||
Reference in New Issue
Block a user