Package org.eclipse.core.runtime

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


          project.open(null);
        IPath location = new Path(project.getLocation()
            .toPortableString() + "/" + localFileName);
        LogService.info("retrieving resource [" + httpAddress
            + "] to project [" + location.toPortableString() + "]");
        IFile iFile = project.getFile(location.lastSegment());
        URL url = new URL(httpAddress);
        HttpURLConnection connection = (HttpURLConnection) url
            .openConnection();
        connection.setRequestMethod("GET");
        // give it 15 seconds to respond
View Full Code Here


          project.open(null);
        IPath location = new Path(project.getLocation()
            .toPortableString() + "/" + localFileName);
        LogService.ok("retrieving resource " + jioLocation
            + " to project " + location.toPortableString());
        IFile iFile = project.getFile(location.lastSegment());
        File sourceFile = new File(jioLocation);
        InputStream is = new FileInputStream(sourceFile);

        bis = new BufferedInputStream(is);
        if (!iFile.exists()) {
View Full Code Here

      filePath = containerFullPath.append(fileName + i);
      if (extension != null) {
        filePath = filePath.addFileExtension(extension);
      }
    }
    return filePath.lastSegment();
  }

  /**
   * Runs the wizard in a dialog.
   *
 
View Full Code Here

      filePath = containerFullPath.append(fileName + i);
      if (extension != null) {
        filePath = filePath.addFileExtension(extension);
      }
    }
    return filePath.lastSegment();
  }

  /**
   * Runs the wizard in a dialog.
   *
 
View Full Code Here

      filePath = containerFullPath.append(fileName + i);
      if (extension != null) {
        filePath = filePath.addFileExtension(extension);
      }
    }
    return filePath.lastSegment();
  }

  /**
   * Runs the wizard in a dialog.
   *
 
View Full Code Here

      filePath = containerFullPath.append(fileName + i);
      if (extension != null) {
        filePath = filePath.addFileExtension(extension);
      }
    }
    return filePath.lastSegment();
  }

  /**
   * Runs the wizard in a dialog.
   *
 
View Full Code Here

      filePath = containerFullPath.append(fileName + i);
      if (extension != null) {
        filePath = filePath.addFileExtension(extension);
      }
    }
    return filePath.lastSegment();
  }

  /**
   * Runs the wizard in a dialog.
   *
 
View Full Code Here

        return statusHandler.handleRequest(request, response, new ServerStatus(IStatus.ERROR, HttpServletResponse.SC_BAD_REQUEST, msg, null));
      }
      webProjectExists = true;
      clone.setContentLocation(project.getProjectStore().getFileStore(filePath.removeFirstSegments(3)).toURI());
      if (cloneName == null)
        cloneName = filePath.segmentCount() > 2 ? filePath.lastSegment() : project.getFullName();
    } else if (workspacePath != null) {
      IPath path = new Path(workspacePath);
      // TODO: move this to CloneJob
      // if so, modify init part to create a new project if necessary
      final IMetaStore metaStore = OrionConfiguration.getMetaStore();
View Full Code Here

        if (srcPath != null && !srcPath.equals(relPath))
          relPath = makeRelativeTo(relPath, srcPath);
        // If the src file path is a file, use the file's name as
        // relative path.
        if (srcPath != null && srcPath.equals(relPath))
          relPath = new Path(relPath.lastSegment());

        File newFile = new File(new Path(targetFile.getAbsolutePath())
            .append(relPath).toPortableString());
        FileUtil.createFile(newFile, false);
        fos = new FileOutputStream(newFile);
View Full Code Here

  public void save() throws Exception {
    String fileName = null;
    if (source != null) {
      try {
        IPath path = new Path(source);
        fileName = path.lastSegment();
      } catch (Exception e) {
        // e.printStackTrace();
      }
    }
    source = LicenseManager.getInstance().saveLicense(
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.