Package org.eclipse.core.runtime

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


            try {
                URL url = FileLocator.resolve(bundle.getEntry("/")); //$NON-NLS-1$
                url = FileLocator.toFileURL(url);
                String path = url.getFile();
                if (path.startsWith("file:")) { //$NON-NLS-1$
                    path = path.substring(5);
                }

                path = new File(path).getAbsolutePath();

                if (path.endsWith("!")) { //$NON-NLS-1$
View Full Code Here


                }

                path = new File(path).getAbsolutePath();

                if (path.endsWith("!")) { //$NON-NLS-1$
                    path = path.substring(0, path.length() - 1);
                }

                return path;
            } catch (IOException e) {
            }
View Full Code Here

                   
                    String path = resource.getFullPath().makeRelativeTo( root.getFullPath() ).toString();
                   
                    if( path.startsWith( "/" ) && path.length() > 1 )
                    {
                        path = path.substring( 1 );
                    }
                   
                    textField.setText( path );
                }
            }
View Full Code Here

        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

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.