DJ-GUI implementation
This commit is contained in:
parent
c60bfd6c6e
commit
43681fac38
9 changed files with 231 additions and 37 deletions
|
@ -87,9 +87,15 @@ import the.bytecode.club.bytecodeviewer.obfuscators.mapping.Refactorer;
|
|||
* add stackmapframes to bytecode decompiler
|
||||
* add stackmapframes remover?
|
||||
* In BCV if you open a class and the name is so big, you cannot close because the [X] does not appear."
|
||||
* refresh appears under panes that are non refreshable
|
||||
* make ez-injection plugin console show all sys.out calls
|
||||
* edit then save issues?
|
||||
*
|
||||
* -----2.9.5-----:
|
||||
* 05/01/2015 - Added 'pingback' for statistics (to track how many people globally use BCV)
|
||||
* -----2.9.6-----:
|
||||
* 05/05/2015 - Fixed a typo in the about window
|
||||
* 05/28/2015 - Started importing JD-GUI Decompiler.
|
||||
* 05/28/2015 - Compile on refresh and compile on save are now enabled by default.
|
||||
* 05/28/2015 - Renamed the File>Save As options to be much more informative.
|
||||
*
|
||||
* @author Konloch
|
||||
*
|
||||
|
@ -98,7 +104,7 @@ import the.bytecode.club.bytecodeviewer.obfuscators.mapping.Refactorer;
|
|||
public class BytecodeViewer {
|
||||
|
||||
/*per version*/
|
||||
public static String version = "2.9.5";
|
||||
public static String version = "2.9.6";
|
||||
public static String krakatauVersion = "2";
|
||||
/*the rest*/
|
||||
public static MainViewerGUI viewer = null;
|
||||
|
|
|
@ -115,6 +115,8 @@ public class Settings {
|
|||
DiskWriter.writeNewLine(BytecodeViewer.settingsName, "7", false);
|
||||
else if(BytecodeViewer.viewer.panelGroup1.isSelected(BytecodeViewer.viewer.panel1KrakatauBytecode.getModel()))
|
||||
DiskWriter.writeNewLine(BytecodeViewer.settingsName, "8", false);
|
||||
else if(BytecodeViewer.viewer.panelGroup1.isSelected(BytecodeViewer.viewer.panel1JDGUI.getModel()))
|
||||
DiskWriter.writeNewLine(BytecodeViewer.settingsName, "9", false);
|
||||
|
||||
if(BytecodeViewer.viewer.panelGroup2.isSelected(BytecodeViewer.viewer.panel2None.getModel()))
|
||||
DiskWriter.writeNewLine(BytecodeViewer.settingsName, "0", false);
|
||||
|
@ -134,6 +136,8 @@ public class Settings {
|
|||
DiskWriter.writeNewLine(BytecodeViewer.settingsName, "7", false);
|
||||
else if(BytecodeViewer.viewer.panelGroup2.isSelected(BytecodeViewer.viewer.panel2KrakatauBytecode.getModel()))
|
||||
DiskWriter.writeNewLine(BytecodeViewer.settingsName, "8", false);
|
||||
else if(BytecodeViewer.viewer.panelGroup2.isSelected(BytecodeViewer.viewer.panel2JDGUI.getModel()))
|
||||
DiskWriter.writeNewLine(BytecodeViewer.settingsName, "9", false);
|
||||
|
||||
if(BytecodeViewer.viewer.panelGroup3.isSelected(BytecodeViewer.viewer.panel3None.getModel()))
|
||||
DiskWriter.writeNewLine(BytecodeViewer.settingsName, "0", false);
|
||||
|
@ -153,6 +157,8 @@ public class Settings {
|
|||
DiskWriter.writeNewLine(BytecodeViewer.settingsName, "7", false);
|
||||
else if(BytecodeViewer.viewer.panelGroup3.isSelected(BytecodeViewer.viewer.panel3KrakatauBytecode.getModel()))
|
||||
DiskWriter.writeNewLine(BytecodeViewer.settingsName, "8", false);
|
||||
else if(BytecodeViewer.viewer.panelGroup3.isSelected(BytecodeViewer.viewer.panel3JDGUI.getModel()))
|
||||
DiskWriter.writeNewLine(BytecodeViewer.settingsName, "9", false);
|
||||
|
||||
DiskWriter.writeNewLine(BytecodeViewer.settingsName, String.valueOf(BytecodeViewer.viewer.refreshOnChange.isSelected()), false);
|
||||
DiskWriter.writeNewLine(BytecodeViewer.settingsName, String.valueOf(BytecodeViewer.viewer.isMaximized), false);
|
||||
|
@ -179,6 +185,9 @@ public class Settings {
|
|||
DiskWriter.writeNewLine(BytecodeViewer.settingsName, String.valueOf(BytecodeViewer.viewer.decodeAPKResources.isSelected()), false);
|
||||
DiskWriter.writeNewLine(BytecodeViewer.settingsName, BytecodeViewer.library, false);
|
||||
DiskWriter.writeNewLine(BytecodeViewer.settingsName, String.valueOf(BytecodeViewer.pingback), false);
|
||||
DiskWriter.writeNewLine(BytecodeViewer.settingsName, String.valueOf(BytecodeViewer.viewer.panel1JDGUI_E.isSelected()), false);
|
||||
DiskWriter.writeNewLine(BytecodeViewer.settingsName, String.valueOf(BytecodeViewer.viewer.panel2JDGUI_E.isSelected()), false);
|
||||
DiskWriter.writeNewLine(BytecodeViewer.settingsName, String.valueOf(BytecodeViewer.viewer.panel3JDGUI_E.isSelected()), false);
|
||||
} catch(Exception e) {
|
||||
new the.bytecode.club.bytecodeviewer.api.ExceptionUI(e);
|
||||
}
|
||||
|
@ -285,6 +294,8 @@ public class Settings {
|
|||
BytecodeViewer.viewer.panelGroup1.setSelected(BytecodeViewer.viewer.panel1Krakatau.getModel(), true);
|
||||
else if(decompiler == 8)
|
||||
BytecodeViewer.viewer.panelGroup1.setSelected(BytecodeViewer.viewer.panel1KrakatauBytecode.getModel(), true);
|
||||
else if(decompiler == 9)
|
||||
BytecodeViewer.viewer.panelGroup1.setSelected(BytecodeViewer.viewer.panel1JDGUI.getModel(), true);
|
||||
|
||||
decompiler = Integer.parseInt(DiskReader.loadString(BytecodeViewer.settingsName, 82, false));
|
||||
if(decompiler == 0)
|
||||
|
@ -305,6 +316,8 @@ public class Settings {
|
|||
BytecodeViewer.viewer.panelGroup2.setSelected(BytecodeViewer.viewer.panel2Krakatau.getModel(), true);
|
||||
else if(decompiler == 8)
|
||||
BytecodeViewer.viewer.panelGroup2.setSelected(BytecodeViewer.viewer.panel2KrakatauBytecode.getModel(), true);
|
||||
else if(decompiler == 9)
|
||||
BytecodeViewer.viewer.panelGroup2.setSelected(BytecodeViewer.viewer.panel2JDGUI.getModel(), true);
|
||||
|
||||
decompiler = Integer.parseInt(DiskReader.loadString(BytecodeViewer.settingsName, 83, false));
|
||||
if(decompiler == 0)
|
||||
|
@ -325,6 +338,8 @@ public class Settings {
|
|||
BytecodeViewer.viewer.panelGroup3.setSelected(BytecodeViewer.viewer.panel3Krakatau.getModel(), true);
|
||||
else if(decompiler == 8)
|
||||
BytecodeViewer.viewer.panelGroup3.setSelected(BytecodeViewer.viewer.panel3KrakatauBytecode.getModel(), true);
|
||||
else if(decompiler == 9)
|
||||
BytecodeViewer.viewer.panelGroup3.setSelected(BytecodeViewer.viewer.panel3JDGUI.getModel(), true);
|
||||
|
||||
BytecodeViewer.viewer.refreshOnChange.setSelected(Boolean.parseBoolean(DiskReader.loadString(BytecodeViewer.settingsName, 84, false)));
|
||||
|
||||
|
@ -356,6 +371,9 @@ public class Settings {
|
|||
BytecodeViewer.viewer.decodeAPKResources.setSelected(Boolean.parseBoolean(DiskReader.loadString(BytecodeViewer.settingsName, 106, false)));
|
||||
BytecodeViewer.library = DiskReader.loadString(BytecodeViewer.settingsName, 107, false);
|
||||
BytecodeViewer.pingback = Boolean.parseBoolean(DiskReader.loadString(BytecodeViewer.settingsName, 108, false));
|
||||
BytecodeViewer.viewer.panel1JDGUI_E.setSelected(Boolean.parseBoolean(DiskReader.loadString(BytecodeViewer.settingsName, 109, false)));
|
||||
BytecodeViewer.viewer.panel2JDGUI_E.setSelected(Boolean.parseBoolean(DiskReader.loadString(BytecodeViewer.settingsName, 110, false)));
|
||||
BytecodeViewer.viewer.panel3JDGUI_E.setSelected(Boolean.parseBoolean(DiskReader.loadString(BytecodeViewer.settingsName, 111, false)));
|
||||
} catch(Exception e) {
|
||||
//ignore because errors are expected, first start up and outdated settings.
|
||||
//e.printStackTrace();
|
||||
|
|
|
@ -245,4 +245,12 @@ public class BytecodeViewer {
|
|||
public static the.bytecode.club.bytecodeviewer.compilers.Compiler getSmaliCompiler() {
|
||||
return the.bytecode.club.bytecodeviewer.compilers.Compiler.smali;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the wrapped JD-GUI Decompiler instance.
|
||||
* @return The wrapped JD-GUI Decompiler instance
|
||||
*/
|
||||
public static the.bytecode.club.bytecodeviewer.decompilers.Decompiler getDJGUIDecompiler() {
|
||||
return the.bytecode.club.bytecodeviewer.decompilers.Decompiler.jdgui;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,4 +26,5 @@ public abstract class Decompiler {
|
|||
public static Decompiler krakatau = new KrakatauDecompiler();
|
||||
public static Decompiler krakatauDA = new KrakatauDisassembler();
|
||||
public static Decompiler smali = new SmaliDisassembler();
|
||||
public static Decompiler jdgui = new JDGUIDecompiler();
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ import the.bytecode.club.bytecodeviewer.MiscUtils;
|
|||
*
|
||||
*/
|
||||
|
||||
public class JDCoreDecompiler extends Decompiler {
|
||||
public class JDGUIDecompiler extends Decompiler {
|
||||
|
||||
@Override
|
||||
public void decompileToClass(String className, String classNameSaved) {
|
||||
|
@ -81,11 +81,11 @@ public class JDCoreDecompiler extends Decompiler {
|
|||
|
||||
exception = "Bytecode Viewer Version: " + BytecodeViewer.version + BytecodeViewer.nl + BytecodeViewer.nl + sw.toString();
|
||||
}
|
||||
return "Procyon error! Send the stacktrace to Konloch at http://the.bytecode.club or konloch@gmail.com"+BytecodeViewer.nl+BytecodeViewer.nl+"Suggested Fix: Click refresh class, if it fails again try another decompiler."+BytecodeViewer.nl+BytecodeViewer.nl+exception;
|
||||
return "JD-GUI error! Send the stacktrace to Konloch at http://the.bytecode.club or konloch@gmail.com"+BytecodeViewer.nl+BytecodeViewer.nl+"Suggested Fix: Click refresh class, if it fails again try another decompiler."+BytecodeViewer.nl+BytecodeViewer.nl+exception;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void decompileToZip(String zipName) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -40,7 +40,7 @@ public class AboutWindow extends JFrame {
|
|||
super.setVisible(b);
|
||||
txtrBytecodeViewerIs
|
||||
.setText("Bytecode Viewer "+BytecodeViewer.version+" is an open source program developed and maintained by Konloch (konloch@gmail.com)\r\n"+
|
||||
"100% free and open sourced licensed under GPL v3 CopyLef\r\n\r\n"+
|
||||
"100% free and open sourced licensed under GPL v3 CopyLeft\r\n\r\n"+
|
||||
"Settings:"+BytecodeViewer.nl+
|
||||
"BCV Dir: " + BytecodeViewer.getBCVDirectory()+BytecodeViewer.nl+
|
||||
"Python: " + BytecodeViewer.python+BytecodeViewer.nl+
|
||||
|
@ -51,6 +51,7 @@ public class AboutWindow extends JFrame {
|
|||
"Keybinds:"+BytecodeViewer.nl+
|
||||
"CTRL + O: Open/add new jar/class/apk"+BytecodeViewer.nl+
|
||||
"CTLR + N: Reset the workspace"+BytecodeViewer.nl+
|
||||
"CTRL + W: Closes the currently opened tab"+BytecodeViewer.nl+
|
||||
"CTRL + T: Compile"+BytecodeViewer.nl+
|
||||
"CTRL + S: Save classes as zip"+BytecodeViewer.nl+
|
||||
"CTRL + R: Run (EZ-Inject) - dynamically load the classes and invoke a main class"+
|
||||
|
|
|
@ -76,6 +76,8 @@ public class ClassViewer extends Viewer {
|
|||
pane1 = 7;
|
||||
else if (BytecodeViewer.viewer.panelGroup1.isSelected(BytecodeViewer.viewer.panel1KrakatauBytecode.getModel()))
|
||||
pane1 = 8;
|
||||
else if (BytecodeViewer.viewer.panelGroup1.isSelected(BytecodeViewer.viewer.panel1JDGUI.getModel()))
|
||||
pane1 = 9;
|
||||
|
||||
if (BytecodeViewer.viewer.panelGroup2.isSelected(BytecodeViewer.viewer.panel2None.getModel()))
|
||||
pane2 = 0;
|
||||
|
@ -95,6 +97,8 @@ public class ClassViewer extends Viewer {
|
|||
pane2 = 7;
|
||||
else if (BytecodeViewer.viewer.panelGroup2.isSelected(BytecodeViewer.viewer.panel2KrakatauBytecode.getModel()))
|
||||
pane2 = 8;
|
||||
else if (BytecodeViewer.viewer.panelGroup2.isSelected(BytecodeViewer.viewer.panel2JDGUI.getModel()))
|
||||
pane2 = 9;
|
||||
|
||||
if (BytecodeViewer.viewer.panelGroup3.isSelected(BytecodeViewer.viewer.panel3None.getModel()))
|
||||
pane3 = 0;
|
||||
|
@ -114,6 +118,8 @@ public class ClassViewer extends Viewer {
|
|||
pane3 = 7;
|
||||
else if (BytecodeViewer.viewer.panelGroup3 .isSelected(BytecodeViewer.viewer.panel3KrakatauBytecode.getModel()))
|
||||
pane3 = 8;
|
||||
else if (BytecodeViewer.viewer.panelGroup3 .isSelected(BytecodeViewer.viewer.panel3JDGUI.getModel()))
|
||||
pane3 = 9;
|
||||
}
|
||||
|
||||
public boolean isPanel1Editable() {
|
||||
|
@ -127,6 +133,8 @@ public class ClassViewer extends Viewer {
|
|||
return true;
|
||||
if(pane1 == 6 && BytecodeViewer.viewer.panel1Smali_E.isSelected())
|
||||
return true;
|
||||
if(pane1 == 9 && BytecodeViewer.viewer.panel1JDGUI_E.isSelected())
|
||||
return true;
|
||||
if((pane1 == 7 || pane1 == 8) && BytecodeViewer.viewer.panel1Krakatau_E.isSelected())
|
||||
return true;
|
||||
|
||||
|
@ -145,6 +153,8 @@ public class ClassViewer extends Viewer {
|
|||
return true;
|
||||
if(pane2 == 6 && BytecodeViewer.viewer.panel2Smali_E.isSelected())
|
||||
return true;
|
||||
if(pane2 == 9 && BytecodeViewer.viewer.panel2JDGUI_E.isSelected())
|
||||
return true;
|
||||
if((pane2 == 7 || pane2 == 8) && BytecodeViewer.viewer.panel2Krakatau_E.isSelected())
|
||||
return true;
|
||||
|
||||
|
@ -163,6 +173,8 @@ public class ClassViewer extends Viewer {
|
|||
return true;
|
||||
if(pane3 == 6 && BytecodeViewer.viewer.panel3Smali_E.isSelected())
|
||||
return true;
|
||||
if(pane3 == 9 && BytecodeViewer.viewer.panel3JDGUI_E.isSelected())
|
||||
return true;
|
||||
if((pane3 == 7 || pane3 == 8) && BytecodeViewer.viewer.panel3Krakatau_E.isSelected())
|
||||
return true;
|
||||
|
||||
|
@ -776,6 +788,32 @@ public class ClassViewer extends Viewer {
|
|||
});
|
||||
panel1.add(scrollPane);
|
||||
}
|
||||
|
||||
if (pane1 == 9) {// JD-GUI
|
||||
RSyntaxTextArea panelArea = new RSyntaxTextArea();
|
||||
panelArea
|
||||
.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVA);
|
||||
panelArea.setCodeFoldingEnabled(true);
|
||||
panelArea.setAntiAliasingEnabled(true);
|
||||
RTextScrollPane scrollPane = new RTextScrollPane(
|
||||
panelArea);
|
||||
panelArea.setText(Decompiler.jdgui.decompileClassNode(cn,b));
|
||||
panelArea.setCaretPosition(0);
|
||||
panelArea.setEditable(isPanel1Editable());
|
||||
panelArea.addKeyListener(new KeyListener() {
|
||||
public void keyPressed(KeyEvent e) {
|
||||
if ((e.getKeyCode() == KeyEvent.VK_F) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0)) {
|
||||
field1.requestFocus();
|
||||
}
|
||||
|
||||
BytecodeViewer.checkHotKey(e);
|
||||
}
|
||||
@Override public void keyReleased(KeyEvent arg0) { }
|
||||
@Override public void keyTyped(KeyEvent arg0) { }
|
||||
});
|
||||
panel1.add(scrollPane);
|
||||
java1 = panelArea;
|
||||
}
|
||||
} catch(Exception e) {
|
||||
new the.bytecode.club.bytecodeviewer.api.ExceptionUI(e);
|
||||
} finally {
|
||||
|
@ -972,6 +1010,32 @@ public class ClassViewer extends Viewer {
|
|||
});
|
||||
panel2.add(scrollPane);
|
||||
}
|
||||
|
||||
if (pane2 == 9) {// JD-GUI
|
||||
RSyntaxTextArea panelArea = new RSyntaxTextArea();
|
||||
panelArea
|
||||
.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVA);
|
||||
panelArea.setCodeFoldingEnabled(true);
|
||||
panelArea.setAntiAliasingEnabled(true);
|
||||
RTextScrollPane scrollPane = new RTextScrollPane(
|
||||
panelArea);
|
||||
panelArea.setText(Decompiler.jdgui.decompileClassNode(cn,b));
|
||||
panelArea.setCaretPosition(0);
|
||||
panelArea.setEditable(isPanel2Editable());
|
||||
panelArea.addKeyListener(new KeyListener() {
|
||||
public void keyPressed(KeyEvent e) {
|
||||
if ((e.getKeyCode() == KeyEvent.VK_F) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0)) {
|
||||
field2.requestFocus();
|
||||
}
|
||||
|
||||
BytecodeViewer.checkHotKey(e);
|
||||
}
|
||||
@Override public void keyReleased(KeyEvent arg0) { }
|
||||
@Override public void keyTyped(KeyEvent arg0) { }
|
||||
});
|
||||
panel2.add(scrollPane);
|
||||
java2 = panelArea;
|
||||
}
|
||||
} catch(Exception e) {
|
||||
new the.bytecode.club.bytecodeviewer.api.ExceptionUI(e);
|
||||
} finally {
|
||||
|
@ -1143,9 +1207,7 @@ public class ClassViewer extends Viewer {
|
|||
panel3.add(scrollPane);
|
||||
java3 = panelArea;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (pane3 == 8) {// kraktau bytecode
|
||||
RSyntaxTextArea panelArea = new RSyntaxTextArea();
|
||||
panelArea
|
||||
|
@ -1171,6 +1233,32 @@ public class ClassViewer extends Viewer {
|
|||
});
|
||||
panel3.add(scrollPane);
|
||||
}
|
||||
|
||||
if (pane3 == 9) {// JD-GUI
|
||||
RSyntaxTextArea panelArea = new RSyntaxTextArea();
|
||||
panelArea
|
||||
.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVA);
|
||||
panelArea.setCodeFoldingEnabled(true);
|
||||
panelArea.setAntiAliasingEnabled(true);
|
||||
RTextScrollPane scrollPane = new RTextScrollPane(
|
||||
panelArea);
|
||||
panelArea.setText(Decompiler.jdgui.decompileClassNode(cn,b));
|
||||
panelArea.setCaretPosition(0);
|
||||
panelArea.setEditable(isPanel3Editable());
|
||||
panelArea.addKeyListener(new KeyListener() {
|
||||
public void keyPressed(KeyEvent e) {
|
||||
if ((e.getKeyCode() == KeyEvent.VK_F) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0)) {
|
||||
field3.requestFocus();
|
||||
}
|
||||
|
||||
BytecodeViewer.checkHotKey(e);
|
||||
}
|
||||
@Override public void keyReleased(KeyEvent arg0) { }
|
||||
@Override public void keyTyped(KeyEvent arg0) { }
|
||||
});
|
||||
panel3.add(scrollPane);
|
||||
java3 = panelArea;
|
||||
}
|
||||
} catch(Exception e) {
|
||||
new the.bytecode.club.bytecodeviewer.api.ExceptionUI(e);
|
||||
} finally {
|
||||
|
|
|
@ -34,11 +34,7 @@ import the.bytecode.club.bytecodeviewer.FileChangeNotifier;
|
|||
import the.bytecode.club.bytecodeviewer.JarUtils;
|
||||
import the.bytecode.club.bytecodeviewer.PluginManager;
|
||||
import the.bytecode.club.bytecodeviewer.Resources;
|
||||
import the.bytecode.club.bytecodeviewer.decompilers.CFRDecompiler;
|
||||
import the.bytecode.club.bytecodeviewer.decompilers.FernFlowerDecompiler;
|
||||
import the.bytecode.club.bytecodeviewer.decompilers.Decompiler;
|
||||
import the.bytecode.club.bytecodeviewer.decompilers.KrakatauDecompiler;
|
||||
import the.bytecode.club.bytecodeviewer.decompilers.ProcyonDecompiler;
|
||||
import the.bytecode.club.bytecodeviewer.obfuscators.rename.RenameClasses;
|
||||
import the.bytecode.club.bytecodeviewer.obfuscators.rename.RenameFields;
|
||||
import the.bytecode.club.bytecodeviewer.obfuscators.rename.RenameMethods;
|
||||
|
@ -107,11 +103,6 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
|
|||
}
|
||||
}
|
||||
|
||||
final Decompiler ff_dc = new FernFlowerDecompiler();
|
||||
final Decompiler proc_dc = new ProcyonDecompiler();
|
||||
final Decompiler cfr_dc = new CFRDecompiler();
|
||||
final Decompiler krak_dc = new KrakatauDecompiler();
|
||||
|
||||
public static final long serialVersionUID = 1851409230530948543L;
|
||||
public JCheckBoxMenuItem debugHelpers = new JCheckBoxMenuItem("Debug Helpers");
|
||||
public JSplitPane sp1;
|
||||
|
@ -154,7 +145,7 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
|
|||
public final JMenuItem mntmNewWorkspace = new JMenuItem("New Workspace");
|
||||
public JMenu mnRecentFiles = new JMenu("Recent Files");
|
||||
public final JMenuItem mntmNewMenuItem = new JMenuItem(
|
||||
"Save Java Files As..");
|
||||
"Decompile & Save All Classes..");
|
||||
public final JMenuItem mntmAbout = new JMenuItem("About");
|
||||
public AboutWindow aboutWindow = new AboutWindow();
|
||||
public final JSeparator separator_3 = new JSeparator();
|
||||
|
@ -174,7 +165,7 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
|
|||
"Show All Strings");
|
||||
public final JMenuItem mntmShowMainMethods = new JMenuItem(
|
||||
"Show Main Methods");
|
||||
public final JMenuItem mntmNewMenuItem_3 = new JMenuItem("Save As Jar..");
|
||||
public final JMenuItem mntmNewMenuItem_3 = new JMenuItem("Save As Runnable Jar..");
|
||||
public JMenuBar menuBar = new JMenuBar();
|
||||
public final JMenuItem mntmReplaceStrings = new JMenuItem(
|
||||
"Replace Strings");
|
||||
|
@ -321,7 +312,7 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
|
|||
"Java");
|
||||
public final JRadioButtonMenuItem panel1Proc = new JRadioButtonMenuItem(
|
||||
"Java");
|
||||
public final JMenuItem mntmNewMenuItem_12 = new JMenuItem("Save Java File..");
|
||||
public final JMenuItem mntmNewMenuItem_12 = new JMenuItem("Decompile & Save Opened Class..");
|
||||
public WorkPane workPane = new WorkPane(this);
|
||||
public final JMenu mnSettings = new JMenu("Settings");
|
||||
public final JSeparator separator_6 = new JSeparator();
|
||||
|
@ -487,6 +478,18 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
|
|||
public final ButtonGroup panelGroup3 = new ButtonGroup();
|
||||
private final JMenuItem mntmSetOpitonalLibrary = new JMenuItem("Set Optionial Library Folder");
|
||||
private final JMenuItem mntmPingback = new JMenuItem("Pingback");
|
||||
private final JMenu mnJdgui = new JMenu("JD-GUI");
|
||||
public final JRadioButtonMenuItem panel3JDGUI = new JRadioButtonMenuItem("Java");
|
||||
private final JSeparator separator_33 = new JSeparator();
|
||||
public final JCheckBoxMenuItem panel3JDGUI_E = new JCheckBoxMenuItem("Editable");
|
||||
private final JMenu menu = new JMenu("JD-GUI");
|
||||
public final JRadioButtonMenuItem panel2JDGUI = new JRadioButtonMenuItem("Java");
|
||||
private final JSeparator separator_34 = new JSeparator();
|
||||
public final JCheckBoxMenuItem panel2JDGUI_E = new JCheckBoxMenuItem("Editable");
|
||||
private final JMenu menu_6 = new JMenu("JD-GUI");
|
||||
public final JRadioButtonMenuItem panel1JDGUI = new JRadioButtonMenuItem("Java");
|
||||
private final JSeparator separator_35 = new JSeparator();
|
||||
public final JCheckBoxMenuItem panel1JDGUI_E = new JCheckBoxMenuItem("Editable");
|
||||
public MainViewerGUI() {
|
||||
mnNewMenu_5.setVisible(false);
|
||||
KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(new Test());
|
||||
|
@ -575,7 +578,8 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
|
|||
|
||||
mnNewMenu.add(mntmNewWorkspace);
|
||||
|
||||
JMenuItem mntmSave = new JMenuItem("Save Files As..");
|
||||
JMenuItem mntmSave = new JMenuItem("Save As Zip..");
|
||||
mntmSave.setActionCommand("");
|
||||
mntmSave.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent arg0) {
|
||||
if(BytecodeViewer.getLoadedClasses().isEmpty()) {
|
||||
|
@ -810,7 +814,7 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
|
|||
JOptionPane pane = new JOptionPane(
|
||||
"What decompiler will you use?");
|
||||
Object[] options = new String[] { "Procyon", "CFR",
|
||||
"Fernflower", "Krakatau", "Cancel" };
|
||||
"Fernflower", "Krakatau", "JD-GUI", "Cancel" };
|
||||
pane.setOptions(options);
|
||||
JDialog dialog = pane.createDialog(BytecodeViewer.viewer,
|
||||
"Bytecode Viewer - Select Decompiler");
|
||||
|
@ -826,7 +830,7 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
|
|||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
proc_dc.decompileToZip(path);
|
||||
Decompiler.procyon.decompileToZip(path);
|
||||
BytecodeViewer.viewer.setIcon(false);
|
||||
} catch (Exception e) {
|
||||
new the.bytecode.club.bytecodeviewer.api.ExceptionUI(e);
|
||||
|
@ -840,7 +844,7 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
|
|||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
cfr_dc.decompileToZip(path);
|
||||
Decompiler.cfr.decompileToZip(path);
|
||||
BytecodeViewer.viewer.setIcon(false);
|
||||
} catch (Exception e) {
|
||||
new the.bytecode.club.bytecodeviewer.api.ExceptionUI(e);
|
||||
|
@ -854,7 +858,7 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
|
|||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
ff_dc.decompileToZip(path);
|
||||
Decompiler.fernflower.decompileToZip(path);
|
||||
BytecodeViewer.viewer.setIcon(false);
|
||||
} catch (Exception e) {
|
||||
new the.bytecode.club.bytecodeviewer.api.ExceptionUI(e);
|
||||
|
@ -869,7 +873,7 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
|
|||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
krak_dc.decompileToZip(path);
|
||||
Decompiler.krakatau.decompileToZip(path);
|
||||
BytecodeViewer.viewer.setIcon(false);
|
||||
} catch (Exception e) {
|
||||
new the.bytecode.club.bytecodeviewer.api.ExceptionUI(e);
|
||||
|
@ -879,7 +883,22 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
|
|||
t.start();
|
||||
}
|
||||
|
||||
if(result == 4) {
|
||||
if (result == 4) {
|
||||
Thread t = new Thread() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
Decompiler.jdgui.decompileToZip(path);
|
||||
BytecodeViewer.viewer.setIcon(false);
|
||||
} catch (Exception e) {
|
||||
new the.bytecode.club.bytecodeviewer.api.ExceptionUI(e);
|
||||
}
|
||||
}
|
||||
};
|
||||
t.start();
|
||||
}
|
||||
|
||||
if(result == 5) {
|
||||
BytecodeViewer.viewer.setIcon(false);
|
||||
}
|
||||
}
|
||||
|
@ -931,7 +950,7 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
|
|||
JOptionPane pane = new JOptionPane(
|
||||
"What decompiler will you use?");
|
||||
Object[] options = new String[] { "Procyon", "CFR",
|
||||
"Fernflower", "Krakatau", "Cancel" };
|
||||
"Fernflower", "Krakatau", "DJ GUI", "Cancel" };
|
||||
pane.setOptions(options);
|
||||
JDialog dialog = pane.createDialog(BytecodeViewer.viewer,
|
||||
"Bytecode Viewer - Select Decompiler");
|
||||
|
@ -947,7 +966,7 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
|
|||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
proc_dc.decompileToClass(s,path);
|
||||
Decompiler.procyon.decompileToClass(s,path);
|
||||
BytecodeViewer.viewer.setIcon(false);
|
||||
} catch (Exception e) {
|
||||
new the.bytecode.club.bytecodeviewer.api.ExceptionUI(
|
||||
|
@ -962,7 +981,7 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
|
|||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
cfr_dc.decompileToClass(s,path);
|
||||
Decompiler.cfr.decompileToClass(s,path);
|
||||
BytecodeViewer.viewer.setIcon(false);
|
||||
} catch (Exception e) {
|
||||
new the.bytecode.club.bytecodeviewer.api.ExceptionUI(
|
||||
|
@ -977,7 +996,7 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
|
|||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
ff_dc.decompileToClass(s,path);
|
||||
Decompiler.fernflower.decompileToClass(s,path);
|
||||
BytecodeViewer.viewer.setIcon(false);
|
||||
} catch (Exception e) {
|
||||
new the.bytecode.club.bytecodeviewer.api.ExceptionUI(
|
||||
|
@ -992,7 +1011,22 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
|
|||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
krak_dc.decompileToClass(s,path);
|
||||
Decompiler.krakatau.decompileToClass(s,path);
|
||||
BytecodeViewer.viewer.setIcon(false);
|
||||
} catch (Exception e) {
|
||||
new the.bytecode.club.bytecodeviewer.api.ExceptionUI(
|
||||
e);
|
||||
}
|
||||
}
|
||||
};
|
||||
t.start();
|
||||
}
|
||||
if (result == 4) {
|
||||
Thread t = new Thread() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
Decompiler.jdgui.decompileToClass(s,path);
|
||||
BytecodeViewer.viewer.setIcon(false);
|
||||
} catch (Exception e) {
|
||||
new the.bytecode.club.bytecodeviewer.api.ExceptionUI(
|
||||
|
@ -1003,7 +1037,7 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
|
|||
t.start();
|
||||
}
|
||||
|
||||
if(result == 4) {
|
||||
if(result == 5) {
|
||||
BytecodeViewer.viewer.setIcon(false);
|
||||
}
|
||||
}
|
||||
|
@ -1083,6 +1117,14 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
|
|||
|
||||
mnCfr.add(panel1CFR_E);
|
||||
|
||||
mnNewMenu_7.add(menu_6);
|
||||
|
||||
menu_6.add(panel1JDGUI);
|
||||
|
||||
menu_6.add(separator_35);
|
||||
|
||||
menu_6.add(panel1JDGUI_E);
|
||||
|
||||
mnNewMenu_7.add(mnFernflower);
|
||||
mnFernflower.add(panel1Fern);
|
||||
panel1Fern.addActionListener(listener);
|
||||
|
@ -1140,6 +1182,14 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
|
|||
|
||||
menu_2.add(panel2CFR_E);
|
||||
|
||||
mnPane.add(menu);
|
||||
|
||||
menu.add(panel2JDGUI);
|
||||
|
||||
menu.add(separator_34);
|
||||
|
||||
menu.add(panel2JDGUI_E);
|
||||
|
||||
mnPane.add(menu_3);
|
||||
|
||||
menu_3.add(panel2Fern);
|
||||
|
@ -1196,6 +1246,14 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
|
|||
|
||||
menu_8.add(panel3CFR_E);
|
||||
|
||||
mnPane_1.add(mnJdgui);
|
||||
|
||||
mnJdgui.add(panel3JDGUI);
|
||||
|
||||
mnJdgui.add(separator_33);
|
||||
|
||||
mnJdgui.add(panel3JDGUI_E);
|
||||
|
||||
mnPane_1.add(menu_9);
|
||||
|
||||
menu_9.add(panel3Fern);
|
||||
|
@ -1231,8 +1289,10 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
|
|||
mnPane_1.add(panel3Hexcode);
|
||||
|
||||
menuBar.add(mnSettings);
|
||||
autoCompileSmali.setSelected(true);
|
||||
|
||||
mnSettings.add(autoCompileSmali);
|
||||
autoCompileOnRefresh.setSelected(true);
|
||||
|
||||
mnSettings.add(autoCompileOnRefresh);
|
||||
mnSettings.add(chckbxmntmNewCheckItem_12);
|
||||
|
@ -1657,6 +1717,7 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
|
|||
panelGroup1.add(panel1None);
|
||||
panelGroup1.add(panel1Proc);
|
||||
panelGroup1.add(panel1CFR);
|
||||
panelGroup1.add(panel1JDGUI);
|
||||
panelGroup1.add(panel1Fern);
|
||||
panelGroup1.add(panel1Krakatau);
|
||||
panelGroup1.add(panel1KrakatauBytecode);
|
||||
|
@ -1667,6 +1728,7 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
|
|||
panelGroup2.add(panel2None);
|
||||
panelGroup2.add(panel2Proc);
|
||||
panelGroup2.add(panel2CFR);
|
||||
panelGroup2.add(panel2JDGUI);
|
||||
panelGroup2.add(panel2Fern);
|
||||
panelGroup2.add(panel2Krakatau);
|
||||
panelGroup2.add(panel2KrakatauBytecode);
|
||||
|
@ -1677,6 +1739,7 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
|
|||
panelGroup3.add(panel3None);
|
||||
panelGroup3.add(panel3Proc);
|
||||
panelGroup3.add(panel3CFR);
|
||||
panelGroup3.add(panel3JDGUI);
|
||||
panelGroup3.add(panel3Fern);
|
||||
panelGroup3.add(panel3Krakatau);
|
||||
panelGroup3.add(panel3KrakatauBytecode);
|
||||
|
|
|
@ -38,7 +38,16 @@ public class CodeSequenceDiagram extends Plugin {
|
|||
return;
|
||||
}
|
||||
ClassNode c = BytecodeViewer.viewer.workPane.getCurrentViewer().cn;
|
||||
JFrame frame = new JFrame("Code Sequence Diagram - " +c.name);
|
||||
if(c == null) {
|
||||
BytecodeViewer.showMessage("ClassNode is null for CodeSequenceDiagram. Please report to @Konloch");
|
||||
return;
|
||||
}
|
||||
JFrame frame = null;
|
||||
if(c.name != null)
|
||||
frame = new JFrame("Code Sequence Diagram - "+c.name);
|
||||
else
|
||||
frame = new JFrame("Code Sequence Diagram - Unknown Name");
|
||||
|
||||
frame.setIconImages(Resources.iconList);
|
||||
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
|
||||
frame.setSize(400, 320);
|
||||
|
|
Loading…
Reference in a new issue