mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-03 13:04:56 +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) {
|
||||
TreeItem ns = null;
|
||||
TreeItem name = null;
|
||||
if (constants.constant_multiname[multinameIndex].needsNs()) {
|
||||
ns = (TreeItem) stack.pop();
|
||||
}
|
||||
TreeItem name = null;
|
||||
if (constants.constant_multiname[multinameIndex].needsName()) {
|
||||
name = (TreeItem) stack.pop();
|
||||
}
|
||||
if (constants.constant_multiname[multinameIndex].needsNs()) {
|
||||
ns = (TreeItem) stack.pop();
|
||||
}
|
||||
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) {
|
||||
String ret = "";
|
||||
if (name != null) {
|
||||
ret = name.toString(constants,localRegNames);
|
||||
ret = "["+name.toString(constants,localRegNames)+"]";
|
||||
} else {
|
||||
ret = constants.constant_multiname[multinameIndex].getName(constants);
|
||||
ret = hilight(constants.constant_multiname[multinameIndex].getName(constants));
|
||||
}
|
||||
if (namespace != null) {
|
||||
ret = ret + "[" + namespace.toString(constants,localRegNames) + "]";
|
||||
ret=namespace.toString(constants,localRegNames)+"::"+ret;
|
||||
} else {
|
||||
Namespace ns = constants.constant_multiname[multinameIndex].getNamespace(constants);
|
||||
if (ns != null) {
|
||||
ret = ret + "[" + ns.getName(constants) + "]";
|
||||
}
|
||||
}
|
||||
|
||||
if ((name == null) && (namespace == null)) {
|
||||
ret = hilight(constants.constant_multiname[multinameIndex].getName(constants));
|
||||
/*Namespace ns = constants.constant_multiname[multinameIndex].getNamespace(constants);
|
||||
if ((ns != null)&&(ns.name_index!=0)) {
|
||||
ret = hilight(ns.getName(constants) + "::")+ret;
|
||||
}*/
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -91,10 +91,13 @@ public abstract class TreeItem {
|
||||
if (((LocalRegTreeItem) object).computedValue instanceof FindPropertyTreeItem)
|
||||
obStr = "";
|
||||
}
|
||||
if(obStr.equals("")){
|
||||
return propertyName.toString(constants,localRegNames);
|
||||
}
|
||||
if (propertyName instanceof FullMultinameTreeItem) {
|
||||
|
||||
if (((FullMultinameTreeItem) propertyName).isRuntime()) {
|
||||
return obStr + "[" + propertyName.toString(constants,localRegNames) + "]";
|
||||
if (((FullMultinameTreeItem) propertyName).isRuntime()) {
|
||||
return obStr + propertyName.toString(constants,localRegNames);
|
||||
} else {
|
||||
if (!obStr.equals("")) obStr += ".";
|
||||
return obStr + ((FullMultinameTreeItem) propertyName).toString(constants,localRegNames);
|
||||
|
||||
BIN
trunk/src/com/jpexs/asdec/gui/graphics/icon256.png
Normal file
BIN
trunk/src/com/jpexs/asdec/gui/graphics/icon256.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 30 KiB |
Reference in New Issue
Block a user