Skip to content

Commit c44e456

Browse files
committed
Delete plugin system
This will be rewritten later
1 parent 7f46409 commit c44e456

21 files changed

+0
-1360
lines changed

plugins/Skeleton.gy

Lines changed: 0 additions & 15 deletions
This file was deleted.

plugins/Skeleton.java

Lines changed: 0 additions & 12 deletions
This file was deleted.

plugins/Skeleton.rb

Whitespace-only changes.

plugins/skeleton.py

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/main/java/the/bytecode/club/jda/JDA.java

Lines changed: 0 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import the.bytecode.club.jda.gui.FileNavigationPane;
88
import the.bytecode.club.jda.gui.MainViewerGUI;
99
import the.bytecode.club.jda.gui.WorkPane;
10-
import the.bytecode.club.jda.plugin.PluginManager;
1110

1211
import javax.swing.*;
1312
import javax.swing.filechooser.FileFilter;
@@ -32,7 +31,6 @@ public class JDA
3231
public static final String nl = System.getProperty("line.separator");
3332
public static final File dataDir = new File(System.getProperty("user.home") + fs + ".jda");
3433
public static final File filesFile = new File(dataDir, "recentfiles.jda");
35-
public static final File pluginsFile = new File(dataDir, "recentplugins.jda");
3634
public static final File settingsFile = new File(dataDir, "settings.jda");
3735
@Deprecated public static final File tempDir = new File(dataDir, "jda_temp");
3836
private static final long start = System.currentTimeMillis();
@@ -43,8 +41,6 @@ public class JDA
4341
public static ArrayList<FileContainer> files = new ArrayList<>(); //all of BCV's loaded files/classes/etc
4442
private static int maxRecentFiles = 25;
4543
private static List<String> recentFiles = new ArrayList<>();
46-
private static List<String> recentPlugins = new ArrayList<>();
47-
public static boolean runningObfuscation = false;
4844
public static String lastDirectory = "";
4945
public static ArrayList<Process> createdProcesses = new ArrayList<>();
5046
public static boolean deleteForiegnLibraries = true;
@@ -77,12 +73,7 @@ public static void main(String[] args)
7773
{
7874
throw new RuntimeException("Could not create recent files file");
7975
}
80-
if (!pluginsFile.exists() && !pluginsFile.createNewFile())
81-
{
82-
throw new RuntimeException("Could not create recent plugins file");
83-
}
8476
recentFiles.addAll(FileUtils.readLines(filesFile, "UTF-8"));
85-
recentPlugins.addAll(FileUtils.readLines(pluginsFile, "UTF-8"));
8677
int CLI = input.parseCommandLine();
8778
if (CLI == CommandLineInput.STOP)
8879
return;
@@ -135,7 +126,6 @@ public void run()
135126
try
136127
{
137128
FileUtils.writeLines(filesFile, recentFiles);
138-
FileUtils.writeLines(pluginsFile, recentPlugins);
139129
}
140130
catch (IOException e)
141131
{
@@ -439,27 +429,6 @@ else if (fn.endsWith(".class"))
439429
t.start();
440430
}
441431

442-
/**
443-
* Starts the specified plugin
444-
*
445-
* @param file the file of the plugin
446-
*/
447-
public static void startPlugin(File file)
448-
{
449-
if (!file.exists())
450-
return;
451-
452-
try
453-
{
454-
PluginManager.runPlugin(file);
455-
}
456-
catch (Throwable e)
457-
{
458-
new ExceptionUI(e);
459-
}
460-
addRecentPlugin(file);
461-
}
462-
463432
/**
464433
* Send a message to alert the user
465434
*
@@ -540,35 +509,6 @@ public static void addRecentFile(File f)
540509

541510
private static ArrayList<String> killList2 = new ArrayList<>();
542511

543-
/**
544-
* Add to the recent plugin list
545-
*
546-
* @param f the plugin file
547-
*/
548-
public static void addRecentPlugin(File f)
549-
{
550-
for (int i = 0; i < recentPlugins.size(); i++)
551-
{ // remove dead strings
552-
String s = recentPlugins.get(i);
553-
if (s.isEmpty() || i > maxRecentFiles)
554-
killList2.add(s);
555-
}
556-
if (!killList2.isEmpty())
557-
{
558-
for (String s : killList2)
559-
recentPlugins.remove(s);
560-
killList2.clear();
561-
}
562-
563-
if (recentPlugins.contains(f.getAbsolutePath())) // already added on the list
564-
recentPlugins.remove(f.getAbsolutePath());
565-
if (recentPlugins.size() >= maxRecentFiles)
566-
recentPlugins.remove(maxRecentFiles - 1); // zero indexing
567-
568-
recentPlugins.add(0, f.getAbsolutePath());
569-
resetRecentFilesMenu();
570-
}
571-
572512
/**
573513
* resets the recent files menu
574514
*/
@@ -585,17 +525,6 @@ public static void resetRecentFilesMenu()
585525
});
586526
viewer.mnRecentFiles.add(m);
587527
}
588-
viewer.mnRecentPlugins.removeAll();
589-
for (String s : recentPlugins)
590-
if (!s.isEmpty())
591-
{
592-
JMenuItem m = new JMenuItem(s);
593-
m.addActionListener(e -> {
594-
JMenuItem m1 = (JMenuItem) e.getSource();
595-
startPlugin(new File(m1.getText()));
596-
});
597-
viewer.mnRecentPlugins.add(m);
598-
}
599528
}
600529

601530
/**

src/main/java/the/bytecode/club/jda/api/BytecodeViewer.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,16 +107,6 @@ public static void createNewClassNodeLoaderInstance()
107107
JDA.loader = new ClassNodeLoader();
108108
}
109109

110-
/**
111-
* Used to start a plugin from file.
112-
*
113-
* @param plugin the file of the plugin
114-
*/
115-
public static void startPlugin(File plugin)
116-
{
117-
JDA.startPlugin(plugin);
118-
}
119-
120110
/**
121111
* Used to load classes/jars into BCV.
122112
*

src/main/java/the/bytecode/club/jda/api/Plugin.java

Lines changed: 0 additions & 70 deletions
This file was deleted.

src/main/java/the/bytecode/club/jda/api/PluginConsole.java

Lines changed: 0 additions & 59 deletions
This file was deleted.

0 commit comments

Comments
 (0)