Now it works much better, but there's still one bug:
If I open a vala file and a regular file (not a new document but an existing one) and then switch tab from the vala file to the non-vala file, the outline pane becomes empty but doesn't hide as it should.
If I instead open a vala file and a new empty document, it works as long as the new document isn't saved. Once saved, Scratch behaves as above.
Also, there's a conflict with trunk's ValaSymbolResolver.vala
Now it works much better, but there's still one bug:
If I open a vala file and a regular file (not a new document but an existing one) and then switch tab from the vala file to the non-vala file, the outline pane becomes empty but doesn't hide as it should.
If I instead open a vala file and a new empty document, it works as long as the new document isn't saved. Once saved, Scratch behaves as above.
Also, there's a conflict with trunk's ValaSymbolResol ver.vala