Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.Path.removeFirstSegments()


      if (tarBundleServletCtx != null) {
        // Adjust a resource directory path suffixed with "/" if need.
        if (!request.getServletPath().endsWith("/")
            && getFwkContainerHelper().checkIsResourceDir(
                tarBundleServletCtx,
                path.removeFirstSegments(1))) {
          response.sendRedirect(request.getRequestURI() + "/");
          return false;
        }
        // Remove the target bundle prefix from the path and then try to
        // redirect to welcome page if exists.
View Full Code Here


        }
        // Remove the target bundle prefix from the path and then try to
        // redirect to welcome page if exists.
        welcomePagePath = getFwkContainerHelper()
            .tryRedirectToWelcomPage(tarBundleServletCtx,
                path.removeFirstSegments(1));
        if (welcomePagePath != null)
          request.setServletPath(path.append(welcomePagePath)
              .toPortableString());
      }
    }
View Full Code Here

              new Path(siteName + "/" + versionName).append(
                  "plugins").append(pluginName)
                  .toPortableString())) {
            File unzippedDocRoot = AutoFindTocProvider.docJarPaths
                .get(bufferedPath);
            String resRelPath = reqPath.removeFirstSegments(3)
                .toPortableString();
            File resFile = new File(unzippedDocRoot, resRelPath);
            try {
              if (resFile.exists())
                return resFile.toURI().toURL();
View Full Code Here

                  "plugins").append(pluginName)
                  .toPortableString())) {
            File jarFile = bufferedPath.toFile();
            JarFile jar = new JarFile(jarFile);
            try {
              JarEntry entry = jar.getJarEntry(reqPath
                  .removeFirstSegments(2).toPortableString());
              if (entry != null) {
                ServletOutputStream out = resp
                    .getOutputStream();
                InputStream in = jar.getInputStream(entry);
View Full Code Here

   * @return the image descriptor
   */
  public static ImageDescriptor findImageDescriptor(String path) {
    final IPath p = new Path(path);
    if (p.isAbsolute() && p.segmentCount() > 1) {
      return AbstractUIPlugin.imageDescriptorFromPlugin(p.segment(0), p
          .removeFirstSegments(1).makeAbsolute().toString());
    } else {
      return getBundledImageDescriptor(p.makeAbsolute().toString());
    }
  }
View Full Code Here

   * @return the image descriptor
   */
  public static ImageDescriptor findImageDescriptor(String path) {
    final IPath p = new Path(path);
    if (p.isAbsolute() && p.segmentCount() > 1) {
      return AbstractUIPlugin.imageDescriptorFromPlugin(p.segment(0), p
          .removeFirstSegments(1).makeAbsolute().toString());
    } else {
      return getBundledImageDescriptor(p.makeAbsolute().toString());
    }
  }
View Full Code Here

  for (int i = 0; i < length; i++) {
    String resName = (String) entryNames.get(i);
    // consider that a .java file is not a non-java resource (see bug 12246 Packages view shows .class and .java files when JAR has source)
    if (!Util.isJavaLikeFileName(resName)) {
      IPath filePath = new Path(resName);
      IPath childPath = filePath.removeFirstSegments(this.names.length);
      if (jarEntries.containsKey(childPath)) {
        // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=222665
        continue;
      }
      JarEntryFile file = new JarEntryFile(filePath.lastSegment());
View Full Code Here

   * @return the image descriptor
   */
  public static ImageDescriptor findImageDescriptor(String path) {
    final IPath p = new Path(path);
    if (p.isAbsolute() && p.segmentCount() > 1) {
      return AbstractUIPlugin.imageDescriptorFromPlugin(p.segment(0), p
          .removeFirstSegments(1).makeAbsolute().toString());
    } else {
      return getBundledImageDescriptor(p.makeAbsolute().toString());
    }
  }
View Full Code Here

   * @return the image descriptor
   */
  public static ImageDescriptor findImageDescriptor(String path) {
    final IPath p = new Path(path);
    if (p.isAbsolute() && p.segmentCount() > 1) {
      return AbstractUIPlugin.imageDescriptorFromPlugin(p.segment(0), p
          .removeFirstSegments(1).makeAbsolute().toString());
    } else {
      return getBundledImageDescriptor(p.makeAbsolute().toString());
    }
  }
View Full Code Here

   * @return the image descriptor
   */
  public static ImageDescriptor findImageDescriptor(String path) {
    final IPath p = new Path(path);
    if (p.isAbsolute() && p.segmentCount() > 1) {
      return AbstractUIPlugin.imageDescriptorFromPlugin(p.segment(0), p
          .removeFirstSegments(1).makeAbsolute().toString());
    } else {
      return getBundledImageDescriptor(p.makeAbsolute().toString());
    }
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.