2. Plugin Components
Components are the fundamental concept of plugin
integration. There are three kinds of components:
Application-level
Project-level
Module-level
3. Plugin Extensions and Extension Points
The IntelliJ Platform provides the concept of extensions
and extension points that allows a plugin to interact
with other plugins or with the IDE itself.
4. Plugin Services
A service is a plugin component loaded on demand.
IntelliJ Platform ensures that only one instance of a
service is loaded even though the service is called
several times.
5. Plugin Actions
Intellij IDEA provides the concept of actions. An action
is a class, derived from the AnAction class, whose
actionPerformed method is called when the menu item
or toolbar button is selected.
12. Usage
copy lines with future style from your layout.xml file
paste it to styles.xml file with Ctrl+Shift+D
enter name of new style in the modal window
your style is prepared!
13. Plan
Prepare environment
Create project and implement functionality
Build jar and upload it into Plugin Repository
24. Insert result, move caret and scroll
CaretModel caretModel = editor.getCaretModel();
// insert new string into the document
document.insertString(caretModel.getOffset(), output);
// move caret to the end of inserted text
caretModel.moveToOffset(caretModel.getOffset() + output.length());
// scroll to the end of inserted text
editor.getScrollingModel().scrollToCaret(ScrollType.RELATIVE);