Class CalloutActionsProvider

java.lang.Object
ro.sync.ecss.extensions.api.callouts.CalloutActionsProvider

@API(type=EXTENDABLE, src=PUBLIC) public abstract class CalloutActionsProvider extends Object
Provides a set of custom actions for a certain highlight. The actions will be mounted on the contextual menu when right clicking a callout.
Since:
17
  • Constructor Details

    • CalloutActionsProvider

      public CalloutActionsProvider()
  • Method Details

    • getActions

      public abstract List<AbstractAction> getActions(AuthorAccess authorAccess, AuthorPersistentHighlight highlight, List<AbstractAction> defaultActionsList)
      Get the list of actions to show for a callout in the contextual menu.
      Parameters:
      authorAccess - The Author access.
      highlight - The highlight for which the actions will be presented.
      defaultActionsList - The default list of actions which would be contributed by the standard implementation. The default actions list can be null when used with custom highlights.
      Returns:
      The final list of actions to show when right clicking a callout or an attribute with change tracking in the Attributes view.
    • getDefaultAction

      public AbstractAction getDefaultAction(AuthorAccess authorAccess, AuthorPersistentHighlight highlight, List<AbstractAction> actionsList)
      Get the default action which is invoked when the user double clicks the callout.
      Parameters:
      authorAccess - The Author access.
      highlight - The highlight for which the actions will be presented.
      actionsList - The default list of actions which would be contributed by the standard implementation.
      Returns:
      The action which is invoked when a callout is double clicked. If the action provided by user is null, it returns the built-in action.
      Since:
      19