Application level component
Dependency and instantiation
- An application component that has no dependencies should have a constructor with no parameters which will be used for its instantiation.
- If an application component depends on other application components, it can specify these components as constructor parameters. The IntelliJ Platform will ensure that the components are instantiated in the correct order to satisfy the dependencies.
Application level components must be registered in the'' section of the plugin.xml file.
To create and register an application component:
- In your project, open the context menu of the destination package and click New (or press Alt+Insert).
- In the New menu, click Application Component.
- In the New Application Component dialog box that opens, enter the application component name, and then click OK.
The IntelliJ Platform will:
- generate a new Java class that implements the ApplicationComponent interface.
- register the newly created component in the plugin.xml file,
- add a node to the module tree view;
- open the created application component class file in the editor.