Oxygen Author review customize

Having trouble installing Oxygen? Got a bug to report? Post it all here.
alexandr.golovach
Posts: 19
Joined: Tue Mar 11, 2014 11:56 am

Oxygen Author review customize

Post by alexandr.golovach »

Hi, Oxygen guys!

I have some questions about Oxygen Author Review Support.
1. How customize Review View? How get access to Remove Comment action into Review View?
2. How customize context menu on highlight comment?(mouse right click on comment)

Thank you!
Radu
Posts: 9057
Joined: Fri Jul 09, 2004 5:18 pm

Re: Oxygen Author review customize

Post by Radu »

Hi Alexandr,

Please see some answers below:
1. How customize Review View? How get access to Remove Comment action into Review View?
We do not have API for this. What exactly is your use case? Could you give us more details about what you want to achieve?
2. How customize context menu on highlight comment?(mouse right click on comment)
You have API like:

Code: Select all

ro.sync.exml.workspace.api.editor.page.author.WSAuthorEditorPageBase.addPopUpMenuCustomizer(AuthorPopupMenuCustomizer)
which would allow you to set a popup menu customization provider. The provider would allow you to reconfigure the popup menu any way you want.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
alexandr.golovach
Posts: 19
Joined: Tue Mar 11, 2014 11:56 am

Re: Oxygen Author review customize

Post by alexandr.golovach »

Hi, Radu.
1. How customize Review View? How get access to Remove Comment action into Review View?
For example, I have two user: USER_1 and USER_2. I open TEST_DOC.dita in Oxygen and I am adding four test comments by USER_1. After this I open TEST_DOC.dita in Oxygen by USER_2. I see all USER_1's comments.
Then I open Review View(push button Manage reviews on Auhtor page toolbar) and I can remove all USER_1's comments but current user is USER_2. The same applies to the context menu on comment highlight. How I can prevent deleting comments in this case?
ro.sync.exml.workspace.api.editor.page.author.WSAuthorEditorPageBase.addPopUpMenuCustomizer(AuthorPopupMenuCustomizer) - which would allow you to set a popup menu customization provider. The provider would allow you to reconfigure the popup menu any way you want.

Code: Select all

	currentPage.addPopUpMenuCustomizer(new AuthorPopupMenuCustomizer() {

@Override
public void customizePopUpMenu(Object o, AuthorAccess authorAccess) {
I use AuthorPopupMenuCustomizer for customization context menu on Author page but if I click on highlight comment my cusomizer not used. How I must use AuthorPopupMenuCustomizer in this case?

Regards,
Alexandr
Radu
Posts: 9057
Joined: Fri Jul 09, 2004 5:18 pm

Re: Oxygen Author review customize

Post by Radu »

Hi Alexandr,

Sorry for the delay.
For example, I have two user: USER_1 and USER_2. I open TEST_DOC.dita in Oxygen and I am adding four test comments by USER_1. After this I open TEST_DOC.dita in Oxygen by USER_2. I see all USER_1's comments.
Then I open Review View(push button Manage reviews on Auhtor page toolbar) and I can remove all USER_1's comments but current user is USER_2. The same applies to the context menu on comment highlight. How I can prevent deleting comments in this case?
Unfortunately we do not have API to allow you to disable the "Remove" action when the user wants to remove certain comments. I will add an improvement request for this.
The current functionality indeed allows all users to remove comments added by any other user. Should I assume that in your case you want only certain users based on certain privileges to be able to remove comments?
I use AuthorPopupMenuCustomizer for customization context menu on Author page but if I click on highlight comment my cusomizer not used. How I must use AuthorPopupMenuCustomizer in this case?
In what part exactly are you right clicking, in the editor or in the callouts part?
That customizer I mentioned was only for right clicking in the editor.
Unfortunately we also do not have API which would allow you to intercept the right click contextual menu in the callouts part.

Another approach for you would be to make your own support to add custom comments (which are no longer the usual comments added by Oxygen) using the API ro.sync.ecss.extensions.api.highlights.AuthorPersistentHighlighter.
This would mean you would need to add your own "Add comment" toolbar action, to create your own Review view based on the comments list and to determine how your comments will be rendered in the callouts area using ro.sync.ecss.extensions.api.callouts.CalloutsRenderingInformationProvider and to provide your own set of contextual menu actions for your custom comments using ro.sync.ecss.extensions.api.highlights.AuthorPersistentHighlighter.setHighlightsActionsProvider(AuthorPersistentHighlightActionsProvider) so this would take some implementation time.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Radu
Posts: 9057
Joined: Fri Jul 09, 2004 5:18 pm

Re: Oxygen Author review customize

Post by Radu »

Hi,

Just to update this thread, in Oxygen 17.1 we added new API to control both the rendering and the actions provided in the Review panel:
ro.sync.ecss.extensions.api.AuthorReviewController.getAuthorReviewViewController()

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply