[oXygen-sdk] Is it possible to capture when the editor is refreshed

Jan Bevers jbevers at sdl.com
Tue Mar 26 04:55:09 CDT 2013


Hi

 

Is it possible to capture an event when the user presses F5 or uses the
refresh menu item in the DITA menu?

 

I have following code, but this only gets triggered when the user presses the
F5 key. Not when the menu item is clicked.

 

KeyboardFocusManager.getCurrentKeyboardFocusManager()

                .addKeyEventDispatcher(new KeyEventDispatcher() {

            @Override

            public boolean dispatchKeyEvent(KeyEvent e) {

                if (e.getKeyCode() == KeyEvent.VK_F5) {

                    try {

                        WorkItem workItem =
AuthoringBridge.getWorkArea().getWorkItemByPath(getEditorLocation());

                        // Enable/disable the editor area

                        EditorHelper.setEditable(getEditorLocation(),
workItem.getIsEditable());

                    } catch (MalformedURLException ex) {

                        Logging.writeError(this.getClass().getName() +
".addListeners", ex.toString());

                    }

                }

                return false;

            }

        });

 

Thanks in advance

 

Jan Bevers | Developer | SDL | Content Management Technologies Division | +32
(0)15 400 970 | jbevers at sdl.com 
 

</pre><font face="arial" size="2" color="#736F6E">



<a href="http://www.sdl.com/?utm_source=Email&utm_medium=Email%2BSignature&utm_campaign=SDL%2BStandard%2BEmail%2BSignature">
<img src="http://www.sdl.com/email.png" border=0><br><br>www.sdl.com
</a><br><br>

<font face="arial" size="1" color="#736F6E">

<b>SDL PLC confidential, all rights reserved.</b>

If you are not the intended recipient of this mail SDL requests and requires that you delete it without acting upon or copying any of its contents, 
and we further request that you advise us.<BR>
SDL PLC is a public limited company registered in England and Wales.  
Registered number: 02675207.<BR>
Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, UK.
</font>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.oxygenxml.com/pipermail/oxygen-sdk/attachments/20130326/c5fb7ad1/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 5562 bytes
Desc: image001.jpg
URL: <http://www.oxygenxml.com/pipermail/oxygen-sdk/attachments/20130326/c5fb7ad1/attachment.jpg>


More information about the oXygen-sdk mailing list