public class CustomXmlTraceDefinition extends CustomTraceDefinition {
/** Ignore tag
- * @deprecated Use {@link Tag#IGNORE} instead. */
+ * @deprecated Use {@link org.eclipse.tracecompass.tmf.core.parsers.custom.CustomTraceDefinition.Tag#IGNORE} instead. */
@Deprecated
public static final String TAG_IGNORE = Messages.CustomXmlTraceDefinition_ignoreTag;
definitionElement.setAttribute(CATEGORY_ATTRIBUTE, categoryName);
definitionElement.setAttribute(NAME_ATTRIBUTE, definitionName);
- Element formatElement = doc.createElement(TIME_STAMP_OUTPUT_FORMAT_ELEMENT);
- definitionElement.appendChild(formatElement);
- formatElement.appendChild(doc.createTextNode(timeStampOutputFormat));
+ if (timeStampOutputFormat != null && !timeStampOutputFormat.isEmpty()) {
+ Element formatElement = doc.createElement(TIME_STAMP_OUTPUT_FORMAT_ELEMENT);
+ definitionElement.appendChild(formatElement);
+ formatElement.appendChild(doc.createTextNode(timeStampOutputFormat));
+ }
if (rootInputElement != null) {
definitionElement.appendChild(createInputElementElement(rootInputElement, doc));