Examples of lastSegment()


Examples of java.io.File.lastSegment()

                }

                String selected = dialog.open();
                if (selected != null) {
                    IPath path = new Path(selected);
                    if (projectName != null && !projectName.equals(path.lastSegment()))
                        selected = path.append(projectName).toString();
                    txtLocation.setText(selected);
                }
            }
        });
View Full Code Here

Examples of org.apache.slide.common.UriPath.lastSegment()

        }
        if (namespaceConfig.isPrincipal(associatedObject.getUri())) {
            // principals must have DAV:displayname
            if (revisionDescriptor.getName() == null || revisionDescriptor.getName().length() == 0) {
                UriPath uripath = new UriPath(associatedObject.getUri());
                revisionDescriptor.setName(uripath.lastSegment());
            }
            // principals must have DAV:principal in resourcetype
            String rt = revisionDescriptor.getResourceType();
            if (rt.indexOf("principal") < 0) {
                revisionDescriptor.setResourceType(rt+"<principal/>");
View Full Code Here

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

          if (target instanceof IResource){
            // internal target
            root = getPackageFragmentRoot((IResource) target);
          } else {
            // external target - only JARs allowed
            if (JavaModel.isFile(target) && (org.aspectj.org.eclipse.jdt.internal.compiler.util.Util.isArchiveFileName(entryPath.lastSegment()))) {
              root = new JarPackageFragmentRoot(entryPath, this);
            }
          }
        } else {
          root = getPackageFragmentRoot(entryPath);
View Full Code Here

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

            allowNestingInOutputLocations[index] = true;
          }
          break;

        case IClasspathEntry.CPE_LIBRARY:
          hasLibFolder |= !org.aspectj.org.eclipse.jdt.internal.compiler.util.Util.isArchiveFileName(path.lastSegment());
          if ((index = Util.indexOfMatchingPath(path, outputLocations, outputCount)) != -1){
            allowNestingInOutputLocations[index] = true;
          }
          break;
      }
View Full Code Here

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

        continue;
      }

      // allow nesting source entries in each other as long as the outer entry excludes the inner one
      if (kind == IClasspathEntry.CPE_SOURCE
          || (kind == IClasspathEntry.CPE_LIBRARY && !org.aspectj.org.eclipse.jdt.internal.compiler.util.Util.isArchiveFileName(entryPath.lastSegment()))){
        for (int j = 0; j < classpath.length; j++){
          IClasspathEntry otherEntry = classpath[j];
          if (otherEntry == null) continue;
          int otherKind = otherEntry.getEntryKind();
          IPath otherPath = otherEntry.getPath();
View Full Code Here

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

          int otherKind = otherEntry.getEntryKind();
          IPath otherPath = otherEntry.getPath();
          if (entry != otherEntry
            && (otherKind == IClasspathEntry.CPE_SOURCE
                || (otherKind == IClasspathEntry.CPE_LIBRARY
                    && !org.aspectj.org.eclipse.jdt.internal.compiler.util.Util.isArchiveFileName(otherPath.lastSegment())))){
            char[][] inclusionPatterns, exclusionPatterns;
            if (otherPath.isPrefixOf(entryPath)
                && !otherPath.equals(entryPath)
                && !Util.isExcluded(entryPath.append("*"), inclusionPatterns = ((ClasspathEntry)otherEntry).fullInclusionPatternChars(), exclusionPatterns = ((ClasspathEntry)otherEntry).fullExclusionPatternChars(), false)) { //$NON-NLS-1$
              String exclusionPattern = entryPath.removeFirstSegments(otherPath.segmentCount()).segment(0);
View Full Code Here

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

    Object[] keys = indexStates.keyTable;
    Object[] states = indexStates.valueTable;
    for (int i = 0, l = states.length; i < l; i++) {
      IPath key = (IPath) keys[i];
      if (key != null && !key.isEmpty() && states[i] == SAVED_STATE) {
        writer.write(key.lastSegment());
        writer.write('\n');
      }
    }
  } catch (IOException ignored) {
    if (VERBOSE)
View Full Code Here

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

      int length = enclosingProjectsAndJars.length;
      projects = new IJavaProject[length];
      int index = 0;
      for (int i = 0; i < length; i++) {
        IPath path = enclosingProjectsAndJars[i];
        if (!org.aspectj.org.eclipse.jdt.internal.compiler.util.Util.isArchiveFileName(path.lastSegment())) {
          projects[index++] = this.javaModel.getJavaProject(path.segment(0));
        }
      }
      if (index < length) {
        System.arraycopy(projects, 0, projects = new IJavaProject[index], 0, index);
View Full Code Here

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

        } else {
          IPath parentPath = childPath.removeLastSegments(1);
          while (parentPath.segmentCount() > 0) {
            ArrayList parentChildren = (ArrayList) childrenMap.get(parentPath);
            if (parentChildren == null) {
              Object dir = new JarEntryDirectory(parentPath.lastSegment());
              jarEntries.put(parentPath, dir);
              childrenMap.put(parentPath, parentChildren = new ArrayList());
              parentChildren.add(childPath);
              if (parentPath.segmentCount() == 1) {
                topJarEntries.add(dir);
View Full Code Here

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

                projectLocation = new Path(path);
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
            String existingName = projectLocation.lastSegment();
            if (!existingName.equals(projectName))
                return new Status(IStatus.ERROR, Plugin.PLUGIN_ID, 0, MessageFormat.format("The name of the new project must be ''{0}''", existingName), null);
        }

        return Status.OK_STATUS;
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.