private static final String DEFAULT_TIMESTAMP_FORMAT = "yyyy-MM-dd HH:mm:ss.SSS"; //$NON-NLS-1$
private static final String TIMESTAMP_FORMAT_BUNDLE = "org.eclipse.tracecompass.doc.user"; //$NON-NLS-1$
private static final String TIMESTAMP_FORMAT_PATH = "reference/api/org/eclipse/tracecompass/tmf/core/timestamp/TmfTimestampFormat.html"; //$NON-NLS-1$
- private static final String PATTERN_URL = "http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html#sum"; //$NON-NLS-1$
+ private static final String PATTERN_URL = "http://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html#sum"; //$NON-NLS-1$
private static final Image LINE_IMAGE = Activator.getDefault().getImageFromPath("/icons/elcl16/line_icon.gif"); //$NON-NLS-1$
private static final Image ADD_IMAGE = Activator.getDefault().getImageFromPath("/icons/elcl16/add_button.gif"); //$NON-NLS-1$
private static final Image ADD_NEXT_IMAGE = Activator.getDefault().getImageFromPath("/icons/elcl16/addnext_button.gif"); //$NON-NLS-1$
CustomTxtTraceDefinition definition) {
super("CustomParserWizardPage"); //$NON-NLS-1$
if (definition == null) {
- setTitle(Messages.CustomTxtParserInputWizardPage_windowTitleNew);
+ setTitle(Messages.CustomTxtParserInputWizardPage_titleNew);
defaultDescription = Messages.CustomTxtParserInputWizardPage_descriptionNew;
} else {
- setTitle(Messages.CustomTxtParserInputWizardPage_windowTitleEdit);
+ setTitle(Messages.CustomTxtParserInputWizardPage_titleEdit);
defaultDescription = Messages.CustomTxtParserInputWizardPage_desccriptionEdit;
}
setDescription(defaultDescription);
StringBuilder sb = new StringBuilder();
String line = null;
while ((line = reader.readLine()) != null) {
- sb.append(line + "\n"); //$NON-NLS-1$
+ sb.append(line);
+ sb.append('\n');
}
return sb.toString();
} catch (CoreException e) {
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;
}