Examples of matchingFirstSegments()


Examples of org.eclipse.core.runtime.Path.matchingFirstSegments()

   */
  public static boolean isTagDirDocument(final TLDDocument tldDoc, final IProject project) {
    if (tldDoc.getUri() == null || tldDoc.getUri().equals("")) { //$NON-NLS-1$
      IPath p = new Path(tldDoc.getBaseLocation());
      IPath webContentPath = ComponentCore.createComponent(project).getRootFolder().getUnderlyingFolder().getFullPath();
      if (p.matchingFirstSegments(webContentPath) == webContentPath.segmentCount()) {
        p = p.removeFirstSegments(webContentPath.segmentCount());
        if (p.matchingFirstSegments(new Path("WEB-INF/tags")) == 2) { //$NON-NLS-1$)  {
          return true;
        }
      }
View Full Code Here

Examples of org.eclipse.core.runtime.Path.matchingFirstSegments()

    if (tldDoc.getUri() == null || tldDoc.getUri().equals("")) { //$NON-NLS-1$
      IPath p = new Path(tldDoc.getBaseLocation());
      IPath webContentPath = ComponentCore.createComponent(project).getRootFolder().getUnderlyingFolder().getFullPath();
      if (p.matchingFirstSegments(webContentPath) == webContentPath.segmentCount()) {
        p = p.removeFirstSegments(webContentPath.segmentCount());
        if (p.matchingFirstSegments(new Path("WEB-INF/tags")) == 2) { //$NON-NLS-1$)  {
          return true;
        }
      }
    }
    return false;
View Full Code Here

Examples of org.eclipse.core.runtime.Path.matchingFirstSegments()

     
      if (namespace != null) {
        String nmspc = namespace.getNamespace();
        IPath nmspcPath = new Path(nmspc.replace("\\", "/"));
       
        int match = nmspcPath.matchingFirstSegments(appendix);
        appendix = appendix.removeFirstSegments(match);

        if (appendix.segmentCount() > 0) {
          nmspc += (!nmspc.isEmpty() ? "\\" : "") +
            appendix.removeTrailingSeparator().toString().replace("/", "\\");
View Full Code Here

Examples of org.eclipse.core.runtime.Path.matchingFirstSegments()

      IPath relLocation = null;
      if (location.toOSString().toLowerCase().startsWith(
            workspaceLocation.toOSString().toLowerCase()))
      {
        relLocation = location.removeFirstSegments(
            location.matchingFirstSegments(workspaceLocation));
      }

      // project is outside the workspace otherwise not at the top of the
      // workspace
      if (relLocation == null || relLocation.segmentCount() != 1) {
View Full Code Here

Examples of org.eclipse.core.runtime.Path.matchingFirstSegments()

      // workspace. Also, take the last segment as the new project name.
      if (location.toOSString().toLowerCase().startsWith(
            workspaceLocation.toOSString().toLowerCase()))
      {
        String name = location.removeFirstSegments(
            location.matchingFirstSegments(workspaceLocation)).toString();
        // hack for windows... manually remove drive letter
        name = name.replaceFirst("^[A-Z]:", "");
        name = name.replaceFirst("/$", "");

        location = null;
View Full Code Here

Examples of org.eclipse.core.runtime.Path.matchingFirstSegments()

      return true;
    }
    File newLocationFile = newLocation.toFile();
    // check if new location is below the same repository
    Path workTree = new Path(srcm.getRepository().getWorkTree().getAbsolutePath());
    int matchingFirstSegments = workTree.matchingFirstSegments(newLocation);
    if (matchingFirstSegments == workTree.segmentCount()) {
      return moveProjectHelperMoveOnlyProject(tree, source, description, updateFlags,
          monitor, srcm, newLocationFile);
    } else {
      int dstAboveSrcRepo = newLocation.matchingFirstSegments(RepositoryMapping
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.