use of com.kyj.fx.voeditor.visual.component.text.ThreadDumpTextArea 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