use of com.kyj.bci.monitor.ApplicationModel in project Gargoyle by callakrsos.
the class JavaProcessMonitor method menuInjectionOnAction.
public void menuInjectionOnAction(ActionEvent e) {
CodeItem selectedItem = injectionItemListComposite.getSelectedItem();
ApplicationModel applicationItem = tbJavaApplication.getSelectionModel().getSelectedItem();
if (ValueUtil.isNotEmpty(selectedItem) && ValueUtil.isNotEmpty(applicationItem)) {
LOGGER.debug("application pid : {} codeitem :{}", applicationItem.getProcessId(), selectedItem.getName());
BtraceRunner.run(applicationItem, selectedItem.getFile());
}
}
use of com.kyj.bci.monitor.ApplicationModel in project Gargoyle by callakrsos.
the class JavaProcessMonitor method menuThreadDumpOnAction.
/**
* Thread Dump
* @작성자 : KYJ
* @작성일 : 2017. 1. 23.
* @param e
* @throws Exception
*/
public void menuThreadDumpOnAction(ActionEvent e) {
ApplicationModel selectedItem = getSelectedItem(item -> item);
if (selectedItem == null) {
Window window = FxUtil.getWindow(this.getParent(), () -> {
return SharedMemory.getPrimaryStage();
});
DialogUtil.showMessageDialog(window, "덤프를 출력할 프로세스를 선택.");
return;
}
Integer selectedProcessId = selectedItem.getProcessId();
String applicationName = selectedItem.getApplicationName();
ByteArrayOutputStream out = new ByteArrayOutputStream();
Monitors.runStackTool(selectedProcessId, out);
ThreadDumpTextArea parent = new ThreadDumpTextArea();
parent.setContent(out.toString());
FxUtil.createStageAndShow(parent, stage -> {
stage.initOwner(getParent().getScene().getWindow());
stage.setWidth(1200d);
stage.setHeight(800d);
stage.setTitle("App - " + applicationName);
});
// FxUtil.createSimpleTextAreaAndShow(out.toString(), stage -> {
//
//
// });
}
Aggregations