Package org.jrd.frontend.frame.main
Class BytecodeDecompilerView
- java.lang.Object
-
- org.jrd.frontend.frame.main.BytecodeDecompilerView
-
public class BytecodeDecompilerView extends java.lang.Object
Class that creates GUI for attached VM.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
BytecodeDecompilerView.OverwriteActionListener
private static class
BytecodeDecompilerView.SearchControlsPanel
private static class
BytecodeDecompilerView.UndoRedoKeyAdapter
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
ATTACH_BUTTON_TEXT
private javax.swing.JPanel
binaryBuffer
private javax.swing.JTabbedPane
buffers
private javax.swing.JPanel
buffersPanel
private javax.swing.JPanel
buffersToolBar
private javax.swing.JPanel
bytecodeDecompilerPanel
private org.fife.ui.rtextarea.RTextScrollPane
bytecodeScrollPane
private BytecodeDecompilerView.SearchControlsPanel
bytecodeSearchControls
private org.fife.ui.rsyntaxtextarea.RSyntaxTextArea
bytecodeSyntaxTextArea
private java.awt.event.ActionListener
bytesActionListener
private static java.util.Set<java.lang.Integer>
CLASS_LIST_REGISTERED_KEY_CODES
private javax.swing.JPanel
classes
private java.awt.event.ActionListener
classesActionListener
private javax.swing.JPanel
classesPanel
private javax.swing.JScrollPane
classesScrollPane
private javax.swing.JTextField
classesSortField
private java.awt.Color
classesSortFieldColor
private javax.swing.JPanel
classesToolBar
private DecompilationController.QuickCompiler
compileAction
private javax.swing.JButton
compileAndUploadButton
private javax.swing.JButton
compileButton
private static java.lang.String
DETACH_BUTTON_TEXT
private javax.swing.JButton
detachButton
private javax.swing.JFrame
detachedBytecodeFrame
private javax.swing.JList<ClassInfo>
filteredClassesJList
private ClassListRenderer
filteredClassesRenderer
private HexEditor
hex
private BytecodeDecompilerView.SearchControlsPanel
hexSearchControls
private java.awt.event.ActionListener
initActionListener
private javax.swing.JButton
initClassButton
private javax.swing.JButton
insertButton
private java.lang.String
lastDecompiledClass
private java.lang.String
lastFqn
private ClassInfo[]
loadedClasses
private javax.swing.JFrame
mainFrame
private BytecodeDecompilerView.OverwriteActionListener
overwriteActionListener
private javax.swing.JButton
overwriteButton
private static java.awt.Insets
PANEL_INSETS
private javax.swing.JComboBox<DecompilerWrapper>
pluginComboBox
private DecompilationController.AgentApiGenerator
popup
private javax.swing.JButton
redoButton
private javax.swing.JButton
reloadClassesButton
private org.fife.ui.rtextarea.SearchContext
searchContext
private boolean
shouldAttach
private javax.swing.JCheckBox
showInfoCheckBox
private javax.swing.JPanel
sourceBuffer
private javax.swing.JSplitPane
splitPane
private boolean
splitPaneFirstResize
private javax.swing.JButton
undoButton
-
Constructor Summary
Constructors Constructor Description BytecodeDecompilerView(javax.swing.JFrame mainFrameReference)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.awt.Dimension
buttonSizeBasedOnTextField(javax.swing.JButton originalButton, javax.swing.JTextField referenceTextField)
private void
bytesWorker(java.lang.String name)
private void
classWorker()
private void
deselectBytecodeSyntaxArea()
boolean
doShowClassInfo()
javax.swing.JPanel
getBytecodeDecompilerPanel()
Constructor creates the graphics and adds the action listeners.DecompilerWrapper
getSelectedDecompiler()
private void
handleBuffersDetaching()
private void
handleClassInfoSwitching()
private void
initialSearchBytecode(java.lang.String query, boolean isRegex, boolean matchesCase)
private boolean
isSourceBufferVisible()
void
refreshComboBox(java.util.List<DecompilerWrapper> wrappers)
void
reloadClassList(ClassInfo[] classesToReload)
Sets the unfiltered class list array and invokes an update.void
reloadTextField(java.lang.String name, java.lang.String decompiledClass, byte[] source)
Sets the decompiled code into JTextAreaprivate void
searchBytecode(boolean forward)
void
setBytesActionListener(java.awt.event.ActionListener listener)
void
setClassesActionListener(java.awt.event.ActionListener listener)
void
setCompileListener(DecompilationController.QuickCompiler listener)
private void
setDecompiledClass(java.lang.String name, java.lang.String data, byte[] source)
void
setInitActionListener(java.awt.event.ActionListener listener)
void
setOverwriteActionListener(DecompilationController.ClassOverwriter worker)
void
setPopup(DecompilationController.AgentApiGenerator ap)
private void
showApiMenu(java.awt.Point forcedLocation)
static java.lang.String
styleTooltip()
private void
updateClassList()
-
-
-
Field Detail
-
bytecodeDecompilerPanel
private javax.swing.JPanel bytecodeDecompilerPanel
-
splitPane
private javax.swing.JSplitPane splitPane
-
classes
private javax.swing.JPanel classes
-
classesToolBar
private javax.swing.JPanel classesToolBar
-
reloadClassesButton
private javax.swing.JButton reloadClassesButton
-
showInfoCheckBox
private javax.swing.JCheckBox showInfoCheckBox
-
classesSortField
private javax.swing.JTextField classesSortField
-
classesSortFieldColor
private final java.awt.Color classesSortFieldColor
-
classesPanel
private javax.swing.JPanel classesPanel
-
classesScrollPane
private javax.swing.JScrollPane classesScrollPane
-
filteredClassesJList
private javax.swing.JList<ClassInfo> filteredClassesJList
-
filteredClassesRenderer
private ClassListRenderer filteredClassesRenderer
-
buffersPanel
private javax.swing.JPanel buffersPanel
-
buffersToolBar
private javax.swing.JPanel buffersToolBar
-
undoButton
private javax.swing.JButton undoButton
-
redoButton
private javax.swing.JButton redoButton
-
insertButton
private javax.swing.JButton insertButton
-
detachButton
private javax.swing.JButton detachButton
-
initClassButton
private javax.swing.JButton initClassButton
-
overwriteButton
private javax.swing.JButton overwriteButton
-
compileButton
private javax.swing.JButton compileButton
-
compileAndUploadButton
private javax.swing.JButton compileAndUploadButton
-
pluginComboBox
private javax.swing.JComboBox<DecompilerWrapper> pluginComboBox
-
buffers
private final javax.swing.JTabbedPane buffers
-
sourceBuffer
private javax.swing.JPanel sourceBuffer
-
bytecodeScrollPane
private org.fife.ui.rtextarea.RTextScrollPane bytecodeScrollPane
-
bytecodeSyntaxTextArea
private org.fife.ui.rsyntaxtextarea.RSyntaxTextArea bytecodeSyntaxTextArea
-
bytecodeSearchControls
private BytecodeDecompilerView.SearchControlsPanel bytecodeSearchControls
-
binaryBuffer
private javax.swing.JPanel binaryBuffer
-
hex
private HexEditor hex
-
hexSearchControls
private BytecodeDecompilerView.SearchControlsPanel hexSearchControls
-
bytesActionListener
private java.awt.event.ActionListener bytesActionListener
-
classesActionListener
private java.awt.event.ActionListener classesActionListener
-
initActionListener
private java.awt.event.ActionListener initActionListener
-
compileAction
private DecompilationController.QuickCompiler compileAction
-
overwriteActionListener
private BytecodeDecompilerView.OverwriteActionListener overwriteActionListener
-
popup
private DecompilationController.AgentApiGenerator popup
-
loadedClasses
private ClassInfo[] loadedClasses
-
lastDecompiledClass
private java.lang.String lastDecompiledClass
-
lastFqn
private java.lang.String lastFqn
-
searchContext
private org.fife.ui.rtextarea.SearchContext searchContext
-
splitPaneFirstResize
private boolean splitPaneFirstResize
-
shouldAttach
private boolean shouldAttach
-
mainFrame
private final javax.swing.JFrame mainFrame
-
detachedBytecodeFrame
private javax.swing.JFrame detachedBytecodeFrame
-
CLASS_LIST_REGISTERED_KEY_CODES
private static final java.util.Set<java.lang.Integer> CLASS_LIST_REGISTERED_KEY_CODES
-
PANEL_INSETS
private static final java.awt.Insets PANEL_INSETS
-
DETACH_BUTTON_TEXT
private static final java.lang.String DETACH_BUTTON_TEXT
- See Also:
- Constant Field Values
-
ATTACH_BUTTON_TEXT
private static final java.lang.String ATTACH_BUTTON_TEXT
- See Also:
- Constant Field Values
-
-
Method Detail
-
getBytecodeDecompilerPanel
public javax.swing.JPanel getBytecodeDecompilerPanel()
Constructor creates the graphics and adds the action listeners.- Returns:
- BytecodeDecompilerPanel
-
handleClassInfoSwitching
private void handleClassInfoSwitching()
-
isSourceBufferVisible
private boolean isSourceBufferVisible()
-
handleBuffersDetaching
private void handleBuffersDetaching()
-
styleTooltip
public static java.lang.String styleTooltip()
-
updateClassList
private void updateClassList()
-
reloadClassList
public void reloadClassList(ClassInfo[] classesToReload)
Sets the unfiltered class list array and invokes an update.- Parameters:
classesToReload
- String[] classesToReload.
-
reloadTextField
public void reloadTextField(java.lang.String name, java.lang.String decompiledClass, byte[] source)
Sets the decompiled code into JTextArea- Parameters:
decompiledClass
- String of source code of decompiler class
-
setDecompiledClass
private void setDecompiledClass(java.lang.String name, java.lang.String data, byte[] source)
-
setClassesActionListener
public void setClassesActionListener(java.awt.event.ActionListener listener)
-
setInitActionListener
public void setInitActionListener(java.awt.event.ActionListener listener)
-
setCompileListener
public void setCompileListener(DecompilationController.QuickCompiler listener)
-
setBytesActionListener
public void setBytesActionListener(java.awt.event.ActionListener listener)
-
setPopup
public void setPopup(DecompilationController.AgentApiGenerator ap)
-
setOverwriteActionListener
public void setOverwriteActionListener(DecompilationController.ClassOverwriter worker)
-
refreshComboBox
public void refreshComboBox(java.util.List<DecompilerWrapper> wrappers)
-
getSelectedDecompiler
public DecompilerWrapper getSelectedDecompiler()
-
initialSearchBytecode
private void initialSearchBytecode(java.lang.String query, boolean isRegex, boolean matchesCase)
-
searchBytecode
private void searchBytecode(boolean forward)
-
deselectBytecodeSyntaxArea
private void deselectBytecodeSyntaxArea()
-
showApiMenu
private void showApiMenu(java.awt.Point forcedLocation)
-
buttonSizeBasedOnTextField
public static java.awt.Dimension buttonSizeBasedOnTextField(javax.swing.JButton originalButton, javax.swing.JTextField referenceTextField)
-
classWorker
private void classWorker()
-
bytesWorker
private void bytesWorker(java.lang.String name)
-
doShowClassInfo
public boolean doShowClassInfo()
-
-