Class DecompilationController
java.lang.Object
org.jrd.frontend.frame.main.decompilerview.DecompilationController
- All Implemented Interfaces:
ClassesAndMethodsProvider
,ClasspathProvider
,LoadingDialogProvider
,ModelProvider
public class DecompilationController
extends Object
implements ModelProvider, LoadingDialogProvider, ClassesAndMethodsProvider, ClasspathProvider
This class provides Action listeners and request handling for
the GUI.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
class
class
Nested classes/interfaces inherited from interface org.jrd.backend.completion.ClassesAndMethodsProvider
ClassesAndMethodsProvider.SettingsClassesAndMethodsProvider
Nested classes/interfaces inherited from interface org.jrd.frontend.frame.main.decompilerview.dummycompiler.providers.ClasspathProvider
ClasspathProvider.SettingsClasspathProvider
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BytecodeDecompilerView
static final String
private boolean
private LoadingDialog
private final MainFrameView
private NewConnectionView
private NewFsVmView
private PluginConfigurationEditorView
private VmInfo
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
private void
private void
static String
bytesToBase64
(byte[] bytes) private void
changeVm
(ActionEvent event) private void
cleanup
(boolean halt) private void
clearOtherList
(JList<VmInfo> vmList) If selected list is remoteVmList clears localVmList and vice versa.
Effectively merging them into one.private void
private String
createFilter
(String text, int caretPosition) private void
private void
private AgentRequestAction
createRequest
(AgentRequestAction.RequestAction action, String... commands) static AgentRequestAction
createRequest
(VmInfo vmInfo, AgentRequestAction.RequestAction action, String... commands) private boolean
exitOnEmpty
(String vmType, VmInfo selectedVm) static String
fileToBase64
(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 void
void
private void
boolean
boolean
private void
private boolean
loadClassBytecode
(ClassInfo name) void
removeOverrides
(String pattern) private void
removeVmDialog
(ActionEvent event) private void
searchInClasses
(String substringAndRegex) void
setVerbose
(boolean verbose) void
showLoadingDialog
(ActionListener listener, String title) private void
showLoadingDialog
(String title) static String
stdinToBase64
(boolean deHex) static byte[]
static String
(package private) String
submitRequest
(AgentRequestAction request) static String
submitRequest
(VmManager vmManager, AgentRequestAction request) private void
private boolean
warnOnOvveridesOfFsVm
(VmInfo selectedVm) static boolean
warnOnOvveridesOfFsVm
(VmInfo vmInfo, JFrame parent)
-
Field Details
-
mainFrameView
-
bytecodeDecompilerView
-
newConnectionDialog
-
newFsVmDialog
-
pluginConfigurationEditorView
-
pluginConfigurationEditorController
-
loadingDialog
-
vmInfo
-
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:
showLoadingDialog
in interfaceLoadingDialogProvider
-
hideLoadingDialog
public void hideLoadingDialog()- Specified by:
hideLoadingDialog
in interfaceLoadingDialogProvider
-
cleanup
private void cleanup(boolean halt) -
abortClassLoading
private void abortClassLoading() -
initClass
-
addClass
-
addJar
-
searchInClasses
-
loadClassBytecode
-
getVm
-
getOverrides
-
removeOverrides
-
getClasspath
- Specified by:
getClasspath
in interfaceClasspathProvider
-
getVmInfo
- Specified by:
getVmInfo
in interfaceClasspathProvider
- Specified by:
getVmInfo
in interfaceModelProvider
-
getVmManager
- Specified by:
getVmManager
in interfaceClasspathProvider
- Specified by:
getVmManager
in interfaceModelProvider
-
getClassesProvider
- Specified by:
getClassesProvider
in interfaceModelProvider
-
getClasses
- Specified by:
getClasses
in interfaceClassesAndMethodsProvider
-
getClassItself
- Specified by:
getClassItself
in interfaceClassesAndMethodsProvider
-
isMissingVmInfo
public boolean isMissingVmInfo()- Specified by:
isMissingVmInfo
in interfaceClassesAndMethodsProvider
-
getSingleClassFromRunningVmCatched
private Collection<io.github.mkoncek.classpathless.api.IdentifiedBytecode> getSingleClassFromRunningVmCatched(String fqn) -
getWhateverFromClass
- Specified by:
getWhateverFromClass
in interfaceClassesAndMethodsProvider
-
getMethodsFromClassInRunningVmCatched
-
getMethodsFromClassInRunningVm
-
getPluginManager
-
fileToBase64
-
stdinToBase64
-
fileToBytes
- Throws:
IOException
-
fileToLines
- Throws:
IOException
-
stdinToBytes
- Throws:
IOException
-
stdinToStrings
- Throws:
IOException
-
bytesToBase64
-
stringToBase64
-
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
-
isVerbose
public boolean isVerbose() -
setVerbose
public void setVerbose(boolean verbose) -
createFilter
-
cpTextInfo
- Specified by:
cpTextInfo
in interfaceClassesAndMethodsProvider
-