mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-18 14:58:24 +00:00
#2022 - AS3 - Make script initializer always visible and available instead of config
This commit is contained in:
@@ -220,7 +220,7 @@ public class ScriptPack extends AS3ClassTreeItem {
|
||||
writer.newLine();
|
||||
}
|
||||
|
||||
if (bodyIndex != -1 && (isSimple || traitIndices.isEmpty())) { // && Configuration.enableScriptInitializerDisplay.get()) {
|
||||
if (bodyIndex != -1 && (isSimple || traitIndices.isEmpty())) {
|
||||
//Note: There must be trait/method highlight even if the initializer is empty to TraitList in GUI to work correctly
|
||||
//TODO: handle this better in GUI(?)
|
||||
writer.startTrait(GraphTextWriter.TRAIT_SCRIPT_INITIALIZER);
|
||||
@@ -233,15 +233,15 @@ public class ScriptPack extends AS3ClassTreeItem {
|
||||
abc.bodies.get(bodyIndex).toString(callStack, abcIndex, path +/*packageName +*/ "/.scriptinitializer", exportMode, abc, null, writer, new ArrayList<>(), new HashSet<>());
|
||||
writer.endBlock();
|
||||
} else {
|
||||
writer.append(" ");
|
||||
writer.append("");
|
||||
}
|
||||
}
|
||||
writer.endMethod();
|
||||
writer.endTrait();
|
||||
if (!scriptInitializerIsEmpty) {
|
||||
writer.newLine();
|
||||
}
|
||||
first = false;
|
||||
first = false;
|
||||
}
|
||||
}
|
||||
|
||||
for (int t : traitIndices) {
|
||||
|
||||
@@ -556,7 +556,7 @@ public final class Configuration {
|
||||
public static ConfigurationItem<Boolean> smartNumberFormatting = null;
|
||||
|
||||
@ConfigurationDefaultBoolean(false)
|
||||
@ConfigurationCategory("script")
|
||||
//@ConfigurationCategory("script")
|
||||
public static ConfigurationItem<Boolean> enableScriptInitializerDisplay = null;
|
||||
|
||||
@ConfigurationDefaultBoolean(false)
|
||||
|
||||
Reference in New Issue
Block a user