diff options
author | Mengxin Zhu | 2012-01-17 03:30:54 +0000 |
---|---|---|
committer | Mengxin Zhu | 2012-01-17 03:30:54 +0000 |
commit | 4529de7e84cc27de8774adf3ab8302cacbe7eb25 (patch) | |
tree | 44fefb7a24a8129da40cfbf259a7a674d9a21b3a /bundles/org.eclipse.equinox.p2.repository.tools/src/org | |
parent | 04549b1dd45c808514d61d55185d55a7a8b7fb63 (diff) | |
download | rt.equinox.p2-4529de7e84cc27de8774adf3ab8302cacbe7eb25.tar.gz rt.equinox.p2-4529de7e84cc27de8774adf3ab8302cacbe7eb25.tar.xz rt.equinox.p2-4529de7e84cc27de8774adf3ab8302cacbe7eb25.zip |
364929 support customizable download statisticsv20120117-1140v20120117-0330
Signed-off-by: Mengxin Zhu <kane.zhu@windriver.com>
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.repository.tools/src/org')
-rw-r--r-- | bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java index 57818e5ce..e814e9fbc 100644 --- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java +++ b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2010 IBM Corporation and others. + * Copyright (c) 2009, 2012 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -43,6 +43,7 @@ public class Repo2Runnable extends AbstractApplication implements IApplication { private static final String NATIVE_ARTIFACTS = "nativeArtifacts"; //$NON-NLS-1$ private static final String NATIVE_TYPE = "org.eclipse.equinox.p2.native"; //$NON-NLS-1$ private static final String PARM_OPERAND = "operand"; //$NON-NLS-1$ + private static final String PARM_PROFILE = "profile"; //$NON-NLS-1$ protected class CollectNativesAction extends ProvisioningAction { public IStatus execute(Map<String, Object> parameters) { @@ -57,8 +58,13 @@ public class Repo2Runnable extends AbstractApplication implements IApplication { @SuppressWarnings("unchecked") List<IArtifactRequest> artifactRequests = (List<IArtifactRequest>) parameters.get(NATIVE_ARTIFACTS); + IProfile profile = (IProfile) parameters.get(PARM_PROFILE); + String statsParameter = null; + if (profile != null) + statsParameter = profile.getProperty(IProfile.PROP_STATS_PARAMETERS); + for (IArtifactKey keyToDownload : toDownload) { - IArtifactRequest request = manager.createMirrorRequest(keyToDownload, destinationArtifactRepository, null, null); + IArtifactRequest request = manager.createMirrorRequest(keyToDownload, destinationArtifactRepository, null, null, statsParameter); artifactRequests.add(request); } return Status.OK_STATUS; |