/*******************************************************************************
- * Copyright (c) 2015 Ericsson
+ * Copyright (c) 2015, 2016 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
import java.util.HashSet;
import java.util.Set;
+import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.tracecompass.tmf.core.event.ITmfEventField;
import org.eclipse.tracecompass.tmf.core.event.TmfEvent;
import org.eclipse.tracecompass.tmf.core.event.TmfEventField;
private static final String CATEGORY_TXT = "txt";
private static final String CATEGORY_XML = "xml";
- private static final String DEFINITION_NAME_TXT = "name txt";
- private static final String DEFINITION_NAME_XML = "name xml";
+ private static final @NonNull String DEFINITION_NAME_TXT = "name txt";
+ private static final @NonNull String DEFINITION_NAME_XML = "name xml";
private static final String SEP = ":";
private static final String CUSTOM_TXT_TRACE_TYPE_PREFIX = "custom.txt.trace" + SEP;
private static final String CUSTOM_XML_TRACE_TYPE_PREFIX = "custom.xml.trace" + SEP;
}
private static CustomTxtTrace fCustomTxtTrace = new CustomTxtTrace(fCustomTxtDefinition);
private static CustomXmlTrace fCustomXmlTrace = new CustomXmlTrace(fCustomXmlDefinition);
- private static TmfEventType fCustomTxtEventType = new CustomTxtEventType(fCustomTxtDefinition);
- private static TmfEventType fCustomXmlEventType = new CustomXmlEventType(fCustomXmlDefinition);
+ private static TmfEventType fCustomTxtEventType = new CustomTxtEventType(DEFINITION_NAME_TXT, null);
+ private static TmfEventType fCustomXmlEventType = new CustomXmlEventType(DEFINITION_NAME_XML, null);
private ITmfEventField fContent = new TmfEventField(ITmfEventField.ROOT_FIELD_ID, null, null);
private TmfEvent fEvent1 = new TmfEvent(TRACE, 0, TmfTimestamp.fromNanos(1), EVENT_TYPE, fContent);
private TmfEvent fEvent2 = new CustomTxtEvent(fCustomTxtDefinition, fCustomTxtTrace, TmfTimestamp.fromNanos(2), fCustomTxtEventType);
/*******************************************************************************
- * Copyright (c) 2010, 2014 Ericsson
+ * Copyright (c) 2010, 2016 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
return customEventType;
}
+ @Override
+ public String getName() {
+ if (fData != null) {
+ processData();
+ }
+ return super.getName();
+ }
+
// ------------------------------------------------------------------------
// Setters
// ------------------------------------------------------------------------
setTimestamp(TmfTimestamp.ZERO);
}
+ // Update the custom event type of this event if set
+ String eventName = fData.get(CustomTraceDefinition.TAG_EVENT_TYPE);
+ ITmfEventType type = getType();
+ if (eventName != null && type instanceof CustomEventType) {
+ ((CustomEventType) type).setName(eventName);
+ }
+
int i = 0;
fColumnData = new TmfEventField[fDefinition.outputs.size()];
for (OutputColumn outputColumn : fDefinition.outputs) {
/*******************************************************************************
- * Copyright (c) 2010, 2014 Ericsson
+ * Copyright (c) 2010, 2016 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
+import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.tracecompass.tmf.core.event.ITmfEventField;
import org.eclipse.tracecompass.tmf.core.event.TmfEventField;
import org.eclipse.tracecompass.tmf.core.event.TmfEventType;
*/
public abstract class CustomEventType extends TmfEventType {
+ private static final @NonNull String EMPTY = ""; //$NON-NLS-1$
+ private @NonNull String fEventName;
+
/**
* Constructor
*
* @param definition
* Trace definition
+ * @deprecated Use {@link #CustomEventType(String, ITmfEventField)} instead.
*/
+ @Deprecated
public CustomEventType(CustomTraceDefinition definition) {
- super(checkNotNull(definition.definitionName), getRootField(definition));
+ super(EMPTY, getRootField(definition));
+ fEventName = checkNotNull(definition.definitionName);
+ }
+
+ /**
+ * Constructor
+ *
+ * @param eventName
+ * the event name
+ * @param root
+ * the root field
+ * @since 2.1
+ */
+ public CustomEventType(@NonNull String eventName, ITmfEventField root) {
+ super(EMPTY, root);
+ fEventName = eventName;
+ }
+
+ @Override
+ public @NonNull String getName() {
+ return fEventName;
+ }
+
+ /**
+ * Set the event name.
+ *
+ * @param eventName
+ * the event name
+ * @since 2.1
+ */
+ public void setName(@NonNull String eventName) {
+ fEventName = eventName;
}
- private static ITmfEventField getRootField(CustomTraceDefinition definition) {
+ static ITmfEventField getRootField(CustomTraceDefinition definition) {
ITmfEventField[] fields = new ITmfEventField[definition.outputs.size()];
for (int i = 0; i < fields.length; i++) {
fields[i] = new TmfEventField(definition.outputs.get(i).name, null, null);
return rootField;
}
+ @Override
+ public int hashCode() {
+ int result = super.hashCode();
+ result += fEventName.hashCode();
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (super.equals(obj) && (obj.getClass().equals(getClass()))) {
+ return fEventName.equals(((CustomEventType) obj).fEventName);
+ }
+ return false;
+ }
+
+ @Override
+ public String toString() {
+ return fEventName;
+ }
}
/*******************************************************************************
- * Copyright (c) 2010, 2015 Ericsson
+ * Copyright (c) 2010, 2016 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
/** "Other" tag */
public static final String TAG_OTHER = Messages.CustomTraceDefinition_otherTag;
+ /** Event type tag
+ * @since 2.1*/
+ public static final String TAG_EVENT_TYPE = Messages.CustomTraceDefinition_eventTypeTag;
+
/** Category of this trace definition */
public String categoryName;
/*******************************************************************************
- * Copyright (c) 2010, 2014 Ericsson
+ * Copyright (c) 2010, 2016 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
*/
public CustomTxtEvent(CustomTxtTraceDefinition definition) {
super(definition);
- setType(new CustomTxtEventType(definition));
}
/**
/*******************************************************************************
- * Copyright (c) 2010, 2014 Ericsson
+ * Copyright (c) 2010, 2016 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
package org.eclipse.tracecompass.tmf.core.parsers.custom;
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.tracecompass.tmf.core.event.ITmfEventField;
+
/**
* Event type for custom text traces.
*
*
* @param definition
* Custom text trace definition
+ * @deprecated Use {@link #CustomTxtEventType(String, ITmfEventField)}
+ * instead.
*/
+ @Deprecated
public CustomTxtEventType(CustomTxtTraceDefinition definition) {
super(definition);
}
+ /**
+ * Constructor
+ *
+ * @param eventName
+ * the event name
+ * @param root
+ * the root field
+ * @since 2.1
+ */
+ public CustomTxtEventType(@NonNull String eventName, ITmfEventField root) {
+ super(eventName, root);
+ }
+
}
/*******************************************************************************
- * Copyright (c) 2010, 2015 Ericsson
+ * Copyright (c) 2010, 2016 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
import org.eclipse.tracecompass.internal.tmf.core.Activator;
import org.eclipse.tracecompass.internal.tmf.core.parsers.custom.CustomEventAspects;
import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
+import org.eclipse.tracecompass.tmf.core.event.ITmfEventField;
import org.eclipse.tracecompass.tmf.core.event.aspect.ITmfEventAspect;
import org.eclipse.tracecompass.tmf.core.exceptions.TmfTraceException;
import org.eclipse.tracecompass.tmf.core.io.BufferedRandomAccessFile;
private static final int MAX_CONFIDENCE = 100;
private final CustomTxtTraceDefinition fDefinition;
- private final CustomTxtEventType fEventType;
+ private final ITmfEventField fRootField;
private BufferedRandomAccessFile fFile;
- private final String fTraceTypeId;
+ private final @NonNull String fTraceTypeId;
private static final char SEPARATOR = ':';
private static final String CUSTOM_TXT_TRACE_TYPE_PREFIX = "custom.txt.trace" + SEPARATOR; //$NON-NLS-1$
*/
public CustomTxtTrace(final CustomTxtTraceDefinition definition) {
fDefinition = definition;
- fEventType = new CustomTxtEventType(fDefinition);
+ fRootField = CustomEventType.getRootField(definition);
fTraceTypeId = buildTraceTypeId(definition.categoryName, definition.definitionName);
setCacheSize(DEFAULT_CACHE_SIZE);
}
* @return The first event
*/
public CustomTxtEvent parseFirstLine(final CustomTxtTraceContext context) {
- final CustomTxtEvent event = new CustomTxtEvent(fDefinition, this, TmfTimestamp.ZERO, fEventType);
+ CustomTxtEventType eventType = new CustomTxtEventType(checkNotNull(fDefinition.definitionName), fRootField);
+ final CustomTxtEvent event = new CustomTxtEvent(fDefinition, this, TmfTimestamp.ZERO, eventType);
event.processGroups(context.inputLine, context.firstLineMatcher);
event.setContent(new CustomEventContent(event, new StringBuffer(context.firstLine)));
return event;
/*******************************************************************************
- * Copyright (c) 2010, 2014 Ericsson
+ * Copyright (c) 2010, 2016 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
*/
public CustomXmlEvent(CustomXmlTraceDefinition definition) {
super(definition);
- setType(new CustomXmlEventType(definition));
}
/**
/*******************************************************************************
- * Copyright (c) 2010, 2014 Ericsson
+ * Copyright (c) 2010, 2016 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
package org.eclipse.tracecompass.tmf.core.parsers.custom;
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.tracecompass.tmf.core.event.ITmfEventField;
+
/**
* Event type class for custom XML traces.
*
*
* @param definition
* Trace definition
+ * @deprecated Use {@link #CustomXmlEventType(String, ITmfEventField)}
+ * instead.
*/
+ @Deprecated
public CustomXmlEventType(CustomXmlTraceDefinition definition) {
super(definition);
}
+ /**
+ * Constructor
+ *
+ * @param eventName
+ * the event name
+ * @param root
+ * the root field
+ * @since 2.1
+ */
+ public CustomXmlEventType(@NonNull String eventName, ITmfEventField root) {
+ super(eventName, root);
+ }
+
}
/*******************************************************************************
- * Copyright (c) 2010, 2015 Ericsson
+ * Copyright (c) 2010, 2016 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
package org.eclipse.tracecompass.tmf.core.parsers.custom;
+import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
+
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
import org.eclipse.tracecompass.internal.tmf.core.Activator;
import org.eclipse.tracecompass.internal.tmf.core.parsers.custom.CustomEventAspects;
import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
+import org.eclipse.tracecompass.tmf.core.event.ITmfEventField;
import org.eclipse.tracecompass.tmf.core.event.aspect.ITmfEventAspect;
import org.eclipse.tracecompass.tmf.core.exceptions.TmfTraceException;
import org.eclipse.tracecompass.tmf.core.io.BufferedRandomAccessFile;
private static final int CONFIDENCE = 100;
private final CustomXmlTraceDefinition fDefinition;
- private final CustomXmlEventType fEventType;
+ private final ITmfEventField fRootField;
private final CustomXmlInputElement fRecordInputElement;
private BufferedRandomAccessFile fFile;
- private final String fTraceTypeId;
+ private final @NonNull String fTraceTypeId;
private static final char SEPARATOR = ':';
private static final String CUSTOM_XML_TRACE_TYPE_PREFIX = "custom.xml.trace" + SEPARATOR; //$NON-NLS-1$
*/
public CustomXmlTrace(final CustomXmlTraceDefinition definition) {
fDefinition = definition;
- fEventType = new CustomXmlEventType(fDefinition);
+ fRootField = CustomEventType.getRootField(definition);
fRecordInputElement = getRecordInputElement(fDefinition.rootInputElement);
fTraceTypeId = buildTraceTypeId(definition.categoryName, definition.definitionName);
setCacheSize(DEFAULT_CACHE_SIZE);
* @return The extracted event
*/
public CustomXmlEvent extractEvent(final Element element, final CustomXmlInputElement inputElement) {
- final CustomXmlEvent event = new CustomXmlEvent(fDefinition, this, TmfTimestamp.ZERO, fEventType);
+ CustomXmlEventType eventType = new CustomXmlEventType(checkNotNull(fDefinition.definitionName), fRootField);
+ final CustomXmlEvent event = new CustomXmlEvent(fDefinition, this, TmfTimestamp.ZERO, eventType);
event.setContent(new CustomEventContent(event, new StringBuffer()));
parseElement(element, event, inputElement);
return event;
/*******************************************************************************
- * Copyright (c) 2013, 2014 Ericsson.
+ * Copyright (c) 2013, 2016 Ericsson.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
public static String CustomTrace_FileNotFound;
// TODO: These strings should not be externalized
+ /** @since 2.1 */
+ public static String CustomTraceDefinition_eventTypeTag;
public static String CustomTraceDefinition_messageTag;
public static String CustomTraceDefinition_otherTag;
public static String CustomTraceDefinition_timestampTag;
###############################################################################
-# Copyright (c) 2013, 2014 Ericsson
+# Copyright (c) 2013, 2016 Ericsson
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
CustomTrace_FileNotFound=File not found
+CustomTraceDefinition_eventTypeTag=Event type
CustomTraceDefinition_messageTag=Message
CustomTraceDefinition_otherTag=Other
CustomTraceDefinition_timestampTag=Time Stamp
@Test
public void testNew() throws FileNotFoundException, IOException {
File xmlFile = ResourcesPlugin.getWorkspace().getRoot().getLocation().append(".metadata/.plugins/org.eclipse.tracecompass.tmf.core/custom_txt_parsers.xml").toFile();
+ // Open the custom parsers dialog
SWTBotUtils.createProject(PROJECT_NAME);
- SWTBotView proejctExplorerBot = fBot.viewByTitle("Project Explorer");
- proejctExplorerBot.show();
- SWTBotTreeItem treeItem = proejctExplorerBot.bot().tree().getTreeItem(PROJECT_NAME);
+ SWTBotView projectExplorerBot = fBot.viewByTitle("Project Explorer");
+ projectExplorerBot.show();
+ SWTBotTreeItem treeItem = projectExplorerBot.bot().tree().getTreeItem(PROJECT_NAME);
treeItem.select();
treeItem.expand();
SWTBotTreeItem treeNode = null;
fBot.waitUntil(Conditions.shellIsActive(MANAGE_CUSTOM_PARSERS_SHELL_TITLE));
fBot.shell(MANAGE_CUSTOM_PARSERS_SHELL_TITLE).setFocus();
+ // Open the new custom txt parser dialog
fBot.button("New...").click();
fBot.waitUntil(Conditions.shellIsActive(CUSTOM_TEXT_PARSER_SHELL_TITLE));
+ // Setting header
fBot.textWithLabel("Category:").setText(CATEGORY_NAME);
fBot.textWithLabel("Trace type:").setText(TRACETYPE_NAME);
fBot.textWithLabel("Time Stamp format:").setText("ss");
+
+ // Fill Group 1 as time stamp
fBot.comboBox(1).setSelection("Time Stamp");
fBot.textWithLabel("format:").setText("ss");
+ // Click on the New group button
fBot.button(8).click();
+ // Add next line
fBot.button(2).click();
SWTBotTreeItem[] treeItems = fBot.tree().getAllItems();
SWTBotTreeItem eventLine[] = new SWTBotTreeItem[2];
}
assertNotNull(eventLine[0]);
assertNotNull(eventLine[1]);
+ // Set the regular expression for each event line
fBot.styledText().setText("12 Hello\nWorld\n23 Goodbye\ncruel world");
eventLine[0].select();
SWTBotUtils.waitForJobs();
fBot.textWithLabel("Regular expression:").setText("\\s*(\\d\\d)\\s(.*\\S)");
eventLine[1].select();
fBot.textWithLabel("Regular expression:").setText("([^0-9]*)");
+ // Click on the new group of root line 2
fBot.button(7).click();
fBot.comboBox("Set").setSelection("Append with |");
fBot.button("Highlight All").click();
fw.write(xmlContent);
fw.flush();
}
+ // Open the custom parsers dialog
SWTBotUtils.createProject(PROJECT_NAME);
SWTBotView proejctExplorerBot = fBot.viewByTitle("Project Explorer");
proejctExplorerBot.show();
assertNotNull(treeNode);
treeNode.contextMenu("Manage Custom Parsers...").click();
fBot.waitUntil(Conditions.shellIsActive(MANAGE_CUSTOM_PARSERS_SHELL_TITLE));
+ // Open the edition dialog for txt parser
fBot.shell(MANAGE_CUSTOM_PARSERS_SHELL_TITLE).setFocus();
fBot.list().select("Demo Category : Demo trace");
fBot.button("Edit...").click();
fBot.waitUntil(Conditions.shellIsActive(CUSTOM_TEXT_PARSER_SHELL_TITLE));
+ // update parser's data
fBot.textWithLabel("Category:").setText(CATEGORY_NAME);
fBot.textWithLabel("Trace type:").setText(TRACETYPE_NAME);
fBot.textWithLabel("Time Stamp format:").setText("ss");
+
+ // update time stamp format
fBot.comboBox(1).setSelection("Time Stamp");
fBot.textWithLabel("format:").setText("ss");
fBot.button(2).click();
inputGroup.tagLabel.setVisible(true);
inputGroup.tagText.setVisible(true);
inputGroup.tagText.addModifyListener(updateListener);
- } else if (inputData.name.equals(CustomTraceDefinition.TAG_MESSAGE)) {
+ } else if (inputData.name.equals(CustomTraceDefinition.TAG_EVENT_TYPE)) {
inputGroup.tagCombo.select(1);
- } else {
+ } else if (inputData.name.equals(CustomTraceDefinition.TAG_MESSAGE)) {
inputGroup.tagCombo.select(2);
+ } else {
+ inputGroup.tagCombo.select(3);
inputGroup.tagText.setText(inputData.name);
inputGroup.tagLabel.setText(Messages.CustomTxtParserInputWizardPage_name);
inputGroup.tagLabel.setVisible(true);
tagCombo = new Combo(tagComposite, SWT.DROP_DOWN | SWT.READ_ONLY);
tagCombo.setItems(new String[] { CustomTraceDefinition.TAG_TIMESTAMP,
+ CustomTraceDefinition.TAG_EVENT_TYPE,
CustomTraceDefinition.TAG_MESSAGE,
- CustomTraceDefinition.TAG_OTHER });
- tagCombo.select(1);
+ CustomTraceDefinition.TAG_OTHER});
+ tagCombo.select(2);
tagCombo.addSelectionListener(new SelectionListener() {
@Override
public void widgetDefaultSelected(SelectionEvent e) {
tagText.setVisible(true);
tagText.addModifyListener(updateListener);
break;
- case 1: // Message
+ case 1: // Event type
+ tagLabel.setVisible(false);
+ tagText.setVisible(false);
+ break;
+ case 2: // Message
tagLabel.setVisible(false);
tagText.setVisible(false);
break;
- case 2: // Other
+ case 3: // Other
tagLabel.setText(Messages.CustomTxtParserInputWizardPage_name);
tagLabel.setVisible(true);
tagText.setVisible(true);
tagText.addModifyListener(updateListener);
break;
- case 3: // Continue
- tagLabel.setVisible(false);
- tagText.setVisible(false);
- break;
default:
break;
}
tagCombo = new Combo(tagComposite, SWT.DROP_DOWN | SWT.READ_ONLY);
tagCombo.setItems(new String[] { CustomXmlTraceDefinition.TAG_IGNORE, CustomTraceDefinition.TAG_TIMESTAMP,
- CustomTraceDefinition.TAG_MESSAGE, CustomTraceDefinition.TAG_OTHER });
+ CustomTraceDefinition.TAG_EVENT_TYPE, CustomTraceDefinition.TAG_MESSAGE, CustomTraceDefinition.TAG_OTHER });
tagCombo.setVisibleItemCount(tagCombo.getItemCount());
tagCombo.addSelectionListener(new SelectionListener() {
@Override
tagText.addModifyListener(updateListener);
actionCombo.setVisible(true);
break;
- case 2: // Message
+ case 2: // Event type
tagLabel.setVisible(false);
tagText.setVisible(false);
actionCombo.setVisible(true);
break;
- case 3: // Other
+ case 3: // Message
+ tagLabel.setVisible(false);
+ tagText.setVisible(false);
+ actionCombo.setVisible(true);
+ break;
+ case 4: // Other
tagLabel.setText(Messages.CustomXmlParserInputWizardPage_tagName);
tagLabel.setVisible(true);
if (tagText.getText().trim().length() == 0) {
tagLabel.setText(Messages.CustomXmlParserInputWizardPage_format);
tagText.setText(inputElement.getInputFormat());
tagText.addModifyListener(updateListener);
- } else if (inputElement.getInputName().equals(CustomTraceDefinition.TAG_MESSAGE)) {
+ } else if (inputElement.getInputName().equals(CustomTraceDefinition.TAG_EVENT_TYPE)) {
tagCombo.select(2);
tagLabel.setVisible(false);
tagText.setVisible(false);
- } else {
+ } else if (inputElement.getInputName().equals(CustomTraceDefinition.TAG_MESSAGE)) {
tagCombo.select(3);
+ tagLabel.setVisible(false);
+ tagText.setVisible(false);
+ } else {
+ tagCombo.select(4);
tagLabel.setText(Messages.CustomXmlParserInputWizardPage_tagName);
tagText.setText(inputElement.getInputName());
tagText.addModifyListener(updateListener);
tagComposite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
tagCombo = new Combo(tagComposite, SWT.DROP_DOWN | SWT.READ_ONLY);
- tagCombo.setItems(new String[] { CustomTraceDefinition.TAG_TIMESTAMP, CustomTraceDefinition.TAG_MESSAGE,
- CustomTraceDefinition.TAG_OTHER });
- tagCombo.select(2); // Other
+ tagCombo.setItems(new String[] { CustomTraceDefinition.TAG_TIMESTAMP, CustomTraceDefinition.TAG_EVENT_TYPE,
+ CustomTraceDefinition.TAG_MESSAGE, CustomTraceDefinition.TAG_OTHER });
+ tagCombo.select(3); // Other
tagCombo.addSelectionListener(new SelectionListener() {
@Override
public void widgetDefaultSelected(SelectionEvent e) {
tagText.setVisible(true);
tagText.addModifyListener(updateListener);
break;
- case 1: // Message
+ case 1: // Event type
tagLabel.setVisible(false);
tagText.setVisible(false);
break;
- case 2: // Other
+ case 2: // Message
+ tagLabel.setVisible(false);
+ tagText.setVisible(false);
+ break;
+ case 3: // Other
tagLabel.setText(Messages.CustomXmlParserInputWizardPage_tagName);
tagLabel.setVisible(true);
if (tagText.getText().trim().length() == 0) {
tagLabel.setText(Messages.CustomXmlParserInputWizardPage_format);
tagText.setText(inputAttribute.getInputFormat());
tagText.addModifyListener(updateListener);
- } else if (inputAttribute.getInputName().equals(CustomTraceDefinition.TAG_MESSAGE)) {
+ } else if (inputAttribute.getInputName().equals(CustomTraceDefinition.TAG_EVENT_TYPE)) {
tagCombo.select(1);
tagLabel.setVisible(false);
tagText.setVisible(false);
- } else {
+ } else if (inputAttribute.getInputName().equals(CustomTraceDefinition.TAG_MESSAGE)) {
tagCombo.select(2);
+ tagLabel.setVisible(false);
+ tagText.setVisible(false);
+ } else {
+ tagCombo.select(3);
tagLabel.setText(Messages.CustomXmlParserInputWizardPage_tagName);
tagText.setText(inputAttribute.getInputName());
tagText.addModifyListener(updateListener);