use of org.talend.designer.runtime.visualization.internal.core.cpu.CpuModelFactory in project tdi-studio-se by Talend.
the class CpuDumpEditor method init.
/*
* @see MultiPageEditorPart#init(IEditorSite, IEditorInput)
*/
@Override
public void init(IEditorSite site, IEditorInput input) throws PartInitException {
super.init(site, input);
cpuModel = new CpuModelFactory().createCpuModel();
cpuModel.addModelChangeListener(new ICpuModelChangeListener() {
@Override
public void modelChanged(CpuModelEvent event) {
if (event.state == CpuModelState.CallersCalleesTargetChanged) {
refresh();
if (cpuModel.getCallersCalleesTarget() != null) {
showCallerCalleeTab();
}
}
}
});
setPartName(input.getName());
if (input instanceof IFileEditorInput) {
String filePath = ((IFileEditorInput) input).getFile().getRawLocation().toOSString();
loadDumpFile(filePath);
} else if (input instanceof FileStoreEditorInput) {
String filePath = ((FileStoreEditorInput) input).getURI().getPath();
loadDumpFile(filePath);
}
}
Aggregations