mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-12 18:55:38 +02:00
[417033] [import/export] RSE import wizard won't let user to select new
source
This commit is contained in:
parent
4b41713d89
commit
311e89ac8a
2 changed files with 33 additions and 5 deletions
|
@ -1,7 +1,7 @@
|
||||||
package org.eclipse.rse.internal.importexport.files;
|
package org.eclipse.rse.internal.importexport.files;
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2007 IBM Corporation and others.
|
* Copyright (c) 2000, 2013 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
|
||||||
|
@ -9,6 +9,7 @@ package org.eclipse.rse.internal.importexport.files;
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* IBM Corporation - initial API and implementation
|
* IBM Corporation - initial API and implementation
|
||||||
|
* David McKnight (IBM) - [417033] [import/export] RSE import wizard won't let user to select new source
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
|
@ -47,13 +48,15 @@ public class FileSystemStructureProvider implements IImportStructureProvider {
|
||||||
String[] children = ((File) element).list();
|
String[] children = ((File) element).list();
|
||||||
int childrenLength = children == null ? 0 : children.length;
|
int childrenLength = children == null ? 0 : children.length;
|
||||||
result = new ArrayList(childrenLength);
|
result = new ArrayList(childrenLength);
|
||||||
long start = System.currentTimeMillis();
|
//long start = System.currentTimeMillis();
|
||||||
// String p=((UniFilePlus)element).getAbsolutePath()+"/"; //$NON-NLS-1$
|
// String p=((UniFilePlus)element).getAbsolutePath()+"/"; //$NON-NLS-1$
|
||||||
// IHost sysC=((UniFilePlus) element).remoteFile.getSystemConnection();
|
// IHost sysC=((UniFilePlus) element).remoteFile.getSystemConnection();
|
||||||
IRemoteFile[] childIRemoteFiles = ((UniFilePlus) element).listIRemoteFiles();
|
IRemoteFile[] childIRemoteFiles = ((UniFilePlus) element).listIRemoteFiles();
|
||||||
for (int i = 0; i < childrenLength; i++)
|
if (childIRemoteFiles != null){
|
||||||
result.add(new UniFilePlus(childIRemoteFiles[i]));
|
for (int i = 0; i < childrenLength; i++)
|
||||||
Debug.out("Expanding [" + ((File) element).getPath() + "] took in (ms): " + (System.currentTimeMillis() - start)); //$NON-NLS-1$ //$NON-NLS-2$
|
result.add(new UniFilePlus(childIRemoteFiles[i]));
|
||||||
|
}
|
||||||
|
//Debug.out("Expanding [" + ((File) element).getPath() + "] took in (ms): " + (System.currentTimeMillis() - start)); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// Probably caused by IFS authority problem
|
// Probably caused by IFS authority problem
|
||||||
// ignore for now
|
// ignore for now
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
* 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
|
* David McKnight (IBM) - [368465] Import Files -RSE - Cyclic Symbolic Reference problem
|
||||||
|
* David McKnight (IBM) - [417033] [import/export] RSE import wizard won't let user to select new source
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.rse.internal.importexport.files;
|
package org.eclipse.rse.internal.importexport.files;
|
||||||
|
|
||||||
|
@ -105,6 +106,7 @@ import org.eclipse.ui.IWorkbench;
|
||||||
import org.eclipse.ui.dialogs.SaveAsDialog;
|
import org.eclipse.ui.dialogs.SaveAsDialog;
|
||||||
import org.eclipse.ui.dialogs.WizardResourceImportPage;
|
import org.eclipse.ui.dialogs.WizardResourceImportPage;
|
||||||
import org.eclipse.ui.internal.ide.dialogs.IElementFilter;
|
import org.eclipse.ui.internal.ide.dialogs.IElementFilter;
|
||||||
|
import org.eclipse.ui.model.AdaptableList;
|
||||||
import org.eclipse.ui.model.WorkbenchContentProvider;
|
import org.eclipse.ui.model.WorkbenchContentProvider;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -165,6 +167,12 @@ class RemoteImportWizardPage1 extends WizardResourceImportPage implements Listen
|
||||||
query(_fileSystemObject, _element, monitor);
|
query(_fileSystemObject, _element, monitor);
|
||||||
_isActive = false;
|
_isActive = false;
|
||||||
|
|
||||||
|
// make sure to update enablement after query
|
||||||
|
Display.getDefault().syncExec(new Runnable(){
|
||||||
|
public void run(){
|
||||||
|
updateWidgetEnablements();
|
||||||
|
}
|
||||||
|
});
|
||||||
return Status.OK_STATUS;
|
return Status.OK_STATUS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -768,6 +776,22 @@ class RemoteImportWizardPage1 extends WizardResourceImportPage implements Listen
|
||||||
if (_fileSystemTree == null){
|
if (_fileSystemTree == null){
|
||||||
_fileSystemTree = selectFiles(sourceDirectory, FileSystemStructureProvider.INSTANCE);
|
_fileSystemTree = selectFiles(sourceDirectory, FileSystemStructureProvider.INSTANCE);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
// update _fileSystemTree
|
||||||
|
Object root = _fileSystemTree.getFileSystemObject();
|
||||||
|
if (root == null){
|
||||||
|
AdaptableList flds = _fileSystemTree.getFolders();
|
||||||
|
if (flds != null){
|
||||||
|
Object child = flds.getChildren()[0];
|
||||||
|
if (child instanceof MinimizedFileSystemElement){
|
||||||
|
Object fsObj = ((MinimizedFileSystemElement)child).getFileSystemObject();
|
||||||
|
if (fsObj != sourceDirectory){
|
||||||
|
_fileSystemTree = selectFiles(sourceDirectory, FileSystemStructureProvider.INSTANCE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return _fileSystemTree;
|
return _fileSystemTree;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -996,6 +1020,7 @@ class RemoteImportWizardPage1 extends WizardResourceImportPage implements Listen
|
||||||
* Repopulate the view based on the currently entered directory.
|
* Repopulate the view based on the currently entered directory.
|
||||||
*/
|
*/
|
||||||
protected void resetSelection() {
|
protected void resetSelection() {
|
||||||
|
_queryAllJob = null; // a new one will be created
|
||||||
MinimizedFileSystemElement currentRoot = getFileSystemTree();
|
MinimizedFileSystemElement currentRoot = getFileSystemTree();
|
||||||
this.selectionGroup.setRoot(currentRoot);
|
this.selectionGroup.setRoot(currentRoot);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue