mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-27 04:20:45 +00:00
Empty lines fix.
This commit is contained in:
-7
@@ -16,21 +16,14 @@
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.abc.avm2.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instructions;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.parser.script.AVM2SourceGenerator;
|
||||
import com.jpexs.decompiler.flash.abc.types.AssignedValue;
|
||||
import com.jpexs.decompiler.flash.abc.types.ConvertData;
|
||||
import com.jpexs.decompiler.flash.abc.types.traits.TraitSlotConst;
|
||||
import com.jpexs.decompiler.flash.abc.types.traits.TraitType;
|
||||
import com.jpexs.decompiler.flash.helpers.GraphTextWriter;
|
||||
import com.jpexs.decompiler.graph.CompilationException;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import com.jpexs.decompiler.graph.model.LocalData;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@@ -271,13 +271,15 @@ public class TraitClass extends Trait implements TraitWithSlot {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//class header
|
||||
instanceInfo.getClassHeaderStr(convertData.assetsDir, writer, abc, fullyQualifiedNames, false, allowEmbed);
|
||||
writer.endTrait();
|
||||
writer.startBlock();
|
||||
writer.startClass(class_info);
|
||||
|
||||
|
||||
first.setVal(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);
|
||||
@@ -293,9 +295,11 @@ public class TraitClass extends Trait implements TraitWithSlot {
|
||||
if (!first.getVal()) {
|
||||
writer.newLine();
|
||||
}
|
||||
first.setVal(false);
|
||||
List<MethodBody> callStack = new ArrayList<>();
|
||||
callStack.add(abc.bodies.get(bodyIndex));
|
||||
abc.bodies.get(bodyIndex).toString(callStack, abcIndex, path + "/" + instanceInfoName + ".staticinitializer", exportMode, abc, this, writer, fullyQualifiedNames, new HashSet<>());
|
||||
//first.setVal(true);
|
||||
//writer.endBlock();
|
||||
} else {
|
||||
//Note: There must be trait/method highlight even if the initializer is empty to TraitList in GUI to work correctly
|
||||
|
||||
@@ -3873,7 +3873,12 @@ public class Graph {
|
||||
*/
|
||||
public static GraphTextWriter graphToString(List<GraphTargetItem> tree, GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
boolean lastNewLine = true;
|
||||
for (GraphTargetItem ti : tree) {
|
||||
int tsize = tree.size();
|
||||
if (!tree.isEmpty() && (tree.get(tree.size() - 1) instanceof ScriptEndItem)) {
|
||||
tsize--;
|
||||
}
|
||||
for (int i = 0; i < tsize; i++) {
|
||||
GraphTargetItem ti = tree.get(i);
|
||||
if (!ti.isEmpty()) {
|
||||
if (ti.hasSingleNewLineAround() && !lastNewLine) {
|
||||
writer.newLine();
|
||||
@@ -3882,8 +3887,8 @@ public class Graph {
|
||||
if (!ti.handlesNewLine()) {
|
||||
writer.newLine();
|
||||
}
|
||||
lastNewLine = false;
|
||||
if (ti.hasSingleNewLineAround()) {
|
||||
lastNewLine = false;
|
||||
if (ti.hasSingleNewLineAround() && (i < tsize - 1)) {
|
||||
writer.newLine();
|
||||
lastNewLine = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user