diff --git a/src/main/java/club/bytecode/the/jda/Boot.java b/src/main/java/club/bytecode/the/jda/Boot.java index 46c3dbe..63f38d3 100644 --- a/src/main/java/club/bytecode/the/jda/Boot.java +++ b/src/main/java/club/bytecode/the/jda/Boot.java @@ -15,7 +15,7 @@ public class Boot { try { screen = new InitialBootScreen(); } catch (Exception e) { - new ExceptionUI(e); + new ExceptionUI(e, "displaying boot screen"); } } diff --git a/src/main/java/club/bytecode/the/jda/FileDrop.java b/src/main/java/club/bytecode/the/jda/FileDrop.java index 77b5111..0990807 100644 --- a/src/main/java/club/bytecode/the/jda/FileDrop.java +++ b/src/main/java/club/bytecode/the/jda/FileDrop.java @@ -330,12 +330,12 @@ public void drop(final java.awt.dnd.DropTargetDropEvent evt) { } // end try catch (final java.io.IOException io) { log(out, "FileDrop: IOException - abort:"); - new ExceptionUI(io); + new ExceptionUI(io, "handling drag/drop"); evt.rejectDrop(); } // end catch IOException catch (final java.awt.datatransfer.UnsupportedFlavorException ufe) { log(out, "FileDrop: UnsupportedFlavorException - abort:"); - new ExceptionUI(ufe); + new ExceptionUI(ufe, "handling drag/drop"); evt.rejectDrop(); } // end catch: UnsupportedFlavorException finally { @@ -434,7 +434,7 @@ private void makeDropTarget(final java.io.PrintStream out, final java.awt.Compon dt.addDropTargetListener(dropListener); } // end try catch (final java.util.TooManyListenersException e) { - new ExceptionUI(e); + new ExceptionUI(e, "initializing drag/drop target"); log(out, "FileDrop: Drop will not work due to previous error. Do you have another listener attached?"); } // end catch diff --git a/src/main/java/club/bytecode/the/jda/JDA.java b/src/main/java/club/bytecode/the/jda/JDA.java index b0c883c..88995ce 100644 --- a/src/main/java/club/bytecode/the/jda/JDA.java +++ b/src/main/java/club/bytecode/the/jda/JDA.java @@ -86,7 +86,7 @@ public static void main(String[] args) { Boot.boot(); JDA.boot(args); } catch (Exception e) { - new ExceptionUI(e); + new ExceptionUI(e, "initializing"); } } @@ -181,7 +181,7 @@ private static void onExit() { try { FileUtils.writeLines(recentsFile, recentFiles); } catch (IOException e) { - new ExceptionUI(e); + new ExceptionUI(e, "saving recent files"); } if (!viewer.isMaximized) viewer.unmaximizedPos = viewer.getLocation(); @@ -320,7 +320,7 @@ public static void openFiles(final File[] files, boolean recentFiles, FileNaviga openFile(newContainer); fnp.addTreeElement(newContainer, parent); } catch (final Exception e) { - new ExceptionUI(e); + new ExceptionUI(e, "loading jar"); } } else { HashMap files1 = new HashMap<>(); @@ -332,8 +332,8 @@ public static void openFiles(final File[] files, boolean recentFiles, FileNaviga fnp.addTreeElement(container, parent); } } - } catch (final Exception e) { - new ExceptionUI(e); + } catch (Exception e) { + new ExceptionUI(e, "loading file"); } finally { JDA.setBusy(false); } @@ -486,32 +486,23 @@ public static String getJDADirectory() { while (!dataDir.exists()) dataDir.mkdirs(); - if (!dataDir.isHidden() && isWindows()) - hideFile(dataDir); + if (!dataDir.isHidden() && SystemUtils.IS_OS_WINDOWS) + hideFileWindows(dataDir); return dataDir.getAbsolutePath(); } - /** - * Checks if the OS contains 'win' - * - * @return true if the os.name property contains 'win' - */ - private static boolean isWindows() { - return System.getProperty("os.name").toLowerCase().contains("win"); - } - /** * Runs the windows command to hide files * * @param f file you want hidden */ - private static void hideFile(File f) { + private static void hideFileWindows(File f) { try { // Hide file by running attrib system command (on Windows) Runtime.getRuntime().exec("attrib +H " + f.getAbsolutePath()); } catch (Exception e) { - new ExceptionUI(e); + new ExceptionUI(e, "hiding file"); } } @@ -568,7 +559,7 @@ public static void openFileChooser() { JDA.openFiles(new File[]{fc.getSelectedFile()}, true); JDA.setBusy(false); } catch (Exception e1) { - new ExceptionUI(e1); + new ExceptionUI(e1, "choosing file"); } } } diff --git a/src/main/java/club/bytecode/the/jda/JarUtils.java b/src/main/java/club/bytecode/the/jda/JarUtils.java index 5c715be..27123e2 100644 --- a/src/main/java/club/bytecode/the/jda/JarUtils.java +++ b/src/main/java/club/bytecode/the/jda/JarUtils.java @@ -41,7 +41,7 @@ public static FileContainer load(final File jarFile) throws IOException { } } } catch (Exception e) { - new ExceptionUI(e); + new ExceptionUI(e, "loading jar"); } finally { jis.closeEntry(); } @@ -75,7 +75,7 @@ public static ArrayList loadClasses(final File jarFile) throws IOExce } } catch (Exception e) { - new ExceptionUI(e); + new ExceptionUI(e, "loading classes from jarfile"); } finally { jis.closeEntry(); } @@ -109,7 +109,7 @@ public static HashMap loadResources(final File zipFile) throws I continue; } } catch (Exception e) { - new ExceptionUI(e); + new ExceptionUI(e, "loading resources from file"); } finally { jis.closeEntry(); } @@ -196,7 +196,7 @@ public static void saveAsJar(ArrayList nodeList, String path, String out.close(); } catch (IOException e) { - new ExceptionUI(e); + new ExceptionUI(e, "saving as jar"); } } @@ -227,7 +227,7 @@ public static void saveAsJarClassesOnly(ArrayList nodeList, String pa noDupe.clear(); out.close(); } catch (IOException e) { - new ExceptionUI(e); + new ExceptionUI(e, "saving as jar"); } } @@ -248,7 +248,7 @@ public static void saveAsJarClassesOnly(Map nodeList, String pat noDupe.clear(); out.close(); } catch (IOException e) { - new ExceptionUI(e); + new ExceptionUI(e, "saving as jar"); } } @@ -282,7 +282,7 @@ public static void saveAsJar(Map nodeList, String path) { noDupe.clear(); out.close(); } catch (IOException e) { - new ExceptionUI(e); + new ExceptionUI(e, "saving as jar"); } } } diff --git a/src/main/java/club/bytecode/the/jda/api/ExceptionUI.java b/src/main/java/club/bytecode/the/jda/api/ExceptionUI.java index 0fb117b..e2d0f25 100644 --- a/src/main/java/club/bytecode/the/jda/api/ExceptionUI.java +++ b/src/main/java/club/bytecode/the/jda/api/ExceptionUI.java @@ -2,6 +2,7 @@ import club.bytecode.the.jda.JDA; import club.bytecode.the.jda.Resources; +import club.bytecode.the.jda.settings.Settings; import javax.swing.*; import java.awt.*; @@ -13,74 +14,48 @@ * * @author Konloch */ - public class ExceptionUI extends JFrame { private static final long serialVersionUID = -5230501978224926296L; /** * @param e The exception to be shown + * @param context What JDA was doing when the exception occurred. Should be a gerund and lowercase */ - public ExceptionUI(Throwable e) { - setup(e, JDA.ISSUE_TRACKER_URL); + public ExceptionUI(Throwable e, String context) { + StringWriter sw = new StringWriter(); + e.printStackTrace(new PrintWriter(sw)); + e.printStackTrace(); + setup(sw.toString(), context); } /** * @param e The exception to be shown + * @param context What JDA was doing when the exception occurred. Should be a gerund and lowercase */ - public ExceptionUI(String e) { - setup(e, JDA.ISSUE_TRACKER_URL); - } - - /** - * @param e The exception to be shown - * @param author the author of the plugin throwing this exception. - */ - public ExceptionUI(Throwable e, String author) { - setup(e, author); + public ExceptionUI(String e, String context) { + setup(e, context); } - /** - * @param e The exception to be shown - * @param author the author of the plugin throwing this exception. - */ - public ExceptionUI(String e, String author) { - setup(e, author); - } - - private void setup(Throwable e, String author) { - this.setIconImages(Resources.iconList); - setSize(new Dimension(600, 400)); - setTitle("JDA v" + JDA.version + " - Stack Trace - Send this to " + author); - getContentPane().setLayout(new CardLayout(0, 0)); - - JTextArea txtrBytecodeViewerIs = new JTextArea(); - txtrBytecodeViewerIs.setDisabledTextColor(Color.BLACK); - txtrBytecodeViewerIs.setWrapStyleWord(true); - getContentPane().add(new JScrollPane(txtrBytecodeViewerIs), "name_140466576080695"); - StringWriter sw = new StringWriter(); - e.printStackTrace(new PrintWriter(sw)); - e.printStackTrace(); + private void setup(String e, String context) { + System.err.println("Error while " + context + ":"); + System.err.println(e); - txtrBytecodeViewerIs.setText("JDA v" + JDA.version + JDA.nl + JDA.nl + sw.toString()); - this.setLocationRelativeTo(null); - this.setVisible(true); - } + if (Settings.DONT_SHOW_EXCEPTIONS.getBool()) + return; - private void setup(String e, String author) { this.setIconImages(Resources.iconList); - setSize(new Dimension(600, 400)); - setTitle("JDA v" + JDA.version + " - Stack Trace - Send this to " + author); + setSize(new Dimension(800, 400)); + setTitle("JDA v" + JDA.version + " - Stack Trace - Send this to " + JDA.ISSUE_TRACKER_URL); getContentPane().setLayout(new CardLayout(0, 0)); JTextArea txtrBytecodeViewerIs = new JTextArea(); txtrBytecodeViewerIs.setDisabledTextColor(Color.BLACK); txtrBytecodeViewerIs.setWrapStyleWord(true); getContentPane().add(new JScrollPane(txtrBytecodeViewerIs), "name_140466576080695"); - txtrBytecodeViewerIs.setText(e); - System.err.println(e); + txtrBytecodeViewerIs.setFont(Settings.getCodeFont()); + txtrBytecodeViewerIs.setText("Error while " + context + ":\n" + e); this.setLocationRelativeTo(null); this.setVisible(true); } - } diff --git a/src/main/java/club/bytecode/the/jda/decompilers/bytecode/InstructionPrinter.java b/src/main/java/club/bytecode/the/jda/decompilers/bytecode/InstructionPrinter.java index e101436..9333399 100644 --- a/src/main/java/club/bytecode/the/jda/decompilers/bytecode/InstructionPrinter.java +++ b/src/main/java/club/bytecode/the/jda/decompilers/bytecode/InstructionPrinter.java @@ -247,7 +247,7 @@ protected String printTypeInsnNode(TypeInsnNode tin) { } return nameOpcode(tin.opcode()) + " " + desc; } catch (Exception e) { - new ExceptionUI(e); + new ExceptionUI(e, "printing instruction"); } return "// error"; } @@ -344,17 +344,4 @@ protected int resolveLabel(LabelNode label) { return newLabelIndex; } } - - public static void saveTo(File file, InstructionPrinter printer) { - try { - BufferedWriter bw = new BufferedWriter(new FileWriter(file)); - for (String s : printer.createPrint()) { - bw.write(s); - bw.newLine(); - } - bw.close(); - } catch (IOException e) { - new ExceptionUI(e); - } - } } diff --git a/src/main/java/club/bytecode/the/jda/gui/MainViewerGUI.java b/src/main/java/club/bytecode/the/jda/gui/MainViewerGUI.java index 8dec539..eb1df4f 100644 --- a/src/main/java/club/bytecode/the/jda/gui/MainViewerGUI.java +++ b/src/main/java/club/bytecode/the/jda/gui/MainViewerGUI.java @@ -27,8 +27,9 @@ import java.util.List; /** - * The main file for the GUI.n + * The main file for the GUI. * + * @author ecx86 * @author Konloch */ public class MainViewerGUI extends JFrame implements IPersistentWindow { @@ -43,7 +44,9 @@ public class MainViewerGUI extends JFrame implements IPersistentWindow { public JMenu fileMenu; public JMenu windowMenu; public JMenu editMenu; + public JMenu optionsMenu; public JMenu helpMenu; + public JMenu pluginsMenu; public boolean isMaximized = false; public Point unmaximizedPos; @@ -62,8 +65,6 @@ public class MainViewerGUI extends JFrame implements IPersistentWindow { public JMenu mnRecentFiles = new JMenu("Recent Files"); private JMenuItem spinnerMenu = new JMenuItem(""); public FontOptionsDialog fontOptionsDialog = new FontOptionsDialog(); - public JMenu settingsMenu; - public JMenu pluginsMenu; public MainViewerGUI() { initializeWindows(); @@ -81,11 +82,11 @@ public void windowStateChanged(WindowEvent evt) { int oldState = evt.getOldState(); int newState = evt.getNewState(); - if ((oldState & Frame.ICONIFIED) == 0 && (newState & Frame.ICONIFIED) != 0) { - //System.out.println("Frame was iconized"); - } else if ((oldState & Frame.ICONIFIED) != 0 && (newState & Frame.ICONIFIED) == 0) { - //System.out.println("Frame was deiconized"); - } +// if ((oldState & Frame.ICONIFIED) == 0 && (newState & Frame.ICONIFIED) != 0) { +// System.out.println("Frame was iconized"); +// } else if ((oldState & Frame.ICONIFIED) != 0 && (newState & Frame.ICONIFIED) == 0) { +// System.out.println("Frame was deiconized"); +// } if ((oldState & Frame.MAXIMIZED_BOTH) == 0 && (newState & Frame.MAXIMIZED_BOTH) != 0) { isMaximized = true; @@ -156,6 +157,7 @@ private void initializeMenubar() { viewMenu = new JMenu("View"); windowMenu = new JMenu("Window"); editMenu = new JMenu("Edit"); + optionsMenu = new JMenu("Settings"); helpMenu = new JMenu("Help"); setJMenuBar(menuBar); @@ -217,31 +219,6 @@ private void initializeMenubar() { // =========================================================================================== menuBar.add(editMenu); - // ------------------------------------------------------------------------------------------- - // Settings menu - settingsMenu = new JMenu("Settings"); - editMenu.add(settingsMenu); - - refreshOnChange.addItemListener(e -> Settings.REFRESH_ON_VIEW_CHANGE.set(refreshOnChange.isSelected())); - refreshOnChange.setSelected(Settings.REFRESH_ON_VIEW_CHANGE.getBool()); - settingsMenu.add(refreshOnChange); - - mntmFontSettings.addActionListener(e -> fontOptionsDialog.display()); - settingsMenu.add(mntmFontSettings); - - settingsMenu.add(new JSeparator()); - - mntmSetOptionalLibrary.addActionListener(e -> setOptionalLibrary()); - settingsMenu.add(mntmSetOptionalLibrary); - - settingsMenu.add(new JSeparator()); - - for (JDADecompiler decompiler : Decompilers.getAllDecompilers()) { - JMenuItem settingsButton = new JMenuItem(decompiler.getName()); - settingsButton.addActionListener(e -> decompiler.getSettings().displayDialog()); - settingsMenu.add(settingsButton); - } - // ------------------------------------------------------------------------------------------- // Plugins menu pluginsMenu = new JMenu("Plugins"); @@ -252,13 +229,15 @@ private void initializeMenubar() { pluginsMenu.add(button); } - // ------------------------------------------------------------------------------------------- + // =========================================================================================== // Search menu - JMenu searchMenu = new JMenu("Search..."); + // =========================================================================================== + JMenu searchMenu = new JMenu("Search"); editMenu.add(searchMenu); JMenuItem constantButton = new JMenuItem("Raw constant"); constantButton.addActionListener((e) -> doSearchDialog()); searchMenu.add(constantButton); + menuBar.add(searchMenu); // =========================================================================================== @@ -273,8 +252,7 @@ private void initializeMenubar() { Settings.SHOW_CONTAINER_NAME.set(mnShowContainer.isSelected()); JTabbedPane tabs = fileViewerPane.tabs; Component[] components = tabs.getComponents(); - for (int i = 0; i < components.length; i++) { - Component c = components[i]; + for (Component c : components) { if (c instanceof Viewer) { ((Viewer) c).updateName(); int idx = tabs.indexOfComponent(c); @@ -305,7 +283,34 @@ private void initializeMenubar() { mnSnapToEdges.setSelected(Settings.SNAP_TO_EDGES.getBool()); mnSnapToEdges.addItemListener(e -> Settings.SNAP_TO_EDGES.set(mnSnapToEdges.isSelected())); windowMenu.add(mnSnapToEdges); - + + // =========================================================================================== + // Options menu + // =========================================================================================== + optionsMenu = new JMenu("Options"); + editMenu.add(optionsMenu); + + refreshOnChange.addItemListener(e -> Settings.REFRESH_ON_VIEW_CHANGE.set(refreshOnChange.isSelected())); + refreshOnChange.setSelected(Settings.REFRESH_ON_VIEW_CHANGE.getBool()); + optionsMenu.add(refreshOnChange); + + mntmFontSettings.addActionListener(e -> fontOptionsDialog.display()); + optionsMenu.add(mntmFontSettings); + + optionsMenu.add(new JSeparator()); + + mntmSetOptionalLibrary.addActionListener(e -> setOptionalLibrary()); + optionsMenu.add(mntmSetOptionalLibrary); + + optionsMenu.add(new JSeparator()); + + for (JDADecompiler decompiler : Decompilers.getAllDecompilers()) { + JMenuItem settingsButton = new JMenuItem(decompiler.getName()); + settingsButton.addActionListener(e -> decompiler.getSettings().displayDialog()); + optionsMenu.add(settingsButton); + } + menuBar.add(optionsMenu); + // =========================================================================================== // Help menu // =========================================================================================== diff --git a/src/main/java/club/bytecode/the/jda/gui/dialogs/FileChooser.java b/src/main/java/club/bytecode/the/jda/gui/dialogs/FileChooser.java deleted file mode 100644 index e611542..0000000 --- a/src/main/java/club/bytecode/the/jda/gui/dialogs/FileChooser.java +++ /dev/null @@ -1,52 +0,0 @@ -package club.bytecode.the.jda.gui.dialogs; - -import club.bytecode.the.jda.JDA; -import club.bytecode.the.jda.api.ExceptionUI; -import club.bytecode.the.jda.settings.Setting; - -import javax.swing.*; -import javax.swing.filechooser.FileFilter; -import java.io.File; - -public class FileChooser { - private Setting target; - private String message; - - public FileChooser(Setting target, String message) { - this.target = target; - this.message = message; - } - - public void run() { - File currentFile = new File( - target.getString() == null || target.getString().isEmpty() ? System.getProperty("user.home") : target.getString()); - JFileChooser fc = new JFileChooser(); - fc.setFileFilter(new FileFilter() { - @Override - public boolean accept(File f) { - return true; - } - - @Override - public String getDescription() { - return message; - } - }); - if (currentFile.isDirectory()) { - fc.setCurrentDirectory(currentFile); - } else { - fc.setSelectedFile(currentFile); - } - fc.setFileHidingEnabled(false); - fc.setAcceptAllFileFilterUsed(false); - - int returnVal = fc.showOpenDialog(JDA.viewer); - if (returnVal == JFileChooser.APPROVE_OPTION) { - try { - target.set(fc.getSelectedFile().getAbsolutePath()); - } catch (Exception e1) { - new ExceptionUI(e1); - } - } - } -} diff --git a/src/main/java/club/bytecode/the/jda/gui/fileviewer/DecompileThread.java b/src/main/java/club/bytecode/the/jda/gui/fileviewer/DecompileThread.java index 3a31355..8c134b6 100644 --- a/src/main/java/club/bytecode/the/jda/gui/fileviewer/DecompileThread.java +++ b/src/main/java/club/bytecode/the/jda/gui/fileviewer/DecompileThread.java @@ -63,7 +63,7 @@ public void run() { SwingUtilities.invokeLater(() -> target.add(scrollPane)); viewer.updatePane(paneId, panelArea, decompiler); } catch (Exception e) { - new ExceptionUI(e); + new ExceptionUI(e, "decompiling " + viewer.getFile().name); } finally { viewer.resetDivider(); JDA.setBusy(false); diff --git a/src/main/java/club/bytecode/the/jda/gui/fileviewer/FileViewer.java b/src/main/java/club/bytecode/the/jda/gui/fileviewer/FileViewer.java index b1d5ba4..7410147 100644 --- a/src/main/java/club/bytecode/the/jda/gui/fileviewer/FileViewer.java +++ b/src/main/java/club/bytecode/the/jda/gui/fileviewer/FileViewer.java @@ -64,7 +64,7 @@ public void setContents(byte[] contents) { }); return; } catch (Exception e) { - new ExceptionUI(e); + new ExceptionUI(e, "setting pane contents to image"); } } else { // todo: fallback diff --git a/src/main/java/club/bytecode/the/jda/gui/fileviewer/SearchPanel.java b/src/main/java/club/bytecode/the/jda/gui/fileviewer/SearchPanel.java index f03d7ea..c93d4ff 100644 --- a/src/main/java/club/bytecode/the/jda/gui/fileviewer/SearchPanel.java +++ b/src/main/java/club/bytecode/the/jda/gui/fileviewer/SearchPanel.java @@ -150,7 +150,7 @@ public void search(String search, boolean next) { } highlight(area, search); } catch (Exception e) { - new ExceptionUI(e); + new ExceptionUI(e, "peforming search"); } } @@ -180,7 +180,7 @@ public void highlight(JTextComponent textComp, String pattern) { pos += pattern.length(); } } catch (Exception e) { - new ExceptionUI(e); + new ExceptionUI(e, "highlighting search result"); } } } diff --git a/src/main/java/club/bytecode/the/jda/settings/Settings.java b/src/main/java/club/bytecode/the/jda/settings/Settings.java index 06d7567..5208bee 100644 --- a/src/main/java/club/bytecode/the/jda/settings/Settings.java +++ b/src/main/java/club/bytecode/the/jda/settings/Settings.java @@ -7,33 +7,38 @@ import club.bytecode.the.jda.gui.MainViewerGUI; import com.eclipsesource.json.JsonObject; import com.eclipsesource.json.JsonValue; +import com.google.common.collect.Lists; import java.awt.*; import java.io.FileOutputStream; import java.io.FileReader; -import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import static club.bytecode.the.jda.settings.Setting.SettingType.BOOLEAN; +import static club.bytecode.the.jda.settings.Setting.SettingType.INT; + /** * Used to handle loading/saving the GUI (options). * * @author Konloch */ public class Settings { - static final List ALL_SETTINGS = new ArrayList<>(); - // todo: I should really refactor this public static final Setting PATH = new Setting("path", ""); - public static final Setting SHOW_CONTAINER_NAME = new Setting("showfilename", false, Setting.SettingType.BOOLEAN); - public static final Setting SNAP_TO_EDGES = new Setting("snaptoedges", false, Setting.SettingType.BOOLEAN); - public static final Setting DO_UPDATE_CHECK = new Setting("doupdatecheck", false, Setting.SettingType.BOOLEAN); - public static final Setting REFRESH_ON_VIEW_CHANGE = new Setting("refreshonviewchange", false, Setting.SettingType.BOOLEAN); + public static final Setting SHOW_CONTAINER_NAME = new Setting("showfilename", false, BOOLEAN); + public static final Setting SNAP_TO_EDGES = new Setting("snaptoedges", false, BOOLEAN); + public static final Setting DO_UPDATE_CHECK = new Setting("doupdatecheck", false, BOOLEAN); + public static final Setting REFRESH_ON_VIEW_CHANGE = new Setting("refreshonviewchange", false, BOOLEAN); + public static final Setting DONT_SHOW_EXCEPTIONS = new Setting("dontshowexceptions", false, BOOLEAN); - public static final Setting FONT_SIZE = new Setting("font", "fontsize", 12, Setting.SettingType.INT); + public static final Setting FONT_SIZE = new Setting("font", "fontsize", 12, INT); public static final Setting FONT_FAMILY = new Setting("font", "fontfamily", Font.MONOSPACED); - public static final Setting FONT_OPTIONS = new Setting("font", "fontoptions", Font.PLAIN, Setting.SettingType.INT); - + public static final Setting FONT_OPTIONS = new Setting("font", "fontoptions", Font.PLAIN, INT); + + static final List ALL_SETTINGS = Lists.newArrayList(PATH, SHOW_CONTAINER_NAME, SNAP_TO_EDGES, DO_UPDATE_CHECK, + REFRESH_ON_VIEW_CHANGE, DONT_SHOW_EXCEPTIONS, FONT_SIZE, FONT_FAMILY, FONT_OPTIONS); + public static final Setting[] PANE_DECOMPILERS; static @@ -43,17 +48,6 @@ public class Settings { PANE_DECOMPILERS[1] = new Setting("panedecompiler1", Decompilers.BYTECODE.getFullName()); for (int i = 2; i < PANE_DECOMPILERS.length; i++) PANE_DECOMPILERS[i] = new Setting("panedecompiler" + i, "None"); - - ALL_SETTINGS.add(PATH); - ALL_SETTINGS.add(SHOW_CONTAINER_NAME); - ALL_SETTINGS.add(SNAP_TO_EDGES); - ALL_SETTINGS.add(DO_UPDATE_CHECK); - ALL_SETTINGS.add(REFRESH_ON_VIEW_CHANGE); - - ALL_SETTINGS.add(FONT_SIZE); - ALL_SETTINGS.add(FONT_FAMILY); - ALL_SETTINGS.add(FONT_OPTIONS); - ALL_SETTINGS.addAll(Arrays.asList(PANE_DECOMPILERS)); }