Examples of PharPath


Examples of org.eclipse.php.internal.core.phar.PharPath

        if (file.exists()) {
          return new Object[] { new LocalFile(file) };
        }

        // try a phar
        final PharPath pharPath = PharPath.getPharPath(new Path(
            fileName));
        if (pharPath != null) {

          try {
            final PharArchiveFile archiveFile = new PharArchiveFile(
                pharPath.getPharName());
            final IArchiveEntry entry = archiveFile
                .getArchiveEntry((pharPath.getFolder().length() == 0 ? "" //$NON-NLS-1$
                    : pharPath.getFolder() + "/") //$NON-NLS-1$
                    + pharPath.getFile());
            return new Object[] { new ExternalEntryFile(fileName,
                archiveFile, entry) };
          } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
View Full Code Here

Examples of org.eclipse.php.internal.core.phar.PharPath

      }
    }

    // do we now have a remapped file ?
    if (mappedPathEntry == null) {
      final PharPath pharPath = PharPath.getPharPath(new Path(
          "phar:" + decodedFile)); //$NON-NLS-1$
      if (pharPath != null) {
        DBGpLogger
            .debug("inbound File '" + decodedFile + "' remapped to phar file"); //$NON-NLS-1$ //$NON-NLS-2$
        mappedFile = "phar:" + decodedFile; //$NON-NLS-1$
View Full Code Here

Examples of org.eclipse.php.internal.core.phar.PharPath

          IPath apfp = apf.getPath();
          if (EnvironmentPathUtils.isFull(apfp)) {
            apfp = EnvironmentPathUtils.getLocalPath(apfp);
            external = true;
          }
          PharPath pharPath = PharPath.getPharPath(new Path(path));
          if (pharPath != null) {
            if (external
                && apfp.equals(new Path(pharPath.getPharName()))
                || !external
                && apfp.lastSegment().equals(
                    new Path(pharPath.getPharName())
                        .lastSegment())) {
              if (pharPath.isPhar()) {
                final String stubName = PharConstants.STUB_PATH;
                pharPath.setFolder(new Path(stubName)
                    .removeLastSegments(1).toString());
                pharPath.setFile(new Path(stubName)
                    .lastSegment());
              }
              IScriptFolder scriptFolder = apf
                  .getScriptFolder(new Path(pharPath
                      .getFolder()));
              try {
                IModelElement[] children = scriptFolder
                    .getChildren();
                if (children != null && children.length > 0) {
                  for (int i = 0; i < children.length; i++) {
                    if (((ISourceModule) children[i])
                        .getElementName().equals(
                            pharPath.getFile())) {
                      return new IncludedPharFileResult(
                          scriptFolder,
                          (ISourceModule) children[i]);
                    }
                  }
View Full Code Here

Examples of org.eclipse.php.internal.core.phar.PharPath

              if (!pharPath.isPrefixOf(prefixPathFolder
                  .append(lastSegmant))) {
                continue;
              }
            } else {
              PharPath pp = PharPath.getPharPath(prefixPathFolder
                  .append(lastSegmant));
              if (pp == null
                  || !new Path(pp.getPharName())
                      .lastSegment().equals(
                          pharPath.lastSegment())) {
                continue;
              } else {
                // if the current phar's name equals to the
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.