Class EclipseProjectPath<E,P>

java.lang.Object
com.ibm.wala.ide.util.EclipseProjectPath<E,P>
Direct Known Subclasses:
JavaEclipseProjectPath, JavaScriptEclipseProjectPath

public abstract class EclipseProjectPath<E,P> extends Object
Representation of an analysis scope from an Eclipse project.

We set up classloaders as follows:

  • The project being analyzed is in the Application Loader
  • Frameworks, application libraries, and linked projects on which the main project depends are in the Extension loader
  • System libraries are in the primordial loader.
  • All source modules go in a special Source loader. This includes source from linked projects if SOURCE_FOR_PROJ_AND_LINKED_PROJS is specified.
  • Field Details

  • Constructor Details

  • Method Details

    • makeProject

      protected abstract P makeProject(org.eclipse.core.resources.IProject p)
    • resolve

      protected abstract E resolve(E entry)
    • resolveClasspathEntry

      protected abstract void resolveClasspathEntry(P project, E entry, EclipseProjectPath.ILoader loader, boolean includeSource, boolean cpeFromMainProject)
    • resolveProjectClasspathEntries

      protected abstract void resolveProjectClasspathEntries(P project, boolean includeSource)
    • create

      public EclipseProjectPath<E,P> create(org.eclipse.core.resources.IProject project) throws org.eclipse.core.runtime.CoreException, IOException
      Throws:
      org.eclipse.core.runtime.CoreException
      IOException
    • resolveLibraryPathEntry

      protected void resolveLibraryPathEntry(EclipseProjectPath.ILoader loader, org.eclipse.core.runtime.IPath p)
    • resolveSourcePathEntry

      protected void resolveSourcePathEntry(EclipseProjectPath.ILoader loader, boolean includeSource, boolean cpeFromMainProject, org.eclipse.core.runtime.IPath p, org.eclipse.core.runtime.IPath o, org.eclipse.core.runtime.IPath[] excludePaths, String fileExtension)
    • resolveProjectPathEntry

      protected void resolveProjectPathEntry(boolean includeSource, org.eclipse.core.runtime.IPath p)
    • isPrimordialJarFile

      protected boolean isPrimordialJarFile(JarFile j)
      Parameters:
      j - The jar file in question.
      Returns:
      true if the given jar file should be handled by the Primordial loader. If false, other provisions should be made to add the jar file to the appropriate component of the AnalysisScope. Subclasses can override this method.
    • resolveClasspathEntries

      protected void resolveClasspathEntries(P project, List<E> l, EclipseProjectPath.ILoader loader, boolean includeSource, boolean entriesFromTopLevelProject)
    • makeAbsolute

      public static org.eclipse.core.runtime.IPath makeAbsolute(org.eclipse.core.runtime.IPath p)
    • toAnalysisScope

      public AnalysisScope toAnalysisScope(ClassLoader classLoader, File exclusionsFile) throws IOException
      Convert this path to a WALA analysis scope
      Throws:
      IOException
    • toAnalysisScope

      public AnalysisScope toAnalysisScope(AnalysisScope scope)
    • toAnalysisScope

      public AnalysisScope toAnalysisScope(File exclusionsFile) throws IOException
      Throws:
      IOException
    • toAnalysisScope

      public AnalysisScope toAnalysisScope() throws IOException
      Throws:
      IOException
    • getModules

      public Collection<Module> getModules(EclipseProjectPath.ILoader loader)
    • toString

      public String toString()
      Overrides:
      toString in class Object