Examples of segmentCount()


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

                                : null, vars.length > 2
                                ? new Path(new String(vars[2]))
                                : null);
                    } else {
                        IPath libPath = new Path(lib);
                        if (!libPath.isAbsolute() && libPath.segmentCount() > 0
                            && libPath.getFileExtension() == null) {
                            project.getFolder(libPath).create(true, true, null);
                            libPath = projectPath.append(libPath);
                        }
                        entries[sourceLength + i] = JavaCore.newLibraryEntry(
View Full Code Here

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

                    }
                }

                // create project's output folder
                IPath outputPath = new Path(projectOutput);
                if (outputPath.segmentCount() > 0) {
                    IFolder output = project.getFolder(outputPath);
                    if (!output.exists()) {
                        output.create(true, true, null);
                    }
                }
View Full Code Here

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

                    && !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);
              if (Util.isExcluded(entryPath, inclusionPatterns, exclusionPatterns, false)) {
                return new JavaModelStatus(IJavaModelStatusConstants.INVALID_CLASSPATH, Messages.bind(Messages.classpath_mustEndWithSlash, new String[] {exclusionPattern, entryPath.makeRelative().toString()}));
              } else {
                if (otherKind == IClasspathEntry.CPE_SOURCE) {
                  exclusionPattern += '/';
View Full Code Here

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

    switch(entry.getEntryKind()){

      // container entry check
      case IClasspathEntry.CPE_CONTAINER :
        if (path.segmentCount() >= 1){
          try {
            IClasspathContainer container = JavaModelManager.getJavaModelManager().getClasspathContainer(path, project);
            // container retrieval is performing validation check on container entry kinds.
            if (container == null){
              return new JavaModelStatus(IJavaModelStatusConstants.CP_CONTAINER_PATH_UNBOUND, project, path);
View Full Code Here

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

        }
        break;

      // variable entry check
      case IClasspathEntry.CPE_VARIABLE :
        if (path.segmentCount() >= 1){
          try {
            entry = JavaCore.getResolvedClasspathEntry(entry);
          } catch (AssertionFailedException e) {
            // Catch the assertion failure and throw java model exception instead
            // see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=55992
View Full Code Here

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

      if (!Util.isJavaLikeFileName(resName)) {
        IPath filePath = new Path(resName);
        IPath childPath = filePath.removeFirstSegments(this.names.length);
        JarEntryFile file = new JarEntryFile(filePath.lastSegment());
        jarEntries.put(childPath, file);
        if (childPath.segmentCount() == 1) {
          file.setParent(pkg);
          topJarEntries.add(file);
        } else {
          IPath parentPath = childPath.removeLastSegments(1);
          while (parentPath.segmentCount() > 0) {
View Full Code Here

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

        if (childPath.segmentCount() == 1) {
          file.setParent(pkg);
          topJarEntries.add(file);
        } 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());
View Full Code Here

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

            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);
                break;
              }
              childPath = parentPath;
              parentPath = childPath.removeLastSegments(1);
View Full Code Here

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

        JarEntryResource child = (JarEntryResource) jarEntries.get(entryValue.get(i));
        child.setParent(jarEntryDirectory);
        children[i] = child;
      }
      jarEntryDirectory.setChildren(children);
      if (entryPath.segmentCount() == 1) {
        jarEntryDirectory.setParent(pkg);
      }
    }
    Object[] res = topJarEntries.toArray(new Object[topJarEntries.size()]);
    info.setNonJavaResources(res);
View Full Code Here

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

          // now the output location becomes a package fragment - along with any subfolders
          ArrayList folders = new ArrayList();
          folders.add(folder);
          collectAllSubfolders(folder, folders);
          Iterator elements = folders.iterator();
          int segments = path.segmentCount();
          while (elements.hasNext()) {
            IFolder f = (IFolder) elements.next();
            IPath relativePath = f.getFullPath().removeFirstSegments(segments);
            String[] pkgName = relativePath.segments();
            IPackageFragment pkg = root.getPackageFragment(pkgName);
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.