From 72749117f2454264fa7bc21884af0baeb0ec5abe Mon Sep 17 00:00:00 2001 From: David McKnight Date: Tue, 21 Apr 2009 20:21:24 +0000 Subject: [PATCH] [272708] [import/export] fix various bugs with the synchronization support --- .../files/RemoteFileImportDescriptionReader.java | 10 +++++++++- .../files/RemoteFileImportDescriptionWriter.java | 4 +++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportDescriptionReader.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportDescriptionReader.java index cc02568f6ab..9a806aec330 100644 --- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportDescriptionReader.java +++ b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportDescriptionReader.java @@ -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$ diff --git a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportDescriptionWriter.java b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportDescriptionWriter.java index 7e5d92190c5..f799c8eb3d7 100644 --- a/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportDescriptionWriter.java +++ b/rse/plugins/org.eclipse.rse.importexport/src/org/eclipse/rse/internal/importexport/files/RemoteFileImportDescriptionWriter.java @@ -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$