mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-17 05:21:54 +00:00
Fixed empty lines afer use clause.
Removed printStackTrace in favor of log.
This commit is contained in:
@@ -2917,7 +2917,7 @@ public class ActionScript3Parser {
|
||||
try {
|
||||
gen.generateScriptInfo(sinitVariables, sinitNeedsActivation, importedClasses, openedNamespaces, scriptIndex, si, allOpenedNamespaces, localData, items, classPos);
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace(); // FIXME
|
||||
Logger.getLogger(ActionScript3Parser.class.getName()).log(Level.FINE, "Script generation exception", ex);
|
||||
abcIndex.getSelectedAbc().script_info.remove(si);
|
||||
throw ex;
|
||||
}
|
||||
|
||||
@@ -501,9 +501,11 @@ public abstract class Trait implements Cloneable, Serializable {
|
||||
for (String u : uses) {
|
||||
writer.appendNoHilight("use namespace " + u + ";").newLine();
|
||||
}
|
||||
writer.newLine();
|
||||
}
|
||||
if (numberContextRef.getVal() != null) {
|
||||
if (uses.isEmpty() && hasImport) {
|
||||
writer.newLine();
|
||||
}
|
||||
writer.appendNoHilight("use ");
|
||||
NumberContext nc = new NumberContext(numberContextRef.getVal());
|
||||
writer.appendNoHilight(NumberContext.usageToName(nc.getUsage()));
|
||||
|
||||
@@ -230,15 +230,17 @@ public class TraitClass extends Trait implements TraitWithSlot {
|
||||
DottedChain packageName = instanceInfoMultiname.getNamespace(abc.constants).getName(abc.constants); //assume not null name
|
||||
|
||||
fullyQualifiedNames = new ArrayList<>();
|
||||
|
||||
Reference<Boolean> first = new Reference<>(true);
|
||||
|
||||
if (getName(abc).getNamespace(abc.constants).kind != Namespace.KIND_PACKAGE_INTERNAL) {
|
||||
writeImports(this, -1, abcIndex, scriptIndex, classIndex, false, abc, writer, packageName, fullyQualifiedNames);
|
||||
first.setVal(!writeImports(this, -1, abcIndex, scriptIndex, classIndex, false, abc, writer, packageName, fullyQualifiedNames));
|
||||
}
|
||||
|
||||
String instanceInfoName = instanceInfoMultiname.getName(abc.constants, fullyQualifiedNames, false, true);
|
||||
|
||||
getMetaData(this, convertData, abc, writer);
|
||||
|
||||
|
||||
boolean allowEmbed = true;
|
||||
|
||||
if (convertData.exportEmbedFlaMode) {
|
||||
@@ -275,9 +277,7 @@ public class TraitClass extends Trait implements TraitWithSlot {
|
||||
writer.endTrait();
|
||||
writer.startBlock();
|
||||
writer.startClass(class_info);
|
||||
|
||||
Reference<Boolean> first = new Reference<>(true);
|
||||
|
||||
|
||||
//static variables & constants
|
||||
ClassInfo classInfo = abc.class_info.get(class_info);
|
||||
classInfo.static_traits.toString(first, abcIndex, new Class[]{TraitSlotConst.class}, this, convertData, path + "/" + instanceInfoName, abc, true, exportMode, false, scriptIndex, class_info, writer, fullyQualifiedNames, parallel, new ArrayList<>(), isInterface);
|
||||
|
||||
Reference in New Issue
Block a user