Search in sources :

Example 1 with TimeStampNode

use of org.eclipse.titan.log.viewer.views.msc.ui.core.TimeStampNode in project titan.EclipsePlug-ins by eclipse.

the class MSCModel method addEnqueued.

private MSCNode[] addEnqueued(final String ref, final String target, final String name, final String time, final int occurrence) {
    Enqueued message = new Enqueued();
    Lifeline source = this.lifelines.get(ref);
    Lifeline dest = this.lifelines.get(target);
    if ((source == null) || (dest == null)) {
        return new MSCNode[] {};
    }
    source.setCurrentEventOccurrence(occurrence);
    dest.setCurrentEventOccurrence(occurrence);
    message.setStartLifeline(source);
    message.setEndLifeline(dest);
    message.setName(name);
    return new MSCNode[] { message, new TimeStampNode(occurrence, time) };
}
Also used : TimeStampNode(org.eclipse.titan.log.viewer.views.msc.ui.core.TimeStampNode) Lifeline(org.eclipse.titan.log.viewer.views.msc.ui.core.Lifeline) MSCNode(org.eclipse.titan.log.viewer.views.msc.ui.core.MSCNode) Enqueued(org.eclipse.titan.log.viewer.views.msc.ui.core.Enqueued)

Example 2 with TimeStampNode

use of org.eclipse.titan.log.viewer.views.msc.ui.core.TimeStampNode in project titan.EclipsePlug-ins by eclipse.

the class MSCModel method addFunctionNode.

private MSCNode[] addFunctionNode(FunctionNode function, String ref, String target, String name, String time, int occurrence) {
    Lifeline source = this.lifelines.get(ref);
    Lifeline destination = this.lifelines.get(target);
    if ((source == null) || (destination == null)) {
        return new MSCNode[] {};
    }
    source.setCurrentEventOccurrence(occurrence);
    destination.setCurrentEventOccurrence(occurrence);
    function.setStartLifeline(source);
    function.setEndLifeline(destination);
    function.setName(name);
    // Create and add Time Stamp
    return new MSCNode[] { function, new TimeStampNode(occurrence, time) };
}
Also used : TimeStampNode(org.eclipse.titan.log.viewer.views.msc.ui.core.TimeStampNode) Lifeline(org.eclipse.titan.log.viewer.views.msc.ui.core.Lifeline) MSCNode(org.eclipse.titan.log.viewer.views.msc.ui.core.MSCNode)

Example 3 with TimeStampNode

use of org.eclipse.titan.log.viewer.views.msc.ui.core.TimeStampNode in project titan.EclipsePlug-ins by eclipse.

the class MSCModel method addPortEventNode.

private MSCNode[] addPortEventNode(PortEventNode portEventNode, String ref, String target, String time, int occurrence) {
    Lifeline source = this.lifelines.get(ref);
    Lifeline destination = this.lifelines.get(target);
    if ((source == null) || (destination == null)) {
        return new MSCNode[] {};
    }
    source.setCurrentEventOccurrence(occurrence);
    destination.setCurrentEventOccurrence(occurrence);
    portEventNode.setStartLifeline(source);
    portEventNode.setEndLifeline(destination);
    // Create and add Time Stamp
    return new MSCNode[] { portEventNode, new TimeStampNode(occurrence, time) };
}
Also used : TimeStampNode(org.eclipse.titan.log.viewer.views.msc.ui.core.TimeStampNode) Lifeline(org.eclipse.titan.log.viewer.views.msc.ui.core.Lifeline) MSCNode(org.eclipse.titan.log.viewer.views.msc.ui.core.MSCNode)

Example 4 with TimeStampNode

use of org.eclipse.titan.log.viewer.views.msc.ui.core.TimeStampNode in project titan.EclipsePlug-ins by eclipse.

the class MSCModel method addSetVerdict.

