MCPcopy Create free account
hub / github.com/cogentcore/core / InsertBefore

Method InsertBefore

core/treesync.go:151–153  ·  view source on GitHub ↗

InsertBefore inserts a new node in the tree before this node, at the same (sibling) level, prompting for the type of node to insert If SyncNode is set, operates on Sync Tree.

()

Source from the content-addressed store, hash-verified

149// prompting for the type of node to insert
150// If SyncNode is set, operates on Sync Tree.
151func (tr *Tree) InsertBefore() { //types:add
152 tr.insertAt(0, "Insert before")
153}
154
155func (tr *Tree) addTreeNodes(rel, myidx int, typ *types.Type, n int) {
156 var stv *Tree

Callers 1

InitMethod · 0.95

Calls 1

insertAtMethod · 0.95

Tested by

no test coverage detected