Package org.eclipse.php.internal.core.phar

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


      }
    }

    // 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

          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

              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

Related Classes of org.eclipse.php.internal.core.phar.PharPath

Copyright © 2018 www.massapicom. 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.