allow trait specification in pcode import

This commit is contained in:
honfika@gmail.com
2015-12-15 12:46:08 +01:00
parent d56c1d931e
commit c563a7449b
9 changed files with 165 additions and 50 deletions

View File

@@ -2059,11 +2059,19 @@ public class CommandLineArgumentParser {
if (args.isEmpty()) {
badArguments("replace");
}
int bodyIndex = Integer.parseInt(args.pop());
ABC abc = pack.abc;
List<Trait> resultTraits = abc.getMethodIndexing().findMethodTraits(pack, bodyIndex);
//int classIndex = 0;
//int traitId = 0;
Trait trait = null; //abc.findTraitByTraitId(classIndex, traitId);
replaceAS3PCode(repText, pack.abc, bodyIndex, trait);
if (resultTraits.size() == 1) {
trait = resultTraits.get(0);
}
replaceAS3PCode(repText, abc, bodyIndex, trait);
}
}
}