Skip to content

rune-langium / visual-editor/src / EditorActions

Interface: EditorActions ​

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

Methods ​

addAnnotation() ​

ts
addAnnotation(nodeId, annotationName): void;

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

Parameters ​

ParameterType
nodeIdstring
annotationNamestring

Returns ​

void


addAttribute() ​

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

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

Parameters ​

ParameterType
nodeIdstring
attrNamestring
typeNamestring
cardinalitystring

Returns ​

void


addChoiceOption() ​

ts
addChoiceOption(nodeId, typeName): void;

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

Parameters ​

ParameterType
nodeIdstring
typeNamestring

Returns ​

void


addCondition() ​

ts
addCondition(nodeId, condition): void;

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

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:158

Parameters ​

ParameterType
nodeIdstring
valueNamestring
displayName?string

Returns ​

void


addInputParam() ​

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

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

Parameters ​

ParameterType
nodeIdstring
paramNamestring
typeNamestring

Returns ​

void


addSynonym() ​

ts
addSynonym(nodeId, synonym): void;

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

Parameters ​

ParameterType
nodeIdstring
synonymstring

Returns ​

void


applyReactFlowEdgeChanges() ​

ts
applyReactFlowEdgeChanges(changes): void;

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

Parameters ​

ParameterType
changesEdgeChange<TypeGraphEdge>[]

Returns ​

void


applyReactFlowNodeChanges() ​

ts
applyReactFlowNodeChanges(changes): void;

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

Parameters ​

ParameterType
changesNodeChange<TypeGraphNode>[]

Returns ​

void


collapseAllNamespaces() ​

ts
collapseAllNamespaces(): void;

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

Returns ​

void


createType() ​

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

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

Parameters ​

ParameterType
kindTypeKind
namestring
namespacestring

Returns ​

string


deleteType() ​

ts
deleteType(nodeId): void;

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

Parameters ​

ParameterType
nodeIdstring

Returns ​

void


expandAllNamespaces() ​

ts
expandAllNamespaces(): void;

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

Returns ​

void


getEdges() ​

ts
getEdges(): TypeGraphEdge[];

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

Returns ​

TypeGraphEdge[]


getNodes() ​

ts
getNodes(): TypeGraphNode[];

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

Returns ​

TypeGraphNode[]


getVisibleEdges() ​

ts
getVisibleEdges(): TypeGraphEdge[];

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

Returns ​

TypeGraphEdge[]


getVisibleNodes() ​

ts
getVisibleNodes(): TypeGraphNode[];

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

Returns ​

TypeGraphNode[]


isolateNode() ​

ts
isolateNode(nodeId): void;

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

Hide all nodes except the given node and its directly connected neighbors.

Parameters ​

ParameterType
nodeIdstring

Returns ​

void


loadModels() ​

ts
loadModels(models, layoutOpts?): void;

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

Parameters ​

ParameterType
modelsunknown
layoutOpts?LayoutOptions

Returns ​

void


relayout() ​

ts
relayout(options?): void;

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

Parameters ​

ParameterType
options?LayoutOptions

Returns ​

void


removeAnnotation() ​

ts
removeAnnotation(nodeId, index): void;

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

Parameters ​

ParameterType
nodeIdstring
indexnumber

Returns ​

void


removeAttribute() ​

ts
removeAttribute(nodeId, attrName): void;

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

Parameters ​

ParameterType
nodeIdstring
attrNamestring

Returns ​

void


removeChoiceOption() ​

ts
removeChoiceOption(nodeId, typeName): void;

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

Parameters ​

ParameterType
nodeIdstring
typeNamestring

Returns ​

void


removeCondition() ​

ts
removeCondition(nodeId, index): void;

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

Parameters ​

ParameterType
nodeIdstring
indexnumber

Returns ​

void


removeEnumValue() ​

ts
removeEnumValue(nodeId, valueName): void;

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

Parameters ​

ParameterType
nodeIdstring
valueNamestring

Returns ​

void


removeInputParam() ​

ts
removeInputParam(nodeId, paramName): void;

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

Parameters ​

ParameterType
nodeIdstring
paramNamestring

Returns ​

void


removeSynonym() ​

ts
removeSynonym(nodeId, index): void;

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

Parameters ​

