Parse current document and highlight if valid

Fix bug when opening a document twice
TreeView for pkgbrowser