1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-13 12:05:21 +02:00

[306187] cancel in properties of remote system view doesn't work

This commit is contained in:
David McKnight 2010-03-17 19:19:29 +00:00
parent 50fbf1f3dc
commit fd257e196b
2 changed files with 15 additions and 5 deletions

View file

@ -1,5 +1,5 @@
/******************************************************************************** /********************************************************************************
* Copyright (c) 2006 IBM Corporation. All rights reserved. * Copyright (c) 2006, 2010 IBM Corporation. All rights reserved.
* This program and the accompanying materials are made available under the terms * 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 * of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html * available at http://www.eclipse.org/legal/epl-v10.html
@ -11,7 +11,7 @@
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
* *
* Contributors: * Contributors:
* {Name} (company) - description of contribution. * David McKnight (IBM) - [306187] cancel in properties of remote system view doesn't work
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.ui.widgets.services; package org.eclipse.rse.ui.widgets.services;
@ -124,13 +124,19 @@ public abstract class RSEModelServiceElement extends ServiceElement
public void revert() public void revert()
{ {
PropertySetServiceElement[] sets = getPropertySets(); PropertySetServiceElement[] sets = getPropertySets();
IPropertySet[] origSets = new IPropertySet[sets.length];
for (int i = 0; i < sets.length; i++) for (int i = 0; i < sets.length; i++)
{ {
IPropertySet newSet = sets[i].getPropertySet(); IPropertySet newSet = sets[i].getPropertySet();
IPropertySet originalSet = sets[i].getOriginalProperySet(); IPropertySet originalSet = sets[i].getOriginalProperySet();
origSets[i] = originalSet;
_modelObject.removePropertySet(newSet.getName()); _modelObject.removePropertySet(newSet.getName());
_modelObject.addPropertySet(originalSet); _modelObject.addPropertySet(originalSet);
} }
_propertySetElements = null;
_propertySets = origSets;
getPropertySets();
} }
public void refreshProperties() public void refreshProperties()

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2006, 2007 IBM Corporation and others. * Copyright (c) 2006, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -12,7 +12,7 @@
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
* *
* Contributors: * Contributors:
* {Name} (company) - description of contribution. * David McKnight (IBM) - [306187] cancel in properties of remote system view doesn't work
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.ui.widgets.services; package org.eclipse.rse.ui.widgets.services;
@ -82,7 +82,11 @@ public class ServerLauncherPropertiesServiceElement extends RSEModelServiceEleme
public void revert() public void revert()
{ {
super.revert(); super.revert();
_launcherProperties = _launcherProperties.getConnectorService().getRemoteServerLauncherProperties();
_launcherProperties.restoreFromProperties();
_launcherProperties.commit();
} }
public IServerLauncherProperties getServerLauncherProperties() public IServerLauncherProperties getServerLauncherProperties()