AS3 goto definition on imports

This commit is contained in:
Jindra Petřík
2021-02-26 19:59:11 +01:00
parent 76a5fe169b
commit 5afdba0600
3 changed files with 15 additions and 7 deletions

View File

@@ -256,7 +256,14 @@ public abstract class Trait implements Cloneable, Serializable {
Collections.sort(imports);
for (DottedChain imp : imports) {
if (imp.size() > 1) { //No imports from root package
writer.appendNoHilight("import " + imp.toPrintableString(true) + ";").newLine();
writer.appendNoHilight("import ");
if (!imp.isTopLevel()) {
writer.appendNoHilight(imp.getWithoutLast().toPrintableString(true));
writer.appendNoHilight(".");
}
writer.hilightSpecial(IdentifiersDeobfuscation.printIdentifier(true, imp.getLast()), HighlightSpecialType.TYPE_NAME, imp.toRawString());
writer.appendNoHilight(";").newLine();
hasImport = true;
}
}