Adding an edit menu

With the functions describing cut and paste and undo/redo in previous chapters we finally have what we need to add common edit functionality to SimplyHTML and to make it available on the GUI.

The edit menu is easily built by adding a new menu definition to our resource bundles: Just a few lines of text describing the new menu and its menu items. The entries in the resource bundle look as follows

# edit menu definition

edit=undo redo - cut copy paste

editLabel=Edit

# edit menu items

undoLabel=Undo

redoLabel=Redo

cutLabel=Cut

copyLabel=Copy

pasteLabel=Paste

Once above text is added to file SimplyHTML.propertiers, construction of the menu as well as proper connection to actions and functionality to enable/disable the menu items is created automatically by the dynamic menu functionality of SimplyHTML.