IntelliJ Integration

The different plugins of MPS are declared using a plugin configuration file. The functionality is split into plugin components ⧉. application-components active when MPS starts, project-components active when a project opens.

MPS uses existing IntelliJ extension points ⧉. Look at Extension Point and Listener List | IntelliJ Platform Plugin SDK ⧉ for a list of all extension points and listeners. Declare new extension points in a section extensionPoints where you must provide a qualified name and the interface to implement. The interface has to contain an extension point name declaration. Example:

1
2
3
4
5
6
public interface IntentionActionsProvider {
  ExtensionPointName<IntentionActionsProvider> EP_NAME = new ExtensionPointName<>("com.intellij.mps.IntentionActionsProvider");

  @NotNull
  AnAction[] getIntentionActions(@NotNull IntentionExecutable intention);
}

You can register the extensions in an extensions block in the plugin.xml. The default extension namespace has to be com.intellij (example). The extension can also have attributes (example ⧉).

Link to different MPS plugin.xml files:

Included in other plugins:

All the plugins use the charisma reporter ⧉ for error reporting. This class makes it possible to report errors to YouTrack. Another notable extension is the declaration of the MPS language library. For example:

<mps.LanguageLibrary dir="/languages" />

It tells MPS where to find the compiled MPS languages in the plugin folder.

Comments