1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +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
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* 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.
*
* 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;
@ -124,13 +124,19 @@ public abstract class RSEModelServiceElement extends ServiceElement
public void revert()
{
PropertySetServiceElement[] sets = getPropertySets();
IPropertySet[] origSets = new IPropertySet[sets.length];
for (int i = 0; i < sets.length; i++)
{
IPropertySet newSet = sets[i].getPropertySet();
IPropertySet originalSet = sets[i].getOriginalProperySet();
origSets[i] = originalSet;
_modelObject.removePropertySet(newSet.getName());
_modelObject.addPropertySet(originalSet);
}
_propertySetElements = null;
_propertySets = origSets;
getPropertySets();
}
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
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -12,7 +12,7 @@
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
*
* 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;
@ -82,7 +82,11 @@ public class ServerLauncherPropertiesServiceElement extends RSEModelServiceEleme
public void revert()
{
super.revert();
super.revert();
_launcherProperties = _launcherProperties.getConnectorService().getRemoteServerLauncherProperties();
_launcherProperties.restoreFromProperties();
_launcherProperties.commit();
}
public IServerLauncherProperties getServerLauncherProperties()