#759 Decompilation § symbol supposed to be string but gets in class name fixed

This commit is contained in:
honfika@gmail.com
2014-12-19 14:56:57 +01:00
parent 907a97dfe9
commit a92d46505e
2 changed files with 23 additions and 6 deletions

View File

@@ -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);
}

View File

@@ -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());