rune-langium / visual-editor/src / EditorActions
Interface: EditorActions
Defined in: packages/visual-editor/src/store/editor-store.ts:96
Methods
addAnnotation()
addAnnotation(nodeId, annotationName): void;Defined in: packages/visual-editor/src/store/editor-store.ts:203
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
annotationName | string |
Returns
void
addAttribute()
addAttribute(
nodeId,
attrName,
typeName,
cardinality): void;Defined in: packages/visual-editor/src/store/editor-store.ts:143
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
attrName | string |
typeName | string |
cardinality | string |
Returns
void
addChoiceOption()
addChoiceOption(nodeId, typeName): void;Defined in: packages/visual-editor/src/store/editor-store.ts:165
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
typeName | string |
Returns
void
addCondition()
addCondition(nodeId, condition): void;Defined in: packages/visual-editor/src/store/editor-store.ts:175
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
condition | { definition?: string; expressionText: string; isPostCondition?: boolean; name?: string; } |
condition.definition? | string |
condition.expressionText | string |
condition.isPostCondition? | boolean |
condition.name? | string |
Returns
void
addEnumValue()
addEnumValue(
nodeId,
valueName,
displayName?): void;Defined in: packages/visual-editor/src/store/editor-store.ts:158
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
valueName | string |
displayName? | string |
Returns
void
addInputParam()
addInputParam(
nodeId,
paramName,
typeName): void;Defined in: packages/visual-editor/src/store/editor-store.ts:169
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
paramName | string |
typeName | string |
Returns
void
addSynonym()
addSynonym(nodeId, synonym): void;Defined in: packages/visual-editor/src/store/editor-store.ts:199
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
synonym | string |
Returns
void
applyReactFlowEdgeChanges()
applyReactFlowEdgeChanges(changes): void;Defined in: packages/visual-editor/src/store/editor-store.ts:208
Parameters
| Parameter | Type |
|---|---|
changes | EdgeChange<TypeGraphEdge>[] |
Returns
void
applyReactFlowNodeChanges()
applyReactFlowNodeChanges(changes): void;Defined in: packages/visual-editor/src/store/editor-store.ts:207
Parameters
| Parameter | Type |
|---|---|
changes | NodeChange<TypeGraphNode>[] |
Returns
void
collapseAllNamespaces()
collapseAllNamespaces(): void;Defined in: packages/visual-editor/src/store/editor-store.ts:117
Returns
void
createType()
createType(
kind,
name,
namespace): string;Defined in: packages/visual-editor/src/store/editor-store.ts:140
Parameters
| Parameter | Type |
|---|---|
kind | TypeKind |
name | string |
namespace | string |
Returns
string
deleteType()
deleteType(nodeId): void;Defined in: packages/visual-editor/src/store/editor-store.ts:141
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
Returns
void
expandAllNamespaces()
expandAllNamespaces(): void;Defined in: packages/visual-editor/src/store/editor-store.ts:116
Returns
void
getEdges()
getEdges(): TypeGraphEdge[];Defined in: packages/visual-editor/src/store/editor-store.ts:111
Returns
getNodes()
getNodes(): TypeGraphNode[];Defined in: packages/visual-editor/src/store/editor-store.ts:110
Returns
getVisibleEdges()
getVisibleEdges(): TypeGraphEdge[];Defined in: packages/visual-editor/src/store/editor-store.ts:121
Returns
getVisibleNodes()
getVisibleNodes(): TypeGraphNode[];Defined in: packages/visual-editor/src/store/editor-store.ts:120
Returns
isolateNode()
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
| Parameter | Type |
|---|---|
nodeId | string |
Returns
void
loadModels()
loadModels(models, layoutOpts?): void;Defined in: packages/visual-editor/src/store/editor-store.ts:98
Parameters
| Parameter | Type |
|---|---|
models | unknown |
layoutOpts? | LayoutOptions |
Returns
void
relayout()
relayout(options?): void;Defined in: packages/visual-editor/src/store/editor-store.ts:107
Parameters
| Parameter | Type |
|---|---|
options? | LayoutOptions |
Returns
void
removeAnnotation()
removeAnnotation(nodeId, index): void;Defined in: packages/visual-editor/src/store/editor-store.ts:204
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
index | number |
Returns
void
removeAttribute()
removeAttribute(nodeId, attrName): void;Defined in: packages/visual-editor/src/store/editor-store.ts:144
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
attrName | string |
Returns
void
removeChoiceOption()
removeChoiceOption(nodeId, typeName): void;Defined in: packages/visual-editor/src/store/editor-store.ts:166
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
typeName | string |
Returns
void
removeCondition()
removeCondition(nodeId, index): void;Defined in: packages/visual-editor/src/store/editor-store.ts:184
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
index | number |
Returns
void
removeEnumValue()
removeEnumValue(nodeId, valueName): void;Defined in: packages/visual-editor/src/store/editor-store.ts:159
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
valueName | string |
Returns
void
removeInputParam()
removeInputParam(nodeId, paramName): void;Defined in: packages/visual-editor/src/store/editor-store.ts:170
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
paramName | string |
Returns
void
removeSynonym()
removeSynonym(nodeId, index): void;Defined in: packages/visual-editor/src/store/editor-store.ts:200
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
index | number |
Returns
void
renameType()
renameType(nodeId, newName): void;Defined in: packages/visual-editor/src/store/editor-store.ts:142
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
newName | string |
Returns
void
reorderAttribute()
reorderAttribute(
nodeId,
fromIndex,
toIndex): void;Defined in: packages/visual-editor/src/store/editor-store.ts:152
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
fromIndex | number |
toIndex | number |
Returns
void
reorderCondition()
reorderCondition(
nodeId,
fromIndex,
toIndex): void;Defined in: packages/visual-editor/src/store/editor-store.ts:194
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
fromIndex | number |
toIndex | number |
Returns
void
reorderEnumValue()
reorderEnumValue(
nodeId,
fromIndex,
toIndex): void;Defined in: packages/visual-editor/src/store/editor-store.ts:161
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
fromIndex | number |
toIndex | number |
Returns
void
revealNeighbors()
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
| Parameter | Type |
|---|---|
nodeId | string |
Returns
void
selectNode()
selectNode(nodeId): void;Defined in: packages/visual-editor/src/store/editor-store.ts:101
Parameters
| Parameter | Type |
|---|---|
nodeId | string | null |
Returns
void
setEnumParent()
setEnumParent(nodeId, parentId): void;Defined in: packages/visual-editor/src/store/editor-store.ts:162
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
parentId | string | null |
Returns
void
setFilters()
setFilters(filters): void;Defined in: packages/visual-editor/src/store/editor-store.ts:103
Parameters
| Parameter | Type |
|---|---|
filters | GraphFilters |
Returns
void
setInheritance()
setInheritance(childId, parentId): void;Defined in: packages/visual-editor/src/store/editor-store.ts:154
Parameters
| Parameter | Type |
|---|---|
childId | string |
parentId | string | null |
Returns
void
setInitialVisibility()
setInitialVisibility(totalNodeCount): void;Defined in: packages/visual-editor/src/store/editor-store.ts:118
Parameters
| Parameter | Type |
|---|---|
totalNodeCount | number |
Returns
void
setSearchQuery()
setSearchQuery(query): void;Defined in: packages/visual-editor/src/store/editor-store.ts:102
Parameters
| Parameter | Type |
|---|---|
query | string |
Returns
void
showAllEdgeKinds()
showAllEdgeKinds(): void;Defined in: packages/visual-editor/src/store/editor-store.ts:127
Returns
void
showAllNodeKinds()
showAllNodeKinds(): void;Defined in: packages/visual-editor/src/store/editor-store.ts:126
Returns
void
showAllNodes()
showAllNodes(): void;Defined in: packages/visual-editor/src/store/editor-store.ts:137
Unhide all nodes (reset hiddenNodeIds).
Returns
void
showOnly()
showOnly(nodeIds): void;Defined in: packages/visual-editor/src/store/editor-store.ts:135
Hide all nodes except the given set.
Parameters
| Parameter | Type |
|---|---|
nodeIds | Set<string> |
Returns
void
toggleDetailPanel()
toggleDetailPanel(): void;Defined in: packages/visual-editor/src/store/editor-store.ts:104
Returns
void
toggleEdgeKind()
toggleEdgeKind(kind): void;Defined in: packages/visual-editor/src/store/editor-store.ts:125
Parameters
| Parameter | Type |
|---|---|
kind | EdgeKind |
Returns
void
toggleExplorer()
toggleExplorer(): void;Defined in: packages/visual-editor/src/store/editor-store.ts:119
Returns
void
toggleNamespace()
toggleNamespace(namespace): void;Defined in: packages/visual-editor/src/store/editor-store.ts:114
Parameters
| Parameter | Type |
|---|---|
namespace | string |
Returns
void
toggleNodeKind()
toggleNodeKind(kind): void;Defined in: packages/visual-editor/src/store/editor-store.ts:124
Parameters
| Parameter | Type |
|---|---|
kind | TypeKind |
Returns
void
toggleNodeVisibility()
toggleNodeVisibility(nodeId): void;Defined in: packages/visual-editor/src/store/editor-store.ts:115
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
Returns
void
updateAttribute()
updateAttribute(
nodeId,
oldName,
newName,
typeName,
cardinality): void;Defined in: packages/visual-editor/src/store/editor-store.ts:145
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
oldName | string |
newName | string |
typeName | string |
cardinality | string |
Returns
void
updateCardinality()
updateCardinality(
nodeId,
attrName,
cardinality): void;Defined in: packages/visual-editor/src/store/editor-store.ts:153
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
attrName | string |
cardinality | string |
Returns
void
updateComments()
updateComments(nodeId, comments): void;Defined in: packages/visual-editor/src/store/editor-store.ts:198
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
comments | string |
Returns
void
updateCondition()
updateCondition(
nodeId,
index,
updates): void;Defined in: packages/visual-editor/src/store/editor-store.ts:185
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
index | number |
updates | { definition?: string; expressionText?: string; name?: string; } |
updates.definition? | string |
updates.expressionText? | string |
updates.name? | string |
Returns
void
updateDefinition()
updateDefinition(nodeId, definition): void;Defined in: packages/visual-editor/src/store/editor-store.ts:197
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
definition | string |
Returns
void
updateEnumValue()
updateEnumValue(
nodeId,
oldName,
newName,
displayName?): void;Defined in: packages/visual-editor/src/store/editor-store.ts:160
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
oldName | string |
newName | string |
displayName? | string |
Returns
void
updateExpression()
updateExpression(nodeId, expressionText): void;Defined in: packages/visual-editor/src/store/editor-store.ts:172
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
expressionText | string |
Returns
void
updateOutputType()
updateOutputType(nodeId, typeName): void;Defined in: packages/visual-editor/src/store/editor-store.ts:171
Parameters
| Parameter | Type |
|---|---|
nodeId | string |
typeName | string |
Returns
void
validate()
validate(): ValidationError[];Defined in: packages/visual-editor/src/store/editor-store.ts:155