<div dir="ltr"><div>Hi,</div><div>  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. </div>
<div>  I am planning to do this using the Author API, specifically the AuthorExtensionStateListener interface (I saw a sample at "<a href="http://www.oxygenxml.com/doc/ug-author/index.html#topics/dg-author-extension-state-listener.html">http://www.oxygenxml.com/doc/ug-author/index.html#topics/dg-author-extension-state-listener.html</a>" 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. </div>
<div>  My questions are as follows:</div><div>  <span class="" style="white-space:pre">     </span>a) Is this the best way to implement what I have in mind?</div><div>  <span class="" style="white-space:pre">        </span>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.</div>
<div>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.</div>
<div><br></div><div>My current code structure something like this...</div><div><br></div><div>File 1: </div><div><br></div><div>public class ditaAuthorExtensionStateListener implements AuthorExtensionStateListener{</div><div>
....</div><div>....</div><div><br></div><div>public void activated(...){</div><div><span class="" style="white-space:pre">      </span>// Add author document listeners.</div><div><span class="" style="white-space:pre">  </span>ditaAuthorDocumentListener = new DitaAuthorListener();</div>
<div><span class="" style="white-space:pre">    </span>authorAccess.getDocumentController().addAuthorListener(ditaAuthorDocumentListener);</div><div><span class="" style="white-space:pre">        </span></div><div>}</div><div><span class="" style="white-space:pre">   </span></div>
<div>File 2: </div><div>public class DitaAuthorListener implements AuthorListener{</div><div><br></div><div>.....</div><div>.....</div><div>// I am stuck here since I do not find any method which is triggered on opening Oxygen Author.</div>
<div><br></div><div>Thanks a bunch!</div><div>Nathan</div></div>