Behavior of WSEditorChangeListener.editorActivated in 15.2

Hi I noticed in my integration that since 15.2 I get unexpected calls on the WSEditorChangeListener.editorActivated method. In my plugin I create an WSEditorChangeListener for the map manager and the editor view on initialization. So each panel/view has its own listener. Since 15.2 I noticed that the editorActivated was called on both listeners. Didn't really matter if a document was opened in the map manager or editor view. In my case I was only expecting it to be called within the listener of the editor view. For example when you open a document like "paint.dita" in the editor view, I can see the editorActivated being called for both the map manager and the editor. Both have the url of that file as an editorLocation parameter. I can get round this issue by getting the WSEditor instance and check if it is null. Kind regards Jan Bevers | Developer | SDL | Content Management Technologies Division | +32 (0)15 400 970 | jbevers@sdl.com [image001] </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/Content/images/SDLlogo2014.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> This message has been scanned for malware by Websense. www.websense.com

Hi Jan, I reproduced the issue and I'll also try to push a fix for it on the Oxygen 15.2 code branch in order to have the fix in the next Oxygen 15.2 minor bug fix release kit which will be announced here: http://www.oxygenxml.com/rssBuildID.xml Just out of curiosity, why exactly are you using the editorActivated callbacks instead of the "editorSelected" one? The activated callback is received more often, when focus is moved inside the current editor for example. Regards, Radu Radu Coravu <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com On 2/10/2014 3:54 PM, Jan Bevers wrote:
Hi
I noticed in my integration that since 15.2 I get unexpected calls on the WSEditorChangeListener.editorActivated method.
In my plugin I create an WSEditorChangeListener for the map manager and the editor view on initialization. So each panel/view has its own listener.
Since 15.2 I noticed that the editorActivated was called on both listeners. Didn’t really matter if a document was opened in the map manager or editor view. In my case I was only expecting it to be called within the listener of the editor view.
For example when you open a document like “paint.dita” in the editor view, I can see the editorActivated being called for both the map manager and the editor. Both have the url of that file as an editorLocation parameter.
I can get round this issue by getting the WSEditor instance and check if it is null.
Kind regards
*Jan Bevers |* Developer *|*SDL *| *Content Management Technologies Division *| *+32 (0)15 400 970*|* jbevers@sdl.com 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.
This message has been scanned for malware by Websense. www.websense.com <http://www.websense.com/>
_______________________________________________ oXygen-sdk mailing list oXygen-sdk@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-sdk
participants (2)
-
Jan Bevers
-
Oxygen XML Editor Support