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 / CustomXmlParserInputWizardPage.java
index 9ab6fb752f274d9858250e9d4f1cd3a2df390bb9..8e84ec3396b7e46f261ee9a9b014d12cf1c5d6db 100644 (file)
@@ -73,17 +73,17 @@ import org.xml.sax.SAXParseException;
 \r
 public class CustomXmlParserInputWizardPage extends WizardPage {\r
 \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 Image elementImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/element_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 addManyImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/addmany_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_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 Image elementImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/element_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 addManyImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/addmany_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_LIGHT_RED = new Color(Display.getDefault(), 255, 192, 192);\r
     private static final Color COLOR_TEXT_BACKGROUND = Display.getCurrent().getSystemColor(SWT.COLOR_WHITE);\r
     private static final Color COLOR_WIDGET_BACKGROUND = Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND);\r
@@ -124,13 +124,13 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
     private int logEntryNestedCount;\r
 \r
     protected CustomXmlParserInputWizardPage(ISelection selection, CustomXmlTraceDefinition definition) {\r
-        super("CustomXmlParserWizardPage");\r
+        super("CustomXmlParserWizardPage"); //$NON-NLS-1$\r
         if (definition == null) {\r
-            setTitle("New Custom XML Parser");\r
-            defaultDescription = "Create a new custom parser for XML log files";\r
+            setTitle(Messages.CustomXmlParserInputWizardPage_titleNew);\r
+            defaultDescription = Messages.CustomXmlParserInputWizardPage_descriptionNew;\r
         } else {\r
-            setTitle("Edit Custom XML Parser");\r
-            defaultDescription = "Edit an existing custom parser for XML log files";\r
+            setTitle(Messages.CustomXmlParserInputWizardPage_titleEdit);\r
+            defaultDescription = Messages.CustomXmlParserInputWizardPage_descriptionEdit;\r
         }\r
         setDescription(defaultDescription);\r
         this.selection = selection;\r
@@ -155,14 +155,14 @@ public class CustomXmlParserInputWizardPage 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.CustomXmlParserInputWizardPage_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.CustomXmlParserInputWizardPage_timestampFormat);\r
         \r
         timeStampOutputFormatText = new Text(headerComposite, SWT.BORDER | SWT.SINGLE);\r
         timeStampOutputFormatText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));\r
@@ -171,7 +171,7 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
 \r
         Button dateFormatHelpButton = new Button(headerComposite, SWT.PUSH);\r
         dateFormatHelpButton.setImage(helpImage);\r
