Allow updating a specific source file of an existing CodeContext
Submitted by Linus Seelinger
Link to original bug (#696335)
Description
I am developing an autocompletion engine for a vala IDE. I use libvala to get all available symbols, which works very well so far.
However, once the user changes a file, I need libvala to parse the file again.
Currently, there seems to be no good way to update a source file within an existing CodeContext.
I tried (as Anjuta does it) to get all the file's CodeNodes and to remove them from their scopes, then parse again. However, this does not remove the symbols entirely.
So, I suggest to enhance Parser.parse_file to replace the file's old symbols.