Bug 559117 - Add ToolbarItem command dialog should be centered

Don't persist dialog origin, set dialog bounds strategy to
DIALOG_PERSISTSIZE only for all SaveDialogBoundsSettingsDialogs

Change-Id: I92af7c37c47a3fff070c34fe5cd42c0a78738507
Signed-off-by: Benedikt Kuntz <benedikt.kuntz@airbus.com>
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/SaveDialogBoundsSettingsDialog.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/SaveDialogBoundsSettingsDialog.java
index 39e29cb..3299b14 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/SaveDialogBoundsSettingsDialog.java
+++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/SaveDialogBoundsSettingsDialog.java
@@ -25,8 +25,6 @@
 
 public abstract class SaveDialogBoundsSettingsDialog extends TitleAreaDialog {
 
-	private static final String DIALOG_ORIGIN_X = "DIALOG_X_ORIGIN"; //$NON-NLS-1$
-	private static final String DIALOG_ORIGIN_Y = "DIALOG_Y_ORIGIN"; //$NON-NLS-1$
 	private static final String DIALOG_WIDTH = "DIALOG_WIDTH"; //$NON-NLS-1$
 	private static final String DIALOG_HEIGHT = "DIALOG_HEIGHT"; //$NON-NLS-1$
 	private static final int DIALOG_MINIMUM_HEIGHT = 300;
@@ -41,15 +39,11 @@
 
 		dialogSettings.put(DIALOG_HEIGHT, preferences.getInt(DIALOG_HEIGHT, -1));
 		dialogSettings.put(DIALOG_WIDTH, preferences.getInt(DIALOG_WIDTH, -1));
-		dialogSettings.put(DIALOG_ORIGIN_X, preferences.getInt(DIALOG_ORIGIN_X, -1));
-		dialogSettings.put(DIALOG_ORIGIN_Y, preferences.getInt(DIALOG_ORIGIN_Y, -1));
 	}
 
 	private void saveDialogSettings() {
 		preferences.put(DIALOG_HEIGHT, dialogSettings.get(DIALOG_HEIGHT));
 		preferences.put(DIALOG_WIDTH, dialogSettings.get(DIALOG_WIDTH));
-		preferences.put(DIALOG_ORIGIN_X, dialogSettings.get(DIALOG_ORIGIN_X));
-		preferences.put(DIALOG_ORIGIN_Y, dialogSettings.get(DIALOG_ORIGIN_Y));
 		try {
 			preferences.flush();
 		} catch (BackingStoreException e) {
@@ -80,6 +74,11 @@
 		return dialogSettings;
 	}
 
+	@Override
+	protected int getDialogBoundsStrategy() {
+		return DIALOG_PERSISTSIZE;
+	}
+
 	public Preferences getPreferences() {
 		return preferences;
 	}