Package org.eclipse.core.runtime

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


   * @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

  // package private for testing
  String getName(IPackageFragmentRoot root) {
    IPath path = root.getPath();
    if (!root.isExternal() && path.segmentCount() > 1) {
      return path.removeFirstSegments(1).toString();
    } else {
      return path.lastSegment();
    }
  }
View Full Code Here

   * @return  label for the class path entry
   */
  private static String getPathLabel(IPackageFragmentRoot root) {
    IPath path = root.getPath();
    if (!root.isExternal()) {
      path = path.removeFirstSegments(1);
    }
    return path.toString();
  }
 
  private final Table table;
View Full Code Here

      jarPackage.setOverwrite(true);
      jarPackage.setBuildIfNeeded(false);
      IPath path = jarPackage.getJarLocation();
      if (path.segmentCount() > 1)
      {
        jarPackage.setJarLocation(path.removeFirstSegments(path.segmentCount() - 1));
      }
      SysOutProgressMonitor.out.println("Exporting jar file using jar descriptor: " + jardesc.getFullPath() + " to: " + jarPackage.getAbsoluteJarLocation().toOSString());
      IJarExportRunnable export = jarPackage.createJarExportRunnable(null);
      export.run(monitor);
      SysOutProgressMonitor.out.println();
View Full Code Here

    dialog.open();
    Object[] results = dialog.getResult();
    if ((results != null) && (results.length > 0)
        && (results[0] instanceof IPath)) {
      IPath path = (IPath) results[0];
      path = path.removeFirstSegments(1);
      String containerName = path.makeRelative().toString();
      fWebAppDirText.setText(containerName);
    }
  }
View Full Code Here

    dialog.showClosedProjects(false);
    dialog.open();
    Object[] results = dialog.getResult();
    if ((results != null) && (results.length > 0) && (results[0] instanceof IPath)) {
      IPath path = (IPath) results[0];
      path = path.removeFirstSegments(1);
      String containerName = path.makeRelative().toString();
      fWebAppDirText.setText(containerName);
    }
  }
View Full Code Here

    dialog.open();
    Object[] results = dialog.getResult();
    if ((results != null) && (results.length > 0)
        && (results[0] instanceof IPath)) {
      IPath path = (IPath) results[0];
      path = path.removeFirstSegments(1);
      String containerName = path.makeRelative().toString();
      fWebAppDirText.setText(containerName);
    }
  }
View Full Code Here

    dialog.open();
    Object[] results = dialog.getResult();
    if ((results != null) && (results.length > 0)
        && (results[0] instanceof IPath)) {
      IPath path = (IPath) results[0];
      path = path.removeFirstSegments(1);
      String containerName = path.makeRelative().toString();
      fWebAppDirText.setText(containerName);
    }
  }
View Full Code Here

    dialog.open();
    Object[] results = dialog.getResult();
    if ((results != null) && (results.length > 0)
        && (results[0] instanceof IPath)) {
      IPath path = (IPath) results[0];
      path = path.removeFirstSegments(1);
      String containerName = path.makeRelative().toString();
      fWebAppDirText.setText(containerName);
    }
  }
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.