Is it possible to capture when the editor is refreshed

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@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>

Hi Jan, I'll see if I can find anything. What exactly do you want to achieve? Do you want to be called after or before the refresh takes place? Regards, Radu Radu Coravu <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com On 3/26/2013 11:55 AM, Jan Bevers wrote:
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@sdl.com Description: image001
www.sdl.com <http://www.sdl.com/?utm_source=Email&utm_medium=Email%2BSignature&utm_campaign=SDL%2BStandard%2BEmail%2BSignature>
*SDL PLC confidential, all rights reserved.* 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. SDL PLC is a public limited company registered in England and Wales. Registered number: 02675207. Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, UK.
_______________________________________________ oXygen-sdk mailing list oXygen-sdk@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-sdk
participants (2)
-
Jan Bevers
-
Oxygen XML Editor Support