1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-20 15:35:24 +02:00

[368465] Import Files -RSE - Cyclic Symbolic Reference problem

This commit is contained in:
David McKnight 2012-01-13 15:15:03 +00:00
parent 98b45a642e
commit 8fe1012c8c
2 changed files with 29 additions and 15 deletions

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2000, 2010 IBM Corporation and others. * Copyright (c) 2000, 2011 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
@ -18,6 +18,7 @@
* David McKnight (IBM) - [272708] [import/export] fix various bugs with the synchronization support * David McKnight (IBM) - [272708] [import/export] fix various bugs with the synchronization support
* David McKnight (IBM) - [276535] File Conflict when Importing Remote Folder with Case-Differentiated-Only Filenames into Project * David McKnight (IBM) - [276535] File Conflict when Importing Remote Folder with Case-Differentiated-Only Filenames into Project
* David McKnight (IBM) - [191558] [importexport][efs] Import to Project doesn't work with remote EFS projects * David McKnight (IBM) - [191558] [importexport][efs] Import to Project doesn't work with remote EFS projects
* David McKnight (IBM) - [368465] Import Files -RSE - Cyclic Symbolic Reference problem
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.internal.importexport.files; package org.eclipse.rse.internal.importexport.files;
@ -141,6 +142,7 @@ class RemoteImportWizardPage1 extends WizardResourceImportPage implements Listen
private Object _fileSystemObject; private Object _fileSystemObject;
private IImportStructureProvider _provider; private IImportStructureProvider _provider;
private MinimizedFileSystemElement _element; private MinimizedFileSystemElement _element;
private List _resultsQueried;
private volatile boolean _isActive = false; private volatile boolean _isActive = false;
public QueryAllJob(Object fileSystemObject, IImportStructureProvider provider, MinimizedFileSystemElement element){ public QueryAllJob(Object fileSystemObject, IImportStructureProvider provider, MinimizedFileSystemElement element){
@ -148,6 +150,7 @@ class RemoteImportWizardPage1 extends WizardResourceImportPage implements Listen
_fileSystemObject = fileSystemObject; _fileSystemObject = fileSystemObject;
_provider = provider; _provider = provider;
_element = element; _element = element;
_resultsQueried = new ArrayList();
} }
@ -186,14 +189,18 @@ class RemoteImportWizardPage1 extends WizardResourceImportPage implements Listen
while (childrenEnum.hasNext()) { while (childrenEnum.hasNext()) {
Object child = childrenEnum.next(); Object child = childrenEnum.next();
String elementLabel = _provider.getLabel(child); if (!_resultsQueried.contains(child)){
//Create one level below _resultsQueried.add(child);
MinimizedFileSystemElement result = new MinimizedFileSystemElement(elementLabel, element, _provider.isFolder(child));
result.setFileSystemObject(child); String elementLabel = _provider.getLabel(child);
//Create one level below
if (child instanceof UniFilePlus){ MinimizedFileSystemElement result = new MinimizedFileSystemElement(elementLabel, element, _provider.isFolder(child));
if (((UniFilePlus)child).isDirectory()){ result.setFileSystemObject(child);
resultsToQuery.add(result);
if (child instanceof UniFilePlus){
if (((UniFilePlus)child).isDirectory()){
resultsToQuery.add(result);
}
} }
} }
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2000, 2009 IBM Corporation and others. * Copyright (c) 2000, 2011 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
@ -13,6 +13,7 @@
* David Dykstal (IBM) [230821] fix IRemoteFileSubSystem API to be consistent with IFileService * David Dykstal (IBM) [230821] fix IRemoteFileSubSystem API to be consistent with IFileService
* Takuya Miyamoto - [185925] Integrate Platform/Team Synchronization * Takuya Miyamoto - [185925] Integrate Platform/Team Synchronization
* David McKnight (IBM) - [272708] [import/export] fix various bugs with the synchronization support * David McKnight (IBM) - [272708] [import/export] fix various bugs with the synchronization support
* David McKnight (IBM) - [368465] Import Files -RSE - Cyclic Symbolic Reference problem
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.internal.importexport.files; package org.eclipse.rse.internal.importexport.files;
@ -57,13 +58,13 @@ public class UniFilePlus extends File {
public boolean canWrite() { public boolean canWrite() {
return remoteFile.canWrite(); return remoteFile.canWrite();
} }
public int compareTo(File pathname) { public int compareTo(File pathname) {
if (pathname instanceof UniFilePlus) return remoteFile.compareTo(pathname); if (pathname instanceof UniFilePlus)
return remoteFile.compareTo(pathname);
return super.compareTo(pathname); return super.compareTo(pathname);
} }
/*
/*
public int compareTo(Object o) public int compareTo(Object o)
{ {
return remoteFile.compareTo(o); return remoteFile.compareTo(o);
@ -118,7 +119,13 @@ public class UniFilePlus extends File {
} }
public boolean equals(Object obj) { public boolean equals(Object obj) {
return remoteFile.equals(obj); if (obj instanceof UniFilePlus){
UniFilePlus uniF = (UniFilePlus)obj;
return remoteFile.getCanonicalPath().equals(uniF.remoteFile.getCanonicalPath());
}
else {
return remoteFile.equals(obj);
}
} }
public boolean exists() { public boolean exists() {