requestor parameter in VirtualFile operations

Answered

All write operations in VirtualFile need a "requestor" parameter, from the document I know it should be the caller of the operation and it could be anything but null (null has special meaning).

I use my class.this as the requestor, it works, anyway I still don't understand what it should be in most case and when it will be used in IDEA.

Thanks

0
2 comments

It's just some user data to pass with the change. Some listeners use it to make decisions. There are 2 special values:

  • null for refresh events
  • "instanceof SavingRequestor" for save events

Everything else is at your discretion. Most clients pass "this" in it, just because they have to pass something.

0
Avatar
Permanently deleted user

Thank you Peter.

0

Please sign in to leave a comment.