The Soar extension now provides full CRUD (Create, Read, Update, Delete) operations for the datamap through the UI, eliminating the need to manually edit JSON files.
All datamap operations are accessible via the Soar Datamap tree view in the sidebar. The tree view displays the hierarchical structure of your datamap, and you can manipulate it using context menu commands.
Add a new attribute to any SOAR_ID vertex in the datamap.
How to use:
- Right-click on a SOAR_ID node (root or any attribute with children)
- Select "Add Attribute"
- Enter the attribute name (e.g.,
position,status,value) - Select the attribute type:
- SOAR_ID - Identifier that can have sub-attributes
- INTEGER - Integer number
- FLOAT - Floating point number
- STRING - Text string
- ENUMERATION - Predefined choices
- If ENUMERATION, enter comma-separated choices (e.g.,
success, failure, pending) - Optionally add a comment describing the attribute
Result: The new attribute is added to the datamap and saved to the project file.
The tree view automatically displays the datamap structure.
Features:
- Hierarchical view of all attributes
- Type icons for each vertex type
- Descriptions showing:
- Number of sub-attributes for SOAR_ID
- Enumeration choices
- Type information
- Tooltips with detailed information
Modify an existing attribute's properties.
How to use:
- Right-click on any attribute (not the root)
- Select "Edit Attribute"
- Choose what to edit:
- Rename - Change the attribute name
- Edit Comment - Add or modify the comment
- Change Type - Change the attribute type (
⚠️ may delete sub-attributes)
Rename:
- Enter the new attribute name
- Validation ensures no duplicates and proper format
Edit Comment:
- Add or modify the descriptive comment
- Empty comments are removed
Change Type:
- Select the new type
⚠️ Warning: Changing from SOAR_ID will delete all sub-attributes- For ENUMERATION, specify the choices
Result: The attribute is updated and the project file is saved.
Remove an attribute and all its descendants from the datamap.
How to use:
- Right-click on any attribute (not the root)
- Select "Delete Attribute"
- Confirm the deletion
- Deletes the attribute
- Recursively deletes all sub-attributes
- Cannot be undone (except via version control)
Result: The attribute is removed and the project file is saved.
Linked attributes are edges that reference a vertex owned by another parent
(^io on substates pointing to the shared IO structure, for example).
How to identify them:
- A link icon appears next to the attribute.
- The tooltip lists the owning parent and the number of inbound references.
- Context menus only expose link-aware commands.
Available commands:
- Reveal Link Owner – switches the datamap view to the owning vertex so you can edit the source definition.
- Remove Linked Attribute – deletes only the edge from the current parent, leaving the shared vertex intact.
Linked attributes cannot be edited or deleted through the regular commands. This prevents accidentally destroying shared structures.
The context menu shows different options depending on the selected item:
| Context | Available Commands |
|---|---|
| Root node | Add Attribute |
| SOAR_ID attribute | Add Attribute, Edit Attribute, Delete Attribute |
| Other attributes | Edit Attribute, Delete Attribute |
| Linked attribute | Reveal Link Owner, Remove Linked Attribute |
- Attribute names must start with a letter and contain only letters, numbers, hyphens, and underscores
- Duplicate names are prevented at the same level
- Enumerations must have at least one choice
- Type changes warn if sub-attributes will be deleted
All operations automatically:
- Update the datamap structure in memory
- Save the changes to the project file (.vsa.json)
- Refresh the tree view
- Show confirmation messages
- Use descriptive names - Make attribute names clear and consistent
- Add comments - Document what each attribute represents
- Use ENUMERATION for fixed sets of values
- Plan hierarchy - Design your datamap structure before creating
- Version control - Commit datamap changes with meaningful messages
-
Right-click on
^output-link→ Add Attribute- Name:
command - Type: SOAR_ID
- Comment: "Commands sent to environment"
- Name:
-
Right-click on
^command→ Add Attribute- Name:
type - Type: ENUMERATION
- Choices:
move, attack, defend - Comment: "Type of command"
- Name:
-
Right-click on
^command→ Add Attribute- Name:
status - Type: ENUMERATION
- Choices:
pending, executing, complete, failed - Comment: "Command execution status"
- Name:
-
Right-click on
^command→ Add Attribute- Name:
parameters - Type: SOAR_ID
- Comment: "Command-specific parameters"
- Name:
No default keyboard shortcuts are assigned, but you can add them in VS Code settings:
{
"key": "ctrl+alt+a",
"command": "soar.addAttribute",
"when": "focusedView == soarDatamap"
}"No datamap loaded"
- Ensure a .vsa.json project file exists in your workspace
- Use "Load Datamap" command from the tree view title
Context menu not showing
- Ensure you're right-clicking on a valid node
- Root node only supports "Add Attribute"
Changes not saving
- Check file permissions on the project file
- Ensure the project file isn't read-only
Tree view not updating
- Click the refresh button in the tree view title
- Or use "Refresh Datamap" command
- Completions automatically use the updated datamap structure
- Validation checks code against the modified datamap
- Hover shows information from the updated datamap
- Tree view reflects changes immediately
Potential future features:
- Drag-and-drop to reorganize attributes
- Bulk import/export operations
- Undo/redo support
- Datamap visualization diagrams
- Import from existing Soar code