Skip to content

rune-langium / visual-editor/src / EditorActions

Interface: EditorActions ​

Defined in: packages/visual-editor/src/store/editor-store.ts:278

Extends ​

  • InspectorMetadataActions

Methods ​

activeHydrationNamespaces() ​

ts
activeHydrationNamespaces(): string[];

Defined in: packages/visual-editor/src/store/editor-store.ts:457

Namespaces that must be sent on EVERY parse (replacement-semantics worker): confirmed-hydrated plus in-flight pending, so a concurrent reparse can't evict a namespace mid-hydration.

Returns ​

string[]


addAnnotation() ​

ts
addAnnotation(nodeId, annotationName): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:430

Parameters ​

ParameterType
nodeIdstring
annotationNamestring

Returns ​

void


addAttribute() ​

ts
addAttribute(
   nodeId, 
   attrName, 
   typeName, 
   cardinality
): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:332

Parameters ​

ParameterType
nodeIdstring
attrNamestring
typeNamestring
cardinalitystring

Returns ​

void


addChoiceOption() ​

ts
addChoiceOption(nodeId, typeName): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:361

Parameters ​

ParameterType
nodeIdstring
typeNamestring

Returns ​

void


addCondition() ​

ts
addCondition(nodeId, condition): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:402

Parameters ​

ParameterType
nodeIdstring
condition{ definition?: string; expressionText: string; isPostCondition?: boolean; name?: string; }
condition.definition?string
condition.expressionTextstring
condition.isPostCondition?boolean
condition.name?string

Returns ​

void


addEnumValue() ​

ts
addEnumValue(
   nodeId, 
   valueName, 
   displayName?
): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:352

Parameters ​

ParameterType
nodeIdstring
valueNamestring
displayName?string

Returns ​

void


addEnumValueSynonym() ​

ts
addEnumValueSynonym(
   nodeId, 
   valueIndex, 
   source, 
   value
): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:356

Parameters ​

ParameterType
nodeIdstring
valueIndexnumber
sourcestring
valuestring

Returns ​

void


addInputParam() ​

ts
addInputParam(
   nodeId, 
   paramName, 
   typeName
): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:365

Parameters ​

ParameterType
nodeIdstring
paramNamestring
typeNamestring

Returns ​

void


addSynonym() ​

ts
addSynonym(
   nodeId, 
   source, 
   value?
): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:426

Parameters ​

ParameterType
nodeIdstring
sourcestring
value?string

Returns ​

void


applyMetadataCommand() ​

ts
applyMetadataCommand(target, command): MetadataEditResult;

Defined in: packages/visual-editor/src/store/metadata-target.ts:76

Parameters ​

ParameterType
targetMetadataTarget
commandMetadataCommand

Returns ​

MetadataEditResult

Inherited from ​

InspectorMetadataActions.applyMetadataCommand


applyReactFlowEdgeChanges() ​

ts
applyReactFlowEdgeChanges(changes): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:435

Parameters ​

ParameterType
changesEdgeChange<TypeGraphEdge>[]

Returns ​

void


applyReactFlowNodeChanges() ​

ts
applyReactFlowNodeChanges(changes): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:434

Parameters ​

ParameterType
changesNodeChange<TypeGraphNode>[]

Returns ​

void


captureMetadataTarget() ​

ts
captureMetadataTarget(nodeId, path): MetadataTarget | undefined;

Defined in: packages/visual-editor/src/store/metadata-target.ts:75

Parameters ​

ParameterType
nodeIdstring
pathMetadataPath

Returns ​

MetadataTarget | undefined

Inherited from ​

InspectorMetadataActions.captureMetadataTarget


collapseAllNamespaces() ​

ts
collapseAllNamespaces(): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:302

Returns ​

void


createType() ​

ts
createType(
   kind, 
   name, 
   namespace
): string;

Defined in: packages/visual-editor/src/store/editor-store.ts:329

Parameters ​

ParameterType
kindTypeKind
namestring
namespacestring

Returns ​

string


deleteType() ​

ts
deleteType(nodeId): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:330

Parameters ​

ParameterType
nodeIdstring

Returns ​

void


dequeuePendingHydration() ​

ts
dequeuePendingHydration(names): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:460

Remove namespaces from the pending queue WITHOUT marking them hydrated — used when an on-demand hydration parse fails, so re-selecting re-queues.

