use of org.talend.designer.runtime.visualization.internal.core.cpu.IMethodNode in project tdi-studio-se by Talend.
the class CpuDumpEditor method refreshContentDescription.
/**
* Refreshes the content description.
*/
private void refreshContentDescription() {
StringBuilder description = new StringBuilder();
AbstractFilteredTree activeTree = getActiveFilteredTree();
if (activeTree == null) {
setContentDescription(description.toString());
return;
}
ViewerType type = activeTree.getViewerType();
IMethodNode callersCalleesTarget = cpuModel.getCallersCalleesTarget();
if ((type == ViewerType.Caller || type == ViewerType.Callee) && callersCalleesTarget != null) {
description.append(NLS.bind(Messages.callersCalleesTargetIndicator, callersCalleesTarget.getName()));
}
ICallTreeNode focusedNode = cpuModel.getFocusTarget();
if (focusedNode != null) {
if ((type != ViewerType.Caller && type != ViewerType.Callee) || callersCalleesTarget != null) {
description.append(NLS.bind(Messages.focusTargetIndicator, focusedNode.getNonqualifiedName()));
}
}
String thread = null;
if (focusedNode != null) {
thread = focusedNode.getThread();
} else if (callersCalleesTarget != null) {
thread = callersCalleesTarget.getThread();
}
if (description.length() > 0 && thread != null) {
description.append(NLS.bind(Messages.threadIndicator, thread));
}
setContentDescription(description.toString());
}
Aggregations