CodeEditorComponent::addPopupMenuItems

I am confused at what this does. What does this give you that PopupMenu::addItem does not?

 

I am working on creating a typeahead html editor. Any advice?

 

It's so you can add your own items to the existing pop-up menu that contains the standard cut/copy/paste etc.