class FeedbackManager {

    public void addMenuItems(Toolbox toolbox, SplitButton button)
    {
        myToolbox = toolbox;
        myPreferences = myToolbox.getPreferencesRegistry().getPreferences(FeedbackManager.class);

        final String provideFeedbackStr = myPreferences.getString(PROVIDE_FEEDBACK, null);
        if (provideFeedbackStr != null)
        {
            final JMenuItem provideFeedbackItem = new JMenuItem("Provide Feedback");
            provideFeedbackItem.addActionListener(e -> transmit(provideFeedbackStr));
            button.addMenuItem(provideFeedbackItem);
        }

        final String reportBugString = myPreferences.getString(REPORT_BUG, null);
        if (reportBugString != null)
        {
            final JMenuItem reportbugItem = new JMenuItem("Report Bug");
            reportbugItem.addActionListener((e) -> transmit(reportBugString));
            button.addMenuItem(reportbugItem);
        }

        final String requestFeatureStr = myPreferences.getString(REQUEST_FEATURE, null);
        if (requestFeatureStr != null)
        {
            final JMenuItem requestFeatureItem = new JMenuItem("Request Feature");
            requestFeatureItem.addActionListener(e -> transmit(requestFeatureStr));
            button.addMenuItem(requestFeatureItem);
        }
    }

}