mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-30 20:10:44 +00:00
AS3: New P-code editing syntax inspired by RABCDAsm.
AS3: Multiname and namespace editing. AS3: Editing whole trait in one textarea AS3: Removed messages about adding new constants AS3: Modified colors in editor AS3: Highlighting pair parenthesis/bracket AS3: Editing various new P-code parameters
This commit is contained in:
@@ -46,6 +46,24 @@ public class ConstantPool {
|
||||
return constant_int.length - 1;
|
||||
}
|
||||
|
||||
public int addNamespace(Namespace ns) {
|
||||
constant_namespace = Arrays.copyOf(constant_namespace, constant_namespace.length + 1);
|
||||
constant_namespace[constant_namespace.length - 1] = ns;
|
||||
return constant_namespace.length - 1;
|
||||
}
|
||||
|
||||
public int addNamespaceSet(NamespaceSet nss) {
|
||||
constant_namespace_set = Arrays.copyOf(constant_namespace_set, constant_namespace_set.length + 1);
|
||||
constant_namespace_set[constant_namespace_set.length - 1] = nss;
|
||||
return constant_namespace_set.length - 1;
|
||||
}
|
||||
|
||||
public int addMultiname(Multiname m) {
|
||||
constant_multiname = Arrays.copyOf(constant_multiname, constant_multiname.length + 1);
|
||||
constant_multiname[constant_multiname.length - 1] = m;
|
||||
return constant_multiname.length - 1;
|
||||
}
|
||||
|
||||
public int addUInt(long value) {
|
||||
constant_uint = Arrays.copyOf(constant_uint, constant_uint.length + 1);
|
||||
constant_uint[constant_uint.length - 1] = value;
|
||||
@@ -164,4 +182,25 @@ public class ConstantPool {
|
||||
output.println("Multiname[" + i + "]=" + constant_multiname[i].toString(this, new ArrayList<String>()));
|
||||
}
|
||||
}
|
||||
|
||||
public String multinameToString(int index) {
|
||||
if (index == 0) {
|
||||
return "null";
|
||||
}
|
||||
return constant_multiname[index].toString(this, new ArrayList<String>());
|
||||
}
|
||||
|
||||
public String namespaceToString(int index) {
|
||||
if (index == 0) {
|
||||
return "null";
|
||||
}
|
||||
return constant_namespace[index].toString(this);
|
||||
}
|
||||
|
||||
public String namespaceSetToString(int index) {
|
||||
if (index == 0) {
|
||||
return "null";
|
||||
}
|
||||
return constant_namespace_set[index].toString(this);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user