Beispiel #1
0
 public static void addServletBridgeFromTarget(final IWARProduct product) {
   String path = getServletBridgeAbsolutePath();
   if (path != null) {
     IPath absolutePath = new Path(path);
     IPath relativePath = new Path(absolutePath.lastSegment());
     product.addLibrary(relativePath, true);
   }
 }
Beispiel #2
0
 public static IPath getAbsolutLibraryPath(final IPath libPath, final IWARProduct product) {
   IPath result = null;
   boolean fromTarget = product.isLibraryFromTarget(libPath);
   if (fromTarget) {
     String absoluteBridgePath = getServletBridgeAbsolutePath();
     if (absoluteBridgePath != null) {
       if (absoluteBridgePath.indexOf(libPath.toPortableString()) != -1) {
         result = new Path(absoluteBridgePath);
       }
     }
   } else {
     IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
     IFile lib = root.getFile(libPath);
     result = lib.getLocation();
   }
   return result;
 }