Spellchecking
MPS helps you make sure that your source code, including single-line comments, Javadoc text and string literals, is spelt correctly.
The Typo inspection detects and highlights words not included in any dictionary. You can either correct the spelling or accept the word as correct.
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 modify 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
Press Ctrl+Alt+S to open the IDE settings and select Editor | Natural Languages | Spelling.
Configure the list of custom dictionaries:
To add a new custom dictionary to the list, click 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 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 or press Alt+Delete.
Select the default dictionary for saving words
Press Ctrl+Alt+S to open the IDE settings and select Editor | Natural Languages | Spelling.
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
Press Ctrl+Alt+S to open the IDE settings and select Editor | Natural Languages | Spelling.
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
andsnake_case
.