Comments/TODOs

This commit is contained in:
Konloch 2021-07-13 05:34:04 -07:00
parent 420cd9d060
commit 52803f410b
2 changed files with 15 additions and 3 deletions

View file

@ -73,6 +73,12 @@ import static the.bytecode.club.bytecodeviewer.util.MiscUtils.guessLanguage;
* + Versioning and updating need to be fixed * + Versioning and updating need to be fixed
* + Fix classfile searcher * + 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: * TODO IN-PROGRESS:
* + Resource Exporter/Save/Decompile As Zip needs to be rewrittern * + Resource Exporter/Save/Decompile As Zip needs to be rewrittern
* + Finish dragging code * + Finish dragging code
@ -376,8 +382,14 @@ public class BytecodeViewer
/** /**
* Gets all of the loaded classes as an array list * 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 * @return the loaded classes as an array list
*/ */
@Deprecated
public static ArrayList<ClassNode> getLoadedClasses() public static ArrayList<ClassNode> getLoadedClasses()
{ {
ArrayList<ClassNode> a = new ArrayList<>(); ArrayList<ClassNode> a = new ArrayList<>();

View file

@ -30,13 +30,13 @@ public class ChangeClassFileVersions extends Plugin
//update the ClassFile version //update the ClassFile version
classNodeList.forEach(classNode -> classNode.version = newVersion); classNodeList.forEach(classNode -> classNode.version = newVersion);
//update the the resource byte[] //update the the container's resource byte-arrays
BytecodeViewer.updateAllClassNodeByteArrays(); BytecodeViewer.updateAllClassNodeByteArrays();
//force refresh all tabs //force refresh all tabs (this forces the decompilers to run with the latest resource data)
BytecodeViewer.refreshAllTabs(); BytecodeViewer.refreshAllTabs();
//alert the changes //alert the changes to the user
BytecodeViewer.showMessage("Set all of the class versions to " + newVersion); BytecodeViewer.showMessage("Set all of the class versions to " + newVersion);
} }
} }