Search in sources :

Example 6 with ICallTreeNode

use of org.talend.designer.runtime.visualization.internal.core.cpu.ICallTreeNode in project tdi-studio-se by Talend.

the class HotSpotsTabPage method refreshContentDescription.

/**
     * Refreshes the content description.
     */
private void refreshContentDescription() {
    if (jvm == null) {
        return;
    }
    ICallTreeNode focusedNode = jvm.getCpuProfiler().getCpuModel().getFocusTarget();
    StringBuilder description = new StringBuilder();
    if (focusedNode != null) {
        description.append(NLS.bind(Messages.focusTargetIndicator, focusedNode.getNonqualifiedName())).append(NLS.bind(Messages.threadIndicator, focusedNode.getThread()));
    }
    setContentDescription(description.toString());
}
Also used : ICallTreeNode(org.talend.designer.runtime.visualization.internal.core.cpu.ICallTreeNode)

Example 7 with ICallTreeNode

use of org.talend.designer.runtime.visualization.internal.core.cpu.ICallTreeNode 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());
}
Also used : IMethodNode(org.talend.designer.runtime.visualization.internal.core.cpu.IMethodNode) ICallTreeNode(org.talend.designer.runtime.visualization.internal.core.cpu.ICallTreeNode) AbstractFilteredTree(org.talend.designer.runtime.visualization.internal.ui.properties.cpu.AbstractFilteredTree) ViewerType(org.talend.designer.runtime.visualization.internal.ui.properties.cpu.AbstractFilteredTree.ViewerType)

Aggregations

ICallTreeNode (org.talend.designer.runtime.visualization.internal.core.cpu.ICallTreeNode)7 ICpuModel (org.talend.designer.runtime.visualization.internal.core.cpu.ICpuModel)4 IMethodNode (org.talend.designer.runtime.visualization.internal.core.cpu.IMethodNode)2 TreeSelection (org.eclipse.jface.viewers.TreeSelection)1 IThreadNode (org.talend.designer.runtime.visualization.internal.core.cpu.IThreadNode)1 AbstractFilteredTree (org.talend.designer.runtime.visualization.internal.ui.properties.cpu.AbstractFilteredTree)1 ViewerType (org.talend.designer.runtime.visualization.internal.ui.properties.cpu.AbstractFilteredTree.ViewerType)1