question: private void updateActions ( ) { String selectedText = getSelectedText ( ) ; if ( selectedText == null ) selectedText = "" ; boolean stuffSelected = ! selectedText . equals ( "" ) ; boolean allSelected = selectedText . equals ( getText ( ) ) ; UNDO_ACTION . setEnabled ( isEnabled ( ) && isEditable ( ) && isUndoAvailable ( ) ) ; CUT_ACTION . setEnabled ( isEnabled ( ) && isEditable ( ) && stuffSelected ) ; COPY_ACTION . setEnabled ( isEnabled ( ) && stuffSelected ) ; PASTE_ACTION . setEnabled ( isEnabled ( ) && isEditable ( ) && isPasteAvailable ( ) ) ; DELETE_ACTION . setEnabled ( isEnabled ( ) && stuffSelected ) ; SELECT_ALL_ACTION . setEnabled ( isEnabled ( ) && ! allSelected ) ; }
target:  Updates the actions in each text just before showing the popup menu.