Book Image

IntelliJ IDEA Essentials

By : Jaroslaw Krochmalski
Book Image

IntelliJ IDEA Essentials

By: Jaroslaw Krochmalski

Overview of this book

Table of Contents (17 chapters)
IntelliJ IDEA Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Developing the plugin functionality


When it comes to plugin development, IntelliJ IDEA introduces the concept of the component. There can be components at the application, module, and project level. Application level (global) components are initialized when the IDE starts. Project level components, on the other hand, are instantiated by the IDE for every project instance opened. Module level components, accordingly, are instantiated for every project's module loaded.

A further concept introduced in the plugins API is action. Here, action represents the toolbar or menu item. It's a class whose actionPerformed method is called when the toolbar button or menu item is selected. Action can be either defined in the configuration file, or instantiated and registered programmatically. Every single action must have a unique identifier.

IntelliJ IDEA provides the mechanism of groups to group actions; a group represents the menu or toolbar. The IDE itself has its own groups defined. By adding your actions...