Examples of IPath


Examples of org.eclipse.core.runtime.IPath

        for (int j = 0, max2 = res.length; j < max2; j++) {
          collector.add(res[j]);
        }
        continue;
      }
      IPath outputLocation = null;
      try {
        outputLocation = javaProject.getOutputLocation();
      } catch (JavaModelException e) {
        // ignore
      }
      IJavaElement root = element;
      while (root != null && root.getElementType() != IJavaElement.PACKAGE_FRAGMENT_ROOT) {
        root = root.getParent();
      }
      if (root == null) continue;
      IPackageFragmentRoot packageFragmentRoot = (IPackageFragmentRoot) root;
      int rootPathSegmentCounts = packageFragmentRoot.getPath().segmentCount();
      try {
        IClasspathEntry entry = packageFragmentRoot.getRawClasspathEntry();
        IPath entryOutputLocation = entry.getOutputLocation();
        if (entryOutputLocation != null) {
          outputLocation = entryOutputLocation;
        }
      } catch (JavaModelException e) {
        e.printStackTrace();
View Full Code Here

Examples of org.eclipse.core.runtime.IPath

      int rootPathSegmentCounts,
      ArrayList collector) {
    IResource resource = unit.getResource();
    char[][] typeNames = state.getDefinedTypeNamesFor(resource.getProjectRelativePath().toString());
    if (typeNames != null) {
      IPath path = unit.getPath().removeFirstSegments(rootPathSegmentCounts).removeLastSegments(1);
      for (int j = 0, max2 = typeNames.length; j < max2; j++) {
        IPath localPath = path.append(new String(typeNames[j]) + ".class"); //$NON-NLS-1$
        IResource member = container.findMember(localPath);
        if (member != null && member.exists()) {
          collector.add(member);
        }
      }
    } else {
      IPath path = unit.getPath().removeFirstSegments(rootPathSegmentCounts).removeLastSegments(1);
      path = path.append(Util.getNameWithoutJavaLikeExtension(unit.getElementName()) + ".class"); //$NON-NLS-1$
      IResource member = container.findMember(path);
      if (member != null && member.exists()) {
        collector.add(member);
      }
    }
View Full Code Here

Examples of ua.pp.bizon.cripto.file.IPath

    }

    @Test
    public void testFile() throws Exception {
        LOG.info("*****test file started******");
        IPath from = FileFactory.getLocalFile(prefix + "1.pdf");
        FtpConfig readConfig = FtpConfig.readConfig(HOST);
        IPath to = FileFactory.getRemoteFile(readConfig.getUrl(), readConfig.getLogin(), readConfig.getPass(), "backup/1/1.pdf");
        CryptoUtil cryptoUtil = new CryptoUtil(credentials);
        Configuration c = new Configuration();
        c.setDirection(Direction.ENCODE);
        c.setFrom(from);
        c.setTo(to);
        cryptoUtil.process(c);
        LOG.info("*****write to server done******");
        IPath response = FileFactory.getLocalFile(prefix + "2.pdf");
        c.setDirection(Direction.DECODE);
        c.setFrom(to);
        c.setTo(response);
        cryptoUtil.process(c);
        LOG.info("*****load from server done******");
        assertTrue(FileUtils.contentEquals(new File(from.getPath()), new File(response.getPath())));
        LOG.info("*****assert files done******");
        new File(prefix + "2.pdf").delete();
        FTPClient client = new FTPClient();
        client.connect(readConfig.getUrl());
        client.login(readConfig.getLogin(), readConfig.getPass());
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.