I'm just beginning with IntelliJ plugin developpment.
I would like to replace *automatically* (on opening) the Java editor content, when the source file is not found (ie I'd like to override the default behaviour that shows comments with "compiled code"). And of course I'd like to keep the same behaviour in order to lookup for sources, notifications, and of course display the original sources if IntelliJ knows them.
To my understanding I should register a component in the aplication scope.
I think the component class should take EditorFactory as an argument, but from there I'm a bit lost.
JavaEditorFileSwapper, AttachSourcesNotificationProvider seem to be good guesses. But I'm not sure how I can plug there.
Can I extend AttachSourcesNotificationProvider and override createNotificationPanel? Or is there a better way?
Besides if it is the best way, how would I register this "extension point" and replace the current AttachSourcesNotificationProvider ?
By the way I'm developping this with IntelliJ 10.5.2.
Guidance would be very much appreciated.