Package org.eclipse.jdt.launching.sourcelookup.containers

Examples of org.eclipse.jdt.launching.sourcelookup.containers.PackageFragmentRootSourceContainer


            if (external.contains(location)) {
              continue;
            }
            external.add(location);
          }
          sourceContainers.add(new PackageFragmentRootSourceContainer(root));
          traceBuffer.append("     RootSourceContainer created for : " + root.getPath().toPortableString() + "\n");
        }
      }     
    }
   
View Full Code Here


    List<ISourceContainer> result = new ArrayList<ISourceContainer>(superResult.length * 2);
    result.addAll(getSrcFoldersAsISourceContainers(configuration));
   
    for (ISourceContainer sourceContainer: superResult) {
      if (sourceContainer instanceof PackageFragmentRootSourceContainer) {
        PackageFragmentRootSourceContainer sc = (PackageFragmentRootSourceContainer) sourceContainer;

        IPath maybeSourcePath =  sc.getPackageFragmentRoot().getSourceAttachmentPath();
       
        if (maybeSourcePath != null) {
          maybeSourcePath = ClojureCore.toOSAbsoluteIPath(maybeSourcePath);
          if (maybeSourcePath.toFile().isFile()) {
            result.add(new ExternalArchiveSourceContainer(maybeSourcePath.toOSString(), false));
          } else {
            result.add(new DirectorySourceContainer(maybeSourcePath, false));
          }
        }
        // unconditionnally add the path of the archive, *after* the sourcePath, so that cljs in sourcePath
        // take precedence over cljs in "bin" path
        if (sc.getPackageFragmentRoot().isExternal()) {
          if (sc.getPackageFragmentRoot().isArchive()) {
            result.add(new ExternalArchiveSourceContainer(sc.getPackageFragmentRoot().getPath().toOSString(), false));
          } else {
            result.add(new DirectorySourceContainer(sc.getPackageFragmentRoot().getPath(), false));
          }
        } else {
          if (sc.getPackageFragmentRoot().isArchive()) {
            result.add(new ArchiveSourceContainer((IFile) sc.getPackageFragmentRoot().getCorrespondingResource(), false));
          } else {
            result.add(new FolderSourceContainer((IContainer) sc.getPackageFragmentRoot().getCorrespondingResource(), false));
          }
        }
      } else if (sourceContainer instanceof ExternalArchiveSourceContainer) {
        // TODO
        ExternalArchiveSourceContainer sc = (ExternalArchiveSourceContainer) sourceContainer;
      } else if (sourceContainer instanceof JavaProjectSourceContainer) {
        // TODO
        JavaProjectSourceContainer sc = (JavaProjectSourceContainer) sourceContainer;
        sc.getJavaProject();
      } else {
        /*    TODO manager other kinds ?
            DirectorySourceContainer

            ISourceContainer
View Full Code Here

                    try {
                        IPackageFragmentRoot[] roots = javaProject.getPackageFragmentRoots();
                        for (int j = 0; j < roots.length; j++) {
                            IPackageFragmentRoot root = roots[j];
                            if (file.equals(root.getUnderlyingResource())) {
                                delegateContainers.put(container, new PackageFragmentRootSourceContainer(root));
                            } else {
                                IPath path = root.getSourceAttachmentPath();
                                if (path != null) {
                                    if (file.getFullPath().equals(path)) {
                                        delegateContainers.put(container, new PackageFragmentRootSourceContainer(root));
                                    }
                                }
                            }
                        }
                    } catch (JavaModelException e) {
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.launching.sourcelookup.containers.PackageFragmentRootSourceContainer

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.