2010-11-09 Francois Chouinard <fchouinard@gmail.com> Contribution for Bug315307
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / tmf / ui / wizards / CustomTxtParserInputWizardPage.java
index 2498bd661f2ae86ba8eb270bd11882037207d800..6175be993de0f6a51fe7367ab4d22f2cf11f9cd3 100644 (file)
@@ -67,18 +67,18 @@ import org.eclipse.swt.widgets.Text;
 \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
@@ -118,13 +118,13 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
     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
@@ -149,14 +149,14 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
         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
@@ -165,7 +165,7 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
 \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
@@ -175,11 +175,11 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
         \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
@@ -189,7 +189,7 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
         \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
@@ -208,11 +208,11 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
         });\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
@@ -235,11 +235,11 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
         });\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
@@ -254,7 +254,7 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
         });\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
@@ -277,7 +277,7 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
         });\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
@@ -356,12 +356,12 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
         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
@@ -371,7 +371,7 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
         \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
@@ -382,10 +382,10 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
         \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
@@ -450,9 +450,9 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
         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
@@ -502,7 +502,7 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
         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
@@ -561,17 +561,17 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
                     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
@@ -586,17 +586,17 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
         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
@@ -755,11 +755,11 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
             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
@@ -771,9 +771,9 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
                 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
@@ -792,7 +792,7 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
                 }\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
@@ -821,13 +821,13 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
                 } 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
@@ -835,8 +835,8 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
                 }\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
@@ -879,21 +879,21 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
     }\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
@@ -912,7 +912,7 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
         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
@@ -940,7 +940,7 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
     }\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
@@ -975,7 +975,7 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
             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
@@ -993,7 +993,7 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
             \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
@@ -1002,7 +1002,7 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
             });\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
@@ -1018,7 +1018,7 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
                     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
@@ -1047,7 +1047,7 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
             \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
@@ -1058,7 +1058,7 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
             \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
@@ -1130,7 +1130,7 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
                     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
@@ -1139,7 +1139,7 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
                     } 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
@@ -1156,7 +1156,7 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
             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
@@ -1172,7 +1172,7 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
             });\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
@@ -1289,7 +1289,7 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
             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
@@ -1301,7 +1301,7 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
             \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
@@ -1323,7 +1323,7 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
                     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
@@ -1333,7 +1333,7 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
                         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
@@ -1359,19 +1359,19 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
             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
@@ -1384,7 +1384,7 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
         \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
@@ -1402,14 +1402,14 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
         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
@@ -1426,14 +1426,14 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
         }\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
@@ -1463,20 +1463,20 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
             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
@@ -1489,26 +1489,26 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
             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
This page took 0.036582 seconds and 5 git commands to generate.