类org.eclipse.ui.wizards.datatransfer.IImportStructureProvider源码实例Demo

下面列出了怎么用org.eclipse.ui.wizards.datatransfer.IImportStructureProvider的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: APICloud-Studio   文件: WizardFolderImportPage.java
/**
 * Return a list of all files in the project
 * 
 * @param files
 * @param provider
 *            The provider for the parent file
 * @param entry
 *            The root directory of the project
 * @return A list of all files in the project
 */
@SuppressWarnings({ "rawtypes", "unchecked" })
protected boolean getFilesForProject(Collection files, IImportStructureProvider provider, Object entry)
{
	List children = provider.getChildren(entry);
	Iterator childrenEnum = children.iterator();

	while (childrenEnum.hasNext())
	{
		Object child = childrenEnum.next();
		// Add the child, this way we get every files except the project
		// folder itself which we don't want
		files.add(child);
		// We don't have isDirectory for tar so must check for children
		// instead
		if (provider.isFolder(child))
		{
			getFilesForProject(files, provider, child);
		}
	}
	return true;
}
 
/**
 * Constructor
 *
 * @param importStructureProvider
 *            the {@link IImportStructureProvider}
 * @param archivePath
 *            the path of the archive file
 */
public FileSystemObjectImportStructureProvider(IImportStructureProvider importStructureProvider, String archivePath) {
    fImportProvider = importStructureProvider;
    fArchivePath = archivePath;
}
 
 类所在包
 类方法
 同包方法