Parameters ​

ParameterType
namesstring[]

Returns ​

void


expandAllNamespaces() ​

ts
expandAllNamespaces(): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:301

Returns ​

void


getEdges() ​

ts
getEdges(): TypeGraphEdge[];

Defined in: packages/visual-editor/src/store/editor-store.ts:296

Returns ​

TypeGraphEdge[]


getNodes() ​

ts
getNodes(): TypeGraphNode[];

Defined in: packages/visual-editor/src/store/editor-store.ts:295

Returns ​

TypeGraphNode[]


getVisibleEdges() ​

ts
getVisibleEdges(): TypeGraphEdge[];

Defined in: packages/visual-editor/src/store/editor-store.ts:306

Returns ​

TypeGraphEdge[]


getVisibleNodes() ​

ts
getVisibleNodes(): TypeGraphNode[];

Defined in: packages/visual-editor/src/store/editor-store.ts:305

Returns ​

TypeGraphNode[]


isolateNode() ​

ts
isolateNode(nodeId): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:316

Hide all nodes except the given node's focused cluster.

Parameters ​

ParameterType
nodeIdstring

Returns ​

void


loadDeferredExports() ​

ts
loadDeferredExports(entries): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:282

Register deferred corpus types as graph nodes without full AST models.

Parameters ​

ParameterType
entriesDeferredExportEntry[]

Returns ​

void


loadModels() ​

ts
loadModels(models, layoutOpts?): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:280

Parameters ​

ParameterType
modelsunknown
layoutOpts?LayoutOptions

Returns ​

void


markNamespacesHydrated() ​

ts
markNamespacesHydrated(names): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:451

Mark a set of namespaces as successfully hydrated: move them from pendingHydrationNamespaces to hydratedNamespaces. Called by the App.tsx effect after applyParseResult returns. Also increments hydrationNonce so effects that depend on it (e.g. the re-link effect in ExplorePerspective) can react to the new AST being live.

Parameters ​

ParameterType
namesstring[]

Returns ​

void


relayout() ​

ts
relayout(options?): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:291

Parameters ​

ParameterType
options?LayoutOptions

Returns ​

void


removeAnnotation() ​

ts
removeAnnotation(nodeId, index): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:431

Parameters ​

ParameterType
nodeIdstring
indexnumber

Returns ​

void


removeAttribute() ​

ts
removeAttribute(nodeId, attrName): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:333

Parameters ​

ParameterType
nodeIdstring
attrNamestring

Returns ​

void


removeChoiceOption() ​

ts
removeChoiceOption(nodeId, typeName): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:362

Parameters ​

ParameterType
nodeIdstring
typeNamestring

Returns ​

void


removeCondition() ​

ts
removeCondition(nodeId, index): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:411

Parameters ​

ParameterType
nodeIdstring
indexnumber

Returns ​

void


removeEnumValue() ​

ts
removeEnumValue(nodeId, valueName): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:353

Parameters ​

ParameterType
nodeIdstring
valueNamestring

Returns ​

void


removeEnumValueSynonym() ​

ts
removeEnumValueSynonym(
   nodeId, 
   valueIndex, 
   synIndex
): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:357

Parameters ​

ParameterType
nodeIdstring
valueIndexnumber
synIndexnumber

Returns ​

void


removeInputParam() ​

ts
removeInputParam(nodeId, paramName): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:366

Parameters ​

ParameterType
nodeIdstring
paramNamestring

Returns ​

void


removeSynonym() ​

ts
removeSynonym(nodeId, index): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:427

Parameters ​

ParameterType
nodeIdstring
indexnumber

Returns ​

void


renameAttribute() ​

ts
renameAttribute(
   nodeId, 
   oldName, 
   newName
): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:334

Parameters ​

ParameterType
nodeIdstring
oldNamestring
newNamestring

Returns ​

void


renameType() ​

ts
renameType(nodeId, newName): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:331

Parameters ​

ParameterType
nodeIdstring
newNamestring

Returns ​

void


reorderAttribute() ​

ts
reorderAttribute(
   nodeId, 
   fromIndex, 
   toIndex
): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:346

Parameters ​

ParameterType
nodeIdstring
fromIndexnumber
toIndexnumber

Returns ​

void


reorderCondition() ​

ts
reorderCondition(
   nodeId, 
   fromIndex, 
   toIndex
): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:421

