[496466] Update tabbar tooltip and text in tests.

Change-Id: If088db1d5ab7c2db53645d3a2f8e69cb7164f559
Signed-off-by: Maxime Porhel <maxime.porhel@obeo.fr>
diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/EdgeLabelStabilityTest.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/EdgeLabelStabilityTest.java
index 890553d..2385d02 100644
--- a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/EdgeLabelStabilityTest.java
+++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/EdgeLabelStabilityTest.java
@@ -15,6 +15,7 @@
 import org.eclipse.sirius.diagram.DDiagram;
 import org.eclipse.sirius.diagram.ui.edit.api.part.AbstractDiagramContainerEditPart;
 import org.eclipse.sirius.diagram.ui.edit.api.part.AbstractDiagramNameEditPart;
+import org.eclipse.sirius.diagram.ui.provider.Messages;
 import org.eclipse.sirius.diagram.ui.tools.api.preferences.SiriusDiagramUiPreferencesKeys;
 import org.eclipse.sirius.tests.swtbot.support.api.AbstractSiriusSwtBotGefTestCase;
 import org.eclipse.sirius.tests.swtbot.support.api.business.UIDiagramRepresentation;
@@ -51,10 +52,6 @@
 
     private static final String C2 = "C2Too lonnnnnnnnnnnng name";
 
-    private static final String COPY_LAYOUT_TOOLTIP = "Copy the layout of the selected diagram elements";
-
-    private static final String PASTE_LAYOUT_TOOLTIP = "Paste the current recorded layout to the selected diagram";
-
     private UIResource sessionAirdResource;
 
     private UILocalSession localSession;
@@ -138,13 +135,13 @@
             Dimension edgeLabelDimension = editor.getDimension("extends " + C2, AbstractDiagramNameEditPart.class);
 
             // Copy layout
-            bot.toolbarButtonWithTooltip(COPY_LAYOUT_TOOLTIP).click();
+            bot.toolbarButtonWithTooltip(Messages.CopyFormatAction_toolTipText).click();
 
             // Open temp diagram
             editor = (SWTBotSiriusDiagramEditor) openRepresentation(localSession.getOpenedSession(), REPRESENTATION_NAME, REPRESENTATION_INSTANCE_NAME_TEMP, DDiagram.class);
 
             // Paste layout
-            bot.toolbarButtonWithTooltip(PASTE_LAYOUT_TOOLTIP).click();
+            bot.toolbarButtonWithTooltip(Messages.PasteFormatAction_toolTipText).click();
 
             assertEquals("The edge label width has changed", edgeLabelDimension.width, editor.getDimension("extends " + C2, AbstractDiagramNameEditPart.class).width);
             assertEquals("The edge label height has changed", edgeLabelDimension.height, editor.getDimension("extends " + C2, AbstractDiagramNameEditPart.class).height);
@@ -156,7 +153,7 @@
             edgeLabelDimension = editor.getDimension("extends " + C2, AbstractDiagramNameEditPart.class);
 
             // Copy layout
-            bot.toolbarButtonWithTooltip(COPY_LAYOUT_TOOLTIP).click();
+            bot.toolbarButtonWithTooltip(Messages.CopyFormatAction_toolTipText).click();
 
             // Close this editor to toggle back to temp diagram
             bot.activeEditor().close();
@@ -168,7 +165,7 @@
                     .selectRepresentationInstance(REPRESENTATION_INSTANCE_NAME_TEMP, UIDiagramRepresentation.class).open();
 
             // Paste layout
-            bot.toolbarButtonWithTooltip(PASTE_LAYOUT_TOOLTIP).click();
+            bot.toolbarButtonWithTooltip(Messages.PasteFormatAction_toolTipText).click();
 
             assertEquals("The edge label width has changed", edgeLabelDimension.width, editor.getDimension("extends " + C2, AbstractDiagramNameEditPart.class).width);
             assertEquals("The edge label height has changed", edgeLabelDimension.height, editor.getDimension("extends " + C2, AbstractDiagramNameEditPart.class).height);
diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/sequence/AbstractActionDisabledOnSequenceDiagramTest.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/sequence/AbstractActionDisabledOnSequenceDiagramTest.java
index 6fb1f26..c1fd66c 100644
--- a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/sequence/AbstractActionDisabledOnSequenceDiagramTest.java
+++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/sequence/AbstractActionDisabledOnSequenceDiagramTest.java
@@ -14,6 +14,7 @@
 import java.util.List;
 
 import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.ui.provider.Messages;
 import org.eclipse.sirius.diagram.ui.tools.api.preferences.SiriusDiagramUiPreferencesKeys;
 import org.eclipse.sirius.ext.base.Option;
 import org.eclipse.sirius.tests.swtbot.support.api.business.UIResource;
