Search in sources :

Example 11 with TreeNode

use of org.erlide.tracing.core.mvc.model.treenodes.TreeNode in project erlide_eclipse by erlang.

the class TraceDataHandler method processLinkTrace.

private ITreeNode processLinkTrace(final String label, final Images image, final OtpErlangTuple tuple) {
    final StringBuilder labelBuilder = new StringBuilder(label).append(": ");
    final ITreeNode process1Node = createProcessNode("process 1: ", tuple.elementAt(TraceDataHandler.INDEX_PROCESS));
    process1Node.setImage(Activator.getImage(Images.PROCESS_NODE));
    labelBuilder.append(lastProcessDescription).append("->");
    final ITreeNode process2Node = createProcessNode("process 2: ", tuple.elementAt(TraceDataHandler.INDEX_PROCESS2));
    process2Node.setImage(Activator.getImage(Images.PROCESS_NODE));
    labelBuilder.append(lastProcessDescription);
    final TreeNode node = new TreeNode(createNodeLabel(labelBuilder.toString()));
    node.setImage(Activator.getImage(image));
    node.addChildren(process1Node, process2Node);
    return node;
}
Also used : ITreeNode(org.erlide.tracing.core.mvc.model.treenodes.ITreeNode) TreeNode(org.erlide.tracing.core.mvc.model.treenodes.TreeNode) ITreeNode(org.erlide.tracing.core.mvc.model.treenodes.ITreeNode)

Example 12 with TreeNode

use of org.erlide.tracing.core.mvc.model.treenodes.TreeNode in project erlide_eclipse by erlang.

the class TraceDataHandler method processExitTrace.

private ITreeNode processExitTrace(final String label, final OtpErlangTuple tuple) {
    final StringBuilder labelBuilder = new StringBuilder(label).append(": ");
    final ITreeNode processNode = createProcessNode("process: ", tuple.elementAt(TraceDataHandler.INDEX_PROCESS));
    processNode.setImage(Activator.getImage(Images.PROCESS_NODE));
    labelBuilder.append(lastProcessDescription);
    final ITreeNode reasonNode = new TreeNode("reason: " + tuple.elementAt(TraceDataHandler.INDEX_REASON).toString(), Activator.getImage(Images.INFO_NODE));
    final TreeNode node = new TreeNode(createNodeLabel(labelBuilder.toString()));
    node.setImage(Activator.getDefault().getImageRegistry().get(Images.EXIT_NODE.toString()));
    node.addChildren(processNode, reasonNode);
    return node;
}
Also used : ITreeNode(org.erlide.tracing.core.mvc.model.treenodes.ITreeNode) TreeNode(org.erlide.tracing.core.mvc.model.treenodes.TreeNode) ITreeNode(org.erlide.tracing.core.mvc.model.treenodes.ITreeNode)

Example 13 with TreeNode

use of org.erlide.tracing.core.mvc.model.treenodes.TreeNode in project erlide_eclipse by erlang.

the class TraceDataHandler method processDropTrace.

// functions creating nodes
private ITreeNode processDropTrace(final OtpErlangTuple tuple) {
    final OtpErlangLong amount = (OtpErlangLong) tuple.elementAt(1);
    final ITreeNode node = new TreeNode("Dropped traces: " + amount.longValue(), Activator.getImage(Images.DROP_NODE));
    return node;
}
Also used : OtpErlangLong(com.ericsson.otp.erlang.OtpErlangLong) ITreeNode(org.erlide.tracing.core.mvc.model.treenodes.ITreeNode) TreeNode(org.erlide.tracing.core.mvc.model.treenodes.TreeNode) ITreeNode(org.erlide.tracing.core.mvc.model.treenodes.ITreeNode)

Aggregations

ITreeNode (org.erlide.tracing.core.mvc.model.treenodes.ITreeNode)13 TreeNode (org.erlide.tracing.core.mvc.model.treenodes.TreeNode)13 OtpErlangObject (com.ericsson.otp.erlang.OtpErlangObject)4 OtpErlangTuple (com.ericsson.otp.erlang.OtpErlangTuple)4 OtpErlangList (com.ericsson.otp.erlang.OtpErlangList)2 OtpErlangLong (com.ericsson.otp.erlang.OtpErlangLong)2 OtpErlangAtom (com.ericsson.otp.erlang.OtpErlangAtom)1 OtpErlangInt (com.ericsson.otp.erlang.OtpErlangInt)1 OtpErlangPid (com.ericsson.otp.erlang.OtpErlangPid)1 OtpErlangRangeException (com.ericsson.otp.erlang.OtpErlangRangeException)1 FunctionNode (org.erlide.tracing.core.mvc.model.treenodes.FunctionNode)1 ModuleNode (org.erlide.tracing.core.mvc.model.treenodes.ModuleNode)1