\r
public class CustomTxtParserInputWizardPage extends WizardPage {\r
\r
- private static final String DEFAULT_REGEX = "\\s*(.*\\S)";\r
- private static final String DEFAULT_TIMESTAMP_FORMAT = "yyyy-MM-dd HH:mm:ss.SSS";\r
- private static final String SIMPLE_DATE_FORMAT_URL = "http://java.sun.com/javase/6/docs/api/java/text/SimpleDateFormat.html#skip-navbar_top";\r
- private static final String PATTERN_URL = "http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html#sum";\r
- private static final Image lineImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/line_icon.gif");\r
- private static final Image addImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/add_button.gif");\r
- private static final Image addNextImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/addnext_button.gif");\r
- private static final Image addChildImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/addchild_button.gif");\r
- private static final Image deleteImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/delete_button.gif");\r
- private static final Image moveUpImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/moveup_button.gif");\r
- private static final Image moveDownImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/movedown_button.gif");\r
- private static final Image helpImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/help_button.gif");\r
+ private static final String DEFAULT_REGEX = "\\s*(.*\\S)"; //$NON-NLS-1$\r
+ private static final String DEFAULT_TIMESTAMP_FORMAT = "yyyy-MM-dd HH:mm:ss.SSS"; //$NON-NLS-1$\r
+ private static final String SIMPLE_DATE_FORMAT_URL = "http://java.sun.com/javase/6/docs/api/java/text/SimpleDateFormat.html#skip-navbar_top"; //$NON-NLS-1$\r
+ private static final String PATTERN_URL = "http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html#sum"; //$NON-NLS-1$\r
+ private static final Image lineImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/line_icon.gif"); //$NON-NLS-1$\r
+ private static final Image addImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/add_button.gif"); //$NON-NLS-1$\r
+ private static final Image addNextImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/addnext_button.gif"); //$NON-NLS-1$\r
+ private static final Image addChildImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/addchild_button.gif"); //$NON-NLS-1$\r
+ private static final Image deleteImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/delete_button.gif"); //$NON-NLS-1$\r
+ private static final Image moveUpImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/moveup_button.gif"); //$NON-NLS-1$\r
+ private static final Image moveDownImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/movedown_button.gif"); //$NON-NLS-1$\r
+ private static final Image helpImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/help_button.gif"); //$NON-NLS-1$\r
private static final Color COLOR_BLACK = Display.getCurrent().getSystemColor(SWT.COLOR_BLACK);\r
private static final Color COLOR_LIGHT_GREEN = new Color(Display.getDefault(), 192, 255, 192);\r
private static final Color COLOR_GREEN = Display.getCurrent().getSystemColor(SWT.COLOR_GREEN);\r
private boolean timestampFound;\r
\r
protected CustomTxtParserInputWizardPage(ISelection selection, CustomTxtTraceDefinition definition) {\r
- super("CustomParserWizardPage");\r
+ super("CustomParserWizardPage"); //$NON-NLS-1$\r
if (definition == null) {\r
- setTitle("New Custom Text Parser");\r
- defaultDescription = "Create a new custom parser for text log files";\r
+ setTitle(Messages.CustomTxtParserInputWizardPage_windowTitleNew);\r
+ defaultDescription = Messages.CustomTxtParserInputWizardPage_descriptionNew;\r
} else {\r
- setTitle("Edit Custom Text Parser");\r
- defaultDescription = "Edit an existing custom parser for text log files";\r
+ setTitle(Messages.CustomTxtParserInputWizardPage_windowTitleEdit);\r
+ defaultDescription = Messages.CustomTxtParserInputWizardPage_desccriptionEdit;\r
}\r
setDescription(defaultDescription);\r
this.selection = selection;\r
headerComposite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));\r
\r
Label logtypeLabel = new Label(headerComposite, SWT.NULL);\r
- logtypeLabel.setText("Log type:");\r
+ logtypeLabel.setText(Messages.CustomTxtParserInputWizardPage_logType);\r
\r
logtypeText = new Text(headerComposite, SWT.BORDER | SWT.SINGLE);\r
logtypeText.setLayoutData(new GridData(120, SWT.DEFAULT));\r
logtypeText.addModifyListener(updateListener);\r
\r
Label timestampFormatLabel = new Label(headerComposite, SWT.NULL);\r
- timestampFormatLabel.setText("Time Stamp format:");\r
+ timestampFormatLabel.setText(Messages.CustomTxtParserInputWizardPage_timestampFormat);\r
\r
timestampOutputFormatText = new Text(headerComposite, SWT.BORDER | SWT.SINGLE);\r
timestampOutputFormatText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));\r
\r
Button dateFormatHelpButton = new Button(headerComposite, SWT.PUSH);\r
dateFormatHelpButton.setImage(helpImage);\r
- dateFormatHelpButton.setToolTipText("Date Format Help");\r
+ dateFormatHelpButton.setToolTipText(Messages.CustomTxtParserInputWizardPage_dateFormatHelp);\r
dateFormatHelpButton.addSelectionListener(new SelectionAdapter() {\r
@Override\r
public void widgetSelected(SelectionEvent e) {\r
\r
Label timestampPreviewLabel = new Label(headerComposite, SWT.NULL);\r
timestampPreviewLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 3, 1));\r
- timestampPreviewLabel.setText("Preview:");\r
+ timestampPreviewLabel.setText(Messages.CustomTxtParserInputWizardPage_preview);\r
\r
timestampPreviewText = new Text(headerComposite, SWT.BORDER | SWT.SINGLE | SWT.READ_ONLY);\r
timestampPreviewText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));\r
- timestampPreviewText.setText("*no matching timestamp*");\r
+ timestampPreviewText.setText(Messages.CustomTxtParserInputWizardPage_noMatchingTimestamp);\r
\r
Composite buttonBar = new Composite(container, SWT.NONE);\r
GridLayout buttonBarLayout = new GridLayout(5, false);\r
\r
Button removeButton = new Button(buttonBar, SWT.PUSH);\r
removeButton.setImage(deleteImage);\r
- removeButton.setToolTipText("Remove line");\r
+ removeButton.setToolTipText(Messages.CustomTxtParserInputWizardPage_removeLine);\r
removeButton.addSelectionListener(new SelectionAdapter() {\r
@Override\r
public void widgetSelected(SelectionEvent e) {\r
});\r
Button addNextButton = new Button(buttonBar, SWT.PUSH);\r
addNextButton.setImage(addNextImage);\r
- addNextButton.setToolTipText("Add next line");\r
+ addNextButton.setToolTipText(Messages.CustomTxtParserInputWizardPage_addNextLine);\r
addNextButton.addSelectionListener(new SelectionAdapter() {\r
@Override\r
public void widgetSelected(SelectionEvent e) {\r
- InputLine inputLine = new InputLine(Cardinality.ZERO_OR_MORE, "", null);\r
+ InputLine inputLine = new InputLine(Cardinality.ZERO_OR_MORE, "", null); //$NON-NLS-1$\r
if (((List<?>) treeViewer.getInput()).size() == 0) {\r
definition.inputs.add(inputLine);\r
} else if (treeViewer.getSelection().isEmpty()) {\r
});\r
Button addChildButton = new Button(buttonBar, SWT.PUSH);\r
addChildButton.setImage(addChildImage);\r
- addChildButton.setToolTipText("Add child line");\r
+ addChildButton.setToolTipText(Messages.CustomTxtParserInputWizardPage_addChildLine);\r
addChildButton.addSelectionListener(new SelectionAdapter() {\r
@Override\r
public void widgetSelected(SelectionEvent e) {\r
- InputLine inputLine = new InputLine(Cardinality.ZERO_OR_MORE, "", null);\r
+ InputLine inputLine = new InputLine(Cardinality.ZERO_OR_MORE, "", null); //$NON-NLS-1$\r
if (((List<?>) treeViewer.getInput()).size() == 0) {\r
definition.inputs.add(inputLine);\r
} else if (treeViewer.getSelection().isEmpty()) {\r
});\r
Button moveUpButton = new Button(buttonBar, SWT.PUSH);\r
moveUpButton.setImage(moveUpImage);\r
- moveUpButton.setToolTipText("Move up");\r
+ moveUpButton.setToolTipText(Messages.CustomTxtParserInputWizardPage_moveUp);\r
moveUpButton.addSelectionListener(new SelectionAdapter() {\r
@Override\r
public void widgetSelected(SelectionEvent e) {\r
});\r
Button moveDownButton = new Button(buttonBar, SWT.PUSH);\r
moveDownButton.setImage(moveDownImage);\r
- moveDownButton.setToolTipText("Move down");\r
+ moveDownButton.setToolTipText(Messages.CustomTxtParserInputWizardPage_moveDown);\r
moveDownButton.addSelectionListener(new SelectionAdapter() {\r
@Override\r
public void widgetSelected(SelectionEvent e) {\r
sashBottom.setLayout(sashBottomLayout);\r
\r
Label previewLabel = new Label(sashBottom, SWT.NULL);\r
- previewLabel.setText("Preview input");\r
+ previewLabel.setText(Messages.CustomTxtParserInputWizardPage_previewInput);\r
previewLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));\r
\r
Button highlightAllButton = new Button(sashBottom, SWT.PUSH);\r
highlightAllButton.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));\r
- highlightAllButton.setText("Highlight All");\r
+ highlightAllButton.setText(Messages.CustomTxtParserInputWizardPage_highlightAll);\r
highlightAllButton.addSelectionListener(new SelectionAdapter() {\r
@Override\r
public void widgetSelected(SelectionEvent e) {\r
\r
Button legendButton = new Button(sashBottom, SWT.PUSH);\r
legendButton.setImage(helpImage);\r
- legendButton.setToolTipText("Preview Legend");\r
+ legendButton.setToolTipText(Messages.CustomTxtParserInputWizardPage_previewLegend);\r
legendButton.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));\r
legendButton.addSelectionListener(new SelectionAdapter() {\r
@Override\r
\r
inputText = new StyledText(sashBottom, SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);\r
if (fixedFont == null) {\r
- if (System.getProperty("os.name").contains("Windows")) {\r
- fixedFont = new Font(Display.getCurrent(), new FontData("Courier New", 10, SWT.NORMAL));\r
+ if (System.getProperty("os.name").contains("Windows")) { //$NON-NLS-1$ //$NON-NLS-2$\r
+ fixedFont = new Font(Display.getCurrent(), new FontData("Courier New", 10, SWT.NORMAL)); //$NON-NLS-1$\r
} else {\r
- fixedFont = new Font(Display.getCurrent(), new FontData("Monospace", 10, SWT.NORMAL));\r
+ fixedFont = new Font(Display.getCurrent(), new FontData("Monospace", 10, SWT.NORMAL)); //$NON-NLS-1$\r
}\r
}\r
inputText.setFont(fixedFont);\r
public String getText(Object element) {\r
InputLine inputLine = (InputLine) element;\r
if (inputLine.parentInput == null) {\r
- return "Root Line " + getName(inputLine) + " " + inputLine.cardinality.toString() + " : " + inputLine.getRegex();\r
+ return "Root Line " + getName(inputLine) + " " + inputLine.cardinality.toString() + " : " + inputLine.getRegex(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\r
} else {\r
- return "Line " + getName(inputLine) + " " + inputLine.cardinality.toString() + " : " + inputLine.getRegex();\r
+ return "Line " + getName(inputLine) + " " + inputLine.cardinality.toString() + " : " + inputLine.getRegex(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\r
}\r
}\r
}\r
if (inputLine.parentInput == null) {\r
return Integer.toString(definition.inputs.indexOf(inputLine)+1);\r
}\r
- return getName(inputLine.parentInput) + "." + Integer.toString(inputLine.parentInput.childrenInputs.indexOf(inputLine)+1);\r
+ return getName(inputLine.parentInput) + "." + Integer.toString(inputLine.parentInput.childrenInputs.indexOf(inputLine)+1); //$NON-NLS-1$\r
}\r
\r
public List<String> getInputNames() {\r
StringBuilder sb = new StringBuilder();\r
String line = null;\r
while ((line = reader.readLine()) != null) {\r
- sb.append(line + "\n");\r
+ sb.append(line + "\n"); //$NON-NLS-1$\r
}\r
return sb.toString();\r
} catch (CoreException e) {\r
- return "";\r
+ return ""; //$NON-NLS-1$\r
} catch (IOException e) {\r
- return "";\r
+ return ""; //$NON-NLS-1$\r
}\r
}\r
}\r
- return "";\r
+ return ""; //$NON-NLS-1$\r
}\r
\r
private void updatePreviews() {\r
inputText.setStyleRanges(new StyleRange[] {});\r
\r
Scanner scanner = new Scanner(inputText.getText());\r
- scanner.useDelimiter("\n");\r
+ scanner.useDelimiter("\n"); //$NON-NLS-1$\r
int rawPos = 0;\r
String skip; // skip starting delimiters\r
- if ((skip = scanner.findWithinHorizon("\\A\n+", 0)) != null) {\r
+ if ((skip = scanner.findWithinHorizon("\\A\n+", 0)) != null) { //$NON-NLS-1$\r
rawPos += skip.length();\r
}\r
\r
timeStampFormat = null;\r
if (selectedLine != null) {\r
for (InputGroup input : selectedLine.inputs) {\r
- input.previewText.setText("*no matching line*");\r
+ input.previewText.setText(Messages.CustomTxtParserInputWizardPage_noMathcingLine);\r
}\r
}\r
\r
firstEntryTimeStampInputFormat = timeStampFormat;\r
}\r
if (firstEntryTimeStamp == null) {\r
- timestampPreviewText.setText("*no timestamp group*");\r
+ timestampPreviewText.setText(Messages.CustomTxtParserInputWizardPage_noTimestampGroup);\r
if (selectedLine != null) {\r
for (InputGroup group : selectedLine.inputs) {\r
if (group.tagCombo.getText().equals(CustomTxtTraceDefinition.TAG_TIMESTAMP)) {\r
- timestampPreviewText.setText("*no matching timestamp*");\r
+ timestampPreviewText.setText(Messages.CustomTxtParserInputWizardPage_noMatchingTimestamp);\r
break;\r
}\r
}\r
dateFormat = new SimpleDateFormat(timestampOutputFormatText.getText().trim());\r
timestampPreviewText.setText(dateFormat.format(date));\r
} catch (ParseException e) {\r
- timestampPreviewText.setText("*parse exception* [" + firstEntryTimeStamp + "] <> [" + firstEntryTimeStampInputFormat + "]");\r
+ timestampPreviewText.setText(Messages.CustomTxtParserInputWizardPage_20 + firstEntryTimeStamp + Messages.CustomTxtParserInputWizardPage_21 + firstEntryTimeStampInputFormat + Messages.CustomTxtParserInputWizardPage_22);\r
} catch (IllegalArgumentException e) {\r
- timestampPreviewText.setText("*parse exception* [Illegal Argument]");\r
+ timestampPreviewText.setText(Messages.CustomTxtParserInputWizardPage_23);\r
}\r
\r
}\r
}\r
String value = matcher.group(i+1).trim();\r
if (selectedLine != null && selectedLine.inputLine.equals(line) && rootLineMatches == 1) {\r
- if (selectedLine.inputs.get(i).previewText.getText().equals("*no matching line*")) {\r
+ if (selectedLine.inputs.get(i).previewText.getText().equals(Messages.CustomTxtParserInputWizardPage_noMatchingLine)) {\r
selectedLine.inputs.get(i).previewText.setText(value);\r
}\r
}\r
} else if (input.action == CustomTxtTraceDefinition.ACTION_APPEND_WITH_SEPARATOR) {\r
String s = data.get(input.name);\r
if (s != null) {\r
- data.put(input.name, s + " | " + value);\r
+ data.put(input.name, s + " | " + value); //$NON-NLS-1$\r
} else {\r
data.put(input.name, value);\r
}\r
if (input.name.equals(CustomTxtTraceDefinition.TAG_TIMESTAMP)) {\r
if (timeStampFormat != null) {\r
- timeStampFormat += " | " + input.format;\r
+ timeStampFormat += " | " + input.format; //$NON-NLS-1$\r
} else {\r
timeStampFormat = input.format;\r
}\r
}\r
} else {\r
if (selectedLine != null && selectedLine.inputLine.equals(line) && rootLineMatches == 1) {\r
- if (selectedLine.inputs.get(i).previewText.getText().equals("*no matching line*")) {\r
- selectedLine.inputs.get(i).previewText.setText("*no matching group*");\r
+ if (selectedLine.inputs.get(i).previewText.getText().equals(Messages.CustomTxtParserInputWizardPage_noMatchingLine)) {\r
+ selectedLine.inputs.get(i).previewText.setText(Messages.CustomTxtParserInputWizardPage_noMatchingGroup);\r
}\r
}\r
}\r
}\r
\r
private void openLegend() {\r
- final String CG = "Captured group";\r
- final String UCG = "Unidentified captured group";\r
- final String UT = "Uncaptured text";\r
+ final String CG = Messages.CustomTxtParserInputWizardPage_capturedGroup;\r
+ final String UCG = Messages.CustomTxtParserInputWizardPage_unidentifiedCaptureGroup;\r
+ final String UT = Messages.CustomTxtParserInputWizardPage_uncapturedText;\r
int line1start = 0;\r
- String line1 = "Non-matching line\n";\r
+ String line1 = Messages.CustomTxtParserInputWizardPage_nonMatchingLine;\r
int line2start = line1start + line1.length();\r
- String line2 = "Matching root line : "+CG+" "+UCG+" "+UT+" \n";\r
+ String line2 = Messages.CustomTxtParserInputWizardPage_matchingLineRoot+CG+" "+UCG+" "+UT+" \n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\r
int line3start = line2start + line2.length();\r
- String line3 = "Matching other line: "+CG+" "+UCG+" "+UT+" \n";\r
+ String line3 = Messages.CustomTxtParserInputWizardPage_matchingOtherLine+CG+" "+UCG+" "+UT+" \n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\r
int line4start = line3start + line3.length();\r
- String line4 = "Matching other line: "+CG+" "+UCG+" "+UT+" \n";\r
+ String line4 = Messages.CustomTxtParserInputWizardPage_matchingOtherLine+CG+" "+UCG+" "+UT+" \n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\r
int line5start = line4start + line4.length();\r
- String line5 = "Non-matching line\n";\r
+ String line5 = Messages.CustomTxtParserInputWizardPage_nonMatchingLine;\r
int line6start = line5start + line5.length();\r
- String line6 = "Matching root line : "+CG+" "+UCG+" "+UT+" \n";\r
+ String line6 = Messages.CustomTxtParserInputWizardPage_44+CG+" "+UCG+" "+UT+" \n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ \r
\r
final Shell legendShell = new Shell(getShell(), SWT.DIALOG_TRIM);\r
legendShell.setLayout(new FillLayout());\r
legendText.setStyleRange(new StyleRange(line4start + line4.indexOf(UCG), UCG.length(), COLOR_BLACK, COLOR_LIGHT_MAGENTA));\r
legendText.setStyleRange(new StyleRange(line6start + line6.indexOf(CG), CG.length(), COLOR_BLACK, COLOR_GREEN, SWT.BOLD));\r
legendText.setStyleRange(new StyleRange(line6start + line6.indexOf(UCG), UCG.length(), COLOR_BLACK, COLOR_MAGENTA));\r
- legendShell.setText("Preview Legend");\r
+ legendShell.setText(Messages.CustomTxtParserInputWizardPage_previewLegend);\r
legendShell.pack();\r
legendShell.open();\r
}\r
}\r
\r
private class Line {\r
- private static final String INFINITY_STRING = "\u221E";\r
+ private static final String INFINITY_STRING = "\u221E"; //$NON-NLS-1$\r
@SuppressWarnings("unused")\r
String name;\r
InputLine inputLine;\r
labelComposite.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));\r
\r
Label label = new Label(labelComposite, SWT.NULL);\r
- label.setText("Regular expression:");\r
+ label.setText(Messages.CustomTxtParserInputWizardPage_regularExpression);\r
\r
Composite regexContainer = new Composite(group, SWT.NONE);\r
GridLayout regexLayout = new GridLayout(2, false);\r
\r
Button regexHelpButton = new Button(regexContainer, SWT.PUSH);\r
regexHelpButton.setImage(helpImage);\r
- regexHelpButton.setToolTipText("Regular Expression Help");\r
+ regexHelpButton.setToolTipText(Messages.CustomTxtParserInputWizardPage_regularExpressionHelp);\r
regexHelpButton.addSelectionListener(new SelectionAdapter() {\r
@Override\r
public void widgetSelected(SelectionEvent e) {\r
});\r
\r
label = new Label(group, SWT.NONE);\r
- label.setText("Cardinality:");\r
+ label.setText(Messages.CustomTxtParserInputWizardPage_cardinality);\r
label.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));\r
\r
cardinalityContainer = new Composite(group, SWT.NONE);\r
Cardinality.ONE_OR_MORE.toString(),\r
Cardinality.ZERO_OR_ONE.toString(),\r
Cardinality.ONE.toString(),\r
- "(?,?)"});\r
+ "(?,?)"}); //$NON-NLS-1$\r
cardinalityCombo.addSelectionListener(new SelectionListener(){\r
@Override\r
public void widgetDefaultSelected(SelectionEvent e) {}\r
\r
cardinalityMinLabel = new Label(cardinalityContainer, SWT.NONE);\r
cardinalityMinLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));\r
- cardinalityMinLabel.setText("min:");\r
+ cardinalityMinLabel.setText(Messages.CustomTxtParserInputWizardPage_min);\r
cardinalityMinLabel.setVisible(false);\r
\r
cardinalityMinText = new Text(cardinalityContainer, SWT.BORDER | SWT.SINGLE);\r
\r
cardinalityMaxLabel = new Label(cardinalityContainer, SWT.NONE);\r
cardinalityMaxLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));\r
- cardinalityMaxLabel.setText("max:");\r
+ cardinalityMaxLabel.setText(Messages.CustomTxtParserInputWizardPage_max);\r
cardinalityMaxLabel.setVisible(false);\r
\r
cardinalityMaxText = new Text(cardinalityContainer, SWT.BORDER | SWT.SINGLE);\r
if (inputData.name.equals(CustomTxtTraceDefinition.TAG_TIMESTAMP)) {\r
inputGroup.tagCombo.select(0);\r
inputGroup.tagText.setText(inputData.format);\r
- inputGroup.tagLabel.setText("format:");\r
+ inputGroup.tagLabel.setText(Messages.CustomTxtParserInputWizardPage_format);\r
inputGroup.tagLabel.setVisible(true);\r
inputGroup.tagText.setVisible(true);\r
inputGroup.tagText.addModifyListener(updateListener);\r
} else {\r
inputGroup.tagCombo.select(2);\r
inputGroup.tagText.setText(inputData.name);\r
- inputGroup.tagLabel.setText("name:");\r
+ inputGroup.tagLabel.setText(Messages.CustomTxtParserInputWizardPage_name);\r
inputGroup.tagLabel.setVisible(true);\r
inputGroup.tagText.setVisible(true);\r
inputGroup.tagText.addModifyListener(updateListener);\r
addGroupButton = new Button(group, SWT.PUSH);\r
addGroupButton.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));\r
addGroupButton.setImage(addImage);\r
- addGroupButton.setToolTipText("Add group");\r
+ addGroupButton.setToolTipText(Messages.CustomTxtParserInputWizardPage_addGroup);\r
addGroupButton.addSelectionListener(new SelectionAdapter() {\r
@Override\r
public void widgetSelected(SelectionEvent e) {\r
});\r
\r
addGroupLabel = new Label(group, SWT.NULL);\r
- addGroupLabel.setText("New group");\r
+ addGroupLabel.setText(Messages.CustomTxtParserInputWizardPage_newGroup);\r
}\r
\r
private void removeAddGroupButton() {\r
Button deleteButton = new Button(labelComposite, SWT.PUSH);\r
deleteButton.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));\r
deleteButton.setImage(deleteImage);\r
- deleteButton.setToolTipText("Remove group");\r
+ deleteButton.setToolTipText(Messages.CustomTxtParserInputWizardPage_removeGroup);\r
deleteButton.addSelectionListener(new SelectionAdapter() {\r
@Override\r
public void widgetSelected(SelectionEvent e) {\r
\r
inputLabel = new Label(labelComposite, SWT.NULL);\r
inputLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));\r
- inputLabel.setText("Group " + inputNumber + ":");\r
+ inputLabel.setText(Messages.CustomTxtParserInputWizardPage_group + inputNumber + ":"); //$NON-NLS-1$\r
\r
tagComposite = new Composite(parent, SWT.FILL);\r
GridLayout tagLayout = new GridLayout(4, false);\r
tagText.removeModifyListener(updateListener);\r
switch (tagCombo.getSelectionIndex()) {\r
case 0: //Time Stamp\r
- tagLabel.setText("format:");\r
+ tagLabel.setText(Messages.CustomTxtParserInputWizardPage_format);\r
tagLabel.setVisible(true);\r
tagText.setVisible(true);\r
tagText.addModifyListener(updateListener);\r
tagText.setVisible(false);\r
break;\r
case 2: //Other\r
- tagLabel.setText("name:");\r
+ tagLabel.setText(Messages.CustomTxtParserInputWizardPage_name);\r
tagLabel.setVisible(true);\r
tagText.setVisible(true);\r
tagText.addModifyListener(updateListener);\r
tagText.setVisible(false);\r
\r
actionCombo = new Combo(tagComposite, SWT.DROP_DOWN | SWT.READ_ONLY);\r
- actionCombo.setItems(new String[] {"Set", "Append", "Append with |"});\r
+ actionCombo.setItems(new String[] {Messages.CustomTxtParserInputWizardPage_set, Messages.CustomTxtParserInputWizardPage_append, Messages.CustomTxtParserInputWizardPage_appendWith});\r
actionCombo.select(0);\r
actionCombo.addSelectionListener(updateListener);\r
\r
previewLabel = new Label(parent, SWT.NULL);\r
previewLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));\r
- previewLabel.setText("Preview:");\r
+ previewLabel.setText(Messages.CustomTxtParserInputWizardPage_preview);\r
\r
previewText = new Text(parent, SWT.BORDER | SWT.SINGLE | SWT.READ_ONLY);\r
gd = new GridData(SWT.FILL, SWT.CENTER, true, false);\r
gd.widthHint = 0;\r
previewText.setLayoutData(gd);\r
- previewText.setText("*no match*");\r
+ previewText.setText(Messages.CustomTxtParserInputWizardPage_noMatch);\r
previewText.setBackground(COLOR_WIDGET_BACKGROUND);\r
}\r
\r
\r
private void setInputNumber(int inputNumber) {\r
this.inputNumber = inputNumber;\r
- inputLabel.setText("Group " + inputNumber + ":");\r
+ inputLabel.setText(Messages.CustomTxtParserInputWizardPage_group + inputNumber + ":"); //$NON-NLS-1$\r
labelComposite.layout();\r
}\r
}\r
StringBuffer errors = new StringBuffer();\r
\r
if (definition.definitionName.length() == 0) {\r
- errors.append("Enter a name for the new log type. ");\r
+ errors.append("Enter a name for the new log type. "); //$NON-NLS-1$\r
logtypeText.setBackground(COLOR_LIGHT_RED);\r
} else {\r
logtypeText.setBackground(COLOR_TEXT_BACKGROUND);\r
for (CustomTxtTraceDefinition def : CustomTxtTraceDefinition.loadAll()) {\r
if (definition.definitionName.equals(def.definitionName)) {\r
if (editDefinitionName == null || ! editDefinitionName.equals(definition.definitionName)) {\r
- errors.append("The log type name already exists. ");\r
+ errors.append("The log type name already exists. "); //$NON-NLS-1$\r
logtypeText.setBackground(COLOR_LIGHT_RED);\r
break;\r
}\r
}\r
if (timestampFound) {\r
if (definition.timeStampOutputFormat.length() == 0) {\r
- errors.append("Enter the output format for the Time Stamp field. ");\r
+ errors.append("Enter the output format for the Time Stamp field. "); //$NON-NLS-1$\r
timestampOutputFormatText.setBackground(COLOR_LIGHT_RED);\r
} else {\r
try {\r
new SimpleDateFormat(definition.timeStampOutputFormat);\r
timestampOutputFormatText.setBackground(COLOR_TEXT_BACKGROUND);\r
} catch (IllegalArgumentException e) {\r
- errors.append("Enter a valid output format for the Time Stamp field. ");\r
+ errors.append("Enter a valid output format for the Time Stamp field. "); //$NON-NLS-1$\r
timestampOutputFormatText.setBackground(COLOR_LIGHT_RED);\r
}\r
}\r
Pattern.compile(inputLine.getRegex());\r
if (line != null) line.regexText.setBackground(COLOR_TEXT_BACKGROUND);\r
} catch (PatternSyntaxException e) {\r
- errors.append("Enter a valid regular expression (Line "+name+"). ");\r
+ errors.append("Enter a valid regular expression (Line "+name+"). "); //$NON-NLS-1$ //$NON-NLS-2$\r
if (line != null) line.regexText.setBackground(COLOR_LIGHT_RED);\r
}\r
if (inputLine.getMinCount() == -1) {\r
- errors.append("Enter a minimum value for cardinality (Line "+name+"). ");\r
+ errors.append("Enter a minimum value for cardinality (Line "+name+"). "); //$NON-NLS-1$ //$NON-NLS-2$\r
if (line != null) line.cardinalityMinText.setBackground(COLOR_LIGHT_RED);\r
} else {\r
if (line != null) line.cardinalityMinText.setBackground(COLOR_TEXT_BACKGROUND);\r
}\r
if (inputLine.getMaxCount() == -1) {\r
- errors.append("Enter a maximum value for cardinality (Line "+name+"). ");\r
+ errors.append("Enter a maximum value for cardinality (Line "+name+"). "); //$NON-NLS-1$ //$NON-NLS-2$\r
if (line != null) line.cardinalityMaxText.setBackground(COLOR_LIGHT_RED);\r
} else if (inputLine.getMinCount() > inputLine.getMaxCount()) {\r
- errors.append("Enter correct (min <= max) values for cardinality (Line "+name+"). ");\r
+ errors.append("Enter correct (min <= max) values for cardinality (Line "+name+"). "); //$NON-NLS-1$ //$NON-NLS-2$\r
if (line != null) line.cardinalityMinText.setBackground(COLOR_LIGHT_RED);\r
if (line != null) line.cardinalityMaxText.setBackground(COLOR_LIGHT_RED);\r
} else {\r
if (inputData.name.equals(CustomTxtTraceDefinition.TAG_TIMESTAMP)) {\r
timestampFound = true;\r
if (inputData.format.length() == 0) {\r
- errors.append("Enter the input format for the Time Stamp (Line "+name+" Group "+(i+1)+"). ");\r
+ errors.append("Enter the input format for the Time Stamp (Line "+name+" Group "+(i+1)+"). "); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\r
if (group != null) group.tagText.setBackground(COLOR_LIGHT_RED);\r
} else {\r
try {\r
new SimpleDateFormat(inputData.format);\r
if (group != null) group.tagText.setBackground(COLOR_TEXT_BACKGROUND);\r
} catch (IllegalArgumentException e) {\r
- errors.append("Enter a valid input format for the Time Stamp (Line "+name+" Group "+(i+1)+"). ");\r
+ errors.append("Enter a valid input format for the Time Stamp (Line "+name+" Group "+(i+1)+"). "); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\r
if (group != null) group.tagText.setBackground(COLOR_LIGHT_RED);\r
}\r
}\r
} else if (inputData.name.length() == 0) {\r
- errors.append("Enter a name for the data group (Line "+name+" Group "+(i+1)+"). ");\r
+ errors.append("Enter a name for the data group (Line "+name+" Group "+(i+1)+"). "); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\r
if (group != null) group.tagText.setBackground(COLOR_LIGHT_RED);\r
} else {\r
if (group != null) group.tagText.setBackground(COLOR_TEXT_BACKGROUND);\r
}\r
}\r
for (int i = 0; inputLine.childrenInputs != null && i < inputLine.childrenInputs.size(); i++) {\r
- errors.append(validateLine(inputLine.childrenInputs.get(i), name+"."+(i+1)));\r
+ errors.append(validateLine(inputLine.childrenInputs.get(i), name+"."+(i+1))); //$NON-NLS-1$\r
}\r
return errors;\r
}\r