Chris Connor May 21 2012 08:19:42 AMBeen working on an eclipse plugin which extends the right click menu. The idea is that it sends (creates) a bookmark type document in a central XPages "Knowledge base" database based upon the selected document.
So the user right clicks to select a document and chooses the "Bookmark" option below
Which provides this dialog
The bookmark document contains simply
1. A subject describing the document
2. A Tag for the document (category)
3. A "Notes URL" link to take the user to the source document
The idea is that people can then search the knowledge base using the tags etc and then open the source document for more info.
So this works on the basis that the URL is built from the selected document (this is where the issue lies... It is running a piece of code that does
NotesUIWorkspace ws = new NotesUIWorkspace();
NotesUIElement elem = ws.getCurrentElement();
Now - if I run the process direct from the Eclipse "Run Configuration" it works fine. If I build the plugin and then install it some strange behaviour can be observed in that "elem" sometimes returns null when run from a view on "Selected Documents".
Note it always returns a valid value if ran on an open document in the Notes UI (ie from the document through the form).
It sometimes resolves itself to return a correct value (sometimes on subsequent runs, sometimes requires you to open a document and run it THEN try it on a view / document).
Its fairly intermittent and extremely frustrating!
Anyone had any experience / knowledge of this?
- Comments