Package org.erlide.cover.views.model

Examples of org.erlide.cover.views.model.TestTreeObject


*/
public class TestViewLabelProvider extends LabelProvider {

    @Override
    public Image getImage(final Object element) {
        final TestTreeObject node = (TestTreeObject) element;
        if (node.getType() == TestTreeObject.DESCR) {
            return null;
        }
        return drawType(node.getType());
    }
View Full Code Here


        return drawType(node.getType());
    }

    @Override
    public String getText(final Object element) {
        final TestTreeObject node = (TestTreeObject) element;
        return node.getDescription();
    }
View Full Code Here

        final String group = msg.elementAt(1).toString();
        final String description = msg.elementAt(2).toString();

        if (group != null && !group.equals("[]") && !group.equals("undefined")) {

            TestTreeObject node = model.findNode(description);
            TestTreeObject parent = model.findNode(group);
            if (parent == null) {
                parent = new TestTreeObject(group, TestTreeObject.WARN);
                model.addChildren(parent);
            }
            if (node != null) {
                model.removeChild(node);
            } else {
                node = new TestTreeObject(description, TestTreeObject.WARN);
            }
            parent.addChild(node);

        } else {
            final TestTreeObject node = model.findNode(description);
            if (node == null) {
                model.addChildren(new TestTreeObject(description, TestTreeObject.WARN));
            }
        }
    }
View Full Code Here

        final String description = msg.elementAt(1).toString();
        final String reason = msg.elementAt(2).toString();

        if (description != null && !description.equals("[]")
                && !description.equals("undefined")) {
            final TestTreeObject node = model.findNode(description);
            node.setDescription(String.format("%s ... canceled: %s",
                    node.getDescription(), reason));
        } else {
            model.addChildren(new TestTreeObject(String.format("canceled: %s", reason),
                    TestTreeObject.FAILOURE));
        }

    }
View Full Code Here

        final OtpErlangTuple source = (OtpErlangTuple) msg.elementAt(5);
        final String module = source.elementAt(0).toString();
        final String function = source.elementAt(1).toString();
        final int arity = Integer.parseInt(source.elementAt(2).toString());

        final TestTreeObject node = new TestTreeObject(makeTestShortDescription(module,
                function, arity), TestTreeObject.FAILOURE);

        node.setDescription(makeTestFullDescription(module, function, arity, description,
                line, String.format("canceled: %s", reason)));

        model.findNode(group).addChild(node);

    }
View Full Code Here

            reason = String.format("No such function: %s:%s/%s", func.elementAt(1)
                    .toString(), func.elementAt(2).toString(), func.elementAt(3)
                    .toString());
        }

        final TestTreeObject node = new TestTreeObject(makeTestShortDescription(module,
                function, arity), TestTreeObject.FAILOURE);

        node.setDescription(makeTestFullDescription(module, function, arity, description,
                line, String.format("skipped: %s", reason)));

        model.findNode(group).addChild(node);

    }
View Full Code Here

        final String function = source.elementAt(1).toString();
        final int arity = Integer.parseInt(source.elementAt(2).toString());

        final String exception = msg.elementAt(5).toString();

        final TestTreeObject node = new TestTreeObject(makeTestShortDescription(module,
                function, arity), TestTreeObject.FAILOURE);

        node.setDescription(makeTestFullDescription(module, function, arity, description,
                line, "error"));
        node.addChild(new TestTreeObject(exception, TestTreeObject.DESCR));

        model.findNode(group).addChild(node);

    }
View Full Code Here

    private void handle_group(final OtpErlangTuple msg) {

        final String description = msg.elementAt(1).toString();
        final int time = Integer.parseInt(msg.elementAt(2).toString());

        final TestTreeObject node = model.findNode(description);
        node.setTime(time);
        node.updateType();

    }
View Full Code Here

        final OtpErlangTuple source = (OtpErlangTuple) msg.elementAt(4);
        final String module = source.elementAt(0).toString();
        final String function = source.elementAt(1).toString();
        final int arity = Integer.parseInt(source.elementAt(2).toString());

        final TestTreeObject node = new TestTreeObject(makeTestShortDescription(module,
                function, arity), TestTreeObject.SUCCESS);

        node.setDescription(makeTestFullDescription(module, function, arity, description,
                line, "ok"));
        node.setTime(time);

        model.findNode(group).addChild(node);

    }
View Full Code Here

TOP

Related Classes of org.erlide.cover.views.model.TestTreeObject

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.