From e525bf1b19b59258473f9b2a04b1c5abac292ef1 Mon Sep 17 00:00:00 2001 From: Dave McKnight Date: Fri, 25 Apr 2014 14:56:21 -0400 Subject: [PATCH] [433541] profile duplication isn't copying profile or connection property sets --- .../rse/internal/core/model/SystemRegistry.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemRegistry.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemRegistry.java index 7195e115d32..830984eda74 100644 --- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemRegistry.java +++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemRegistry.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2006, 2011 IBM Corporation and others. All rights reserved. + * Copyright (c) 2006, 2014 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 http://www.eclipse.org/legal/epl-v10.html @@ -61,6 +61,7 @@ * Martin Oberhuber (Wind River) - [245154][api] add getSubSystemConfigurationProxiesBySystemType() * Zhou Renjian (Kortide) - [282238] NPE when copying host and overwrite itself * Martin Oberhuber (Wind River) - [359554] Avoid disconnect when changing default user id only + * David McKnight (IBM) - [433541] profile duplication isn't copying profile or connection property sets ********************************************************************************/ package org.eclipse.rse.internal.core.model; @@ -585,10 +586,11 @@ public class SystemRegistry implements ISystemRegistry ISubSystemConfiguration factory = null; for (int idx = 0; idx < conns.length; idx++) { - msg = "Copying subsystems for connection " + conns[idx].getAliasName(); //$NON-NLS-1$ + IHost host = conns[idx]; + msg = "Copying subsystems for connection " + host.getAliasName(); //$NON-NLS-1$ //monitor.subTask(msg); RSECorePlugin.getDefault().getLogger().logDebugMessage(this.getClass().getName(), msg); - subsystems = getSubSystems(conns[idx]); // get old subsystems for this connection + subsystems = getSubSystems(host); // get old subsystems for this connection if ((subsystems != null) && (subsystems.length > 0) && newConns != null) { for (int jdx = 0; jdx < subsystems.length; jdx++) @@ -602,9 +604,12 @@ public class SystemRegistry implements ISystemRegistry } } //try { java.lang.Thread.sleep(1000l); } catch (InterruptedException e) {} + host.clonePropertySets(newConns[idx]); // copy property sets from host } } - monitor.worked(1); + + profile.clonePropertySets(newProfile); // copy property sets from profile + monitor.worked(1); } catch (Exception exc) { @@ -648,6 +653,7 @@ public class SystemRegistry implements ISystemRegistry return newProfile; } + /* (non-Javadoc) * @see org.eclipse.rse.core.model.ISystemRegistry#deleteSystemProfile(org.eclipse.rse.core.model.ISystemProfile) */