From ce2d2cd96c456b77c1ecf9fbe1cf31fecb56493a Mon Sep 17 00:00:00 2001 From: Konloch Date: Wed, 2 Oct 2024 16:12:32 -0600 Subject: [PATCH] Abstract Decompiler API Update --- .../bytecode/club/bytecodeviewer/decompilers/Decompiler.java | 5 ++++- .../club/bytecodeviewer/resources/ResourceDecompiling.java | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/decompilers/Decompiler.java b/src/main/java/the/bytecode/club/bytecodeviewer/decompilers/Decompiler.java index b255f80c..bdb5f998 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/decompilers/Decompiler.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/decompilers/Decompiler.java @@ -63,7 +63,10 @@ public enum Decompiler return getDecompiler().getDecompilerName(); } - public String getDecompilerNameProgrammic() + /** + * Used for the compressed exports (Zip / Jar) + */ + public String getDecompilerNameProgrammatic() { if(decompiler == null) return ""; diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/resources/ResourceDecompiling.java b/src/main/java/the/bytecode/club/bytecodeviewer/resources/ResourceDecompiling.java index a14478ab..29c28f64 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/resources/ResourceDecompiling.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/resources/ResourceDecompiling.java @@ -258,7 +258,7 @@ public class ResourceDecompiling //decompile all opened classes to zip decompiler.getDecompiler().decompileToZip(targetJar.getAbsolutePath(), saveAll ? MiscUtils.append(outputZip, - "-" + decompiler.getDecompilerNameProgrammic() + ".zip") : outputZip.getAbsolutePath()); + "-" + decompiler.getDecompilerNameProgrammatic() + ".zip") : outputZip.getAbsolutePath()); //signal to the user that BCV is finished performing that action BytecodeViewer.updateBusyStatus(false); @@ -271,7 +271,7 @@ public class ResourceDecompiling //decompile the currently opened resource and save it to the specified file DiskWriter.replaceFile(saveAll ? MiscUtils.append(outputFile, - "-" + decompiler.getDecompilerNameProgrammic() + ".java") : outputFile.getAbsolutePath(), BCV.decompileCurrentlyOpenedClassNode(decompiler), false); + "-" + decompiler.getDecompilerNameProgrammatic() + ".java") : outputFile.getAbsolutePath(), BCV.decompileCurrentlyOpenedClassNode(decompiler), false); //signal to the user that BCV is finished performing that action BytecodeViewer.updateBusyStatus(false);