use of org.talend.designer.runtime.visualization.internal.core.cpu.CpuModelEvent in project tdi-studio-se by Talend.
the class CpuDumpEditor method addListeners.
/**
* Adds the listeners.
*/
private void addListeners() {
cpuModel.addModelChangeListener(new ICpuModelChangeListener() {
@Override
public void modelChanged(CpuModelEvent e) {
Display.getDefault().asyncExec(new Runnable() {
@Override
public void run() {
refresh();
}
});
}
});
addPageChangedListener(new IPageChangedListener() {
@Override
public void pageChanged(PageChangedEvent event) {
pageSelectionChanged();
}
});
}
use of org.talend.designer.runtime.visualization.internal.core.cpu.CpuModelEvent 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