Documentation
¶
Index ¶
- Constants
- func CloseDoc(uri Uri)
- func GetDoc(uri Uri) *TextDocument
- func GetOpenDocsIter() iter.Seq2[Uri, *TextDocument]
- func GetTree(uri Uri) *Tree
- func GetTreeText(uri Uri) (tree *Tree, text []byte, err error)
- func NodeToPosString(node *Node) string
- func ParseTree(text []byte) (*Tree, error)
- func RemoveDoc(uri Uri) error
- func RemoveTree(uri Uri)
- func SetTree(uri Uri, tree *Tree)
- func TempDoc(uri Uri) (doc *TextDocument, err error)
- func ToString(node *Node, doc *TextDocument) string
- func UriFileExist(uri Uri) bool
- func WalkFiles(uri Uri, extensions []string, cb func(Uri, string) error) (err error)
- func WalkTrees(cb func(Uri, *Tree))
- type Docs
- type Duplicate
- type Duplicates
- type FamMem
- type Families
- type Family
- func (family *Family) AddMember(node *Node, text []byte) *Member
- func (family *Family) AddMemberName(node *Node, name string, aliases []string, surname string) *Member
- func (family *Family) FindMember(name string) (mem *Member)
- func (family *Family) GetMember(name string) *Member
- func (family *Family) HasMember(name string) bool
- func (family *Family) MembersIter() iter.Seq[*Member]
- func (family *Family) NamesIter() iter.Seq[string]
- type File
- type FileTree
- type Files
- type FilesTree
- type Listeners
- type Member
- type Members
- type NodeRefs
- type Ref
- type Refs
- type Root
- func (root *Root) AddFamily(uri Uri, node *Node, text []byte) *Family
- func (root *Root) AddLabel(uri Uri, label string)
- func (root *Root) AddNodeRef(uri Uri, famMem *FamMem)
- func (root *Root) AddRef(ref *Ref)
- func (root *Root) AddUnknownFile(uri Uri) error
- func (root *Root) AddUnknownRef(ref *Ref)
- func (root *Root) FamilyIter() iter.Seq[*Family]
- func (root *Root) FindFamiliesByUri(uri Uri) []*Family
- func (root *Root) FindFamily(name string) *Family
- func (root *Root) FindFolder(uri Uri) Uri
- func (root *Root) FindMember(surname string, name string) (family *Family, member *Member)
- func (root *Root) GetFamMem(uri Uri, node *Node) *FamMem
- func (root *Root) GetFamilyByUriNode(uri Uri, node *Node) *Family
- func (root *Root) GetMemberByUriNode(uri Uri, node *Node) *Member
- func (root *Root) MembersIter() iter.Seq[*Member]
- func (root *Root) OnUpdate(cb func())
- func (root *Root) OpenDoc(uri Uri) (doc *TextDocument, err error)
- func (root *Root) OpenDocText(uri Uri, text string, tree *Tree) (doc *TextDocument, err error)
- func (root *Root) RemoveFamily(f *Family)
- func (root *Root) SetFolders(folders []Uri) (err error)
- func (root *Root) Trigger(event string)
- func (root *Root) Update(tree *Tree, text []byte, uri Uri) (err error)
- func (root *Root) UpdateDirty() error
- func (root *Root) UpdateUnknownFiles()
- func (root *Root) UpdateUnknownRefs()
- type UriSet
Constants ¶
View Source
const ( FileCreate = uint8(iota) FileChange FileRename FileDelete FileOpen FileClose )
View Source
const RootOnUpdate = "update"
Variables ¶
This section is empty.
Functions ¶
func GetOpenDocsIter ¶
func GetTreeText ¶
func NodeToPosString ¶ added in v1.2.0
func NodeToPosString(node *Node) string
func RemoveTree ¶
func RemoveTree(uri Uri)
func UriFileExist ¶
func UriFileExist(uri Uri) bool
Types ¶
type Duplicates ¶
type Family ¶
type Family struct { Name string Aliases []string Members Members Duplicates Duplicates Uri Uri Node *Node Root *Root }
func (*Family) AddMemberName ¶ added in v1.1.0
func (*Family) FindMember ¶ added in v1.4.0
type File ¶
type File struct { Uri Uri Path []string }
func CreateFile ¶
func (*File) PathIncludes ¶
type Member ¶
type Member struct { Node *Node Name string Aliases []string Surname string Refs Refs InfoUri Uri Family *Family Origin *Member }
func (*Member) GetUniqName ¶
func (*Member) NormalizeName ¶ added in v1.7.0
type Root ¶
type Root struct { Folders UriSet Families Families Duplicates Duplicates NodeRefs NodeRefs UnknownRefs []*Ref UnknownFiles Files DirtyUris UriSet Labels map[Uri][]string Listeners Listeners Log func(string, ...any) UpdateLock sync.Mutex }
func CreateRoot ¶
func (*Root) AddNodeRef ¶
func (*Root) AddUnknownFile ¶
func (*Root) AddUnknownRef ¶ added in v1.1.0
func (*Root) FindFamiliesByUri ¶
func (*Root) FindFamily ¶
func (*Root) FindFolder ¶
func (root *Root) FindFolder(uri Uri) Uri
func (*Root) FindMember ¶
func (*Root) GetFamilyByUriNode ¶ added in v1.1.0
func (*Root) GetMemberByUriNode ¶
func (*Root) OpenDocText ¶
func (*Root) RemoveFamily ¶
func (*Root) SetFolders ¶
func (*Root) UpdateDirty ¶
func (*Root) UpdateUnknownFiles ¶
func (root *Root) UpdateUnknownFiles()
func (*Root) UpdateUnknownRefs ¶
func (root *Root) UpdateUnknownRefs()
Click to show internal directories.
Click to hide internal directories.