MPS 2025.3 Help

Code completion

Basic code completion helps you complete the names of classes, methods, and keywords within the visibility scope.

MPS analyzes the context and suggests the choices that are reachable from the current caret position. Completion is available for a non-English keyboard layout.

Invoke basic completion

  • By default, MPS displays the code completion popup automatically as you type.

    Alternatively, you can press Ctrl+Space or select Code | Code Completion | Basic from the main menu.

  • Code completion is available for custom file types. However, MPS does not recognize the structure of such files and suggests options regardless of whether they are appropriate in the current context.

Accept a suggestion from the list

  • Press Enter or double-click the relevant list item to insert it to the left of the caret.

  • Press Tab to replace the characters to the right from the caret.

  • Use Ctrl+Shift+Enter to make the current code construct syntactically correct (balance parentheses, add missing braces and semicolons, and so on).

Completion tips and tricks

Autocomplete HTTP constants by typing the code number

  • After you specify an imported package name, such as http, you can type 404 to autocomplete the value to http.StatusNotFound.

Narrow down the suggestion list

  • Narrow down the suggestion list by typing any part of a word (even characters from somewhere in the middle) or invoking code completion after a dot separator .

    MPS displays suggestions containing the characters you've entered, regardless of their position. This makes the use of wildcards unnecessary.

    Code completion Wild Card

Completion shortcuts

You can use the following live templates shortcuts for one of the most frequently used statements:

  • sout: prints System.out.printIn()

  • serr: prints System.err.printIn()

View code hierarchy

You can view code hierarchy when you've selected an entry from the suggestion list:

  • Ctrl+H: view type hierarchy

Troubleshooting

If code completion does not work, this may be due to one of the following reasons:

  • The Power Save Mode is on (File | Power Save Mode). Turning it on minimizes power consumption of your laptop by eliminating the background operations, including error highlighting, on-the-fly inspections, and code completion.

  • An SDK is not configured for your project.

  • Your file does not reside in a content root , so it does not get the required class definitions and resources needed for code completion.

  • A file containing classes and functions that you want to appear in the completion suggestion list is marked as a plain text file.

  • External libraries that contain functions that you want to appear in the completion suggestion list are not added as dependencies or global libraries.

  • Code completion popup might not appear automatically if it takes too long to gather the completion options. For example, if the computer is busy with another task. In this case, you may still activate the completion popup manually via Ctrl+Space.

19 November 2025