Class DecompilationController
java.lang.Object
org.jrd.frontend.frame.main.decompilerview.DecompilationController
- All Implemented Interfaces:
ClassesAndMethodsProvider,LoadingDialogProvider,ModelProvider
public class DecompilationController
extends Object
implements ModelProvider, LoadingDialogProvider, ClassesAndMethodsProvider
This class provides Action listeners and request handling for
the GUI.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass(package private) classNested classes/interfaces inherited from interface org.jrd.backend.completion.ClassesAndMethodsProvider
ClassesAndMethodsProvider.SettingsClassesAndMethodsProvider -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BytecodeDecompilerViewstatic final Stringprivate booleanprivate LoadingDialogprivate final MainFrameViewprivate NewConnectionViewprivate NewFsVmViewprivate PluginConfigurationEditorViewprivate PluginManagerprivate VmInfoprivate VmManager -
Constructor Summary
ConstructorsConstructorDescriptionDecompilationController(MainFrameView mainFrameView, Model model, boolean isVerbose) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidprivate voidprivate voidstatic StringbytesToBase64(byte[] bytes) private voidchangeVm(ActionEvent event) private voidcleanup(boolean halt) private voidclearOtherList(JList<VmInfo> vmList) If selected list is remoteVmList clears localVmList and vice versa.
Effectively merging them into one.private voidprivate StringcreateFilter(String text, int caretPosition) private voidprivate voidprivate AgentRequestActioncreateRequest(AgentRequestAction.RequestAction action, String... commands) static AgentRequestActioncreateRequest(VmInfo vmInfo, AgentRequestAction.RequestAction action, String... commands) private booleanexitOnEmpty(String vmType, VmInfo selectedVm) static StringfileToBase64(String path, boolean deHex) static byte[]fileToBytes(String path) fileToLines(String path) String[]getClasses(CompletionSettings settings) byte[]getClassItself(CompletionSettings settings, String fqn) private String[]getMethodsFromClassInRunningVm(CompletionSettings settings, String fqn) private String[]getMethodsFromClassInRunningVmCatched(CompletionSettings settings, String fqn) String[]private Collection<io.github.mkoncek.classpathless.api.IdentifiedBytecode>getVm()String[]getWhateverFromClass(CompletionSettings settings, String fqn) private voidvoidprivate voidprivate voidprivate voidloadClassBytecode(String name) private voidSends request for classes.voidremoveOverrides(String pattern) private voidremoveVmDialog(ActionEvent event) private voidsearchInClasses(String substringAndRegex) voidshowLoadingDialog(ActionListener listener, String title) private voidshowLoadingDialog(String title) static StringstdinToBase64(boolean deHex) static byte[](package private) StringsubmitRequest(AgentRequestAction request) static StringsubmitRequest(VmManager vmManager, AgentRequestAction request) private voidprivate booleanwarnOnOvveridesOfFsVm(VmInfo selectedVm) static booleanwarnOnOvveridesOfFsVm(VmInfo vmInfo, JFrame parent)
-
Field Details
-
mainFrameView
-
bytecodeDecompilerView
-
newConnectionDialog
-
newFsVmDialog
-
pluginConfigurationEditorView
-
pluginConfigurationEditorController
-
loadingDialog
-
vmManager
-
vmInfo
-
pluginManager
-
isVerbose
private boolean isVerbose -
CLASSES_NOPE
- See Also:
-
-
Constructor Details
-
DecompilationController
-
-
Method Details
-
createConfigurationEditor
private void createConfigurationEditor() -
createNewConnectionDialog
private void createNewConnectionDialog() -
createNewFsVMDialog
private void createNewFsVMDialog() -
removeVmDialog
-
exitOnEmpty
-
warnOnOvveridesOfFsVm
-
warnOnOvveridesOfFsVm
-
updateVmLists
private void updateVmLists() -
changeVm
-
clearOtherList
If selected list is remoteVmList clears localVmList and vice versa.
Effectively merging them into one.- Parameters:
vmList- list that doesn't get cleared containing the VM that user wants to attach.
-
showLoadingDialog
-
showLoadingDialog
- Specified by:
showLoadingDialogin interfaceLoadingDialogProvider
-
hideLoadingDialog
public void hideLoadingDialog()- Specified by:
hideLoadingDialogin interfaceLoadingDialogProvider
-
cleanup
private void cleanup(boolean halt) -
abortClassLoading
private void abortClassLoading() -
initClass
-
addClass
-
addJar
-
loadClassNames
private void loadClassNames()Sends request for classes. If "ok" response is received updates classes list. If "error" response is received shows an error dialog. -
searchInClasses
-
loadClassBytecode
-
getVm
-
getOverrides
-
removeOverrides
-
getVmInfo
- Specified by:
getVmInfoin interfaceModelProvider
-
getVmManager
- Specified by:
getVmManagerin interfaceModelProvider
-
getClassesProvider
- Specified by:
getClassesProviderin interfaceModelProvider
-
getClasses
- Specified by:
getClassesin interfaceClassesAndMethodsProvider
-
getClassItself
- Specified by:
getClassItselfin interfaceClassesAndMethodsProvider
-
getSingleClassFromRunningVmCatched
private Collection<io.github.mkoncek.classpathless.api.IdentifiedBytecode> getSingleClassFromRunningVmCatched(String fqn) -
getWhateverFromClass
- Specified by:
getWhateverFromClassin interfaceClassesAndMethodsProvider
-
getMethodsFromClassInRunningVmCatched
-
getMethodsFromClassInRunningVm
-
fileToBase64
-
stdinToBase64
-
fileToBytes
- Throws:
IOException
-
fileToLines
- Throws:
IOException
-
stdinToBytes
- Throws:
IOException
-
stdinToStrings
- Throws:
IOException
-
bytesToBase64
-
haltAgent
private void haltAgent() -
killAllSession
private void killAllSession() -
createRequest
private AgentRequestAction createRequest(AgentRequestAction.RequestAction action, String... commands) -
createRequest
public static AgentRequestAction createRequest(VmInfo vmInfo, AgentRequestAction.RequestAction action, String... commands) -
submitRequest
-
submitRequest
-
createFilter
-
cpTextInfo
- Specified by:
cpTextInfoin interfaceClassesAndMethodsProvider
-