Example #1
0
  public static IPluginModelBase resolveTargetBundleEntry(BundleEntry e) {
    final String[] bundleId = splitBundleId(e);

    final String id = bundleId[0];
    final String version = bundleId[1];

    final ModelEntry entry = PluginRegistry.findEntry(id);
    if (entry == null) {
      return null;
    }

    final IPluginModelBase[] models = entry.getExternalModels();

    return findClosestPluginMatch(version, models);
  }
Example #2
0
 private static String getServletBridgeAbsolutePath() {
   String result = null;
   ModelEntry entry = PluginRegistry.findEntry(Validator.SERVLET_BRIDGE_ID);
   if (entry != null) {
     IPluginModelBase[] targetModels = entry.getExternalModels();
     for (int i = 0; i < targetModels.length && result == null; i++) {
       IPluginModelBase bridgeModel = targetModels[i];
       String libLocation = bridgeModel.getInstallLocation();
       if (libLocation != null && libLocation.toLowerCase().indexOf(".jar") != -1) // $NON-NLS-1$
       {
         result = libLocation;
       }
     }
   }
   return result;
 }