< prev index next >

application/org.openjdk.jmc.rcp.application/src/main/java/org/openjdk/jmc/rcp/application/p2/P2Toolkit.java

Print this page

        

@@ -37,14 +37,16 @@
 import java.util.logging.Level;
 
 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.
  * 
  */

@@ -69,7 +71,10 @@
                 IArtifactRepositoryManager artifactManager = ProvUI.getArtifactRepositoryManager(ui.getSession());
                 artifactManager.addRepository(repoUri);
 
                 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);
         }
 }
< prev index next >