changeset 77:75d4f7700580

JMC-5990: Human readable names for JMC updatesites are missing Reviewed-by: hirt Contributed-by: Tejpal Rebari <tejpal.rebari@oracle.com>
author ghb <guru.hb@oracle.com>
date Mon, 26 Nov 2018 11:50:45 +0530
parents f08427620998
children 1fa131d835db
files application/l10n/org.openjdk.jmc.rcp.application.ja/src/main/resources/org/openjdk/jmc/rcp/application/messages_ja.properties application/l10n/org.openjdk.jmc.rcp.application.zh_CN/src/main/resources/org/openjdk/jmc/rcp/application/messages_zh_CN.properties application/org.openjdk.jmc.rcp.application/src/main/java/org/openjdk/jmc/rcp/application/Messages.java application/org.openjdk.jmc.rcp.application/src/main/java/org/openjdk/jmc/rcp/application/p2/P2Toolkit.java application/org.openjdk.jmc.rcp.application/src/main/resources/org/openjdk/jmc/rcp/application/messages.properties
diffstat 5 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/application/l10n/org.openjdk.jmc.rcp.application.ja/src/main/resources/org/openjdk/jmc/rcp/application/messages_ja.properties	Mon Nov 26 11:46:28 2018 +0530
+++ b/application/l10n/org.openjdk.jmc.rcp.application.ja/src/main/resources/org/openjdk/jmc/rcp/application/messages_ja.properties	Mon Nov 26 11:50:45 2018 +0530
@@ -52,3 +52,4 @@
 LockedWorkspaceDialog_LOCKED_WORKSPACE3_TEXT=\u672C\u5F53\u306B\u7D9A\u884C\u3057\u307E\u3059\u304B\u3002
 LockedWorkspaceDialog_OK_BUTTON_TEXT=OK
 LockedWorkspaceDialog_CANCEL_BUTTON_TEXT=\u53D6\u6D88
+JMC_RCP_P2_UPDATESITE_NICK_NAME=JDK Mission Control 7.0.0 RCP Update Site
\ No newline at end of file
--- a/application/l10n/org.openjdk.jmc.rcp.application.zh_CN/src/main/resources/org/openjdk/jmc/rcp/application/messages_zh_CN.properties	Mon Nov 26 11:46:28 2018 +0530
+++ b/application/l10n/org.openjdk.jmc.rcp.application.zh_CN/src/main/resources/org/openjdk/jmc/rcp/application/messages_zh_CN.properties	Mon Nov 26 11:50:45 2018 +0530
@@ -52,3 +52,4 @@
 LockedWorkspaceDialog_LOCKED_WORKSPACE3_TEXT=\u662F\u5426\u786E\u5B9E\u8981\u7EE7\u7EED?
 LockedWorkspaceDialog_OK_BUTTON_TEXT=\u786E\u5B9A
 LockedWorkspaceDialog_CANCEL_BUTTON_TEXT=\u53D6\u6D88
+JMC_RCP_P2_UPDATESITE_NICK_NAME=JDK Mission Control 7.0.0 RCP Update Site
\ No newline at end of file
--- a/application/org.openjdk.jmc.rcp.application/src/main/java/org/openjdk/jmc/rcp/application/Messages.java	Mon Nov 26 11:46:28 2018 +0530
+++ b/application/org.openjdk.jmc.rcp.application/src/main/java/org/openjdk/jmc/rcp/application/Messages.java	Mon Nov 26 11:50:45 2018 +0530
@@ -59,6 +59,7 @@
 	public static String LockedWorkspaceDialog_LOCKED_WORKSPACE3_TEXT;
 	public static String LockedWorkspaceDialog_LOCKED_WORKSPACE_TITLE;
 	public static String LockedWorkspaceDialog_OK_BUTTON_TEXT;
+	public static String JMC_RCP_P2_UPDATESITE_NICK_NAME;
 
 	static {
 		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
--- a/application/org.openjdk.jmc.rcp.application/src/main/java/org/openjdk/jmc/rcp/application/p2/P2Toolkit.java	Mon Nov 26 11:46:28 2018 +0530
+++ b/application/org.openjdk.jmc.rcp.application/src/main/java/org/openjdk/jmc/rcp/application/p2/P2Toolkit.java	Mon Nov 26 11:50:45 2018 +0530
@@ -39,10 +39,12 @@
 import org.eclipse.equinox.internal.p2.ui.ProvUI;
 import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
 import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.repository.IRepository;
 import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
 import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
 import org.eclipse.equinox.p2.ui.ProvisioningUI;
 import org.openjdk.jmc.rcp.application.ApplicationPlugin;
+import org.openjdk.jmc.rcp.application.Messages;
 
 /**
  * Toolkit for managing P2 repositories.
@@ -71,5 +73,8 @@
 
 		IMetadataRepositoryManager metadataManager = ProvUI.getMetadataRepositoryManager(ui.getSession());
 		metadataManager.addRepository(repoUri);
+
+		metadataManager.setRepositoryProperty(repoUri, IRepository.PROP_NICKNAME, Messages.JMC_RCP_P2_UPDATESITE_NICK_NAME);
+		artifactManager.setRepositoryProperty(repoUri, IRepository.PROP_NICKNAME, Messages.JMC_RCP_P2_UPDATESITE_NICK_NAME);
 	}
 }
--- a/application/org.openjdk.jmc.rcp.application/src/main/resources/org/openjdk/jmc/rcp/application/messages.properties	Mon Nov 26 11:46:28 2018 +0530
+++ b/application/org.openjdk.jmc.rcp.application/src/main/resources/org/openjdk/jmc/rcp/application/messages.properties	Mon Nov 26 11:50:45 2018 +0530
@@ -52,3 +52,4 @@
 LockedWorkspaceDialog_LOCKED_WORKSPACE3_TEXT=Are you sure you want to proceed?
 LockedWorkspaceDialog_OK_BUTTON_TEXT=Ok
 LockedWorkspaceDialog_CANCEL_BUTTON_TEXT=Cancel
+JMC_RCP_P2_UPDATESITE_NICK_NAME=JDK Mission Control 7.0.0 RCP Update Site
\ No newline at end of file