gpt4 book ai didi

org.eclipse.ui.wizards.datatransfer.ZipFileStructureProvider.getChildren()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-14 08:00:49 29 4
gpt4 key购买 nike

本文整理了Java中org.eclipse.ui.wizards.datatransfer.ZipFileStructureProvider.getChildren()方法的一些代码示例,展示了ZipFileStructureProvider.getChildren()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipFileStructureProvider.getChildren()方法的具体详情如下:
包路径:org.eclipse.ui.wizards.datatransfer.ZipFileStructureProvider
类名称:ZipFileStructureProvider
方法名:getChildren

ZipFileStructureProvider.getChildren介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui

@Override
public boolean hasChildren(Object element) {
  List<?> list= fProvider.getChildren(element);
  if (list != null) {
    for (int i= 0; i < list.size(); i++) {
      if (fProvider.isFolder(list.get(i))) {
        return true;
      }
    }
  }
  return false;
}

代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui

public boolean hasChildren(Object element) {
  List list= fProvider.getChildren(element);
  if (list != null) {
    for (int i= 0; i < list.size(); i++) {
      if (fProvider.isFolder(list.get(i))) {
        return true;
      }
    }
  }
  return false;
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

@Override
public boolean hasChildren(Object element) {
  List<?> list= fProvider.getChildren(element);
  if (list != null) {
    for (int i= 0; i < list.size(); i++) {
      if (fProvider.isFolder(list.get(i))) {
        return true;
      }
    }
  }
  return false;
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

@Override
public Object[] getChildren(Object element) {
  List<?> list= fProvider.getChildren(element);
  ArrayList<Object> res= new ArrayList<>();
  if (list != null) {
    for (int i= 0; i < list.size(); i++) {
      Object curr= list.get(i);
      if (fProvider.isFolder(curr)) {
        res.add(curr);
      }
    }
  }
  return res.toArray();
}

代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui

public Object[] getChildren(Object element) {
  List list= fProvider.getChildren(element);
  ArrayList res= new ArrayList();
  if (list != null) {
    for (int i= 0; i < list.size(); i++) {
      Object curr= list.get(i);
      if (fProvider.isFolder(curr)) {
        res.add(curr);
      }
    }
  }
  return res.toArray();
}

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui

@Override
public Object[] getChildren(Object element) {
  List<?> list= fProvider.getChildren(element);
  ArrayList<Object> res= new ArrayList<>();
  if (list != null) {
    for (int i= 0; i < list.size(); i++) {
      Object curr= list.get(i);
      if (fProvider.isFolder(curr)) {
        res.add(curr);
      }
    }
  }
  return res.toArray();
}

代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui

private Object recursiveFind(Object element, String name) {
  if (name.equals(fProvider.getLabel(element))) {
    return element;
  }
  List list= fProvider.getChildren(element);
  if (list != null) {
    for (int k= 0; k < list.size(); k++) {
      Object res= recursiveFind(list.get(k), name);
      if (res != null) {
        return res;
      }
    }                
  }
  return null;
}

代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui

public static String[] getTopLevelResources(File file) {
  ArrayList<String> result = new ArrayList<>();
  try (ZipFile zipFile = new ZipFile(file)) {
    ZipFileStructureProvider provider = new ZipFileStructureProvider(zipFile);
    List<?> children = provider.getChildren(provider.getRoot());
    if (children != null && !children.isEmpty()) {
      for (int i = 0; i < children.size(); i++) {
        Object curr = children.get(i);
        if (provider.isFolder(curr)) {
          if (!isClassFolder(provider, curr))
            result.add(provider.getLabel(curr) + "/"); //$NON-NLS-1$
          else {
            if (!result.contains(".")) //$NON-NLS-1$
              result.add("."); //$NON-NLS-1$
          }
        } else {
          result.add(provider.getLabel(curr));
        }
      }
    }
  } catch (IOException e) {
  }
  return result.toArray(new String[result.size()]);
}

代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui

public Object findElement(IPath path) {
  String[] segments= path.segments();
  
  Object elem= fProvider.getRoot();
  for (int i= 0; i < segments.length && elem != null; i++) {
    List list= fProvider.getChildren(elem);
    String name= segments[i];
    elem= null;
    for (int k= 0; k < list.size(); k++) {
      Object curr= list.get(k);
      if (fProvider.isFolder(curr) && name.equals(fProvider.getLabel(curr))) {
        elem= curr;
        break;
      }
    }
  }
  return elem;
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

public Object findElement(IPath path) {
  String[] segments= path.segments();
  Object elem= fProvider.getRoot();
  for (int i= 0; i < segments.length && elem != null; i++) {
    List<?> list= fProvider.getChildren(elem);
    String name= segments[i];
    elem= null;
    for (int k= 0; k < list.size(); k++) {
      Object curr= list.get(k);
      if (fProvider.isFolder(curr) && name.equals(fProvider.getLabel(curr))) {
        elem= curr;
        break;
      }
    }
  }
  return elem;
}

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui

public Object findElement(IPath path) {
  String[] segments= path.segments();
  Object elem= fProvider.getRoot();
  for (int i= 0; i < segments.length && elem != null; i++) {
    List<?> list= fProvider.getChildren(elem);
    String name= segments[i];
    elem= null;
    for (int k= 0; k < list.size(); k++) {
      Object curr= list.get(k);
      if (fProvider.isFolder(curr) && name.equals(fProvider.getLabel(curr))) {
        elem= curr;
        break;
      }
    }
  }
  return elem;
}

代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui

List<?> children = provider.getChildren(element);
if (children != null && !children.isEmpty()) {
  for (int i = 0; i < children.size(); i++) {

代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui

/**
 * Recursively searches through the zip files searching for files inside of
 * the specified folder.  The files found will be added to the given list.
 * @param provider zip provider
 * @param element element of the zip currently being looked at
 * @param folderPath location of the folder to get resources from
 * @param collected list of files found
 * @since 3.4
 */
private static void collectResourcesFromFolder(ZipFileStructureProvider provider, Object element, IPath folderPath, ArrayList<Object> collected) {
  List<?> children = provider.getChildren(element);
  if (children != null && !children.isEmpty()) {
    for (int i = 0; i < children.size(); i++) {
      Object curr = children.get(i);
      if (provider.isFolder(curr)) {
        if (provider.getLabel(curr).equals(folderPath.segment(0))) {
          if (folderPath.segmentCount() > 1) {
            collectResourcesFromFolder(provider, curr, folderPath.removeFirstSegments(1), collected);
          } else {
            collectResources(provider, curr, collected);
          }
        }
      }
    }
  }
}

代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui

List<?> children = provider.getChildren(provider.getRoot());
if (children != null && !children.isEmpty()) {
  for (int i = 0; i < children.size(); i++) {

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com