org.eclipse.equinox.internal.frameworkadmin.utils.Utils.getBundleInfosFromList()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(8.7k)|赞(0)|评价(0)|浏览(65)

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

Utils.getBundleInfosFromList介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.equinox.simpleconfigurator/manipulator

private BundleInfo[] orderingInitialConfig(List setToInitialConfig) {
  List notToBeStarted = new LinkedList();
  List toBeStarted = new LinkedList();
  for (Iterator ite2 = setToInitialConfig.iterator(); ite2.hasNext();) {
    BundleInfo bInfo = (BundleInfo) ite2.next();
    if (bInfo.isMarkedAsStarted())
      toBeStarted.add(bInfo);
    else
      notToBeStarted.add(bInfo);
  }
  setToInitialConfig.clear();
  setToInitialConfig.addAll(notToBeStarted);
  setToInitialConfig.addAll(toBeStarted);
  return Utils.getBundleInfosFromList(setToInitialConfig);
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.equinox.simpleconfigurator.manipulator

private BundleInfo[] orderingInitialConfig(List<BundleInfo> setToInitialConfig) {
  List<BundleInfo> notToBeStarted = new LinkedList<BundleInfo>();
  List<BundleInfo> toBeStarted = new LinkedList<BundleInfo>();
  for (Iterator<BundleInfo> ite2 = setToInitialConfig.iterator(); ite2.hasNext();) {
    BundleInfo bInfo = ite2.next();
    if (bInfo.isMarkedAsStarted())
      toBeStarted.add(bInfo);
    else
      notToBeStarted.add(bInfo);
  }
  setToInitialConfig.clear();
  setToInitialConfig.addAll(notToBeStarted);
  setToInitialConfig.addAll(toBeStarted);
  return Utils.getBundleInfosFromList(setToInitialConfig);
}

代码示例来源:origin: com.github.veithen.cosmos.bootstrap/org.eclipse.equinox.simpleconfigurator.manipulator

private BundleInfo[] orderingInitialConfig(List<BundleInfo> setToInitialConfig) {
  List<BundleInfo> notToBeStarted = new LinkedList<BundleInfo>();
  List<BundleInfo> toBeStarted = new LinkedList<BundleInfo>();
  for (Iterator<BundleInfo> ite2 = setToInitialConfig.iterator(); ite2.hasNext();) {
    BundleInfo bInfo = ite2.next();
    if (bInfo.isMarkedAsStarted())
      toBeStarted.add(bInfo);
    else
      notToBeStarted.add(bInfo);
  }
  setToInitialConfig.clear();
  setToInitialConfig.addAll(notToBeStarted);
  setToInitialConfig.addAll(toBeStarted);
  return Utils.getBundleInfosFromList(setToInitialConfig);
}

代码示例来源:origin: com.github.veithen.cosmos.bootstrap/org.eclipse.equinox.frameworkadmin

return getBundleInfosFromList(bundleInfoList);

代码示例来源:origin: org.eclipse.platform/org.eclipse.equinox.frameworkadmin

return getBundleInfosFromList(bundleInfoList);

代码示例来源:origin: org.eclipse.equinox/frameworkadmin

return getBundleInfosFromList(bundleInfoList);

代码示例来源:origin: com.github.veithen.cosmos.bootstrap/org.eclipse.equinox.frameworkadmin

public BundleInfo[] getExpectedState() throws FrameworkAdminRuntimeException {
  if (!fwAdmin.isActive())
    throw new FrameworkAdminRuntimeException("FrameworkAdmin creates this object is no more available.", FrameworkAdminRuntimeException.FRAMEWORKADMIN_UNAVAILABLE); //$NON-NLS-1$
  return Utils.getBundleInfosFromList(this.bundleInfosList);
}

代码示例来源:origin: org.eclipse.equinox/frameworkadmin

public BundleInfo[] getExpectedState() throws FrameworkAdminRuntimeException {
  if (!fwAdmin.isActive())
    throw new FrameworkAdminRuntimeException("FrameworkAdmin creates this object is no more available.", FrameworkAdminRuntimeException.FRAMEWORKADMIN_UNAVAILABLE);
  return Utils.getBundleInfosFromList(this.bundleInfosList);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.equinox.frameworkadmin

@Override
public BundleInfo[] getExpectedState() throws FrameworkAdminRuntimeException {
  if (!fwAdmin.isActive())
    throw new FrameworkAdminRuntimeException("FrameworkAdmin creates this object is no more available.", FrameworkAdminRuntimeException.FRAMEWORKADMIN_UNAVAILABLE); //$NON-NLS-1$
  return Utils.getBundleInfosFromList(this.bundleInfosList);
}

代码示例来源:origin: com.github.veithen.cosmos.bootstrap/org.eclipse.equinox.frameworkadmin

return Utils.getBundleInfosFromList(list);

代码示例来源:origin: org.eclipse.equinox/frameworkadmin

public BundleInfo[] getSystemFragmentedBundles() {
  BundleInfo systemBInfo = this.getSystemBundle();
  if (systemBInfo == null)
    return NULL_BUNDLEINFOS;
  List list = new LinkedList();
  for (Iterator ite = this.bundleInfosList.iterator(); ite.hasNext();) {
    BundleInfo bInfo = (BundleInfo) ite.next();
    URI location = bInfo.getLocation();
    String manifestVersion = Utils.getManifestMainAttributes(location, Constants.BUNDLE_MANIFESTVERSION);
    if (manifestVersion == null)
      continue;
    if (manifestVersion.equals("1") || manifestVersion.equals("1.0")) //$NON-NLS-1$//$NON-NLS-2$
      continue;
    String fragmentHost = Utils.getManifestMainAttributes(location, Constants.FRAGMENT_HOST);
    if (fragmentHost == null)
      continue;
    int index = fragmentHost.indexOf(";"); //$NON-NLS-1$
    if (index == -1)
      continue;
    String symbolicName = fragmentHost.substring(0, index).trim();
    String parameter = fragmentHost.substring(index + 1).trim();
    // TODO What to do ,in case of alias name of system bundle is not used ?
    if (symbolicName.equals(Constants.SYSTEM_BUNDLE_SYMBOLICNAME))
      if (parameter.equals(Constants.EXTENSION_DIRECTIVE + ":=" + Constants.EXTENSION_FRAMEWORK)) { //$NON-NLS-1$
        list.add(location);
        break;
      }
  }
  return Utils.getBundleInfosFromList(list);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.equinox.frameworkadmin

return Utils.getBundleInfosFromList(list);

代码示例来源:origin: org.eclipse.platform/org.eclipse.equinox.frameworkadmin

@Override
public BundleInfo[] getPrerequisteBundles(BundleInfo bInfo) {
  URI location = bInfo.getLocation();
  final String requiredBundles = Utils.getManifestMainAttributes(location, Constants.REQUIRE_BUNDLE);
  if (requiredBundles == null)
    return new BundleInfo[] {this.getSystemBundle()};
  String[] clauses = Utils.getClauses(requiredBundles);
  List<String> list = new LinkedList<>();
  for (int i = 0; i < clauses.length; i++)
    list.add(Utils.getPathFromClause(clauses[i]));
  List<BundleInfo> ret = new LinkedList<>();
  ret.add(this.getSystemBundle());
  for (Iterator<BundleInfo> ite = this.bundleInfosList.iterator(); ite.hasNext();) {
    BundleInfo currentBInfo = ite.next();
    URI currentLocation = currentBInfo.getLocation();
    String currentSymbolicName = Utils.getManifestMainAttributes(currentLocation, Constants.BUNDLE_SYMBOLICNAME);
    if (currentSymbolicName == null)
      continue;
    currentSymbolicName = Utils.getPathFromClause(currentSymbolicName);
    for (Iterator<String> ite2 = list.iterator(); ite2.hasNext();) {
      String symbolicName = ite2.next();
      if (symbolicName.equals(currentSymbolicName)) {
        ret.add(currentBInfo);
        break;
      }
    }
  }
  return Utils.getBundleInfosFromList(ret);
}

代码示例来源:origin: org.eclipse.equinox/frameworkadmin

public BundleInfo[] getPrerequisteBundles(BundleInfo bInfo) {
  URI location = bInfo.getLocation();
  final String requiredBundles = Utils.getManifestMainAttributes(location, Constants.REQUIRE_BUNDLE);
  if (requiredBundles == null)
    return new BundleInfo[] {this.getSystemBundle()};
  String[] clauses = Utils.getClauses(requiredBundles);
  List list = new LinkedList();
  for (int i = 0; i < clauses.length; i++)
    list.add(Utils.getPathFromClause(clauses[i]));
  List ret = new LinkedList();
  ret.add(this.getSystemBundle());
  for (Iterator ite = this.bundleInfosList.iterator(); ite.hasNext();) {
    BundleInfo currentBInfo = (BundleInfo) ite.next();
    URI currentLocation = currentBInfo.getLocation();
    String currentSymbolicName = Utils.getManifestMainAttributes(currentLocation, Constants.BUNDLE_SYMBOLICNAME);
    if (currentSymbolicName == null)
      continue;
    currentSymbolicName = Utils.getPathFromClause(currentSymbolicName);
    for (Iterator ite2 = list.iterator(); ite2.hasNext();) {
      String symbolicName = (String) ite2.next();
      if (symbolicName.equals(currentSymbolicName)) {
        ret.add(currentBInfo);
        break;
      }
    }
  }
  return Utils.getBundleInfosFromList(ret);
}

代码示例来源:origin: com.github.veithen.cosmos.bootstrap/org.eclipse.equinox.frameworkadmin

public BundleInfo[] getPrerequisteBundles(BundleInfo bInfo) {
  URI location = bInfo.getLocation();
  final String requiredBundles = Utils.getManifestMainAttributes(location, Constants.REQUIRE_BUNDLE);
  if (requiredBundles == null)
    return new BundleInfo[] {this.getSystemBundle()};
  String[] clauses = Utils.getClauses(requiredBundles);
  List<String> list = new LinkedList<String>();
  for (int i = 0; i < clauses.length; i++)
    list.add(Utils.getPathFromClause(clauses[i]));
  List<BundleInfo> ret = new LinkedList<BundleInfo>();
  ret.add(this.getSystemBundle());
  for (Iterator<BundleInfo> ite = this.bundleInfosList.iterator(); ite.hasNext();) {
    BundleInfo currentBInfo = ite.next();
    URI currentLocation = currentBInfo.getLocation();
    String currentSymbolicName = Utils.getManifestMainAttributes(currentLocation, Constants.BUNDLE_SYMBOLICNAME);
    if (currentSymbolicName == null)
      continue;
    currentSymbolicName = Utils.getPathFromClause(currentSymbolicName);
    for (Iterator<String> ite2 = list.iterator(); ite2.hasNext();) {
      String symbolicName = ite2.next();
      if (symbolicName.equals(currentSymbolicName)) {
        ret.add(currentBInfo);
        break;
      }
    }
  }
  return Utils.getBundleInfosFromList(ret);
}

相关文章