@@ -36,22 +37,6 @@
  */
 public abstract class AbstractActionDisabledOnSequenceDiagramTest extends AbstractDefaultModelSequenceTests {
 
-    private static final String PIN = "Pin selected elements";
-
-    private static final String UNPIN = "Unpin selected elements";
-
-    private static final String HIDE = "Hide element";
-
-    private static final String COPY_LAYOUT = "Copy the layout of the selected diagram elements";
-
-    private static final String PIN_UNPIN_WIZARD = "Pin/Unpin";
-
-    private static final String DIALOG_PINNING = "Diagram elements pinning";
-
-    private static final String SHOW_HIDE_WIZARD = "Show/Hide";
-
-    private static final String DIALOG_SHOWING = "Diagram elements visibility";
-
     /**
      * Method to retrieve the part to check.
      * 
@@ -93,7 +78,7 @@
      * interactionUses, combinedFragments, Lost messages and found messages.
      */
     public void testPinFromTabbarOnSequenceDiagramsComponents() {
-        testActionFromTabbarOnSequenceDiagramComponents("The pin action in tabbar should not be enabled", PIN);
+        testActionFromTabbarOnSequenceDiagramComponents("The pin action in tabbar should not be enabled", Messages.PinElementsEclipseAction_text);
     }
 
     /**
@@ -101,7 +86,7 @@
      * interactionUses, combinedFragments, Lost messages and found messages.
      */
     public void testUnpinFromTabbarOnSequenceDiagramsComponents() {
-        testActionFromTabbarOnSequenceDiagramComponents("The unPin action in tabbar should not be enabled", UNPIN);
+        testActionFromTabbarOnSequenceDiagramComponents("The unPin action in tabbar should not be enabled", Messages.UnpinElementsEclipseAction_text);
     }
 
     /**
@@ -109,7 +94,7 @@
      * interactionUses, combinedFragments, Lost messages and found messages.
      */
     public void testHideFromTabbarOnSequenceDiagramsComponents() {
-        testActionFromTabbarOnSequenceDiagramComponents("The Hide action in tabbar should not be enabled", HIDE);
+        testActionFromTabbarOnSequenceDiagramComponents("The Hide action in tabbar should not be enabled", Messages.SiriusDiagramActionBarContributor_hideElement);
     }
 
     /**
@@ -118,7 +103,7 @@
      * messages.
      */
     public void testCopyLayoutFromTabbarOnSequenceDiagramsComponents() {
-        testActionFromTabbarOnSequenceDiagramComponents("The Copy Layout action in tabbar should not be enabled", COPY_LAYOUT);
+        testActionFromTabbarOnSequenceDiagramComponents("The Copy Format action in tabbar should not be enabled", Messages.CopyFormatAction_toolTipText);
     }
 
     /**
@@ -128,7 +113,8 @@
      * Session should not be in dirty.
      */
     public void testPinUnPinWizardFromTabbarOnSequenceDiagramsComponents() {
-        testActionWizardFromTabbarOnSequenceDiagramComponents(PIN_UNPIN_WIZARD, DIALOG_PINNING, "The elements in wizard Pin/UnPin should be show grayed and should have no effect");
+        testActionWizardFromTabbarOnSequenceDiagramComponents(Messages.SelectPinnedElementsAction_tooltip, Messages.SelectPinnedElementsAction_label,
+                "The elements in wizard Pin/UnPin should be show grayed and should have no effect");
     }
 
     /**
@@ -138,7 +124,8 @@
      * Session should not be in dirty.
      */
     public void testShowHideWizardFromTabbarOnSequenceDiagramsComponents() {
-        testActionWizardFromTabbarOnSequenceDiagramComponents(SHOW_HIDE_WIZARD, DIALOG_SHOWING, "The elements in wizard Show/Hide should be show grayed and should have no effect");
+        testActionWizardFromTabbarOnSequenceDiagramComponents(Messages.SelectHiddenElementsAction_tooltip, Messages.HiddenElementsSelectionCommand_dialogTitle,
+                "The elements in wizard Show/Hide should be show grayed and should have no effect");
     }
 
     private void testActionWizardFromTabbarOnSequenceDiagramComponents(String toolTipAction, String dialogName, String messageError) {
diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/tabbar/TabBarTest.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/tabbar/TabBarTest.java
index 7b32658..70eafb5 100644
--- a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/tabbar/TabBarTest.java
+++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/tabbar/TabBarTest.java
@@ -26,9 +26,9 @@
 import org.eclipse.sirius.diagram.ui.edit.api.part.AbstractDiagramContainerEditPart;
 import org.eclipse.sirius.diagram.ui.edit.api.part.IDDiagramEditPart;
 import org.eclipse.sirius.diagram.ui.provider.DiagramUIPlugin;
+import org.eclipse.sirius.diagram.ui.provider.Messages;
 import org.eclipse.sirius.diagram.ui.tools.api.preferences.SiriusDiagramUiPreferencesKeys;
 import org.eclipse.sirius.diagram.ui.tools.internal.actions.distribute.DistributeAction;
-import org.eclipse.sirius.diagram.ui.tools.internal.actions.style.ResetStylePropertiesToDefaultValuesAction;
 import org.eclipse.sirius.diagram.ui.tools.internal.editor.DDiagramEditorImpl;
 import org.eclipse.sirius.ext.base.Option;
 import org.eclipse.sirius.tests.support.api.TestsUtil;
@@ -90,16 +90,17 @@
 
     private static final String[] DIAGRAM_TOOLBARDROPDOWNBUTTONS_TOOLTIPS = { "Arrange All", "Select &All", "Layers", "Filters" };
 
-    private static final String[] DIAGRAM_TOOLBARBUTTONS_TOOLTIPS = { "Refresh diagram", "Show/Hide", "Pin/Unpin", "Paste the current recorded layout to the selected diagram", "Zoom In (Ctrl+=)",
-            "Zoom Out (Ctrl+-)", "Export diagram as image" };
+    private static final String[] DIAGRAM_TOOLBARBUTTONS_TOOLTIPS = { Messages.SiriusDiagramActionBarContributor_refreshDiagram, Messages.SelectHiddenElementsAction_tooltip,
+            Messages.SelectPinnedElementsAction_tooltip, Messages.PasteStyleAction_toolTipText, "Zoom In (Ctrl+=)", "Zoom Out (Ctrl+-)", Messages.SaveAsImageFileAction_label };
 
-    private static final String[] DIAGRAM_TOOLBARTOGGLEBUTTONS_TOOLTIPS = { "Activate Layouting Mode" };
+    private static final String[] DIAGRAM_TOOLBARTOGGLEBUTTONS_TOOLTIPS = { Messages.SetLayoutingModeCommandAndUpdateActionImage_activateLabel };
 
     private static final String[] CONTAINER_TOOLBARDROPDOWNBUTTONS_TOOLTIPS = { "Arrange Selection", "Align Left", DistributeAction.getTooltip(DistributeAction.GAPS_HORIZONTALLY), "Font Color",
             "Fill &Color", "Li&ne Color", "Line Style" };
 
-    private static final String[] CONTAINER_TOOLBARBUTTONS_TOOLTIPS = { "Pin selected elements", "Unpin selected elements", "Copy the layout of the selected diagram elements", "Hide element",
-            "Hide label", "Delete from Diagram", "Delete from Model", "Font", "Set style to workspace image", ResetStylePropertiesToDefaultValuesAction.ACTION_NAME,
+    private static final String[] CONTAINER_TOOLBARBUTTONS_TOOLTIPS = { Messages.PinElementsEclipseAction_text, Messages.UnpinElementsEclipseAction_text, Messages.CopyFormatAction_toolTipText,
+            Messages.SiriusDiagramActionBarContributor_hideElement, Messages.SiriusDiagramActionBarContributor_hideLabel, Messages.SiriusDiagramActionBarContributor_deleteFromDiagram,
+            Messages.SiriusDiagramActionBarContributor_deleteFromModel, "Font", Messages.SetStyleToWorkspaceImageAction_text, Messages.ResetStylePropertiesToDefaultValuesAction_text,
             "Apply the applicable appearance properties of the last selected shape to the other selected shapes.", "Make height and width same size", "Auto Size" };
 
     private static final String[] CONTAINER_TOOLBARTOGGLEBUTTONS_TOOLTIPS = { "Bold Font Style", "Italic Font Style" };