MPS 2022.2 Help

Spellchecking

MPS checks the spelling of all your source code, including single-line comments, Javadoc text, and string literals.

The Typo inspection detects and highlights words that are not included in any dictionary. You can either correct the spelling or accept the word as correct (by saving it to the dictionary).

Accept a misspelled word

  • Select the Add to dictionary action in the Context menu to add the word to the user's dictionary and skip it in the future.

Design languages for spellchecking

Spellchecking is enabled for all languages. To indicate that the text of a particular editor cell should be checked against a dictionary (as configured in Preferences), add the ’spellcheck’ style attribute in the Inspector to the cell in your editor declaration.

Dictionaries

MPS includes bundled dictionaries for all configured languages. You cannot change them directly, but you can extend the spellchecker in other ways:

  • Save words to a built-in global or project dictionary.

  • Add plain-text files with the .dic extension that contain lists of words.

  • If you have the Hunspell plugin installed and enabled, you can add Hunspell dictionaries, which comprise of two files: the DIC file that contains a list of words with the applicable modification rules and the AFF file that lists prefixes and suffixes regulated by a specific modification rule. For example, en_GB.dic and en_GB.aff.

Configure the spellchecker dictionaries

  1. Press Ctrl+Alt+S to open the IDE settings and select Editor | Natural Languages | Spelling.

  2. Configure the list of custom dictionaries:

    • To add a new custom dictionary to the list, click the Add button or press Alt+Insert and specify the location of the required file.

    • To edit the contents of a custom dictionary in MPS, select it and click the Edit button or press Enter. The corresponding file will open in a new editor tab.

    • To remove a custom dictionary from the list, select it and click the Remove button or press Alt+Delete.

Select the default dictionary for saving words

  1. Press Ctrl+Alt+S to open the IDE settings and select Editor | Natural Languages | Spelling.

  2. Select either the built-in project-level or application-level dictionary or disable the option to prompt you every time you save a word.

Add accepted words manually

  1. Press Ctrl+Alt+S to open the IDE settings and select Editor | Natural Languages | Spelling.

  2. Add words to the Accepted words list. MPS adds manually accepted words to the project-level dictionary.

    You can't add words that are already present in one of the dictionaries and mixed-case words, such as CamelCase and snake_case.

Share dictionaries

MPS stores the built-in project-level dictionary with other project-related files. This means that anyone working with the project has access to the words stored in this dictionary.

Last modified: 24 November 2022