Package dev.turboism.sdk.action
Interface ActionRegistry
public interface ActionRegistry
Registry for plugin-owned actions that runtime UI contributions can invoke.
Registration requires turboism.action.register. The runtime schedules handlers
asynchronously; a handler must not assume the invoking or host UI thread. Register the returned
handle with the plugin DisposableScope or close it on disable.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceImmutable definition of an action registered with this registry.static interfaceInvocation metadata supplied by the runtime. -
Method Summary
Modifier and TypeMethodDescriptionregister(String id, ActionRegistry.Action action) Registers an action under the supplied plugin-local identifier.
-
Method Details
-
register
Registers an action under the supplied plugin-local identifier.Duplicate identifiers replace the prior action; the prior handle becomes a no-op. The runtime validates ownership and permissions before accepting the registration.
- Parameters:
id- non-blank action identifier used by menu and other UI contributionsaction- action definition; itsActionRegistry.Action.id()is descriptive and does not replaceidas this registry's key- Returns:
- a reversible registration; close it to unregister this action if it is still current
- Throws:
NullPointerException- ifidoractionisnullIllegalArgumentException- ifidis blankCubismPermissionException- if the plugin lacks the registration permission
-