I have added the DocumentListener and update information in the tool window on document change (like outline view for the current file).
The problem is when I access the current PsiFile in the documentChanged() method then PsiFile doen't contain recent changes.
Do I need different listener type (something for listening PSI changes)? Should I use inspections for this task? Or there is method to update PSI caches?