Search in sources :

Example 1 with ComponentCreation

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

the class MSCModel method createLifelineAndHeaderComponent.

private void createLifelineAndHeaderComponent(final String ref, final String time, final Lifeline lifeline, final int occurrence) {
    if (this.lifelines.containsKey(ref)) {
        return;
    }
    // Add life line
    this.lifelines.put(ref, lifeline);
    // Get and set name
    String name = getComponentNameFromReference(ref);
    // Set name without ref so that the visual order works
    lifeline.setName(name);
    this.frame.addLifeLine(lifeline);
    // Create and add Header
    LifelineHeader lifeLineHeader = new LifelineHeader(lifeline, this.frame);
    if (!name.contentEquals(this.sutName) && !name.contentEquals(MSCConstants.MTC_NAME) && !name.contentEquals(ref)) {
        // $NON-NLS-1$ //$NON-NLS-2$
        name = name + " (" + ref + ")";
    }
    lifeLineHeader.setName(name);
    this.frame.addLifeLineHeader(lifeLineHeader);
    // Create and add Start
    lifeline.setCurrentEventOccurrence(occurrence);
    ComponentCreation start = new ComponentCreation(occurrence, lifeline);
    start.setName(name);
    lifeline.setStart(start);
}
Also used : LifelineHeader(org.eclipse.titan.log.viewer.views.msc.ui.core.LifelineHeader) ComponentCreation(org.eclipse.titan.log.viewer.views.msc.ui.core.ComponentCreation)

Example 2 with ComponentCreation

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

the class MSCModel method createComponent.

private MSCNode[] createComponent(final String ref, final String time, final Lifeline lifeline, final int occurrence) {
    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 + ")";
    }
    ComponentCreation start = new ComponentCreation(occurrence, lifeline);
    start.setName(name);
    return new MSCNode[] { start, new TimeStampNode(occurrence, time) };
}
Also used : TimeStampNode(org.eclipse.titan.log.viewer.views.msc.ui.core.TimeStampNode) ComponentCreation(org.eclipse.titan.log.viewer.views.msc.ui.core.ComponentCreation) MSCNode(org.eclipse.titan.log.viewer.views.msc.ui.core.MSCNode)

Aggregations

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