private MSCNode[] addSetVerdict(final String ref, final String name, final String time, final int occurrence) {
    MSCNode[] temp = new MSCNode[2];
    if ((ref == null) || (ref.length() == 0)) {
        SetverdictUnknown setverdictUnknown = new SetverdictUnknown(occurrence, name);
        setverdictUnknown.setName(name);
        temp[0] = setverdictUnknown;
    } else {
        // Get life line
        Lifeline tmpLifeline = this.lifelines.get(ref);
        if (tmpLifeline == null) {
            return new MSCNode[] {};
        }
        SetverdictComp setverdictComp = new SetverdictComp(occurrence, tmpLifeline, name);
        setverdictComp.setName(name);
        temp[0] = setverdictComp;
    }
    // Create and add Time Stamp
    temp[1] = new TimeStampNode(occurrence, time);
    return temp;
}
Also used : TimeStampNode(org.eclipse.titan.log.viewer.views.msc.ui.core.TimeStampNode) SetverdictUnknown(org.eclipse.titan.log.viewer.views.msc.ui.core.SetverdictUnknown) Lifeline(org.eclipse.titan.log.viewer.views.msc.ui.core.Lifeline) MSCNode(org.eclipse.titan.log.viewer.views.msc.ui.core.MSCNode) SetverdictComp(org.eclipse.titan.log.viewer.views.msc.ui.core.SetverdictComp)

Example 5 with TimeStampNode

use of org.eclipse.titan.log.viewer.views.msc.ui.core.TimeStampNode in project titan.EclipsePlug-ins by eclipse.

the class MSCModel method terminateComponent.

private MSCNode[] terminateComponent(final String ref, final String time, final int occurrence) {
    // Get life line
    Lifeline tmpLifeline = this.lifelines.get(ref);
    if (tmpLifeline == null) {
        return new MSCNode[] {};
    }
    // Get name
    String name = getComponentNameFromReference(ref);
    if (!name.contentEquals(this.sutName) && !name.contentEquals(MSCConstants.MTC_NAME) && !name.contentEquals(ref)) {
        // $NON-NLS-1$ //$NON-NLS-2$
        name = name + " (" + ref + ")";
    }
    // Create and add stop
    String verdict = getComponentVerdictFromReference(ref);
    ComponentTermination stop = new ComponentTermination(occurrence, tmpLifeline, verdict);
    stop.setName(name);
    tmpLifeline.setStop(stop);
    // Create and add Time Stamp
    return new MSCNode[] { stop, new TimeStampNode(occurrence, time) };
}
Also used : TimeStampNode(org.eclipse.titan.log.viewer.views.msc.ui.core.TimeStampNode) Lifeline(org.eclipse.titan.log.viewer.views.msc.ui.core.Lifeline) MSCNode(org.eclipse.titan.log.viewer.views.msc.ui.core.MSCNode) ComponentTermination(org.eclipse.titan.log.viewer.views.msc.ui.core.ComponentTermination)

Aggregations

MSCNode (org.eclipse.titan.log.viewer.views.msc.ui.core.MSCNode)10 TimeStampNode (org.eclipse.titan.log.viewer.views.msc.ui.core.TimeStampNode)10 Lifeline (org.eclipse.titan.log.viewer.views.msc.ui.core.Lifeline)7 ComponentCreation (org.eclipse.titan.log.viewer.views.msc.ui.core.ComponentCreation)1 ComponentTermination (org.eclipse.titan.log.viewer.views.msc.ui.core.ComponentTermination)1 Enqueued (org.eclipse.titan.log.viewer.views.msc.ui.core.Enqueued)1 SetverdictComp (org.eclipse.titan.log.viewer.views.msc.ui.core.SetverdictComp)1 SetverdictUnknown (org.eclipse.titan.log.viewer.views.msc.ui.core.SetverdictUnknown)1 SilentEvent (org.eclipse.titan.log.viewer.views.msc.ui.core.SilentEvent)1 TestCaseEnd (org.eclipse.titan.log.viewer.views.msc.ui.core.TestCaseEnd)1 TestCaseStart (org.eclipse.titan.log.viewer.views.msc.ui.core.TestCaseStart)1