Search in sources :

Example 1 with SilentEvent

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

the class MSCModel method addSilentEvent.

private MSCNode[] addSilentEvent(final String ref, final String name, final String type, final String time, final int occurrence) {
    String silentEventType = null;
    Set<String> types = Constants.EVENT_CATEGORIES.keySet();
    for (String currType : types) {
        if (type.startsWith(currType)) {
            silentEventType = currType;
            break;
        }
    }
    if (silentEventType == null) {
        return new MSCNode[] {};
    }
    // Get life line
    Lifeline tmpLifeline = this.lifelines.get(ref);
    if (tmpLifeline == null) {
        return new MSCNode[] {};
    }
    // Create and add silent event
    SilentEvent silentEvent = new SilentEvent(occurrence, tmpLifeline, type);
    // $NON-NLS-1$
    silentEvent.setName(type + "\n" + name);
    // Create and add Time Stamp
    return new MSCNode[] { silentEvent, 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) SilentEvent(org.eclipse.titan.log.viewer.views.msc.ui.core.SilentEvent)

Aggregations

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