Parameters ​

ParameterType
nodeIdstring
fromIndexnumber
toIndexnumber

Returns ​

void


reorderEnumValue() ​

ts
reorderEnumValue(
   nodeId, 
   fromIndex, 
   toIndex
): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:355

Parameters ​

ParameterType
nodeIdstring
fromIndexnumber
toIndexnumber

Returns ​

void


reorderInputParam() ​

ts
reorderInputParam(
   nodeId, 
   fromIndex, 
   toIndex
): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:385

Parameters ​

ParameterType
nodeIdstring
fromIndexnumber
toIndexnumber

Returns ​

void


requestNamespaceHydration() ​

ts
requestNamespaceHydration(ns): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:443

Queue a namespace for server-side hydration. No-op if the namespace is already hydrated or already pending. The App.tsx effect watches pendingHydrationNamespaces and re-parses when this list is non-empty.

Parameters ​

ParameterType
nsstring

Returns ​

void


resetHydration() ​

ts
resetHydration(): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:467

Clear all hydration state. Called on workspace switch so stale browsed- namespace names from the previous workspace don't carry over into the new one (the on-demand effect won't re-fire for names already in hydratedNamespaces, so they must be cleared on workspace load).

Returns ​

void


revealNeighbors() ​

ts
revealNeighbors(nodeId): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:318

Unhide a node's focused cluster (expand their namespaces too).

Parameters ​

ParameterType
nodeIdstring

Returns ​

void


selectNode() ​

ts
selectNode(nodeId, options?): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:285

Parameters ​

ParameterType
nodeIdstring | null
options?{ isolateInFocusMode?: boolean; reapplyFocusMode?: boolean; }
options.isolateInFocusMode?boolean
options.reapplyFocusMode?boolean

Returns ​

void


setEnumParent() ​

ts
setEnumParent(nodeId, parentId): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:358

Parameters ​

ParameterType
nodeIdstring
parentIdstring | null

Returns ​

void


setFilters() ​

ts
setFilters(filters): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:287

Parameters ​

ParameterType
filtersGraphFilters

Returns ​

void


setFunctionParent() ​

ts
setFunctionParent(nodeId, parentId): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:397

Set (or clear, with null) a Function's superFunction parent reference.

Parameters ​

ParameterType
nodeIdstring
parentIdstring | null

Returns ​

void


setInheritance() ​

ts
setInheritance(childId, parentId): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:348

Parameters ​

ParameterType
childIdstring
parentIdstring | null

Returns ​

void


setInitialVisibility() ​

ts
setInitialVisibility(totalNodeCount): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:303

Parameters ​

ParameterType
totalNodeCountnumber

Returns ​

void


setLayoutEngine() ​

ts
setLayoutEngine(engine): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:292

Parameters ​

ParameterType
engineLayoutEngine

Returns ​

void


setSearchQuery() ​

ts
setSearchQuery(query): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:286

Parameters ​

ParameterType
querystring

Returns ​

void


showAllEdgeKinds() ​

ts
showAllEdgeKinds(): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:312

Returns ​

void


showAllNodeKinds() ​

ts
showAllNodeKinds(): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:311

Returns ​

void


showAllNodes() ​

ts
showAllNodes(): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:322

Unhide all nodes (reset hiddenNodeIds).

Returns ​

void


showOnly() ​

ts
showOnly(nodeIds): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:320

Hide all nodes except the given set.

Parameters ​

ParameterType
nodeIdsSet<string>

Returns ​

void


toggleDetailPanel() ​

ts
toggleDetailPanel(): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:288

Returns ​

void


toggleEdgeKind() ​

ts
toggleEdgeKind(kind): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:310

Parameters ​

ParameterType
kindEdgeKind

Returns ​

void


toggleExplorer() ​

ts
toggleExplorer(): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:304

Returns ​

void


toggleFocusMode() ​

ts
toggleFocusMode(): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:324

Toggle focus mode (auto-isolate selected node + neighbors).

Returns ​

void


toggleFocusRelatedExcludedKind() ​

ts
toggleFocusRelatedExcludedKind(kind): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:326

Toggle exclusion of a node kind from focus-mode related clusters.

Parameters ​

ParameterType
kindTypeKind

Returns ​

void


toggleNamespace() ​

ts
toggleNamespace(namespace): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:299

Parameters ​

ParameterType
namespacestring

