How to create dynamic menus in a NetBeans plugin?
<p>I am developing a NetBeans plugin which requires the use of "dynamic" menus because currently one has to hard code in a class which is dedicated to a certain menu item and its action. However I wish to allow the user through the UI provided by the plugin to be able to change the values for the menu items (what they do - this would be dealt with with variables in the main method, I would not allow the user to write the code for the main method themselves -, what they are called and their associated keyboard shortcuts) as well as to add and remove menu items. My plugin would probably read these preferences from a file and would ideally have just one class which would create all these dynamic menu items with their values defined within the preferences file.</p>

<p>I understand that there is a way of doing this, but the only real information I could find on it was <a href="http://forums.netbeans.org/topic8718.html" rel="nofollow">this thread</a> and <a href="http://www.netbeans.org/issues/show_bug.cgi?id=153000" rel="nofollow">the bugzilla page</a> it links to seems to be down at the moment so that doesn't really help me... So how exactly can one make a dynamic menu with dynamic menu items?</p>

<p>I have NetBeans version 8.1 and JDK8. Also, when I say "dynamic menu item" or similar I am talking about the actual options provided to you from the menu that do that stuff (whatever stuff the plugin is there to do, in my case it copies certain data to the clipboard when one of these options is clicked).</p>