mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 02:00:58 +00:00
better multibane namespace resolving
icon 256
This commit is contained in:
@@ -82,13 +82,13 @@ public class InstructionDefinition {
|
|||||||
|
|
||||||
protected FullMultinameTreeItem resolveMultiname(Stack<TreeItem> stack, ConstantPool constants, int multinameIndex, AVM2Instruction ins) {
|
protected FullMultinameTreeItem resolveMultiname(Stack<TreeItem> stack, ConstantPool constants, int multinameIndex, AVM2Instruction ins) {
|
||||||
TreeItem ns = null;
|
TreeItem ns = null;
|
||||||
TreeItem name = null;
|
TreeItem name = null;
|
||||||
if (constants.constant_multiname[multinameIndex].needsNs()) {
|
|
||||||
ns = (TreeItem) stack.pop();
|
|
||||||
}
|
|
||||||
if (constants.constant_multiname[multinameIndex].needsName()) {
|
if (constants.constant_multiname[multinameIndex].needsName()) {
|
||||||
name = (TreeItem) stack.pop();
|
name = (TreeItem) stack.pop();
|
||||||
}
|
}
|
||||||
|
if (constants.constant_multiname[multinameIndex].needsNs()) {
|
||||||
|
ns = (TreeItem) stack.pop();
|
||||||
|
}
|
||||||
return new FullMultinameTreeItem(ins, multinameIndex, name, ns);
|
return new FullMultinameTreeItem(ins, multinameIndex, name, ns);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -56,21 +56,17 @@ public class FullMultinameTreeItem extends TreeItem {
|
|||||||
public String toString(ConstantPool constants, HashMap<Integer,String> localRegNames) {
|
public String toString(ConstantPool constants, HashMap<Integer,String> localRegNames) {
|
||||||
String ret = "";
|
String ret = "";
|
||||||
if (name != null) {
|
if (name != null) {
|
||||||
ret = name.toString(constants,localRegNames);
|
ret = "["+name.toString(constants,localRegNames)+"]";
|
||||||
} else {
|
} else {
|
||||||
ret = constants.constant_multiname[multinameIndex].getName(constants);
|
ret = hilight(constants.constant_multiname[multinameIndex].getName(constants));
|
||||||
}
|
}
|
||||||
if (namespace != null) {
|
if (namespace != null) {
|
||||||
ret = ret + "[" + namespace.toString(constants,localRegNames) + "]";
|
ret=namespace.toString(constants,localRegNames)+"::"+ret;
|
||||||
} else {
|
} else {
|
||||||
Namespace ns = constants.constant_multiname[multinameIndex].getNamespace(constants);
|
/*Namespace ns = constants.constant_multiname[multinameIndex].getNamespace(constants);
|
||||||
if (ns != null) {
|
if ((ns != null)&&(ns.name_index!=0)) {
|
||||||
ret = ret + "[" + ns.getName(constants) + "]";
|
ret = hilight(ns.getName(constants) + "::")+ret;
|
||||||
}
|
}*/
|
||||||
}
|
|
||||||
|
|
||||||
if ((name == null) && (namespace == null)) {
|
|
||||||
ret = hilight(constants.constant_multiname[multinameIndex].getName(constants));
|
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,10 +91,13 @@ public abstract class TreeItem {
|
|||||||
if (((LocalRegTreeItem) object).computedValue instanceof FindPropertyTreeItem)
|
if (((LocalRegTreeItem) object).computedValue instanceof FindPropertyTreeItem)
|
||||||
obStr = "";
|
obStr = "";
|
||||||
}
|
}
|
||||||
|
if(obStr.equals("")){
|
||||||
|
return propertyName.toString(constants,localRegNames);
|
||||||
|
}
|
||||||
if (propertyName instanceof FullMultinameTreeItem) {
|
if (propertyName instanceof FullMultinameTreeItem) {
|
||||||
|
|
||||||
if (((FullMultinameTreeItem) propertyName).isRuntime()) {
|
if (((FullMultinameTreeItem) propertyName).isRuntime()) {
|
||||||
return obStr + "[" + propertyName.toString(constants,localRegNames) + "]";
|
return obStr + propertyName.toString(constants,localRegNames);
|
||||||
} else {
|
} else {
|
||||||
if (!obStr.equals("")) obStr += ".";
|
if (!obStr.equals("")) obStr += ".";
|
||||||
return obStr + ((FullMultinameTreeItem) propertyName).toString(constants,localRegNames);
|
return obStr + ((FullMultinameTreeItem) propertyName).toString(constants,localRegNames);
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 30 KiB |
Reference in New Issue
Block a user