Package org.eclipse.core.runtime

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


                result = new CnfInfo(Existence.ImportedOpen, location);
            else
                result = new CnfInfo(Existence.ImportedClosed, location);
        } else {
            IPath location = ResourcesPlugin.getWorkspace().getRoot().getLocation().append(Workspace.CNFDIR);
            File dir = location.toFile();

            if (dir.isDirectory())
                result = new CnfInfo(Existence.Exists, location);
            else
                result = new CnfInfo(Existence.None, location);
View Full Code Here


                setPageComplete(false);
                return;
            }

            IPath projectLocation = ResourcesPlugin.getWorkspace().getRoot().getLocation().append(name);
            if (projectLocation.toFile().exists()) {
                try {
                    // correct casing
                    String canonicalPath = projectLocation.toFile().getCanonicalPath();
                    projectLocation = new Path(canonicalPath);
                } catch (IOException e) {
View Full Code Here

            IPath projectLocation = ResourcesPlugin.getWorkspace().getRoot().getLocation().append(name);
            if (projectLocation.toFile().exists()) {
                try {
                    // correct casing
                    String canonicalPath = projectLocation.toFile().getCanonicalPath();
                    projectLocation = new Path(canonicalPath);
                } catch (IOException e) {
                    JavaPlugin.log(e);
                }
View Full Code Here

            IPath projectPath = Path.fromOSString(location);

            // if (fLocationGroup.isWorkspaceRadioSelected())
            // projectPath= projectPath.append(fNameGroup.getName());

            if (projectPath.toFile().exists()) {// create from existing source
                if (Platform.getLocation().isPrefixOf(projectPath)) { // create
                                                                      // from
                                                                      // existing
                                                                      // source
                                                                      // in
View Full Code Here

                        setErrorMessage("Projects located in the workspace folder must be direct sub folders of the workspace folder");
                        setPageComplete(false);
                        return;
                    }

                    if (!projectPath.toFile().exists()) {
                        setErrorMessage("The selected existing source location in the workspace root does not exist");
                        setPageComplete(false);
                        return;
                    }
                }
View Full Code Here

                        IPath location = delta.getResource().getLocation();
                        if (location == null) {
                            System.out.println("Cannot convert resource to file: " + delta.getResource());
                        } else {
                            File file = location.toFile();
                            File parent = file.getParentFile();
                            boolean parentIsWorkspace = parent.equals(getWorkspace().getBase());

                            // file
                            // /development/osgi/svn/build/org.osgi.test.cases.distribution/bnd.bnd
View Full Code Here

                            if (includedFiles == null) {
                                return false;
                            }
                            for (File includedFile : includedFiles) {
                                IPath location = resource.getLocation();
                                if (location != null && includedFile.equals(location.toFile())) {
                                    result.set(true);
                                    return false;
                                }
                            }
                        }
View Full Code Here

            return bundlePath;

        // Try install location
        if (installLocation != null) {
            IPath installedBundlePath = new Path(installLocation.getURL().getFile()).append(bundlePath);
            if (installedBundlePath.toFile().exists())
                return installedBundlePath;
        }

        // Try config location
        if (configLocation != null) {
View Full Code Here

        }

        // Try config location
        if (configLocation != null) {
            IPath configuredBundlePath = new Path(configLocation.getURL().getFile()).append(bundlePath);
            if (configuredBundlePath.toFile().exists())
                return configuredBundlePath;
        }

        return null;
    }
View Full Code Here

        for (IPath path : paths) {
            try {
                IFile ifile = wsroot.getFile(path);
                IPath location = ifile.getLocation();
                if (location != null)
                    files.add(location.toFile());
            } catch (IllegalArgumentException e) {
                System.err.println("### Error processing path: " + path);
                e.printStackTrace();
            }
        }
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.