[oXygen-sdk] Implementation of AuthorExtensionStateListener
Nathan
vrveerar at gmail.com
Tue Jan 21 21:53:17 CST 2014
Hi,
I am using Oxygen 15's inbuilt DITA framework and I would like to
customize it by showing a Swing based form when Oxygen Author has been
opened. This form will be used to set custom variables which can then be
used later on.
I am planning to do this using the Author API, specifically the
AuthorExtensionStateListener interface (I saw a sample at "
http://www.oxygenxml.com/doc/ug-author/index.html#topics/dg-author-extension-state-listener.html"
in this regard). I presume the next step would be to register an
implementation of AuthorListener (or extend the "AuthorListenerAdapter"
class) within the activate method of the implementation of
AuthorExtensionStateListener interface.
My questions are as follows:
a) Is this the best way to implement what I have in mind?
b) There does not seem to be any Author window event which can be used to
popup the form. I see others for doctypeChanged(), documentChanged etc here
but nothing to record a opening-of-author event.
I feel like I am missing something here and would greatly appreciate some
help. If there is a better way to do this, I am all ears. Just a note, I
cannot use plugins since this has to work for people who use Oxygen Author
standalone and those who use the Author plugin within eclipse.
My current code structure something like this...
File 1:
public class ditaAuthorExtensionStateListener implements
AuthorExtensionStateListener{
....
....
public void activated(...){
// Add author document listeners.
ditaAuthorDocumentListener = new DitaAuthorListener();
authorAccess.getDocumentController().addAuthorListener(ditaAuthorDocumentListener);
}
File 2:
public class DitaAuthorListener implements AuthorListener{
.....
.....
// I am stuck here since I do not find any method which is triggered on
opening Oxygen Author.
Thanks a bunch!
Nathan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.oxygenxml.com/pipermail/oxygen-sdk/attachments/20140121/4037ab83/attachment.html>
More information about the oXygen-sdk
mailing list