Page 1 of 1

com.oxygenxml.editor.editors.author.AuthorDnDListener for multiple opened Editors

Posted: Tue Aug 14, 2012 12:07 pm
by SSC
Hello,

I implemented a com.oxygenxml.editor.editors.author.AuthorDnDListener for our Eclipse RCP client.

I am using the ro.sync.ecss.extensions.api.AuthorAccess of the AuthorDnDListener´s init method to manipulate the xml file, according to the dropped object.
That works quite well, but when I open another editor and then activate the former editor again the drop occurs on the lastest opened editor and not on the editor which is currently activated.

It seems to me that you just have one single instance of the com.oxygenxml.editor.editors.author.AuthorDnDListener and as soon I open further editors the init method overrides the former ro.sync.ecss.extensions.api.AuthorAccess.
I think it would be better to have one com.oxygenxml.editor.editors.author.AuthorDnDListener for every opened editor.

Actually I do like to have the correct AuthorAccess, when a certain Editor is activated/selected again.

Do you have any idea how I can achieve that?

Best regards,

Simon

Re: com.oxygenxml.editor.editors.author.AuthorDnDListener for multiple opened Editors

Posted: Wed Aug 15, 2012 8:25 am
by Radu
Hi Simon,

You are right in your analysis, you have set the drag and drop listener as a separate extension and the same object gets reused among different opened documents. Indeed right now this is not useable because the init() does not get called on it when another editor is selected.
I think it would be better to have one com.oxygenxml.editor.editors.author.AuthorDnDListener for every opened editor.
I think also that a new instance should be created for each opened editor.
Actually I do like to have the correct AuthorAccess, when a certain Editor is activated/selected again.
The alternative would be to notify the common instance and call init() when an editor gets re-selected. But the alternative method in an ExtensionsBundle implementation which returns such an instance is called ro.sync.ecss.extensions.api.ExtensionsBundle#createAuthorSWTDndListener() so for consistency I think that if you set an instance separately, it should get created for each opened editor.
I will make this fix in version 14.1. I can also give you a beta kit when I'm done. Do you need it sooner? I could also try to push the fix in an Oxygen 14.0 minor bug fix release.

Regards,
Radu

Re: com.oxygenxml.editor.editors.author.AuthorDnDListener for multiple opened Editors

Posted: Wed Aug 15, 2012 11:20 am
by SSC
Radu wrote: I will make this fix in version 14.1. I can also give you a beta kit when I'm done. Do you need it sooner? I could also try to push the fix in an Oxygen 14.0 minor bug fix release.
Could you please tell me the release date of Oxygen 14.1?

We would appreciate to have that fix in the middle of september, which is approximately in a mouth.

If the release is later, I´ll have to ask my projectlead, whether we can wait until the release or we like to have an Oxygen 14.0 minor bug fix release.

Best regards,

Simon

Re: com.oxygenxml.editor.editors.author.AuthorDnDListener for multiple opened Editors

Posted: Wed Aug 15, 2012 11:30 am
by Radu
Hi Simon,

We also plan to release Oxygen 14.1 in the middle of September but in order for you not to depend on our usual release delays I will try to add fix also in the next Oxygen 14.0 minor bug fix releases which are usually announced here:

http://www.oxygenxml.com/rssBuildID.xml

By the way, Oxygen 14.1 will also have a very interesting addition for editing attributes in-line in the Author page using SWT controls like text fields or combo boxes.

Regards,
Radu

Re: com.oxygenxml.editor.editors.author.AuthorDnDListener for multiple opened Editors

Posted: Wed Aug 15, 2012 11:49 am
by SSC
Thanks for the reply.

Can you give us a hint, when the Oxygen 14.0 minor bug fix for the DnD behavior will be released?
Our projectlead just told me that he would apreaciate to have that fix next week, if possible, because he has a demo on wednesday next week.

If this is not possible, he will avoid to open more than one editor until the minor bug fix is available.

Best regards,

Simon

Re: com.oxygenxml.editor.editors.author.AuthorDnDListener for multiple opened Editors

Posted: Thu Aug 16, 2012 10:11 am
by Radu
Hi Simon,

This is too soon for us to generate an official 14.0 bug fix release.
But I will try in a couple of days to generate an un-official Oxygen 14.0 Eclipse plugin kit for you with the fix in place.

Regards,
Radu

Re: com.oxygenxml.editor.editors.author.AuthorDnDListener for multiple opened Editors

Posted: Thu Aug 16, 2012 10:45 am
by SSC
Hi Radu,

thanks for your efforts.
Looking forward to test your fixed version.

Best regards,

Simon

Re: com.oxygenxml.editor.editors.author.AuthorDnDListener for multiple opened Editors

Posted: Thu Aug 30, 2012 3:42 pm
by adrian
Hello,

I just wanted to let you know that this problem has been resolved in the latest maintenance build of Oxygen 14.0, 2012082911 (released on August 30th):
Author API: The "create" methods from ro.sync.ecss.extensions.api.ExtensionsBundle were implemented incorrectly and the returned objects, listeners, etc were affected when switching between editors instead of being editor bound.
You can download it from our web site:
http://www.oxygenxml.com/download.html

The list of bug-fixes can be found here:
http://www.oxygenxml.com/build_history.html#2012082911

The SDKs have also been updated here:
http://www.oxygenxml.com/oxygen_sdk.html

You can follow the release/build RSS feed here:
http://www.oxygenxml.com/rssBuildID.xml

Let us know if you encounter further problems with this new build.

Regards,
Adrian