NEW - bug 282382: UDC: Upload url should be displayed in preferences/wizard
https://bugs.eclipse.org/bugs/show_bug.cgi?id=282382
diff --git a/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preferences/Messages.java b/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preferences/Messages.java
index 0ca4cd6..6df135a 100644
--- a/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preferences/Messages.java
+++ b/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preferences/Messages.java
@@ -33,6 +33,7 @@
 	public static String UsageDataUploadingPreferencesPage_6;

 	public static String UsageDataUploadingPreferencesPage_7;

 	public static String UsageDataUploadingPreferencesPage_8;

+	public static String UsageDataUploadingPreferencesPage_9;

 	public static String UsageDataUploadingTermsOfUsePage_0;

 

 	static {

diff --git a/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preferences/UsageDataUploadingPreferencesPage.java b/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preferences/UsageDataUploadingPreferencesPage.java
index 4134d93..a7a3191 100644
--- a/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preferences/UsageDataUploadingPreferencesPage.java
+++ b/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preferences/UsageDataUploadingPreferencesPage.java
@@ -251,6 +251,7 @@
 			
 		createUploadPeriodField(group);
 		createLastUploadField(group);
+		createUploadUrlField(group);
 	}
 		
 	/*
@@ -311,7 +312,7 @@
 	private Image getErrorImage() {
 		return FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_ERROR).getImage();
 	}
-
+	
 	/*
 	 * Note that this method expects to be run in the UI Thread.
 	 */
@@ -328,6 +329,26 @@
 	}
 	
 	/*
+	 * The Upload URL is not expected to change during execution, so
+	 * we make not consideration for changes while the preferences
+	 * page is open.
+	 * 
+	 * Note that this method expects to be run in the UI Thread.
+	 */
+	private void createUploadUrlField(Group composite) {
+		label = new Label(composite, SWT.NONE);
+		label.setText(Messages.UsageDataUploadingPreferencesPage_9); 
+		
+		Text uploadUrlText = new Text(composite, SWT.SINGLE | SWT.BORDER);
+		uploadUrlText.setEnabled(false);
+		GridData gridData = new GridData(SWT.FILL, SWT.CENTER, true, false);
+		gridData.horizontalIndent = FieldDecorationRegistry.getDefault().getMaximumDecorationWidth();
+		gridData.horizontalSpan = 2;
+		uploadUrlText.setLayoutData(gridData);
+		uploadUrlText.setText(getSettings().getUploadUrl());
+	}
+	
+	/*
 	 * Note that this method expects to be run in the UI Thread.
 	 */
 	private void createButtonsArea(Composite parent) {
diff --git a/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preferences/messages.properties b/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preferences/messages.properties
index ae16fc9..57df0b1 100644
--- a/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preferences/messages.properties
+++ b/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preferences/messages.properties
@@ -9,4 +9,5 @@
 UsageDataUploadingPreferencesPage_6=Last Upload:

 UsageDataUploadingPreferencesPage_7=Upload Now

 UsageDataUploadingPreferencesPage_8=This value is being overridden by a System property.

+UsageDataUploadingPreferencesPage_9=Upload URL:

 UsageDataUploadingTermsOfUsePage_0=I accept the Terms of Use