1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-09-10 12:03:16 +02:00

[272708] [import/export] fix various bugs with the synchronization support

This commit is contained in:
David McKnight 2009-04-21 20:21:24 +00:00
parent 9eb977c623
commit 72749117f2
2 changed files with 12 additions and 2 deletions

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2007 IBM Corporation and others.
* Copyright (c) 2000, 2009 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
@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Martin Oberhuber (Wind River) - [174945] split importexport icons from rse.ui
* David McKnight (IBM) - [272708] [import/export] fix various bugs with the synchronization support
*******************************************************************************/
package org.eclipse.rse.internal.importexport.files;
@ -103,6 +104,13 @@ public class RemoteFileImportDescriptionReader implements IRemoteFileImportDescr
private void xmlReadOptions(RemoteFileImportData importData, Element element) throws IOException {
if (element.getNodeName().equals("options")) { //$NON-NLS-1$
try {
importData.setReviewSynchronize(getBooleanAttribute(element, "reviewSynchronize")); //$NON-NLS-1$
}
catch (IOException e){
// this is a new option so if we're reading an older config file, this attribute doesn't exist
importData.setReviewSynchronize(false);
}
importData.setOverWriteExistingFiles(getBooleanAttribute(element, "overWriteExistingFiles")); //$NON-NLS-1$
importData.setCreateDirectoryStructure(getBooleanAttribute(element, "createDirectoryStructure")); //$NON-NLS-1$
importData.setCreateSelectionOnly(getBooleanAttribute(element, "createSelectedOnly")); //$NON-NLS-1$

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2007 IBM Corporation and others.
* Copyright (c) 2000, 2009 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
@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Martin Oberhuber (Wind River) - [174945] split importexport icons from rse.ui
* David McKnight (IBM) - [272708] [import/export] fix various bugs with the synchronization support
*******************************************************************************/
package org.eclipse.rse.internal.importexport.files;
@ -108,6 +109,7 @@ public class RemoteFileImportDescriptionWriter implements IRemoteFileImportDescr
private void xmlWriteOptions(RemoteFileImportData importData, Document document, Element xmlFileDesc) throws DOMException {
Element options = document.createElement("options"); //$NON-NLS-1$
xmlFileDesc.appendChild(options);
options.setAttribute("reviewSynchronize", "" + importData.isReviewSynchronize()); //$NON-NLS-1$ //$NON-NLS-2$
options.setAttribute("overWriteExistingFiles", "" + importData.isOverWriteExistingFiles()); //$NON-NLS-1$ //$NON-NLS-2$
options.setAttribute("createDirectoryStructure", "" + importData.isCreateDirectoryStructure()); //$NON-NLS-1$ //$NON-NLS-2$
options.setAttribute("createSelectedOnly", "" + importData.isCreateSelectionOnly()); //$NON-NLS-1$ //$NON-NLS-2$