class FeatureActionsPlugin extends AbstractServicePlugin {

    @Override
    protected Collection<Service> getServices(PluginLoaderData plugindata, Toolbox toolbox)
    {
        myToolbox = toolbox;
        FeatureActionsRegistry registry = new FeatureActionsRegistry(toolbox.getPreferencesRegistry());
        FeatureActionsToolbox pluginToolbox = new FeatureActionsToolbox(registry);
        FeatureActionsController controller = new FeatureActionsController(toolbox, registry);
        myStateController = new FeatureActionStateController(registry, MantleToolboxUtils.getMantleToolbox(toolbox).getDataGroupController());

        ActionEditorDisplayer displayer = new ActionEditorDisplayerImpl(toolbox, registry);
        UIRegistry uiRegistry = toolbox.getUIRegistry();
        myEditorMenuProvider = new FeatureActionsMenuProvider(displayer, uiRegistry);
        uiRegistry.getContextActionManager().registerContextMenuItemProvider(DataGroupInfo.ACTIVE_DATA_CONTEXT,
                DataGroupContextKey.class, myEditorMenuProvider);
        toolbox.getModuleStateManager().registerModuleStateController("Feature Action", myStateController);

        myClearFeaturesMenuProvider = new ContextMenuProvider<>()
        {
            @Override
            public List<JMenuItem> getMenuItems(String contextId, Void key)
            {
                JMenuItem clearFeatures = new JMenuItem("Clear Feature Actions");
                clearFeatures.addActionListener(new ActionListener()
                {
                    @Override
                    public void actionPerformed(ActionEvent e)
                    {
                        registry.clearAll();
                    }
                });
                return Collections.singletonList(clearFeatures);
            }

            @Override
            public int getPriority()
            {
                return 9;
            }
        };

        toolbox.getUIRegistry().getContextActionManager().registerContextMenuItemProvider(ContextIdentifiers.DELETE_CONTEXT,
                Void.class, myClearFeaturesMenuProvider);

        myFeatureActionManagerButton = new FeatureActionAlertButton(null);
        myFeatureActionManagerButton.addActionListener(e -> showFeatureActionManager(toolbox, registry));
        EventQueueUtilities.invokeLater(() -> toolbox.getUIRegistry().getToolbarComponentRegistry().registerToolbarComponent(
                ToolbarLocation.SOUTH, "FeatureActionManager", myFeatureActionManagerButton, 202, SeparatorLocation.NONE));
        myFeatureActionManagerButton.setIcons();
        MantleToolboxUtils.getMantleToolbox(toolbox).getDataGroupController().addActivationListener(myActivationListener);

        return New.list(toolbox.getPluginToolboxRegistry().getRegistrationService(pluginToolbox), controller);
    }

}