ConstructPlanScope

Construct's plan scope: a plan holds each document it edits (opal-plan-edit-sessions §PES-1, §PES-2).

Inherits QObject and IPlanScope

In the namespace construct::opal. Declared in src/libs/libconstruct/construct/opal/ConstructPlanScope.hpp.

Detailed description

The first time a plan writes a document, in that step's GUI call, the scope opens a session on it: the executor's hold (only this plan writes) and the plan's undo batch (the plan is one undo unit). The document's change feed follows the hold, so its panels settle once, when the plan ends. At the plan's end — on every exit — the scope closes the batch, releases the hold and reports each document's batch in the plan result.

Everything here runs on the GUI thread except stepStarting(), which the runtime calls on the plan thread and which reaches the GUI thread only through opal::guiCall(ctx, fn).

A read-only plan, and a plan that ends before its first write, open no session.

In this section