Returns ​

void


toggleNodeKind() ​

ts
toggleNodeKind(kind): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:309

Parameters ​

ParameterType
kindTypeKind

Returns ​

void


toggleNodeVisibility() ​

ts
toggleNodeVisibility(nodeId): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:300

Parameters ​

ParameterType
nodeIdstring

Returns ​

void


updateAttribute() ​

ts
updateAttribute(
   nodeId, 
   oldName, 
   newName, 
   typeName, 
   cardinality
): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:345

Parameters ​

ParameterType
nodeIdstring
oldNamestring
newNamestring
typeNamestring
cardinalitystring

Returns ​

void


updateAttributeType() ​

ts
updateAttributeType(
   nodeId, 
   attrName, 
   newTypeName, 
   targetTypeId
): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:344

Update the type ref on an attribute.

Parameters ​

ParameterTypeDescription
nodeIdstring-
attrNamestring-
newTypeNamestring-
targetTypeIdstringCanonical node id of the resolved target (namespace.Name). The store validates the id against current nodes and writes a fully-qualified $refText when any other node shares the bare name across namespaces (spec 020 Phase 13, Finding 3). Stale or unknown ids are rejected (no-op).

Returns ​

void


updateCardinality() ​

ts
updateCardinality(
   nodeId, 
   attrName, 
   cardinality
): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:347

Parameters ​

ParameterType
nodeIdstring
attrNamestring
cardinalitystring

Returns ​

void


updateComments() ​

ts
updateComments(nodeId, comments): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:425

Parameters ​

ParameterType
nodeIdstring
commentsstring

Returns ​

void


updateCondition() ​

ts
updateCondition(
   nodeId, 
   index, 
   updates
): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:412

Parameters ​

ParameterType
nodeIdstring
indexnumber
updates{ definition?: string; expressionText?: string; name?: string; }
updates.definition?string
updates.expressionText?string
updates.name?string

Returns ​

void


updateDefinition() ​

ts
updateDefinition(nodeId, definition): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:424

Parameters ​

ParameterType
nodeIdstring
definitionstring

Returns ​

void


updateEnumValue() ​

ts
updateEnumValue(
   nodeId, 
   oldName, 
   newName, 
   displayName?
): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:354

Parameters ​

ParameterType
nodeIdstring
oldNamestring
newNamestring
displayName?string

Returns ​

void


updateExpression() ​

ts
updateExpression(
   nodeId, 
   expressionText, 
   operationIndex?
): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:399

Parameters ​

ParameterType
nodeIdstring
expressionTextstring
operationIndex?number

Returns ​

void


updateInputParam() ​

ts
updateInputParam(
   nodeId, 
   oldName, 
   newName, 
   typeName, 
   cardinality, 
   targetTypeId?
): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:377

Update name, type, and cardinality for a function input parameter.

Parameters ​

ParameterTypeDescription
nodeIdstring-
oldNamestring-
newNamestring-
typeNamestring-
cardinalitystring-
targetTypeId?stringCanonical node id of the resolved target (namespace.Name). Mirrors updateAttributeType's qualification contract: when provided, the store calls disambiguateTypeRef and writes a fully-qualified $refText when another node shares the bare name across namespaces. When omitted (or unknown), the bare typeName is written as before (backward-compatible).

Returns ​

void


updateOutputParam() ​

ts
updateOutputParam(
   nodeId, 
   oldName, 
   newName, 
   typeName, 
   cardinality, 
   targetTypeId?
): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:387

Update the output signature and its references as one undoable edit.

Parameters ​

ParameterType
nodeIdstring
oldNamestring
newNamestring
typeNamestring
cardinalitystring
targetTypeId?string

Returns ​

void


updateOutputType() ​

ts
updateOutputType(nodeId, typeName): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:395

Parameters ​

ParameterType
nodeIdstring
typeNamestring

Returns ​

void


updateTypeAliasType() ​

ts
updateTypeAliasType(nodeId, typeName): void;

Defined in: packages/visual-editor/src/store/editor-store.ts:398

Parameters ​

ParameterType
nodeIdstring
typeNamestring

Returns ​

void


validate() ​

ts
validate(): ValidationError[];

Defined in: packages/visual-editor/src/store/editor-store.ts:349

Returns ​

ValidationError[]

Core packages released under MIT. Studio app released under FSL-1.1-ALv2.