def create_abbreviation(self, folder, description, abbr, contents):
if not self.configManager.check_abbreviation_unique(abbr, None, None):<EOL><INDENT>raise Exception("<STR_LIT>")<EOL><DEDENT>self.monitor.suspend()<EOL>p = model.Phrase(description, contents)<EOL>p.modes.append(model.TriggerMode.ABBREVIATION)<EOL>p.abbreviations = [abbr]<EOL>folder.add_item(p)<EOL>p.persist()<EOL>self.monitor.unsuspend()<EOL>self.configManager.config_altered(False)<EOL>
Create a text abbreviation

Usage: C{engine.create_abbreviation(folder, description, abbr, contents)}

When the given abbreviation is typed, it will be replaced with the given
text.

@param folder: folder to place the abbreviation in, retrieved using C{engine.get_folder()}
@param description: description for the phrase
@param abbr: the abbreviation that will trigger the expansion
@param contents: the expansion text
@raise Exception: if the specified abbreviation is not unique