-        dateFormatHelpButton.setToolTipText("Date Format Help");\r
+        dateFormatHelpButton.setToolTipText(Messages.CustomXmlParserInputWizardPage_dateFormatHelp);\r
         dateFormatHelpButton.addSelectionListener(new SelectionAdapter() {\r
                @Override\r
             public void widgetSelected(SelectionEvent e) {\r
@@ -181,11 +181,11 @@ public class CustomXmlParserInputWizardPage 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.CustomXmlParserInputWizardPage_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 time stamp element or attribute*");\r
+        timeStampPreviewText.setText("*no time stamp element or attribute*"); //$NON-NLS-1$\r
 \r
         createButtonBar();\r
         \r
@@ -236,7 +236,7 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
         \r
         if (definition.rootInputElement == null) {\r
             removeButton.setEnabled(false);\r
-            addChildButton.setToolTipText("Add document element");\r
+            addChildButton.setToolTipText(Messages.CustomXmlParserInputWizardPage_addDocumentElement);\r
             addNextButton.setEnabled(false);\r
             moveUpButton.setEnabled(false);\r
             moveDownButton.setEnabled(false);\r
@@ -251,7 +251,7 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
         sashBottom.setLayout(sashBottomLayout);\r
 \r
         Label previewLabel = new Label(sashBottom, SWT.NULL);\r
-        previewLabel.setText("Preview input");\r
+        previewLabel.setText(Messages.CustomXmlParserInputWizardPage_previewInput);\r
 \r
         errorText = new Text(sashBottom, SWT.SINGLE | SWT.READ_ONLY);\r
         errorText.setBackground(COLOR_WIDGET_BACKGROUND);\r
@@ -260,10 +260,10 @@ public class CustomXmlParserInputWizardPage 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
@@ -293,7 +293,7 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
         \r
         removeButton = new Button(buttonBar, SWT.PUSH);\r
         removeButton.setImage(deleteImage);\r
-        removeButton.setToolTipText("Remove element");\r
+        removeButton.setToolTipText(Messages.CustomXmlParserInputWizardPage_removeElement);\r
         removeButton.addSelectionListener(new SelectionAdapter() {\r
                @Override\r
             public void widgetSelected(SelectionEvent e) {\r
@@ -311,7 +311,7 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
                 removeButton.setEnabled(false);\r
                 if (definition.rootInputElement == null) {\r
                     addChildButton.setEnabled(true);\r
-                    addChildButton.setToolTipText("Add document element");\r
+                    addChildButton.setToolTipText(Messages.CustomXmlParserInputWizardPage_addDocumentEleemnt);\r
                 } else {\r
                     addChildButton.setEnabled(false);\r
                 }\r
@@ -323,11 +323,11 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
         \r
         addChildButton = new Button(buttonBar, SWT.PUSH);\r
         addChildButton.setImage(addChildImage);\r
-        addChildButton.setToolTipText("Add child element");\r
+        addChildButton.setToolTipText(Messages.CustomXmlParserInputWizardPage_addChildElement);\r
         addChildButton.addSelectionListener(new SelectionAdapter() {\r
                @Override\r
             public void widgetSelected(SelectionEvent e) {\r
-                InputElement inputElement = new InputElement("", false, CustomXmlTraceDefinition.TAG_IGNORE, 0, "", null);\r
+                InputElement inputElement = new InputElement("", false, CustomXmlTraceDefinition.TAG_IGNORE, 0, "", null); //$NON-NLS-1$ //$NON-NLS-2$\r
                 if (definition.rootInputElement == null) {\r
                     definition.rootInputElement = inputElement;\r
                     inputElement.elementName = getChildNameSuggestion(null);\r
@@ -345,11 +345,11 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
         \r
         addNextButton = new Button(buttonBar, SWT.PUSH);\r
         addNextButton.setImage(addNextImage);\r
-        addNextButton.setToolTipText("Add next element");\r
+        addNextButton.setToolTipText(Messages.CustomXmlParserInputWizardPage_addNextElement);\r
         addNextButton.addSelectionListener(new SelectionAdapter() {\r
                @Override\r
             public void widgetSelected(SelectionEvent e) {\r
-                InputElement inputElement = new InputElement("", false, CustomXmlTraceDefinition.TAG_IGNORE, 0, "", null);\r
+                InputElement inputElement = new InputElement("", false, CustomXmlTraceDefinition.TAG_IGNORE, 0, "", null); //$NON-NLS-1$ //$NON-NLS-2$\r
                 if (definition.rootInputElement == null) {\r
                     definition.rootInputElement = inputElement;\r
                     inputElement.elementName = getChildNameSuggestion(null);\r
@@ -371,14 +371,14 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
         \r
         feelingLuckyButton = new Button(buttonBar, SWT.PUSH);\r
         feelingLuckyButton.setImage(addManyImage);\r
-        feelingLuckyButton.setToolTipText("Feeling lucky");\r
+        feelingLuckyButton.setToolTipText(Messages.CustomXmlParserInputWizardPage_feelingLucky);\r
         feelingLuckyButton.addSelectionListener(new SelectionAdapter() {\r
                @Override\r
             public void widgetSelected(SelectionEvent e) {\r
                 InputElement inputElement = null;\r
                 if (definition.rootInputElement == null) {\r
                     if (getChildNameSuggestion(null).length() != 0) {\r
-                        inputElement = new InputElement(getChildNameSuggestion(null), false, CustomXmlTraceDefinition.TAG_IGNORE, 0, "", null);\r
+                        inputElement = new InputElement(getChildNameSuggestion(null), false, CustomXmlTraceDefinition.TAG_IGNORE, 0, "", null); //$NON-NLS-1$\r
                         definition.rootInputElement = inputElement;\r
                         feelingLucky(inputElement);\r
                     }\r
@@ -396,7 +396,7 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
         \r
         moveUpButton = new Button(buttonBar, SWT.PUSH);\r
         moveUpButton.setImage(moveUpImage);\r
-        moveUpButton.setToolTipText("Move up");\r
+        moveUpButton.setToolTipText(Messages.CustomXmlParserInputWizardPage_moveUp);\r
         moveUpButton.addSelectionListener(new SelectionAdapter() {\r
                @Override\r
             public void widgetSelected(SelectionEvent e) {\r
@@ -415,7 +415,7 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
         \r
         moveDownButton = new Button(buttonBar, SWT.PUSH);\r
         moveDownButton.setImage(moveDownImage);\r
-        moveDownButton.setToolTipText("Move down");\r
+        moveDownButton.setToolTipText(Messages.CustomXmlParserInputWizardPage_moveDown);\r
         moveDownButton.addSelectionListener(new SelectionAdapter() {\r
                @Override\r
             public void widgetSelected(SelectionEvent e) {\r
@@ -439,7 +439,7 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
             if (attributeName.length() == 0) {\r
                 break;\r
             } else {\r
-                InputAttribute attribute = new InputAttribute(attributeName, attributeName, 0, "");\r
+                InputAttribute attribute = new InputAttribute(attributeName, attributeName, 0, ""); //$NON-NLS-1$\r
                 inputElement.addAttribute(attribute);\r
             }\r
         }\r
@@ -448,7 +448,7 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
             if (childName.length() == 0) {\r
                 break;\r
             } else {\r
-                InputElement childElement = new InputElement(childName, false, CustomXmlTraceDefinition.TAG_IGNORE, 0, "", null);\r
+                InputElement childElement = new InputElement(childName, false, CustomXmlTraceDefinition.TAG_IGNORE, 0, "", null); //$NON-NLS-1$\r
                 inputElement.addChild(childElement);\r
                 feelingLucky(childElement);\r
             }\r
@@ -505,7 +505,7 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
         @Override\r
         public String getText(Object element) {\r
             InputElement inputElement = (InputElement) element;\r
-            return (inputElement.elementName.trim().length() == 0) ? "?" : inputElement.elementName;\r
+            return (inputElement.elementName.trim().length() == 0) ? "?" : inputElement.elementName; //$NON-NLS-1$\r
         }\r
     }\r
 \r
@@ -526,7 +526,7 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
                 updatePreviews();\r
                 removeButton.setEnabled(true);\r
                 addChildButton.setEnabled(true);\r
-                addChildButton.setToolTipText("Add child element");\r
+                addChildButton.setToolTipText(Messages.CustomXmlParserInputWizardPage_addChildElement);\r
                 if (definition.rootInputElement == inputElement) {\r
                     addNextButton.setEnabled(false);\r
                 } else {\r
@@ -538,7 +538,7 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
                 removeButton.setEnabled(false);\r
                 if (definition.rootInputElement == null) {\r
                     addChildButton.setEnabled(true);\r
-                    addChildButton.setToolTipText("Add document element");\r
+                    addChildButton.setToolTipText(Messages.CustomXmlParserInputWizardPage_addDocumentElement);\r
                 } else {\r
                     addChildButton.setEnabled(false);\r
                 }\r
@@ -572,16 +572,16 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
     }\r
     \r
     private String getName(InputElement inputElement) {\r
-        String name = (inputElement.elementName.trim().length() == 0) ? "?" : inputElement.elementName.trim();\r
+        String name = (inputElement.elementName.trim().length() == 0) ? "?" : inputElement.elementName.trim(); //$NON-NLS-1$\r
         if (inputElement.parentElement == null) {\r
             return name;\r
         }\r
-        return getName(inputElement.parentElement) + " : " + name;\r
+        return getName(inputElement.parentElement) + " : " + name; //$NON-NLS-1$\r
     }\r
 \r
     private String getName(InputAttribute inputAttribute, InputElement inputElement) {\r
-        String name = (inputAttribute.attributeName.trim().length() == 0) ? "?" : inputAttribute.attributeName.trim();\r
-        return getName(inputElement) + " : " + name;\r
+        String name = (inputAttribute.attributeName.trim().length() == 0) ? "?" : inputAttribute.attributeName.trim(); //$NON-NLS-1$\r
+        return getName(inputElement) + " : " + name; //$NON-NLS-1$\r
     }\r
 \r
     /* (non-Javadoc)\r
@@ -645,7 +645,7 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
                 try {\r
                     inputStream = file.getContents();\r
                 } catch (CoreException e) {\r
-                    return "";\r
+                    return ""; //$NON-NLS-1$\r
                 }\r
             }\r
         }\r
@@ -655,15 +655,15 @@ public class CustomXmlParserInputWizardPage 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
                 parseXmlInput(sb.toString());\r
                 return sb.toString();\r
             } catch (IOException e) {\r
-                return "";\r
+                return ""; //$NON-NLS-1$\r
             }\r
         }\r
-        return "";\r
+        return ""; //$NON-NLS-1$\r
     }\r
     \r
     private void parseXmlInput(final String string) {\r
@@ -675,7 +675,7 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
             EntityResolver resolver = new EntityResolver () {\r
                @Override\r
                 public InputSource resolveEntity (String publicId, String systemId) {\r
-                    String empty = "";\r
+                    String empty = ""; //$NON-NLS-1$\r
                     ByteArrayInputStream bais = new ByteArrayInputStream(empty.getBytes());\r
                     return new InputSource(bais);\r
                 }\r
@@ -741,12 +741,12 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
                 dateFormat = new SimpleDateFormat(timeStampOutputFormatText.getText().trim());\r
                 timeStampPreviewText.setText(dateFormat.format(date));\r
             } catch (ParseException e) {\r
-                timeStampPreviewText.setText("*parse exception* [" + timeStampValue + "] <> [" + timeStampFormat + "]");\r
+                timeStampPreviewText.setText("*parse exception* [" + timeStampValue + "] <> [" + timeStampFormat + "]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\r
             } catch (IllegalArgumentException e) {\r
-                timeStampPreviewText.setText("*parse exception* [Illegal Argument]");\r
+                timeStampPreviewText.setText("*parse exception* [Illegal Argument]"); //$NON-NLS-1$\r
             }\r
         } else {\r
-            timeStampPreviewText.setText("*no matching time stamp*");\r
+            timeStampPreviewText.setText("*no matching time stamp*"); //$NON-NLS-1$\r
         }\r
     }\r
 \r
@@ -825,7 +825,7 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
             group.setText(getName(inputElement));\r
             \r
             Label label = new Label(group, SWT.NULL);\r
-            label.setText("Element name:");\r
+            label.setText(Messages.CustomXmlParserInputWizardPage_elementName);\r
             label.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));\r
             \r
             elementNameText = new Text(group, SWT.BORDER | SWT.SINGLE);\r
@@ -844,17 +844,17 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
             if (inputElement.parentElement != null) {\r
                 previewLabel = new Label(group, SWT.NULL);\r
                 previewLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));\r
-                previewLabel.setText("Preview:");\r
+                previewLabel.setText(Messages.CustomXmlParserInputWizardPage_preview);\r
                 \r
                 previewText = new Text(group, 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 matching element*");\r
+                previewText.setText(Messages.CustomXmlParserInputWizardPage_noMatchingElement);\r
                 previewText.setBackground(COLOR_WIDGET_BACKGROUND);\r
                 \r
                 logEntryButton = new Button(group, SWT.CHECK);\r
-                logEntryButton.setText("Log Entry");\r
+                logEntryButton.setText(Messages.CustomXmlParserInputWizardPage_logEntry);\r
                 logEntryButton.setSelection(inputElement.logEntry);\r
                 logEntryButton.addSelectionListener(new SelectionListener(){\r
                        @Override\r
@@ -895,7 +895,7 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
                             actionCombo.setVisible(false);\r
                             break;\r
                         case 1: //Time Stamp\r
-                            tagLabel.setText("format:");\r
+                            tagLabel.setText(Messages.CustomXmlParserInputWizardPage_format);\r
                             tagLabel.setVisible(true);\r
                             tagText.setVisible(true);\r
                             tagText.addModifyListener(updateListener);\r
@@ -907,7 +907,7 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
                             actionCombo.setVisible(true);\r
                             break;\r
                         case 3: //Other\r
-                            tagLabel.setText("tag name:");\r
+                            tagLabel.setText(Messages.CustomXmlParserInputWizardPage_tagName);\r
                             tagLabel.setVisible(true);\r
                             if (tagText.getText().trim().length() == 0) {\r
                                 tagText.setText(elementNameText.getText().trim());\r
@@ -931,7 +931,7 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
                 tagText.setLayoutData(gd);\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.CustomXmlParserInputWizardPage_set, Messages.CustomXmlParserInputWizardPage_append, Messages.CustomXmlParserInputWizardPage_appendWith});\r
                 actionCombo.select(inputElement.inputAction);\r
                 actionCombo.addSelectionListener(updateListener);\r
                 \r
@@ -942,7 +942,7 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
                     actionCombo.setVisible(false);\r
                 } else if (inputElement.inputName.equals(CustomXmlTraceDefinition.TAG_TIMESTAMP)) {\r
                     tagCombo.select(1);\r
-                    tagLabel.setText("format:");\r
+                    tagLabel.setText(Messages.CustomXmlParserInputWizardPage_format);\r
                     tagText.setText(inputElement.inputFormat);\r
                     tagText.addModifyListener(updateListener);\r
                 } else if (inputElement.inputName.equals(CustomXmlTraceDefinition.TAG_MESSAGE)) {\r
@@ -951,7 +951,7 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
                     tagText.setVisible(false);\r
                 } else {\r
                     tagCombo.select(3);\r
-                    tagLabel.setText("tag name:");\r
+                    tagLabel.setText(Messages.CustomXmlParserInputWizardPage_tagName);\r
                     tagText.setText(inputElement.inputName);\r
                     tagText.addModifyListener(updateListener);\r
                 }\r
@@ -970,7 +970,7 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
         private void updatePreview() {\r
             Element element = getPreviewElement(inputElement);\r
             if (inputElement.parentElement != null) { // no preview text for document element\r
-                previewText.setText("*no matching element*");\r
+                previewText.setText(Messages.CustomXmlParserInputWizardPage_noMatchingElement);\r
                 if (element != null) {\r
                     previewText.setText(CustomXmlTrace.parseElement(element, new StringBuffer()).toString());\r
                     if (logEntryButton.getSelection()) {\r
@@ -997,8 +997,8 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
                                 }\r
                             } else if (actionCombo.getSelectionIndex() == CustomXmlTraceDefinition.ACTION_APPEND_WITH_SEPARATOR) {\r
                                 if (timeStampValue != null) {\r
-                                    timeStampValue += " | " + value;\r
-                                    timeStampFormat += " | " + tagText.getText().trim();\r
+                                    timeStampValue += " | " + value; //$NON-NLS-1$\r
+                                    timeStampFormat += " | " + tagText.getText().trim(); //$NON-NLS-1$\r
                                 } else {\r
                                     timeStampValue = value;\r
                                     timeStampFormat = tagText.getText().trim();\r
@@ -1027,8 +1027,8 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
                                 }\r
                             } else if (attribute.actionCombo.getSelectionIndex() == CustomXmlTraceDefinition.ACTION_APPEND_WITH_SEPARATOR) {\r
                                 if (timeStampValue != null) {\r
-                                    timeStampValue += " | " + value;\r
-                                    timeStampFormat += " | " + attribute.tagText.getText().trim();\r
+                                    timeStampValue += " | " + value; //$NON-NLS-1$\r
+                                    timeStampFormat += " | " + attribute.tagText.getText().trim(); //$NON-NLS-1$\r
                                 } else {\r
                                     timeStampValue = value;\r
                                     timeStampFormat = attribute.tagText.getText().trim();\r
@@ -1036,10 +1036,10 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
                             }\r
                         }\r
                     } else {\r
-                        attribute.previewText.setText("*no matching attribute*");\r
+                        attribute.previewText.setText(Messages.CustomXmlParserInputWizardPage_noMatchingAttribute);\r
                     }\r
                 } else {\r
-                    attribute.previewText.setText("*no matching element*");\r
+                    attribute.previewText.setText(Messages.CustomXmlParserInputWizardPage_noMatchingElement);\r
                 }\r
             }\r
             for (ElementNode child : childElements) {\r
@@ -1062,13 +1062,13 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
             \r
             addAttributeButton = new Button(addAttributeComposite, SWT.PUSH);\r
             addAttributeButton.setImage(addImage);\r
-            addAttributeButton.setToolTipText("Add attribute");\r
+            addAttributeButton.setToolTipText(Messages.CustomXmlParserInputWizardPage_addAttribute);\r
             addAttributeButton.addSelectionListener(new SelectionAdapter() {\r
                @Override\r
                 public void widgetSelected(SelectionEvent e) {\r
                     removeAddButton();\r
                     String attributeName = getAttributeNameSuggestion(inputElement);\r
-                    InputAttribute inputAttribute = new InputAttribute(attributeName, attributeName, 0, "");\r
+                    InputAttribute inputAttribute = new InputAttribute(attributeName, attributeName, 0, ""); //$NON-NLS-1$\r
                     attributes.add(new Attribute(group, ElementNode.this, inputAttribute, attributes.size()+1));\r
                     createAddButton();\r
                     elementContainer.layout();\r
@@ -1081,7 +1081,7 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
             \r
             addAttributeLabel = new Label(addAttributeComposite, SWT.NULL);\r
             addAttributeLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));\r
-            addAttributeLabel.setText("New attribute");\r
+            addAttributeLabel.setText(Messages.CustomXmlParserInputWizardPage_newAttibute);\r
         }\r
 \r
         private void removeAddButton() {\r
@@ -1175,7 +1175,7 @@ public class CustomXmlParserInputWizardPage 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 attribute");\r
+            deleteButton.setToolTipText(Messages.CustomXmlParserInputWizardPage_removeAttribute);\r
             deleteButton.addSelectionListener(new SelectionAdapter() {\r
                @Override\r
                 public void widgetSelected(SelectionEvent e) {\r
@@ -1187,7 +1187,7 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
             \r
             attributeLabel = new Label(labelComposite, SWT.NULL);\r
             attributeLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));\r
-            attributeLabel.setText("Attribute");\r
+            attributeLabel.setText(Messages.CustomXmlParserInputWizardPage_attibute);\r
             \r
             attributeComposite = new Composite(parent, SWT.FILL);\r
             GridLayout attributeLayout = new GridLayout(4, false);\r
@@ -1197,7 +1197,7 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
             attributeComposite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));\r
 \r
             Label nameLabel = new Label(attributeComposite, SWT.NONE);\r
-            nameLabel.setText("name:");\r
+            nameLabel.setText(Messages.CustomXmlParserInputWizardPage_name);\r
             \r
             attributeNameText = new Text(attributeComposite, SWT.BORDER | SWT.SINGLE);\r
             attributeNameText.setLayoutData(new GridData(120, SWT.DEFAULT));\r
@@ -1205,13 +1205,13 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
             attributeNameText.addModifyListener(updateListener);\r
             \r
             Label previewLabel = new Label(attributeComposite, SWT.NONE);\r
-            previewLabel.setText("Preview:");\r
+            previewLabel.setText(Messages.CustomXmlParserInputWizardPage_preview);\r
             \r
             previewText = new Text(attributeComposite, SWT.BORDER | SWT.SINGLE | SWT.READ_ONLY);\r
             GridData 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.CustomXmlParserInputWizardPage_noMatch);\r
             previewText.setBackground(COLOR_WIDGET_BACKGROUND);\r
 \r
             filler = new Label(parent, SWT.NULL);\r
@@ -1236,7 +1236,7 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
                     tagText.removeModifyListener(updateListener);\r
                     switch (tagCombo.getSelectionIndex()) {\r
                     case 0: //Time Stamp\r
-                        tagLabel.setText("format:");\r
+                        tagLabel.setText(Messages.CustomXmlParserInputWizardPage_format);\r
                         tagLabel.setVisible(true);\r
                         tagText.setVisible(true);\r
                         tagText.addModifyListener(updateListener);\r
@@ -1246,7 +1246,7 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
                         tagText.setVisible(false);\r
                         break;\r
                     case 2: //Other\r
-                        tagLabel.setText("tag name:");\r
+                        tagLabel.setText(Messages.CustomXmlParserInputWizardPage_tagName);\r
                         tagLabel.setVisible(true);\r
                         if (tagText.getText().trim().length() == 0) {\r
                             tagText.setText(attributeNameText.getText().trim());\r
@@ -1270,13 +1270,13 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
             tagText.setText(attributeNameText.getText());\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.CustomXmlParserInputWizardPage_set, Messages.CustomXmlParserInputWizardPage_append, Messages.CustomXmlParserInputWizardPage_appendWith});\r
             actionCombo.select(inputAttribute.inputAction);\r
             actionCombo.addSelectionListener(updateListener);\r
             \r
             if (inputAttribute.inputName.equals(CustomXmlTraceDefinition.TAG_TIMESTAMP)) {\r
                 tagCombo.select(0);\r
-                tagLabel.setText("format:");\r
+                tagLabel.setText(Messages.CustomXmlParserInputWizardPage_format);\r
                 tagText.setText(inputAttribute.inputFormat);\r
                 tagText.addModifyListener(updateListener);\r
             } else if (inputAttribute.inputName.equals(CustomXmlTraceDefinition.TAG_MESSAGE)) {\r
@@ -1285,7 +1285,7 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
                 tagText.setVisible(false);\r
             } else {\r
                 tagCombo.select(2);\r
-                tagLabel.setText("tag name:");\r
+                tagLabel.setText(Messages.CustomXmlParserInputWizardPage_tagName);\r
                 tagText.setText(inputAttribute.inputName);\r
                 tagText.addModifyListener(updateListener);\r
             }\r
@@ -1364,7 +1364,7 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
                 }\r
             }\r
         }\r
-        return ("");\r
+        return ""; //$NON-NLS-1$\r
     }\r
     \r
     private String getAttributeNameSuggestion(InputElement inputElement) {\r
@@ -1387,7 +1387,7 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
                 }\r
             }\r
         }\r
-        return ("");\r
+        return ""; //$NON-NLS-1$\r
     }\r
 \r
     private void validate() {\r
@@ -1402,14 +1402,14 @@ public class CustomXmlParserInputWizardPage 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(Messages.CustomXmlParserInputWizardPage_62);\r
             logtypeText.setBackground(COLOR_LIGHT_RED);\r
         } else {\r
             logtypeText.setBackground(COLOR_TEXT_BACKGROUND);\r
             for (CustomXmlTraceDefinition def : CustomXmlTraceDefinition.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(Messages.CustomXmlParserInputWizardPage_63);\r
                         logtypeText.setBackground(COLOR_LIGHT_RED);\r
                         break;\r
                     }\r
@@ -1418,7 +1418,7 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
         }\r
         \r
         if (definition.rootInputElement == null) {\r
-            errors.append("Add a document element. ");\r
+            errors.append(Messages.CustomXmlParserInputWizardPage_64);\r
         }\r
         \r
         if (definition.rootInputElement != null) {\r
@@ -1431,28 +1431,28 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
             if ((definition.rootInputElement.attributes != null && definition.rootInputElement.attributes.size() != 0) ||\r
                     (definition.rootInputElement.childElements != null && definition.rootInputElement.childElements.size() != 0) || errors.length() == 0) {\r
                 if (!logEntryFound) {\r
-                    errors.append("Identify a Log Entry element. ");\r
+                    errors.append(Messages.CustomXmlParserInputWizardPage_65);\r
                 }\r
 \r
                 if (timeStampFound) {\r
                     if (timeStampOutputFormatText.getText().trim().length() == 0) {\r
-                        errors.append("Enter the output format for the Time Stamp field. ");\r
+                        errors.append(Messages.CustomXmlParserInputWizardPage_66);\r
                         timeStampOutputFormatText.setBackground(COLOR_LIGHT_RED);\r
                     } else {\r
                         try {\r
                             new SimpleDateFormat(timeStampOutputFormatText.getText().trim());\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(Messages.CustomXmlParserInputWizardPage_67);\r
                             timeStampOutputFormatText.setBackground(COLOR_LIGHT_RED);\r
                         }\r
                     }\r
                 } else {\r
-                    timeStampPreviewText.setText("*no time stamp element or attribute*");\r
+                    timeStampPreviewText.setText(Messages.CustomXmlParserInputWizardPage_68);\r
                 }\r
             }\r
         } else {\r
-            timeStampPreviewText.setText("*no time stamp element or attribute*");\r
+            timeStampPreviewText.setText(Messages.CustomXmlParserInputWizardPage_69);\r
         }\r
     \r
         if (errors.length() == 0) {\r
@@ -1470,7 +1470,7 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
         if (selectedElement != null && selectedElement.inputElement.equals(inputElement)) elementNode = selectedElement;\r
         if (inputElement == definition.rootInputElement) {\r
             if (inputElement.elementName.length() == 0) {\r
-                errors.append("Enter a name for the document element. ");\r
+                errors.append(Messages.CustomXmlParserInputWizardPage_70);\r
                 if (elementNode != null) elementNode.elementNameText.setBackground(COLOR_LIGHT_RED);\r
             } else {\r
                 if (elementNode != null) elementNode.elementNameText.setBackground(COLOR_TEXT_BACKGROUND);\r
@@ -1484,19 +1484,19 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
             if (inputElement.inputName.equals(CustomXmlTraceDefinition.TAG_TIMESTAMP)) {\r
                 timeStampFound = true;\r
                 if (inputElement.inputFormat.length() == 0) {\r
-                    errors.append("Enter the input format for the Time Stamp (Element " + getName(inputElement) + "). ");\r
+                    errors.append(Messages.CustomXmlParserInputWizardPage_71 + getName(inputElement) + "). "); //$NON-NLS-1$\r
                     if (elementNode != null) elementNode.tagText.setBackground(COLOR_LIGHT_RED);\r
                 } else {\r
                     try {\r
                         new SimpleDateFormat(inputElement.inputFormat);\r
                         if (elementNode != null) elementNode.tagText.setBackground(COLOR_TEXT_BACKGROUND);\r
                     } catch (IllegalArgumentException e) {\r
-                        errors.append("Enter a valid input format for the Time Stamp (Element " + getName(inputElement) + "). ");\r
+                        errors.append(Messages.CustomXmlParserInputWizardPage_73 + getName(inputElement) + "). "); //$NON-NLS-1$\r
                         if (elementNode != null) elementNode.tagText.setBackground(COLOR_LIGHT_RED);\r
                     }\r
                 }\r
             } else if (inputElement.inputName.length() == 0) {\r
-                errors.append("Enter a name for the input . ");\r
+                errors.append(Messages.CustomXmlParserInputWizardPage_75);\r
                 if (elementNode != null) elementNode.tagText.setBackground(COLOR_LIGHT_RED);\r
             } else {\r
                 if (elementNode != null) elementNode.tagText.setBackground(COLOR_TEXT_BACKGROUND);\r
@@ -1521,28 +1521,28 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
                     }\r
                 }\r
                 if (attribute.attributeName.length() == 0) {\r
-                    errors.append("Enter a name for the attribute (Attribute " + getName(inputElement) + ": ?). ");\r
+                    errors.append(Messages.CustomXmlParserInputWizardPage_76 + getName(inputElement) + ": ?). "); //$NON-NLS-1$\r
                     if (elementNode != null) elementNode.attributes.get(i).attributeNameText.setBackground(COLOR_LIGHT_RED);\r
                 } else if (duplicate) {\r
-                    errors.append("Duplicate attribute names (Attribute " + getName(attribute, inputElement) +"). ");\r
+                    errors.append(Messages.CustomXmlParserInputWizardPage_78 + getName(attribute, inputElement) +"). "); //$NON-NLS-1$\r
                     if (elementNode != null) elementNode.attributes.get(i).attributeNameText.setBackground(COLOR_LIGHT_RED);\r
                 }\r
                 if (attribute.inputName.equals(CustomXmlTraceDefinition.TAG_TIMESTAMP)) {\r
                     timeStampFound = true;\r
                     if (attribute.inputFormat.length() == 0) {\r
-                        errors.append("Enter the input format for the Time Stamp (Attribute " + getName(attribute, inputElement) +"). ");\r
+                        errors.append(Messages.CustomXmlParserInputWizardPage_80 + getName(attribute, inputElement) +"). "); //$NON-NLS-1$\r
                         if (elementNode != null) elementNode.attributes.get(i).tagText.setBackground(COLOR_LIGHT_RED);\r
                     } else {\r
                         try {\r
                             new SimpleDateFormat(attribute.inputFormat);\r
                             if (elementNode != null) elementNode.attributes.get(i).tagText.setBackground(COLOR_TEXT_BACKGROUND);\r
                         } catch (IllegalArgumentException e) {\r
-                            errors.append("Enter a valid input format for the Time Stamp (Attribute " + getName(attribute, inputElement) +"). ");\r
+                            errors.append(Messages.CustomXmlParserInputWizardPage_82 + getName(attribute, inputElement) +"). "); //$NON-NLS-1$\r
                             if (elementNode != null) elementNode.attributes.get(i).tagText.setBackground(COLOR_LIGHT_RED);\r
                         }\r
                     }\r
                 } else if (attribute.inputName.length() == 0) {\r
-                    errors.append("Enter a name for the data group (Attribute " + getName(attribute, inputElement) +"). ");\r
+                    errors.append(Messages.CustomXmlParserInputWizardPage_84 + getName(attribute, inputElement) +"). "); //$NON-NLS-1$\r
                     if (elementNode != null) elementNode.attributes.get(i).tagText.setBackground(COLOR_LIGHT_RED);\r
                 } else {\r
                     if (elementNode != null) elementNode.attributes.get(i).tagText.setBackground(COLOR_TEXT_BACKGROUND);\r
@@ -1560,7 +1560,7 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
                 ElementNode childElementNode = null;\r
                 if (selectedElement != null && selectedElement.inputElement.equals(child)) childElementNode = selectedElement;\r
                 if (child.elementName.length() == 0) {\r
-                    errors.append("Enter a name for the element (Element " + getName(child) + "). ");\r
+                    errors.append(Messages.CustomXmlParserInputWizardPage_86 + getName(child) + "). "); //$NON-NLS-1$\r
                     if (childElementNode != null) childElementNode.elementNameText.setBackground(COLOR_LIGHT_RED);\r
                 } else {\r
                     boolean duplicate = false;\r
@@ -1574,7 +1574,7 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
                         }\r
                     }\r
                     if (duplicate) {\r
-                        errors.append("Duplicate element names (Element " + getName(child) + "). ");\r
+                        errors.append(Messages.CustomXmlParserInputWizardPage_88 + getName(child) + "). "); //$NON-NLS-1$\r
                         if (childElementNode != null) childElementNode.elementNameText.setBackground(COLOR_LIGHT_RED);\r
                     }\r
                 }\r
This page took 0.038494 seconds and 5 git commands to generate.