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);
}
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) };
}
Aggregations