saros
saros copied to clipboard
Handle invalidation of a reference point or its parent resource
Currently, only two cases of invalidating a shared reference point root are supported (introduced with #1001):
- Deleting the shared reference point root directory.
- Moving the shared reference point root directory into an excluded directory.
There are, however, other ways to invalidate reference point root directories that are not covered by the current logic.
- If a parent directory of the shared reference point root is deleted.
- If the parent directory of a shared reference point root is moved into an excluded directory.
- If the shared reference point root or one of its parent directories is marked as excluded.
These cases should also be covered by the logic. In all cases, the session should be ended and the user should be informed about the session end and its reasons.
Cases 3 & 4
I already created an initial patch to cover cases 3. and 4. but wasn't really happy with it and didn't want to invest more time into it right now. The patch is attached below if anybody else is interested in working on this.
handle-ref-point-parent-invalidation-diff.txt
Case 5
I am not quite sure how to handle this case as I haven't figured out how to listen for changes to the module root model yet. This could be covered by the VirtualFileListener.propertyChanged(...) through the property PROP_HIDDEN, but I doubt it. (Haven't tried it yet though.)