use of org.eclipse.titan.log.viewer.views.msc.ui.core.Lifeline 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;
}
use of org.eclipse.titan.log.viewer.views.msc.ui.core.Lifeline 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) };
}
use of org.eclipse.titan.log.viewer.views.msc.ui.core.Lifeline 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) };
}
use of org.eclipse.titan.log.viewer.views.msc.ui.core.Lifeline in project titan.EclipsePlug-ins by eclipse.
the class MSCModel method addSignal.
private MSCNode[] addSignal(final Signal signal, final String ref, final String target, final String name, final String time, final int occurrence) {
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);
signal.setStartLifeline(source);
signal.setEndLifeline(dest);
signal.setName(name);
// Create and add Time Stamp
return new MSCNode[] { signal, new TimeStampNode(occurrence, time) };
}
Aggregations