Search in sources :

Example 1 with ComponentTermination

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

the class MSCModel method terminateLifeLineComponent.

private void terminateLifeLineComponent(final String ref, final String time, final int occurrence) {
    // Get life line
    Lifeline tmpLifeline = this.lifelines.get(ref);
    if (tmpLifeline == null) {
        return;
    }
    // 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);
}
Also used : Lifeline(org.eclipse.titan.log.viewer.views.msc.ui.core.Lifeline) ComponentTermination(org.eclipse.titan.log.viewer.views.msc.ui.core.ComponentTermination)

Example 2 with ComponentTermination

use of org.eclipse.titan.log.viewer.views.msc.ui.core.ComponentTermination 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

ComponentTermination (org.eclipse.titan.log.viewer.views.msc.ui.core.ComponentTermination)2 Lifeline (org.eclipse.titan.log.viewer.views.msc.ui.core.Lifeline)2 MSCNode (org.eclipse.titan.log.viewer.views.msc.ui.core.MSCNode)1 TimeStampNode (org.eclipse.titan.log.viewer.views.msc.ui.core.TimeStampNode)1