I want to build a plug-in that gets loaded when the Notes client (8.5.2++) loads that gets called whenever a document is opened and get the (Notes) URL of that document. What extension points and APIs do I need?
Clarification:
I do know how to get to the current document (NotesUIWorkspace.currentDocument). What I don’t know is how (and when) to register a listener to get notified.
Special challenge: documents can be opened in Framesets (more than one) and documents can be opened as part of a composite page. The Frameset isn’t a big concern, but the composite. If this would require to listen to any page opening and inspect it – I’m fine with that
We have solved this by getting all request of anykind of “post selection”. The following Code snipped is from a sidebarplugin and is called in createViewPart():
The first part of the magic is “PlattformUI ….. .addPostSelecitonListener();” On this point we register our listener, witch is als based on a observer pattern.
The NotesSelectionObserver is a interface with the following definition:
The NotesSelecitonContext is a other Interface that delivers all the information about the Selection. Here the definition:
So and now the last part, witch is the clue…. the NotesSelectionObservable:
You have also asked about the list of plugins:
We will bring this code also as a plugin to the openNTF Community. I think anybody who wants to extend the notesclient via Sidebars need to be aware on witch context a user is and wants to response to this context.