Examples of removeLastSegments()


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

                                                                      // from
                                                                      // existing
                                                                      // source
                                                                      // in
                                                                      // workspace
                    if (!Platform.getLocation().equals(projectPath.removeLastSegments(1))) {
                        setErrorMessage("Projects located in the workspace folder must be direct sub folders of the workspace folder");
                        setPageComplete(false);
                        return;
                    }
View Full Code Here

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

            if (r != null)
                return;

            IPath p = (IPath) path.clone();
            while (p.segmentCount() > 0) {
                p = p.removeLastSegments(1);
                IResource resource = ResourcesPlugin.getWorkspace().getRoot().findMember(p);
                if (resource != null) {
                    resource.refreshLocal(2, null);
                    return;
                }
View Full Code Here

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

            this.depth = 0;
        } else if (file.isDirectory()) {
            target = ResourcesPlugin.getWorkspace().getRoot().getFolder(wsPath);
            this.depth = IResource.DEPTH_INFINITE;
        } else {
            target = ResourcesPlugin.getWorkspace().getRoot().getFolder(wsPath.removeLastSegments(1));
            this.depth = IResource.DEPTH_INFINITE;
        }

        this.resource = target;
    }
View Full Code Here

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

            if (r != null)
                return;

            IPath p = (IPath) path.clone();
            while (p.segmentCount() > 0) {
                p = p.removeLastSegments(1);
                IResource resource = ResourcesPlugin.getWorkspace().getRoot().findMember(p);
                if (resource != null) {
                    resource.refreshLocal(2, null);
                    return;
                }
View Full Code Here

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

            this.depth = 0;
        } else if (file.isDirectory()) {
            target = ResourcesPlugin.getWorkspace().getRoot().getFolder(wsPath);
            this.depth = IResource.DEPTH_INFINITE;
        } else {
            target = ResourcesPlugin.getWorkspace().getRoot().getFolder(wsPath.removeLastSegments(1));
            this.depth = IResource.DEPTH_INFINITE;
        }

        this.resource = target;
    }
View Full Code Here

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

                                                                      // from
                                                                      // existing
                                                                      // source
                                                                      // in
                                                                      // workspace
                    if (!Platform.getLocation().equals(projectPath.removeLastSegments(1))) {
                        setErrorMessage("Projects located in the workspace folder must be direct sub folders of the workspace folder");
                        setPageComplete(false);
                        return;
                    }
View Full Code Here

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

              if (childUri == null) {
                childUri = "WEB-INF/lib/" + child.getName(); //$NON-NLS-1$
              }
              IPath jarPath = new Path(childUri);
              File jarFile = new File(tempFile, jarPath.lastSegment());
              jarPath = jarPath.removeLastSegments(1);

              IModuleResource[] mr = server.getResources(new IModule[] { child });
              IStatus[] status = helper.publishToPath(mr, new Path(jarFile.getAbsolutePath()), monitor);
              merge(result, status);
              resources.add(new ModuleFile(jarFile, jarFile.getName(), jarPath));
View Full Code Here

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

              if (childUri == null) {
                childUri = "WEB-INF/lib/" + child.getName() + ".jar"; //$NON-NLS-1$ //$NON-NLS-2$
              }
              IPath jarPath = new Path(childUri);
              File jarFile = new File(tempFile, jarPath.lastSegment());
              jarPath = jarPath.removeLastSegments(1);

              IModuleResource[] mr = server.getResources(new IModule[] { child });
              IStatus[] status = helper.publishZip(mr, new Path(jarFile.getAbsolutePath()), monitor);
              merge(result, status);
              resources.add(new ModuleFile(jarFile, jarFile.getName(), jarPath));
View Full Code Here

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

    public IPath findDefaultBundleLocation(ISigilProjectModel m) throws CoreException
    {
        IPath loc = m.getProject().getLocation();
        loc = loc.append(m.getJavaModel().getOutputLocation().removeFirstSegments(1));
        loc = loc.removeLastSegments(1).append("lib");
        return loc.append(m.getSymbolicName() + ".jar");
    }

    public static void makeSigilProject(IProject project, IProgressMonitor monitor)
        throws CoreException
View Full Code Here

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

                    }

                    // special-case the situation where they share a parent
                    // to implement the 'files before folders' logic

                    if (p1.removeLastSegments(1).equals(p2.removeLastSegments(1))) {

                        if (o1.getClass() != o2.getClass()) {
                            if (o1 instanceof IModuleFile) {
                                return -1; // files first
                            } else {
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.