IDEA Plugin Dev - Module level components

Card Puncher Data Processing

About

Module level components

Management

Manual Creation

Implementation

  • Interface: Optionally, a module level component’s implementation class may implement the ModuleComponent interface.
  • Constructor: The constructor of a module level component can have a parameter of the Module type, if it needs the module instance. It can also specify other application level, project level or module level components as parameters, if it depends on those components.

Registration

Note that module level components must be registered in the

section of the plugin.xml file (see Plugin Configuration File).
Wizard Creation

To create and register a module component

  • In your project, open the context menu of the destination package and click New (or press Alt+Insert).
  • In the New menu, click Module Component.
  • In the New Module Component dialog box that opens, enter the module component name, and then click OK.

The IntelliJ Platform will:

  • generate a new Java class that implements the ModuleComponent interface;
  • register the newly created component in the plugin.xml file;
  • add a node to the module tree view;
  • and open the created application component class file in the editor.
State Persistence

Module level components save their state to the module (.iml) file when implementing the JDOMExternalizable (deprecated) interface. See Idea Plugin Dev - Component





Discover More
Card Puncher Data Processing
Idea Plugin Dev - Component

A plugin is made of one of several components. There are three kinds of components: Application level components: They are created and initialized when your IDE starts up. They can be acquired...



Share this page:
Follow us:
Task Runner