Open MichaelRFairhurst opened 7 years ago
Yeah, I debated about that part of the implementation. Currently, contentChanged
is only invoked when there is a watch event of type MODIFY
or when an overlay is added, changed or removed. I was thinking about having separate methods for when files are added or removed, but haven't implemented them yet. (There are to-do comments for them.)
Your idea of passing in a driver is an interesting one. I think, though, that it makes the assumption that plugins will only ever analyze a file in a single driver, and I'm not sure that's valid given dependency overrides. (I routinely have 'analyzer' and 'analysis_server' open and changes I make to 'analyzer' force server to re-analyze part of 'analysis_server'.)
... maybe these could be made part of the
AnalysisDriverGeneric
interface ...
Yeah, I'm not sure what we want that interface to look like. I guess we'll just have to figure it out as we go along. If the base plugin class were to invoke a contentChanged
method on the driver, then it would probably have to notify every driver of every change just in case. Not sure whether it either saves the plugin author any effort or improves performance.
I'm filling in
Might be nice if I got the driver that cared, and a differentiation between add and change events.
Ultimately I'll be doing, like
maybe these could be made part of the
AnalysisDriverGeneric
interface, so I don't even have to write it?