ProjectContext

public class ProjectContext extends io.cocotec.coco.platform.coco.Context

A view onto a project’s contents at a particular moment in time.

Constructors

ProjectContext

protected ProjectContext(APIClient client, long objectId)

Internal constructor

Methods

finalize

protected void finalize()

getObjectId

public long getObjectId()

Internal method

getOrCreate

public static ProjectContext getOrCreate(APIClient client, long objectId)

Internal method

nodeForTreeNode

public io.cocotec.coco.platform.coco.Node nodeForTreeNode(io.cocotec.coco.platform.coco.ide.ProjectTreeNode node)

Returns the AST node that corresponds to the ProjectTreeNode, if any.

project

public io.cocotec.coco.platform.coco.ide.Project project()

The project this is a context for.

startCreateSimulator

public void startCreateSimulator(io.cocotec.coco.platform.coco.Counterexample counterexample, io.cocotec.coco.platform.coco.BehaviouralInstance targetInstance)

Starts the process of creating a simulator for a counterexample of this ProjectCounterexample.

treeNodeForNode

public io.cocotec.coco.platform.coco.ide.ProjectTreeNode treeNodeForNode(io.cocotec.coco.platform.coco.Node node)

Given the declaration, attempts to computes the node corresponds to.

versionHash

public String versionHash(io.cocotec.coco.platform.coco.ide.ProjectTreeNode node)

Computes a hash to identify the version of that is loaded into this Isolate. The hash has no semantic meaning other than hash(n1) == hash(n2) implying that the underlying data is identical.