Hello,
We use oxygen-18.1.0.0.jar, and we need to execute a specific action each time users accept a review in our application.
In fact, this action will update a "table of modification" in the document.
I success to override "Edit/Accept_Change" in the Review toolbar but we also need to override the "accept" action in the Manage Reviews panel.
I don't find how to do that.
Can you explain me how can I improve this "accept" action, please ?
Thanks.
Regards,
Isabelle
Override the "accept" action in Manage Reviews panel
-
- Posts: 705
- Joined: Wed Nov 16, 2005 11:11 am
Re: Override the "accept" action in Manage Reviews panel
Hello,
You can customize the actions in the Review panel using an ReviewActionsProvider. You can set one line this:
Best regards,
Alex
You can customize the actions in the Review panel using an ReviewActionsProvider. You can set one line this:
Code: Select all
if (EditorPageConstants.PAGE_AUTHOR.equals(editorComponent.getWSEditorAccess().getCurrentPageID())) {
WSAuthorComponentEditorPage page = (WSAuthorComponentEditorPage) editorComponent.getWSEditorAccess().getCurrentPage();
AuthorReviewController reviewController = page.getAuthorAccess().getReviewController();
AuthorReviewViewController authorReviewViewController = reviewController.getAuthorReviewViewController();
authorReviewViewController.addReviewActionsProvider(new ReviewActionsProvider() {
@Override
public void customizeContextualMenuActions(
AuthorAccess authorAccess,
AuthorPersistentHighlight[] selectedHighlights,
Object popupMenu) {
}
@Override
public void customizeHoverActions(AuthorAccess authorAccess,
AuthorPersistentHighlight authorPersistentHighlight,
List actions) {
}
});
}
Alex
Re: Override the "accept" action in Manage Reviews panel
Hello Alex,
Thanks for your answer but I don't understand how it could solve my issue.
The 2 methods you provide only allow to customize the contextual menu actions and the hover actions.
But I need to customize the "accept" action in the Review Panel.

Is it possible ?
Regards,
Isabelle
Thanks for your answer but I don't understand how it could solve my issue.
The 2 methods you provide only allow to customize the contextual menu actions and the hover actions.
But I need to customize the "accept" action in the Review Panel.

Is it possible ?
Regards,
Isabelle
-
- Posts: 705
- Joined: Wed Nov 16, 2005 11:11 am
Re: Override the "accept" action in Manage Reviews panel
Hello Isabelle,
The "Accept" action appears only when you hover an entry in the Review panel. This means that you can intercept it on the customizeHoverActions() callback:
Best regards,
Alex
customizeHoverActions
The "Accept" action appears only when you hover an entry in the Review panel. This means that you can intercept it on the customizeHoverActions() callback:
Code: Select all
public void customizeHoverActions(AuthorAccess authorAccess,
AuthorPersistentHighlight authorPersistentHighlight,
List actions) {
if (actions != null) {
for (Iterator iterator = actions.iterator(); iterator.hasNext();) {
javax.swing.Action action = (javax.swing.Action) iterator.next();
String oxygenActionID = ((StandalonePluginWorkspace) PluginWorkspaceProvider.getPluginWorkspace()).getOxygenActionID(action);
if ("Review/Accept".equals(oxygenActionID)) {
// TODO This is the accept action. You can replace it with another one.
}
}
}
}
Alex
customizeHoverActions
Re: Override the "accept" action in Manage Reviews panel
Hello,
Thank you Alex.
I didn't realize it was an "hover" method type.
I will try this.
Regards,
Isabelle
Thank you Alex.
I didn't realize it was an "hover" method type.
I will try this.
Regards,
Isabelle