use of org.talend.designer.runtime.visualization.core.dump.ThreadDumpParser in project tdi-studio-se by Talend.
the class ThreadDumpEditor method parseDumpFile.
/**
* Parses the dump file.
*
* @param filePath The file path
*/
private void parseDumpFile(final String filePath) {
Job job = new Job(Messages.parseThreadDumpFileJobLabel) {
@Override
protected IStatus run(IProgressMonitor monitor) {
final ThreadDumpParser parser = new ThreadDumpParser(new File(filePath), threadListElements, monitor);
try {
parser.parse();
} catch (ParserConfigurationException e) {
//$NON-NLS-1$
return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Could not load thread dump file.", e);
} catch (SAXException e) {
//$NON-NLS-1$
return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Could not load thread dump file.", e);
} catch (IOException e) {
//$NON-NLS-1$
return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Could not load thread dump file.", e);
}
setProfileInfo(parser.getProfileInfo());
Display.getDefault().asyncExec(new Runnable() {
@Override
public void run() {
if (threadSashForm != null) {
threadSashForm.refresh();
}
}
});
return Status.OK_STATUS;
}
};
job.schedule();
}
Aggregations