@Override
    public void actionPerformed(ActionContext context) {
        int userChoice = OptionDialog.showOptionDialog( panel, "Reset All Formats?", 
            "There is no undo for this action.\n" +
            "Are you sure you want to reset all formats?", "Continue", 
            OptionDialog.WARNING_MESSAGE );
        if ( userChoice == OptionDialog.CANCEL_OPTION ) {
            return;
        }
        
		formatMgr.setDefaultFormats();
		panel.getHeaderTab().update();
	}
Method called when the action is invoked.
Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/format/actions/ResetAllFormatsAction.java