Package org.eclipse.core.runtime

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


        final InputStream is = new FileInputStream(path);

        final String fileName;
        if (path.contains("/")) {
          fileName = path.substring(path.lastIndexOf("/") + 1);
        } else {
          fileName = path.substring(path.lastIndexOf("\\") + 1);
        }

        IFile importFile = importProject.getFile(fileName);
View Full Code Here


        final String fileName;
        if (path.contains("/")) {
          fileName = path.substring(path.lastIndexOf("/") + 1);
        } else {
          fileName = path.substring(path.lastIndexOf("\\") + 1);
        }

        IFile importFile = importProject.getFile(fileName);
        if (importFile.exists()) {
          importFile.delete(true, null);
View Full Code Here

    }
    else if (resource instanceof ClassPathResource) {
      String path = ((ClassPathResource) resource).getPath();
      String fileName = path;
      String packageName = "";
      int ix = path.lastIndexOf('/');
      if (ix > 0) {
        fileName = path.substring(ix + 1);
        packageName = path.substring(0, ix).replace('/', '.');
      }
      if (fileName.endsWith(ClassUtils.CLASS_FILE_SUFFIX)) {
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.