saros icon indicating copy to clipboard operation
saros copied to clipboard

Handle invalidation of a reference point or its parent resource

Open tobous opened this issue 5 years ago • 0 comments
trafficstars

Currently, only two cases of invalidating a shared reference point root are supported (introduced with #1001):

  1. Deleting the shared reference point root directory.
  2. 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.

  1. If a parent directory of the shared reference point root is deleted.
  2. If the parent directory of a shared reference point root is moved into an excluded directory.
  3. 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.)

tobous avatar May 28 '20 20:05 tobous