ParameterType
nodeIdstring
indexnumber

Returns ​

void


renameType() ​

ts
renameType(nodeId, newName): void;

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

Parameters ​

ParameterType
nodeIdstring
newNamestring

Returns ​

void


reorderAttribute() ​

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

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

Parameters ​

ParameterType
nodeIdstring
fromIndexnumber
toIndexnumber

Returns ​

void


reorderCondition() ​

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

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

Parameters ​

ParameterType
nodeIdstring
fromIndexnumber
toIndexnumber

Returns ​

void


reorderEnumValue() ​

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

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

Parameters ​

ParameterType
nodeIdstring
fromIndexnumber
toIndexnumber

Returns ​

void


revealNeighbors() ​

ts
revealNeighbors(nodeId): void;

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

Unhide the direct neighbors of a node (expand their namespaces too).

Parameters ​

ParameterType
nodeIdstring

Returns ​

void


selectNode() ​

ts
selectNode(nodeId): void;

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

Parameters ​

ParameterType
nodeIdstring | null

Returns ​

void


setEnumParent() ​

ts
setEnumParent(nodeId, parentId): void;

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

Parameters ​

ParameterType
nodeIdstring
parentIdstring | null

Returns ​

void


setFilters() ​

ts
setFilters(filters): void;

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

Parameters ​

ParameterType
filtersGraphFilters

Returns ​

void


setInheritance() ​

ts
setInheritance(childId, parentId): void;

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

Parameters ​

ParameterType
childIdstring
parentIdstring | null

Returns ​

void


setInitialVisibility() ​

ts
setInitialVisibility(totalNodeCount): void;

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

Parameters ​

ParameterType
totalNodeCountnumber

Returns ​

void


setSearchQuery() ​

ts
setSearchQuery(query): void;

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

Parameters ​

ParameterType
querystring

Returns ​

void


showAllEdgeKinds() ​

ts
showAllEdgeKinds(): void;

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

Returns ​

void


showAllNodeKinds() ​

ts
showAllNodeKinds(): void;

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

Returns ​

void


showAllNodes() ​

ts
showAllNodes(): void;

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

Unhide all nodes (reset hiddenNodeIds).

Returns ​

void


showOnly() ​

ts
showOnly(nodeIds): void;

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

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:104

Returns ​

void


toggleEdgeKind() ​

ts
toggleEdgeKind(kind): void;

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

Parameters ​

ParameterType
kindEdgeKind

Returns ​

void


toggleExplorer() ​

ts
toggleExplorer(): void;

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

Returns ​

void


toggleNamespace() ​

ts
toggleNamespace(namespace): void;

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

Parameters ​

ParameterType
namespacestring

Returns ​

void


toggleNodeKind() ​

ts
toggleNodeKind(kind): void;

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

Parameters ​

ParameterType
kindTypeKind

Returns ​

void


toggleNodeVisibility() ​

ts
toggleNodeVisibility(nodeId): void;

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

Parameters ​

ParameterType
nodeIdstring

Returns ​

void


updateAttribute() ​

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

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

Parameters ​

ParameterType
nodeIdstring
oldNamestring
newNamestring
typeNamestring
cardinalitystring

Returns ​

void


updateCardinality() ​

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

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

Parameters ​

ParameterType
nodeIdstring
attrNamestring
cardinalitystring

Returns ​

void


updateComments() ​

ts
updateComments(nodeId, comments): void;

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

Parameters ​

ParameterType
nodeIdstring
commentsstring

Returns ​

void


updateCondition() ​

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

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

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:197

Parameters ​

ParameterType
nodeIdstring
definitionstring

Returns ​

void


updateEnumValue() ​

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

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

Parameters ​

ParameterType
nodeIdstring
oldNamestring
newNamestring
displayName?string

Returns ​

void


updateExpression() ​

ts
updateExpression(nodeId, expressionText): void;

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

Parameters ​

ParameterType
nodeIdstring
expressionTextstring

Returns ​

void


updateOutputType() ​

ts
updateOutputType(nodeId, typeName): void;

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

Parameters ​

ParameterType
nodeIdstring
typeNamestring

Returns ​

void


validate() ​

ts
validate(): ValidationError[];

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

Returns ​

ValidationError[]

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