Class: ProcedureParameterRename
Defined in: plugins/block-shareable-procedures/src/events_procedure_parameter_rename.ts:15
Notifies listeners that a procedure parameter was renamed.
Extends
Properties index
| Property | Description |
|---|---|
| group | An ID for the group of events this block is associated with. |
| isBlank | Whether or not the event was constructed without necessary parameters (to be populated by fromJson). |
| isUiEvent | Whether or not the event is a UI event. |
| oldName | The old name of the procedure parameter. |
| parameter | The parameter model associated with this event. |
| procedure | The procedure model associated with this event. |
| recordUndo | Whether this event is undoable or not. |
| type | A string used to check the type of the event. |
| workspaceId | The workspace identifier for this event. |
| TYPE | - |
Methods index
| Method | Description |
|---|---|
| getEventWorkspace_ | Get workspace the event belongs to. |
| isNull | Does this event record any change of state? |
| run | Replays the event in the workspace. |
| toJson | Encode the event as JSON. |
Constructors
Constructor
new ProcedureParameterRename(
workspace,
procedure,
parameter,
oldName,
newName?,
newVarId?
): ProcedureParameterRename;
Defined in: plugins/block-shareable-procedures/src/events_procedure_parameter_rename.ts:41
Constructs the procedure parameter rename event.
Parameters
| Parameter | Type | Description |
|---|---|---|
workspace | Workspace | The workpace this event is associated with. |
procedure | IProcedureModel | The procedure model this event is associated with. |
parameter | ObservableParameterModel | The parameter model this event is associated with. |
oldName | string | The old name of the procedure parameter. |
newName? | string | The (optional) new name of the procedure parameter. If not provided, the parameter model will be inspected to see what its current name is. |
newVarId? | string | The (optional) new id of the procedure parameter's backing variable. If not provided, the parameter model will be inspected to see what its current name is. |
Returns
ProcedureParameterRename
Overrides
ProcedureParameterBase.constructor
Properties
group
group: string;
An ID for the group of events this block is associated with.
Groups define events that should be treated as an single action from the user's perspective, and should be undone together.
Inherited from
isBlank
isBlank: boolean = false;
Defined in: plugins/block-shareable-procedures/src/events_procedure_base.ts:18
Whether or not the event was constructed without necessary parameters (to be populated by fromJson).
Inherited from
ProcedureParameterBase.isBlank
isUiEvent
isUiEvent: boolean;
Whether or not the event is a UI event.
Inherited from
ProcedureParameterBase.isUiEvent
oldName
readonly oldName: string;
Defined in: plugins/block-shareable-procedures/src/events_procedure_parameter_rename.ts:45
The old name of the procedure parameter.
parameter
readonly parameter: IParameterModel;
Defined in: plugins/block-shareable-procedures/src/events_procedure_parameter_base.ts:30
The parameter model associated with this event.
Inherited from
ProcedureParameterBase.parameter
procedure
readonly procedure: IProcedureModel;
Defined in: plugins/block-shareable-procedures/src/events_procedure_base.ts:28
The procedure model associated with this event.
Inherited from
ProcedureParameterBase.procedure
recordUndo
recordUndo: boolean;
Whether this event is undoable or not.
Inherited from
ProcedureParameterBase.recordUndo
type
type: string = ProcedureParameterRename.TYPE;
Defined in: plugins/block-shareable-procedures/src/events_procedure_parameter_rename.ts:19
A string used to check the type of the event.
Overrides
workspaceId?
workspaceId?: string;
The workspace identifier for this event.
Inherited from
ProcedureParameterBase.workspaceId
TYPE
readonly static TYPE: "procedure_parameter_rename" = 'procedure_parameter_rename';
Defined in: plugins/block-shareable-procedures/src/events_procedure_parameter_rename.ts:16
Overrides
Methods
getEventWorkspace_()
getEventWorkspace_(): Workspace;
Get workspace the event belongs to.
Returns
Workspace
The workspace the event belongs to.
Throws
if workspace is null.
Inherited from
ProcedureParameterBase.getEventWorkspace_
isNull()
isNull(): boolean;
Does this event record any change of state?
Returns
boolean
True if null, false if something changed.
Inherited from
run()
run(forward): void;
Defined in: plugins/block-shareable-procedures/src/events_procedure_parameter_rename.ts:61
Replays the event in the workspace.
Parameters
| Parameter | Type | Description |
|---|---|---|
forward | boolean | if true, play the event forward (redo), otherwise play it backward (undo). |
Returns
void
Overrides
toJson()
toJson(): ProcedureParameterRenameJson;
Defined in: plugins/block-shareable-procedures/src/events_procedure_parameter_rename.ts:84
Encode the event as JSON.
Returns
JSON representation.