diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/BytecodeViewer.java b/src/main/java/the/bytecode/club/bytecodeviewer/BytecodeViewer.java index d410f47e..54ff141a 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/BytecodeViewer.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/BytecodeViewer.java @@ -73,6 +73,12 @@ import static the.bytecode.club.bytecodeviewer.util.MiscUtils.guessLanguage; * + Versioning and updating need to be fixed * + Fix classfile searcher * + * TODO API BUGS: + * + All of the plugins that modify code need to include BytecodeViewer.updateAllClassNodeByteArrays(); + * + All of the plugins that do any code changes should also include BytecodeViewer.refreshAllTabs(); + * + Anything using getLoadedClasses() needs to be replaced with the new API + * + Anything using blindlySearchForClassNode() should instead search through the file container search function + * * TODO IN-PROGRESS: * + Resource Exporter/Save/Decompile As Zip needs to be rewrittern * + Finish dragging code @@ -376,8 +382,14 @@ public class BytecodeViewer /** * Gets all of the loaded classes as an array list * + * TODO: remove this and replace it with: + * BytecodeViewer.getResourceContainers().forEach(container -> { + * execute(new ArrayList<>(container.resourceClasses.values())); + * }); + * * @return the loaded classes as an array list */ + @Deprecated public static ArrayList getLoadedClasses() { ArrayList a = new ArrayList<>(); diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/ChangeClassFileVersions.java b/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/ChangeClassFileVersions.java index 72fd314f..e76cba38 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/ChangeClassFileVersions.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/ChangeClassFileVersions.java @@ -30,13 +30,13 @@ public class ChangeClassFileVersions extends Plugin //update the ClassFile version classNodeList.forEach(classNode -> classNode.version = newVersion); - //update the the resource byte[] + //update the the container's resource byte-arrays BytecodeViewer.updateAllClassNodeByteArrays(); - //force refresh all tabs + //force refresh all tabs (this forces the decompilers to run with the latest resource data) BytecodeViewer.refreshAllTabs(); - //alert the changes + //alert the changes to the user BytecodeViewer.showMessage("Set all of the class versions to " + newVersion); } } \ No newline at end of file