Packages

class WorkspaceManager[ProjectType <: Project] extends AnyRef

WorkspaceManager: a component, which loads and maintains the list of projects made accessible via Ocular/Joern.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. WorkspaceManager
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new WorkspaceManager(path: String, loader: WorkspaceLoader[ProjectType] = DefaultLoader)

    path

    path to to workspace.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. def closeProject(name: String): Option[Project]

    Free up resources occupied by this project but do not remove project from disk.

  7. def cpg: Cpg

    Obtain the cpg that was last loaded.

    Obtain the cpg that was last loaded. Throws a runtime exception if no CPG has been loaded.

  8. def cpgExists(inputPath: String, isLegacy: Boolean = false): Boolean

    Indicates whether a base CPG exists for @inputPath.

  9. def createProject(inputPath: String, projectName: String): Option[Path]

    Create project for code stored at inputPath with the project name name.

    Create project for code stored at inputPath with the project name name. If name is empty, the project name is derived from inputPath. If a project for this name already exists, it is deleted from the workspace first. If no file or directory exists at inputPath, then no project is created. Returns the path to the project directory as an optional String, and None if there was an error.

  10. def deleteCurrentProject(): Unit

    Remove currently active project from workspace and delete all associated workspace files from disk.

  11. def deleteProject(name: String): Option[Unit]

    Remove project with name name from workspace and delete all associated workspace files from disk.

    Remove project with name name from workspace and delete all associated workspace files from disk.

    name

    the name of the project that should be removed

  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  15. def getActiveProject: Option[Project]

    Retrieve the currently active project.

    Retrieve the currently active project. If no project is active, None is returned.

  16. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  17. def getNextOverlayDirName(baseCpg: Cpg, overlayName: String): String
  18. def getPath: String
  19. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  20. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  21. def loadedCpgs: List[Cpg]

    A sorted list of all loaded CPGs

  22. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  23. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  24. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  25. def numberOfProjects: Int

    Return the number of projects currently present in this workspace.

  26. def openProject(name: String, loader: (String) => Option[Cpg] = x =>
    loadCpgRaw(x)
    )
    : Option[Project]

    Open project by name and return it.

    Open project by name and return it. If a project with this name does not exist, None is returned. If the CPG of this project is loaded, it is unloaded first and then reloaded. Returns project or None on error.

    name

    of the project to load

    loader

    function to perform CPG loading. This parameter only exists for testing purposes.

  27. def overlayDir(inputPath: String): String

    Overlay directory for CPG with given @inputPath

  28. def overlayDirByProjectName(name: String): String
  29. def project(name: String): Option[Project]
  30. def projectByCpg(baseCpg: Cpg): Option[ProjectType]

    Workspace record for the CPG, or none, if the CPG is not in the workspace

  31. def projectExists(inputPath: String): Boolean

    Indicates whether a workspace record exists for @inputPath.

  32. def projectExistsForCpg(baseCpg: Cpg): Boolean
  33. def projects: List[Project]
  34. def reloadCpgByName(name: String, loadCpg: (String) => Option[Cpg]): Option[Cpg]
  35. def removeProject(name: String): Unit

    Remove project named name from disk

    Remove project named name from disk

    name

    name of the project

  36. def reset(): Unit

    Delete the workspace from disk, then initialize it again.

  37. def setActiveProject(name: String): Option[ProjectType]

    Set active project to project with name name.

    Set active project to project with name name. If a project with this name does not exist, does nothing.

  38. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  39. def toString(): String
    Definition Classes
    WorkspaceManager → AnyRef → Any
  40. def unloadCpgByProjectName(name: String): Unit
  41. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  42. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  43. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Deprecated Value Members

  1. def baseCpgExists(inputPath: String, isLegacy: Boolean = false): Boolean
    Annotations
    @deprecated
    Deprecated

    (Since version )

  2. def recordExists(inputPath: String): Boolean
    Annotations
    @deprecated
    Deprecated

    (Since version )

Inherited from AnyRef

Inherited from Any

Ungrouped