📜 ⬆️ ⬇️

Development of IntelliJ IDEA plugin. Part 1

Recently, I have accumulated enough materials to develop plug-ins for IntelliJ IDEA, and this is what I am going to share with the habrasocommunity.

Development Environment and Infrastructure


Before starting to program a plugin, it is worth considering the device of the development environment, supported functions and their implementation, and, of course, the IDE setting necessary for plug-in development.

For the development of plug-ins, any modern version of Intellij IDEA is suitable - it already includes the full set of necessary tools.
There are several steps to set up the development environment:



After that, you can start developing the plug-in as a regular Java project, but with the additional opportunity to see the source code of the internal API and to trace its execution in the debugger.
')

Assembly numbers


These are restrictions on the range of supported versions used by the integrated environment to determine whether a particular plug-in can work correctly. The initial and final build numbers are specified in the plugin.xml file, as well as other meta-information.
Starting with IntelliJ IDEA 9, the build numbering is used: for example, IU-90.94. This number consists of the following parts:

Each time a new release branch of one of the products based on the IntelliJ platform is created, the branch number is increased by 1, and the number in the trunk is 2, so unstable builds have an even number and stable ones are odd.

Composite build numbers can be used in the since-build and until-build tags in the plugin.xml file. Usually the product ID is omitted using only the branch number and the build: <idea-version since-build="94.539"/>

Compatibility of plug-ins with products on the IntelliJ platform


All products based on the IntelliJ Platform (IntelliJ IDEA, RubyMine, WebStorm, PhpStorm, PyCharm and AppCode) share a common underlying platform API. Thus, plugins that do not use any Java-specific functionality may be marked as compatible with other products, and not just with IDEA itself. This can be done by defining the dependencies on the modules in the plugin.xml file.
Dependencies are placed inside the tag.
 ,     com.intellij.modules . : 
<idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

plugin.xml, IDEA. plugin.xml , .
IntelliJ:
com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
:
com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
PhpStorm , PHP , : com.jetbrains.php .
. , Java , :
<depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
, , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

IntelliJ IDEA
– IDEA. . .


.
– jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
.IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
– :
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
Classes lib classpath.
– jar-, lib:
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


, IDEA . , IDEA .
-, , . , plugin.xml, depends . , . .


– . :
; ; .
IntelliJ IDEA.
Application getComponent(Class).

Project ( ). Project getComponent(Class).

, IDEA. Module.

, . , . , (, , ) .

, . getComponentName(). : < ><>< >.

, , ApplicationComponent. , , . , , IDEA , .

<application-components> plugin.xml.
IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
New Java Alt+Insert; New Application Component; New Application Component, OK.
IDEA , ApplicationComponent, plugin.xml, Module Tree View .

, ProjectComponent. Project, . , .

<project-components> . IDE, "New | Project Component".

ModuleComponent. . <module-components> "New | Module Component".


, : JDOMExternalizable (, ) PersistentStateComponent.
PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
JDOMExternalizable, :
(.ipr), plugin.xml «workspace» – .iws; .iml .

:
– ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
:
– writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
getComponent() - . , , initComponent().


Intellij IDEA , IDEA.
, , . , . .

.
, , , . plugin.xml:
<extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

"interface" , . "beanClass" , @Attribute . , plugin.xml.
MyBeanClass1:
public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
MyExtPoint, "key" "implementationClass" .

:
«xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
, .

, ;
, : "interface", "implementation", – , ; "beanClass", , @Attribute .


(Actions)
Intellij IDEA (actions).
– , AnAction, actionPerformed() , .

, . . .
.


– , , getService() ServiceManager. Intellij IDEA , , .

, plugin.xml. .

, .. , , applicationService, projectService moduleService .

:
( , , ) ;
:
"serviceInterface" – ; "serviceImplementaion" – .


.
plugin.xml:
<extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
: , , .

: 1 , 2 , 3 , 4 , 5 , 6 , 7 .
, com.intellij.modules . :
<idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

plugin.xml, IDEA. plugin.xml , .
IntelliJ:
com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
:
com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
PhpStorm , PHP , : com.jetbrains.php .
. , Java , :
<depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
, , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

IntelliJ IDEA
– IDEA. . .


.
– jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
.IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
– :
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
Classes lib classpath.
– jar-, lib:
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


, IDEA . , IDEA .
-, , . , plugin.xml, depends . , . .


– . :
; ; .
IntelliJ IDEA.
Application getComponent(Class).

Project ( ). Project getComponent(Class).

, IDEA. Module.

, . , . , (, , ) .

, . getComponentName(). : < ><>< >.

, , ApplicationComponent. , , . , , IDEA , .

<application-components> plugin.xml.
IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
New Java Alt+Insert; New Application Component; New Application Component, OK.
IDEA , ApplicationComponent, plugin.xml, Module Tree View .

, ProjectComponent. Project, . , .

<project-components> . IDE, "New | Project Component".

ModuleComponent. . <module-components> "New | Module Component".


, : JDOMExternalizable (, ) PersistentStateComponent.
PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
JDOMExternalizable, :
(.ipr), plugin.xml «workspace» – .iws; .iml .

:
– ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
:
– writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
getComponent() - . , , initComponent().


Intellij IDEA , IDEA.
, , . , . .

.
, , , . plugin.xml:
<extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

"interface" , . "beanClass" , @Attribute . , plugin.xml.
MyBeanClass1:
public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
MyExtPoint, "key" "implementationClass" .

:
«xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
, .

, ;
, : "interface", "implementation", – , ; "beanClass", , @Attribute .


(Actions)
Intellij IDEA (actions).
– , AnAction, actionPerformed() , .

, . . .
.


– , , getService() ServiceManager. Intellij IDEA , , .

, plugin.xml. .

, .. , , applicationService, projectService moduleService .

:
( , , ) ;
:
"serviceInterface" – ; "serviceImplementaion" – .


.
plugin.xml:
<extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
: , , .

: 1 , 2 , 3 , 4 , 5 , 6 , 7 .
, com.intellij.modules . :
<idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

plugin.xml, IDEA. plugin.xml , .
IntelliJ:
com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
:
com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
PhpStorm , PHP , : com.jetbrains.php .
. , Java , :
<depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
, , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

IntelliJ IDEA
– IDEA. . .


.
– jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
.IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
– :
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
Classes lib classpath.
– jar-, lib:
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


, IDEA . , IDEA .
-, , . , plugin.xml, depends . , . .


– . :
; ; .
IntelliJ IDEA.
Application getComponent(Class).

Project ( ). Project getComponent(Class).

, IDEA. Module.

, . , . , (, , ) .

, . getComponentName(). : < ><>< >.

, , ApplicationComponent. , , . , , IDEA , .

<application-components> plugin.xml.
IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
New Java Alt+Insert; New Application Component; New Application Component, OK.
IDEA , ApplicationComponent, plugin.xml, Module Tree View .

, ProjectComponent. Project, . , .

<project-components> . IDE, "New | Project Component".

ModuleComponent. . <module-components> "New | Module Component".


, : JDOMExternalizable (, ) PersistentStateComponent.
PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
JDOMExternalizable, :
(.ipr), plugin.xml «workspace» – .iws; .iml .

:
– ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
:
– writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
getComponent() - . , , initComponent().


Intellij IDEA , IDEA.
, , . , . .

.
, , , . plugin.xml:
<extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

"interface" , . "beanClass" , @Attribute . , plugin.xml.
MyBeanClass1:
public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
MyExtPoint, "key" "implementationClass" .

:
«xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
, .

, ;
, : "interface", "implementation", – , ; "beanClass", , @Attribute .


(Actions)
Intellij IDEA (actions).
– , AnAction, actionPerformed() , .

, . . .
.


– , , getService() ServiceManager. Intellij IDEA , , .

, plugin.xml. .

, .. , , applicationService, projectService moduleService .

:
( , , ) ;
:
"serviceInterface" – ; "serviceImplementaion" – .


.
plugin.xml:
<extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
: , , .

: 1 , 2 , 3 , 4 , 5 , 6 , 7 .
, com.intellij.modules . :
<idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

plugin.xml, IDEA. plugin.xml , .
IntelliJ:
com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
:
com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
PhpStorm , PHP , : com.jetbrains.php .
. , Java , :
<depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
, , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

IntelliJ IDEA
– IDEA. . .


.
– jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
.IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
– :
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
Classes lib classpath.
– jar-, lib:
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


, IDEA . , IDEA .
-, , . , plugin.xml, depends . , . .


– . :
; ; .
IntelliJ IDEA.
Application getComponent(Class).

Project ( ). Project getComponent(Class).

, IDEA. Module.

, . , . , (, , ) .

, . getComponentName(). : < ><>< >.

, , ApplicationComponent. , , . , , IDEA , .

<application-components> plugin.xml.
IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
New Java Alt+Insert; New Application Component; New Application Component, OK.
IDEA , ApplicationComponent, plugin.xml, Module Tree View .

, ProjectComponent. Project, . , .

<project-components> . IDE, "New | Project Component".

ModuleComponent. . <module-components> "New | Module Component".


, : JDOMExternalizable (, ) PersistentStateComponent.
PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
JDOMExternalizable, :
(.ipr), plugin.xml «workspace» – .iws; .iml .

:
– ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
:
– writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
getComponent() - . , , initComponent().


Intellij IDEA , IDEA.
, , . , . .

.
, , , . plugin.xml:
<extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

"interface" , . "beanClass" , @Attribute . , plugin.xml.
MyBeanClass1:
public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
MyExtPoint, "key" "implementationClass" .

:
«xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
, .

, ;
, : "interface", "implementation", – , ; "beanClass", , @Attribute .


(Actions)
Intellij IDEA (actions).
– , AnAction, actionPerformed() , .

, . . .
.


– , , getService() ServiceManager. Intellij IDEA , , .

, plugin.xml. .

, .. , , applicationService, projectService moduleService .

:
( , , ) ;
:
"serviceInterface" – ; "serviceImplementaion" – .


.
plugin.xml:
<extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
: , , .

: 1 , 2 , 3 , 4 , 5 , 6 , 7 .
 ,     com.intellij.modules . : 
<idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

plugin.xml, IDEA. plugin.xml , .
IntelliJ:
com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
:
com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
PhpStorm , PHP , : com.jetbrains.php .
. , Java , :
<depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
, , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

IntelliJ IDEA
– IDEA. . .


.
– jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
.IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
– :
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
Classes lib classpath.
– jar-, lib:
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


, IDEA . , IDEA .
-, , . , plugin.xml, depends . , . .


– . :
; ; .
IntelliJ IDEA.
Application getComponent(Class).

Project ( ). Project getComponent(Class).

, IDEA. Module.

, . , . , (, , ) .

, . getComponentName(). : < ><>< >.

, , ApplicationComponent. , , . , , IDEA , .

<application-components> plugin.xml.
IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
New Java Alt+Insert; New Application Component; New Application Component, OK.
IDEA , ApplicationComponent, plugin.xml, Module Tree View .

, ProjectComponent. Project, . , .

<project-components> . IDE, "New | Project Component".

ModuleComponent. . <module-components> "New | Module Component".


, : JDOMExternalizable (, ) PersistentStateComponent.
PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
JDOMExternalizable, :
(.ipr), plugin.xml «workspace» – .iws; .iml .

:
– ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
:
– writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
getComponent() - . , , initComponent().


Intellij IDEA , IDEA.
, , . , . .

.
, , , . plugin.xml:
<extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

"interface" , . "beanClass" , @Attribute . , plugin.xml.
MyBeanClass1:
public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
MyExtPoint, "key" "implementationClass" .

:
«xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
, .

, ;
, : "interface", "implementation", – , ; "beanClass", , @Attribute .


(Actions)
Intellij IDEA (actions).
– , AnAction, actionPerformed() , .

, . . .
.


– , , getService() ServiceManager. Intellij IDEA , , .

, plugin.xml. .

, .. , , applicationService, projectService moduleService .

:
( , , ) ;
:
"serviceInterface" – ; "serviceImplementaion" – .


.
plugin.xml:
<extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
: , , .

: 1 , 2 , 3 , 4 , 5 , 6 , 7 .
, com.intellij.modules . :
<idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

plugin.xml, IDEA. plugin.xml , .
IntelliJ:
com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
:
com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
PhpStorm , PHP , : com.jetbrains.php .
. , Java , :
<depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
, , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

IntelliJ IDEA
– IDEA. . .


.
– jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
.IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
– :
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
Classes lib classpath.
– jar-, lib:
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


, IDEA . , IDEA .
-, , . , plugin.xml, depends . , . .


– . :
; ; .
IntelliJ IDEA.
Application getComponent(Class).

Project ( ). Project getComponent(Class).

, IDEA. Module.

, . , . , (, , ) .

, . getComponentName(). : < ><>< >.

, , ApplicationComponent. , , . , , IDEA , .

<application-components> plugin.xml.
IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
New Java Alt+Insert; New Application Component; New Application Component, OK.
IDEA , ApplicationComponent, plugin.xml, Module Tree View .

, ProjectComponent. Project, . , .

<project-components> . IDE, "New | Project Component".

ModuleComponent. . <module-components> "New | Module Component".


, : JDOMExternalizable (, ) PersistentStateComponent.
PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
JDOMExternalizable, :
(.ipr), plugin.xml «workspace» – .iws; .iml .

:
– ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
:
– writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
getComponent() - . , , initComponent().


Intellij IDEA , IDEA.
, , . , . .

.
, , , . plugin.xml:
<extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

"interface" , . "beanClass" , @Attribute . , plugin.xml.
MyBeanClass1:
public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
MyExtPoint, "key" "implementationClass" .

:
«xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
, .

, ;
, : "interface", "implementation", – , ; "beanClass", , @Attribute .


(Actions)
Intellij IDEA (actions).
– , AnAction, actionPerformed() , .

, . . .
.


– , , getService() ServiceManager. Intellij IDEA , , .

, plugin.xml. .

, .. , , applicationService, projectService moduleService .

:
( , , ) ;
:
"serviceInterface" – ; "serviceImplementaion" – .


.
plugin.xml:
<extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
: , , .

: 1 , 2 , 3 , 4 , 5 , 6 , 7 .

, com.intellij.modules . :
<idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

plugin.xml, IDEA. plugin.xml , .
IntelliJ:
com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
:
com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
PhpStorm , PHP , : com.jetbrains.php .
. , Java , :
<depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
, , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

IntelliJ IDEA
– IDEA. . .


.
– jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
.IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
– :
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
Classes lib classpath.
– jar-, lib:
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


, IDEA . , IDEA .
-, , . , plugin.xml, depends . , . .


– . :
; ; .
IntelliJ IDEA.
Application getComponent(Class).

Project ( ). Project getComponent(Class).

, IDEA. Module.

, . , . , (, , ) .

, . getComponentName(). : < ><>< >.

, , ApplicationComponent. , , . , , IDEA , .

<application-components> plugin.xml.
IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
New Java Alt+Insert; New Application Component; New Application Component, OK.
IDEA , ApplicationComponent, plugin.xml, Module Tree View .

, ProjectComponent. Project, . , .

<project-components> . IDE, "New | Project Component".

ModuleComponent. . <module-components> "New | Module Component".


, : JDOMExternalizable (, ) PersistentStateComponent.
PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
JDOMExternalizable, :
(.ipr), plugin.xml «workspace» – .iws; .iml .

:
– ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
:
– writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
getComponent() - . , , initComponent().


Intellij IDEA , IDEA.
, , . , . .

.
, , , . plugin.xml:
<extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

"interface" , . "beanClass" , @Attribute . , plugin.xml.
MyBeanClass1:
public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
MyExtPoint, "key" "implementationClass" .

:
«xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
, .

, ;
, : "interface", "implementation", – , ; "beanClass", , @Attribute .


(Actions)
Intellij IDEA (actions).
– , AnAction, actionPerformed() , .

, . . .
.


– , , getService() ServiceManager. Intellij IDEA , , .

, plugin.xml. .

, .. , , applicationService, projectService moduleService .

:
( , , ) ;
:
"serviceInterface" – ; "serviceImplementaion" – .


.
plugin.xml:
<extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
: , , .

: 1 , 2 , 3 , 4 , 5 , 6 , 7 .

, com.intellij.modules . :
<idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

plugin.xml, IDEA. plugin.xml , .
IntelliJ:
com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
:
com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
PhpStorm , PHP , : com.jetbrains.php .
. , Java , :
<depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
, , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

IntelliJ IDEA
– IDEA. . .


.
– jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
.IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
– :
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
Classes lib classpath.
– jar-, lib:
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


, IDEA . , IDEA .
-, , . , plugin.xml, depends . , . .


– . :
; ; .
IntelliJ IDEA.
Application getComponent(Class).

Project ( ). Project getComponent(Class).

, IDEA. Module.

, . , . , (, , ) .

, . getComponentName(). : < ><>< >.

, , ApplicationComponent. , , . , , IDEA , .

<application-components> plugin.xml.
IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
New Java Alt+Insert; New Application Component; New Application Component, OK.
IDEA , ApplicationComponent, plugin.xml, Module Tree View .

, ProjectComponent. Project, . , .

<project-components> . IDE, "New | Project Component".

ModuleComponent. . <module-components> "New | Module Component".


, : JDOMExternalizable (, ) PersistentStateComponent.
PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
JDOMExternalizable, :
(.ipr), plugin.xml «workspace» – .iws; .iml .

:
– ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
:
– writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
getComponent() - . , , initComponent().


Intellij IDEA , IDEA.
, , . , . .

.
, , , . plugin.xml:
<extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

"interface" , . "beanClass" , @Attribute . , plugin.xml.
MyBeanClass1:
public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
MyExtPoint, "key" "implementationClass" .

:
«xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
, .

, ;
, : "interface", "implementation", – , ; "beanClass", , @Attribute .


(Actions)
Intellij IDEA (actions).
– , AnAction, actionPerformed() , .

, . . .
.


– , , getService() ServiceManager. Intellij IDEA , , .

, plugin.xml. .

, .. , , applicationService, projectService moduleService .

:
( , , ) ;
:
"serviceInterface" – ; "serviceImplementaion" – .


.
plugin.xml:
<extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
: , , .

: 1 , 2 , 3 , 4 , 5 , 6 , 7 .
, com.intellij.modules . :
<idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

plugin.xml, IDEA. plugin.xml , .
IntelliJ:
com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
:
com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
PhpStorm , PHP , : com.jetbrains.php .
. , Java , :
<depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
, , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

IntelliJ IDEA
– IDEA. . .


.
– jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
.IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
– :
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
Classes lib classpath.
– jar-, lib:
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


, IDEA . , IDEA .
-, , . , plugin.xml, depends . , . .


– . :
; ; .
IntelliJ IDEA.
Application getComponent(Class).

Project ( ). Project getComponent(Class).

, IDEA. Module.

, . , . , (, , ) .

, . getComponentName(). : < ><>< >.

, , ApplicationComponent. , , . , , IDEA , .

<application-components> plugin.xml.
IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
New Java Alt+Insert; New Application Component; New Application Component, OK.
IDEA , ApplicationComponent, plugin.xml, Module Tree View .

, ProjectComponent. Project, . , .

<project-components> . IDE, "New | Project Component".

ModuleComponent. . <module-components> "New | Module Component".


, : JDOMExternalizable (, ) PersistentStateComponent.
PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
JDOMExternalizable, :
(.ipr), plugin.xml «workspace» – .iws; .iml .

:
– ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
:
– writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
getComponent() - . , , initComponent().


Intellij IDEA , IDEA.
, , . , . .

.
, , , . plugin.xml:
<extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

"interface" , . "beanClass" , @Attribute . , plugin.xml.
MyBeanClass1:
public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
MyExtPoint, "key" "implementationClass" .

:
«xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
, .

, ;
, : "interface", "implementation", – , ; "beanClass", , @Attribute .


(Actions)
Intellij IDEA (actions).
– , AnAction, actionPerformed() , .

, . . .
.


– , , getService() ServiceManager. Intellij IDEA , , .

, plugin.xml. .

, .. , , applicationService, projectService moduleService .

:
( , , ) ;
:
"serviceInterface" – ; "serviceImplementaion" – .


.
plugin.xml:
<extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
: , , .

: 1 , 2 , 3 , 4 , 5 , 6 , 7 .
, com.intellij.modules . :
<idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

plugin.xml, IDEA. plugin.xml , .
IntelliJ:
com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
:
com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
PhpStorm , PHP , : com.jetbrains.php .
. , Java , :
<depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
, , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

IntelliJ IDEA
– IDEA. . .


.
– jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
.IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
– :
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
Classes lib classpath.
– jar-, lib:
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


, IDEA . , IDEA .
-, , . , plugin.xml, depends . , . .


– . :
; ; .
IntelliJ IDEA.
Application getComponent(Class).

Project ( ). Project getComponent(Class).

, IDEA. Module.

, . , . , (, , ) .

, . getComponentName(). : < ><>< >.

, , ApplicationComponent. , , . , , IDEA , .

<application-components> plugin.xml.
IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
New Java Alt+Insert; New Application Component; New Application Component, OK.
IDEA , ApplicationComponent, plugin.xml, Module Tree View .

, ProjectComponent. Project, . , .

<project-components> . IDE, "New | Project Component".

ModuleComponent. . <module-components> "New | Module Component".


, : JDOMExternalizable (, ) PersistentStateComponent.
PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
JDOMExternalizable, :
(.ipr), plugin.xml «workspace» – .iws; .iml .

:
– ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
:
– writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
getComponent() - . , , initComponent().


Intellij IDEA , IDEA.
, , . , . .

.
, , , . plugin.xml:
<extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

"interface" , . "beanClass" , @Attribute . , plugin.xml.
MyBeanClass1:
public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
MyExtPoint, "key" "implementationClass" .

:
«xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
, .

, ;
, : "interface", "implementation", – , ; "beanClass", , @Attribute .


(Actions)
Intellij IDEA (actions).
– , AnAction, actionPerformed() , .

, . . .
.


– , , getService() ServiceManager. Intellij IDEA , , .

, plugin.xml. .

, .. , , applicationService, projectService moduleService .

:
( , , ) ;
:
"serviceInterface" – ; "serviceImplementaion" – .


.
plugin.xml:
<extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
: , , .

: 1 , 2 , 3 , 4 , 5 , 6 , 7 .
 ,     com.intellij.modules . : 
<idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

plugin.xml, IDEA. plugin.xml , .
IntelliJ:
com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
:
com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
PhpStorm , PHP , : com.jetbrains.php .
. , Java , :
<depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
, , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

IntelliJ IDEA
– IDEA. . .


.
– jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
.IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
– :
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
Classes lib classpath.
– jar-, lib:
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


, IDEA . , IDEA .
-, , . , plugin.xml, depends . , . .


– . :
; ; .
IntelliJ IDEA.
Application getComponent(Class).

Project ( ). Project getComponent(Class).

, IDEA. Module.

, . , . , (, , ) .

, . getComponentName(). : < ><>< >.

, , ApplicationComponent. , , . , , IDEA , .

<application-components> plugin.xml.
IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
New Java Alt+Insert; New Application Component; New Application Component, OK.
IDEA , ApplicationComponent, plugin.xml, Module Tree View .

, ProjectComponent. Project, . , .

<project-components> . IDE, "New | Project Component".

ModuleComponent. . <module-components> "New | Module Component".


, : JDOMExternalizable (, ) PersistentStateComponent.
PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
JDOMExternalizable, :
(.ipr), plugin.xml «workspace» – .iws; .iml .

:
– ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
:
– writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
getComponent() - . , , initComponent().


Intellij IDEA , IDEA.
, , . , . .

.
, , , . plugin.xml:
<extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

"interface" , . "beanClass" , @Attribute . , plugin.xml.
MyBeanClass1:
public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
MyExtPoint, "key" "implementationClass" .

:
«xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
, .

, ;
, : "interface", "implementation", – , ; "beanClass", , @Attribute .


(Actions)
Intellij IDEA (actions).
– , AnAction, actionPerformed() , .

, . . .
.


– , , getService() ServiceManager. Intellij IDEA , , .

, plugin.xml. .

, .. , , applicationService, projectService moduleService .

:
( , , ) ;
:
"serviceInterface" – ; "serviceImplementaion" – .


.
plugin.xml:
<extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
: , , .

: 1 , 2 , 3 , 4 , 5 , 6 , 7 .
, com.intellij.modules . :
<idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

plugin.xml, IDEA. plugin.xml , .
IntelliJ:
com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
:
com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
PhpStorm , PHP , : com.jetbrains.php .
. , Java , :
<depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
, , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

IntelliJ IDEA
– IDEA. . .


.
– jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
.IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
– :
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
Classes lib classpath.
– jar-, lib:
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


, IDEA . , IDEA .
-, , . , plugin.xml, depends . , . .


– . :
; ; .
IntelliJ IDEA.
Application getComponent(Class).

Project ( ). Project getComponent(Class).

, IDEA. Module.

, . , . , (, , ) .

, . getComponentName(). : < ><>< >.

, , ApplicationComponent. , , . , , IDEA , .

<application-components> plugin.xml.
IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
New Java Alt+Insert; New Application Component; New Application Component, OK.
IDEA , ApplicationComponent, plugin.xml, Module Tree View .

, ProjectComponent. Project, . , .

<project-components> . IDE, "New | Project Component".

ModuleComponent. . <module-components> "New | Module Component".


, : JDOMExternalizable (, ) PersistentStateComponent.
PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
JDOMExternalizable, :
(.ipr), plugin.xml «workspace» – .iws; .iml .

:
– ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
:
– writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
getComponent() - . , , initComponent().


Intellij IDEA , IDEA.
, , . , . .

.
, , , . plugin.xml:
<extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

"interface" , . "beanClass" , @Attribute . , plugin.xml.
MyBeanClass1:
public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
MyExtPoint, "key" "implementationClass" .

:
«xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
, .

, ;
, : "interface", "implementation", – , ; "beanClass", , @Attribute .


(Actions)
Intellij IDEA (actions).
– , AnAction, actionPerformed() , .

, . . .
.


– , , getService() ServiceManager. Intellij IDEA , , .

, plugin.xml. .

, .. , , applicationService, projectService moduleService .

:
( , , ) ;
:
"serviceInterface" – ; "serviceImplementaion" – .


.
plugin.xml:
<extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
: , , .

: 1 , 2 , 3 , 4 , 5 , 6 , 7 .
 ,     com.intellij.modules . : 
<idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

plugin.xml, IDEA. plugin.xml , .
IntelliJ:
com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
:
com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
PhpStorm , PHP , : com.jetbrains.php .
. , Java , :
<depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
, , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

IntelliJ IDEA
– IDEA. . .


.
– jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
.IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
– :
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
Classes lib classpath.
– jar-, lib:
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


, IDEA . , IDEA .
-, , . , plugin.xml, depends . , . .


– . :
; ; .
IntelliJ IDEA.
Application getComponent(Class).

Project ( ). Project getComponent(Class).

, IDEA. Module.

, . , . , (, , ) .

, . getComponentName(). : < ><>< >.

, , ApplicationComponent. , , . , , IDEA , .

<application-components> plugin.xml.
IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
New Java Alt+Insert; New Application Component; New Application Component, OK.
IDEA , ApplicationComponent, plugin.xml, Module Tree View .

, ProjectComponent. Project, . , .

<project-components> . IDE, "New | Project Component".

ModuleComponent. . <module-components> "New | Module Component".


, : JDOMExternalizable (, ) PersistentStateComponent.
PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
JDOMExternalizable, :
(.ipr), plugin.xml «workspace» – .iws; .iml .

:
– ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
:
– writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
getComponent() - . , , initComponent().


Intellij IDEA , IDEA.
, , . , . .

.
, , , . plugin.xml:
<extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

"interface" , . "beanClass" , @Attribute . , plugin.xml.
MyBeanClass1:
public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
MyExtPoint, "key" "implementationClass" .

:
«xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
, .

, ;
, : "interface", "implementation", – , ; "beanClass", , @Attribute .


(Actions)
Intellij IDEA (actions).
– , AnAction, actionPerformed() , .

, . . .
.


– , , getService() ServiceManager. Intellij IDEA , , .

, plugin.xml. .

, .. , , applicationService, projectService moduleService .

:
( , , ) ;
:
"serviceInterface" – ; "serviceImplementaion" – .


.
plugin.xml:
<extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
: , , .

: 1 , 2 , 3 , 4 , 5 , 6 , 7 .
, com.intellij.modules . :
<idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

plugin.xml, IDEA. plugin.xml , .
IntelliJ:
com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
:
com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
PhpStorm , PHP , : com.jetbrains.php .
. , Java , :
<depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
, , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

IntelliJ IDEA
– IDEA. . .


.
– jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
.IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
– :
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
Classes lib classpath.
– jar-, lib:
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


, IDEA . , IDEA .
-, , . , plugin.xml, depends . , . .


– . :
; ; .
IntelliJ IDEA.
Application getComponent(Class).

Project ( ). Project getComponent(Class).

, IDEA. Module.

, . , . , (, , ) .

, . getComponentName(). : < ><>< >.

, , ApplicationComponent. , , . , , IDEA , .

<application-components> plugin.xml.
IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
New Java Alt+Insert; New Application Component; New Application Component, OK.
IDEA , ApplicationComponent, plugin.xml, Module Tree View .

, ProjectComponent. Project, . , .

<project-components> . IDE, "New | Project Component".

ModuleComponent. . <module-components> "New | Module Component".


, : JDOMExternalizable (, ) PersistentStateComponent.
PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
JDOMExternalizable, :
(.ipr), plugin.xml «workspace» – .iws; .iml .

:
– ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
:
– writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
getComponent() - . , , initComponent().


Intellij IDEA , IDEA.
, , . , . .

.
, , , . plugin.xml:
<extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

"interface" , . "beanClass" , @Attribute . , plugin.xml.
MyBeanClass1:
public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
MyExtPoint, "key" "implementationClass" .

:
«xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
, .

, ;
, : "interface", "implementation", – , ; "beanClass", , @Attribute .


(Actions)
Intellij IDEA (actions).
– , AnAction, actionPerformed() , .

, . . .
.


– , , getService() ServiceManager. Intellij IDEA , , .

, plugin.xml. .

, .. , , applicationService, projectService moduleService .

:
( , , ) ;
:
"serviceInterface" – ; "serviceImplementaion" – .


.
plugin.xml:
<extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
: , , .

: 1 , 2 , 3 , 4 , 5 , 6 , 7 .
 ,     com.intellij.modules . : 
<idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

plugin.xml, IDEA. plugin.xml , .
IntelliJ:
com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
:
com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
PhpStorm , PHP , : com.jetbrains.php .
. , Java , :
<depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
, , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

IntelliJ IDEA
– IDEA. . .


.
– jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
.IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
– :
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
Classes lib classpath.
– jar-, lib:
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


, IDEA . , IDEA .
-, , . , plugin.xml, depends . , . .


– . :
; ; .
IntelliJ IDEA.
Application getComponent(Class).

Project ( ). Project getComponent(Class).

, IDEA. Module.

, . , . , (, , ) .

, . getComponentName(). : < ><>< >.

, , ApplicationComponent. , , . , , IDEA , .

<application-components> plugin.xml.
IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
New Java Alt+Insert; New Application Component; New Application Component, OK.
IDEA , ApplicationComponent, plugin.xml, Module Tree View .

, ProjectComponent. Project, . , .

<project-components> . IDE, "New | Project Component".

ModuleComponent. . <module-components> "New | Module Component".


, : JDOMExternalizable (, ) PersistentStateComponent.
PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
JDOMExternalizable, :
(.ipr), plugin.xml «workspace» – .iws; .iml .

:
– ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
:
– writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
getComponent() - . , , initComponent().


Intellij IDEA , IDEA.
, , . , . .

.
, , , . plugin.xml:
<extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

"interface" , . "beanClass" , @Attribute . , plugin.xml.
MyBeanClass1:
public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
MyExtPoint, "key" "implementationClass" .

:
«xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
, .

, ;
, : "interface", "implementation", – , ; "beanClass", , @Attribute .


(Actions)
Intellij IDEA (actions).
– , AnAction, actionPerformed() , .

, . . .
.


– , , getService() ServiceManager. Intellij IDEA , , .

, plugin.xml. .

, .. , , applicationService, projectService moduleService .

:
( , , ) ;
:
"serviceInterface" – ; "serviceImplementaion" – .


.
plugin.xml:
<extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
: , , .

: 1 , 2 , 3 , 4 , 5 , 6 , 7 .
, com.intellij.modules . :
<idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

plugin.xml, IDEA. plugin.xml , .
IntelliJ:
com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
:
com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
PhpStorm , PHP , : com.jetbrains.php .
. , Java , :
<depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
, , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

IntelliJ IDEA
– IDEA. . .


.
– jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
.IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
– :
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
Classes lib classpath.
– jar-, lib:
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


, IDEA . , IDEA .
-, , . , plugin.xml, depends . , . .


– . :
; ; .
IntelliJ IDEA.
Application getComponent(Class).

Project ( ). Project getComponent(Class).

, IDEA. Module.

, . , . , (, , ) .

, . getComponentName(). : < ><>< >.

, , ApplicationComponent. , , . , , IDEA , .

<application-components> plugin.xml.
IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
New Java Alt+Insert; New Application Component; New Application Component, OK.
IDEA , ApplicationComponent, plugin.xml, Module Tree View .

, ProjectComponent. Project, . , .

<project-components> . IDE, "New | Project Component".

ModuleComponent. . <module-components> "New | Module Component".


, : JDOMExternalizable (, ) PersistentStateComponent.
PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
JDOMExternalizable, :
(.ipr), plugin.xml «workspace» – .iws; .iml .

:
– ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
:
– writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
getComponent() - . , , initComponent().


Intellij IDEA , IDEA.
, , . , . .

.
, , , . plugin.xml:
<extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

"interface" , . "beanClass" , @Attribute . , plugin.xml.
MyBeanClass1:
public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
MyExtPoint, "key" "implementationClass" .

:
«xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
, .

, ;
, : "interface", "implementation", – , ; "beanClass", , @Attribute .


(Actions)
Intellij IDEA (actions).
– , AnAction, actionPerformed() , .

, . . .
.


– , , getService() ServiceManager. Intellij IDEA , , .

, plugin.xml. .

, .. , , applicationService, projectService moduleService .

:
( , , ) ;
:
"serviceInterface" – ; "serviceImplementaion" – .


.
plugin.xml:
<extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
: , , .

: 1 , 2 , 3 , 4 , 5 , 6 , 7 .
, com.intellij.modules . :
<idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

plugin.xml, IDEA. plugin.xml , .
IntelliJ:
com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
:
com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
PhpStorm , PHP , : com.jetbrains.php .
. , Java , :
<depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
, , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

IntelliJ IDEA
– IDEA. . .


.
– jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
.IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
– :
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
Classes lib classpath.
– jar-, lib:
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


, IDEA . , IDEA .
-, , . , plugin.xml, depends . , . .


– . :
; ; .
IntelliJ IDEA.
Application getComponent(Class).

Project ( ). Project getComponent(Class).

, IDEA. Module.

, . , . , (, , ) .

, . getComponentName(). : < ><>< >.

, , ApplicationComponent. , , . , , IDEA , .

<application-components> plugin.xml.
IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
New Java Alt+Insert; New Application Component; New Application Component, OK.
IDEA , ApplicationComponent, plugin.xml, Module Tree View .

, ProjectComponent. Project, . , .

<project-components> . IDE, "New | Project Component".

ModuleComponent. . <module-components> "New | Module Component".


, : JDOMExternalizable (, ) PersistentStateComponent.
PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
JDOMExternalizable, :
(.ipr), plugin.xml «workspace» – .iws; .iml .

:
– ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
:
– writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
getComponent() - . , , initComponent().


Intellij IDEA , IDEA.
, , . , . .

.
, , , . plugin.xml:
<extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

"interface" , . "beanClass" , @Attribute . , plugin.xml.
MyBeanClass1:
public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
MyExtPoint, "key" "implementationClass" .

:
«xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
, .

, ;
, : "interface", "implementation", – , ; "beanClass", , @Attribute .


(Actions)
Intellij IDEA (actions).
– , AnAction, actionPerformed() , .

, . . .
.


– , , getService() ServiceManager. Intellij IDEA , , .

, plugin.xml. .

, .. , , applicationService, projectService moduleService .

:
( , , ) ;
:
"serviceInterface" – ; "serviceImplementaion" – .


.
plugin.xml:
<extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
: , , .

: 1 , 2 , 3 , 4 , 5 , 6 , 7 .
, com.intellij.modules . :
<idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

plugin.xml, IDEA. plugin.xml , .
IntelliJ:
com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
:
com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
PhpStorm , PHP , : com.jetbrains.php .
. , Java , :
<depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
, , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

IntelliJ IDEA
– IDEA. . .


.
– jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
.IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
– :
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
Classes lib classpath.
– jar-, lib:
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


, IDEA . , IDEA .
-, , . , plugin.xml, depends . , . .


– . :
; ; .
IntelliJ IDEA.
Application getComponent(Class).

Project ( ). Project getComponent(Class).

, IDEA. Module.

, . , . , (, , ) .

, . getComponentName(). : < ><>< >.

, , ApplicationComponent. , , . , , IDEA , .

<application-components> plugin.xml.
IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
New Java Alt+Insert; New Application Component; New Application Component, OK.
IDEA , ApplicationComponent, plugin.xml, Module Tree View .

, ProjectComponent. Project, . , .

<project-components> . IDE, "New | Project Component".

ModuleComponent. . <module-components> "New | Module Component".


, : JDOMExternalizable (, ) PersistentStateComponent.
PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
JDOMExternalizable, :
(.ipr), plugin.xml «workspace» – .iws; .iml .

:
– ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
:
– writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
getComponent() - . , , initComponent().


Intellij IDEA , IDEA.
, , . , . .

.
, , , . plugin.xml:
<extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

"interface" , . "beanClass" , @Attribute . , plugin.xml.
MyBeanClass1:
public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
MyExtPoint, "key" "implementationClass" .

:
«xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
, .

, ;
, : "interface", "implementation", – , ; "beanClass", , @Attribute .


(Actions)
Intellij IDEA (actions).
– , AnAction, actionPerformed() , .

, . . .
.


– , , getService() ServiceManager. Intellij IDEA , , .

, plugin.xml. .

, .. , , applicationService, projectService moduleService .

:
( , , ) ;
:
"serviceInterface" – ; "serviceImplementaion" – .


.
plugin.xml:
<extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
: , , .

: 1 , 2 , 3 , 4 , 5 , 6 , 7 .
, com.intellij.modules . :
<idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

plugin.xml, IDEA. plugin.xml , .
IntelliJ:
com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
:
com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
PhpStorm , PHP , : com.jetbrains.php .
. , Java , :
<depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
, , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

IntelliJ IDEA
– IDEA. . .


.
– jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
.IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
– :
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
Classes lib classpath.
– jar-, lib:
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


, IDEA . , IDEA .
-, , . , plugin.xml, depends . , . .


– . :
; ; .
IntelliJ IDEA.
Application getComponent(Class).

Project ( ). Project getComponent(Class).

, IDEA. Module.

, . , . , (, , ) .

, . getComponentName(). : < ><>< >.

, , ApplicationComponent. , , . , , IDEA , .

<application-components> plugin.xml.
IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
New Java Alt+Insert; New Application Component; New Application Component, OK.
IDEA , ApplicationComponent, plugin.xml, Module Tree View .

, ProjectComponent. Project, . , .

<project-components> . IDE, "New | Project Component".

ModuleComponent. . <module-components> "New | Module Component".


, : JDOMExternalizable (, ) PersistentStateComponent.
PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
JDOMExternalizable, :
(.ipr), plugin.xml «workspace» – .iws; .iml .

:
– ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
:
– writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
getComponent() - . , , initComponent().


Intellij IDEA , IDEA.
, , . , . .

.
, , , . plugin.xml:
<extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

"interface" , . "beanClass" , @Attribute . , plugin.xml.
MyBeanClass1:
public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
MyExtPoint, "key" "implementationClass" .

:
«xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
, .

, ;
, : "interface", "implementation", – , ; "beanClass", , @Attribute .


(Actions)
Intellij IDEA (actions).
– , AnAction, actionPerformed() , .

, . . .
.


– , , getService() ServiceManager. Intellij IDEA , , .

, plugin.xml. .

, .. , , applicationService, projectService moduleService .

:
( , , ) ;
:
"serviceInterface" – ; "serviceImplementaion" – .


.
plugin.xml:
<extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
: , , .

: 1 , 2 , 3 , 4 , 5 , 6 , 7 .
, com.intellij.modules . :
<idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

plugin.xml, IDEA. plugin.xml , .
IntelliJ:
com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
:
com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
PhpStorm , PHP , : com.jetbrains.php .
. , Java , :
<depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
, , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

IntelliJ IDEA
– IDEA. . .


.
– jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
.IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
– :
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
Classes lib classpath.
– jar-, lib:
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


, IDEA . , IDEA .
-, , . , plugin.xml, depends . , . .


– . :
; ; .
IntelliJ IDEA.
Application getComponent(Class).

Project ( ). Project getComponent(Class).

, IDEA. Module.

, . , . , (, , ) .

, . getComponentName(). : < ><>< >.

, , ApplicationComponent. , , . , , IDEA , .

<application-components> plugin.xml.
IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
New Java Alt+Insert; New Application Component; New Application Component, OK.
IDEA , ApplicationComponent, plugin.xml, Module Tree View .

, ProjectComponent. Project, . , .

<project-components> . IDE, "New | Project Component".

ModuleComponent. . <module-components> "New | Module Component".


, : JDOMExternalizable (, ) PersistentStateComponent.
PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
JDOMExternalizable, :
(.ipr), plugin.xml «workspace» – .iws; .iml .

:
– ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
:
– writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
getComponent() - . , , initComponent().


Intellij IDEA , IDEA.
, , . , . .

.
, , , . plugin.xml:
<extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

"interface" , . "beanClass" , @Attribute . , plugin.xml.
MyBeanClass1:
public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
MyExtPoint, "key" "implementationClass" .

:
«xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
, .

, ;
, : "interface", "implementation", – , ; "beanClass", , @Attribute .


(Actions)
Intellij IDEA (actions).
– , AnAction, actionPerformed() , .

, . . .
.


– , , getService() ServiceManager. Intellij IDEA , , .

, plugin.xml. .

, .. , , applicationService, projectService moduleService .

:
( , , ) ;
:
"serviceInterface" – ; "serviceImplementaion" – .


.
plugin.xml:
<extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
: , , .

: 1 , 2 , 3 , 4 , 5 , 6 , 7 .
  1. , com.intellij.modules . :
    <idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

    plugin.xml, IDEA. plugin.xml , .
    IntelliJ:
    com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
    :
    com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
    PhpStorm , PHP , : com.jetbrains.php .
    . , Java , :
    <depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
    , , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

    IntelliJ IDEA
    – IDEA. . .


    .
    – jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
    .IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
    – :
    .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
    Classes lib classpath.
    – jar-, lib:
    .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


    , IDEA . , IDEA .
    -, , . , plugin.xml, depends . , . .


    – . :
    ; ; .
    IntelliJ IDEA.
    Application getComponent(Class).

    Project ( ). Project getComponent(Class).

    , IDEA. Module.

    , . , . , (, , ) .

    , . getComponentName(). : < ><>< >.

    , , ApplicationComponent. , , . , , IDEA , .

    <application-components> plugin.xml.
    IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
    New Java Alt+Insert; New Application Component; New Application Component, OK.
    IDEA , ApplicationComponent, plugin.xml, Module Tree View .

    , ProjectComponent. Project, . , .

    <project-components> . IDE, "New | Project Component".

    ModuleComponent. . <module-components> "New | Module Component".


    , : JDOMExternalizable (, ) PersistentStateComponent.
    PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
    JDOMExternalizable, :
    (.ipr), plugin.xml «workspace» – .iws; .iml .

    :
    – ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
    :
    – writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
    getComponent() - . , , initComponent().


    Intellij IDEA , IDEA.
    , , . , . .

    .
    , , , . plugin.xml:
    <extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

    "interface" , . "beanClass" , @Attribute . , plugin.xml.
    MyBeanClass1:
    public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
    MyExtPoint, "key" "implementationClass" .

    :
    «xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
    , .

    , ;
    , : "interface", "implementation", – , ; "beanClass", , @Attribute .


    (Actions)
    Intellij IDEA (actions).
    – , AnAction, actionPerformed() , .

    , . . .
    .


    – , , getService() ServiceManager. Intellij IDEA , , .

    , plugin.xml. .

    , .. , , applicationService, projectService moduleService .

    :
    ( , , ) ;
    :
    "serviceInterface" – ; "serviceImplementaion" – .


    .
    plugin.xml:
    <extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
    : , , .

    : 1 , 2 , 3 , 4 , 5 , 6 , 7 .
  2. , com.intellij.modules . :
    <idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

    plugin.xml, IDEA. plugin.xml , .
    IntelliJ:
    com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
    :
    com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
    PhpStorm , PHP , : com.jetbrains.php .
    . , Java , :
    <depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
    , , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

    IntelliJ IDEA
    – IDEA. . .


    .
    – jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
    .IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
    – :
    .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
    Classes lib classpath.
    – jar-, lib:
    .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


    , IDEA . , IDEA .
    -, , . , plugin.xml, depends . , . .


    – . :
    ; ; .
    IntelliJ IDEA.
    Application getComponent(Class).

    Project ( ). Project getComponent(Class).

    , IDEA. Module.

    , . , . , (, , ) .

    , . getComponentName(). : < ><>< >.

    , , ApplicationComponent. , , . , , IDEA , .

    <application-components> plugin.xml.
    IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
    New Java Alt+Insert; New Application Component; New Application Component, OK.
    IDEA , ApplicationComponent, plugin.xml, Module Tree View .

    , ProjectComponent. Project, . , .

    <project-components> . IDE, "New | Project Component".

    ModuleComponent. . <module-components> "New | Module Component".


    , : JDOMExternalizable (, ) PersistentStateComponent.
    PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
    JDOMExternalizable, :
    (.ipr), plugin.xml «workspace» – .iws; .iml .

    :
    – ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
    :
    – writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
    getComponent() - . , , initComponent().


    Intellij IDEA , IDEA.
    , , . , . .

    .
    , , , . plugin.xml:
    <extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

    "interface" , . "beanClass" , @Attribute . , plugin.xml.
    MyBeanClass1:
    public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
    MyExtPoint, "key" "implementationClass" .

    :
    «xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
    , .

    , ;
    , : "interface", "implementation", – , ; "beanClass", , @Attribute .


    (Actions)
    Intellij IDEA (actions).
    – , AnAction, actionPerformed() , .

    , . . .
    .


    – , , getService() ServiceManager. Intellij IDEA , , .

    , plugin.xml. .

    , .. , , applicationService, projectService moduleService .

    :
    ( , , ) ;
    :
    "serviceInterface" – ; "serviceImplementaion" – .


    .
    plugin.xml:
    <extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
    : , , .

    : 1 , 2 , 3 , 4 , 5 , 6 , 7 .
  3. , com.intellij.modules . :
    <idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

    plugin.xml, IDEA. plugin.xml , .
    IntelliJ:
    com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
    :
    com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
    PhpStorm , PHP , : com.jetbrains.php .
    . , Java , :
    <depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
    , , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

    IntelliJ IDEA
    – IDEA. . .


    .
    – jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
    .IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
    – :
    .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
    Classes lib classpath.
    – jar-, lib:
    .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


    , IDEA . , IDEA .
    -, , . , plugin.xml, depends . , . .


    – . :
    ; ; .
    IntelliJ IDEA.
    Application getComponent(Class).

    Project ( ). Project getComponent(Class).

    , IDEA. Module.

    , . , . , (, , ) .

    , . getComponentName(). : < ><>< >.

    , , ApplicationComponent. , , . , , IDEA , .

    <application-components> plugin.xml.
    IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
    New Java Alt+Insert; New Application Component; New Application Component, OK.
    IDEA , ApplicationComponent, plugin.xml, Module Tree View .

    , ProjectComponent. Project, . , .

    <project-components> . IDE, "New | Project Component".

    ModuleComponent. . <module-components> "New | Module Component".


    , : JDOMExternalizable (, ) PersistentStateComponent.
    PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
    JDOMExternalizable, :
    (.ipr), plugin.xml «workspace» – .iws; .iml .

    :
    – ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
    :
    – writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
    getComponent() - . , , initComponent().


    Intellij IDEA , IDEA.
    , , . , . .

    .
    , , , . plugin.xml:
    <extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

    "interface" , . "beanClass" , @Attribute . , plugin.xml.
    MyBeanClass1:
    public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
    MyExtPoint, "key" "implementationClass" .

    :
    «xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
    , .

    , ;
    , : "interface", "implementation", – , ; "beanClass", , @Attribute .


    (Actions)
    Intellij IDEA (actions).
    – , AnAction, actionPerformed() , .

    , . . .
    .


    – , , getService() ServiceManager. Intellij IDEA , , .

    , plugin.xml. .

    , .. , , applicationService, projectService moduleService .

    :
    ( , , ) ;
    :
    "serviceInterface" – ; "serviceImplementaion" – .


    .
    plugin.xml:
    <extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
    : , , .

    : 1 , 2 , 3 , 4 , 5 , 6 , 7 .
, com.intellij.modules . :
<idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

plugin.xml, IDEA. plugin.xml , .
IntelliJ:
com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
:
com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
PhpStorm , PHP , : com.jetbrains.php .
. , Java , :
<depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
, , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

IntelliJ IDEA
– IDEA. . .


.
– jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
.IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
– :
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
Classes lib classpath.
– jar-, lib:
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


, IDEA . , IDEA .
-, , . , plugin.xml, depends . , . .


– . :
; ; .
IntelliJ IDEA.
Application getComponent(Class).

Project ( ). Project getComponent(Class).

, IDEA. Module.

, . , . , (, , ) .

, . getComponentName(). : < ><>< >.

, , ApplicationComponent. , , . , , IDEA , .

<application-components> plugin.xml.
IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
New Java Alt+Insert; New Application Component; New Application Component, OK.
IDEA , ApplicationComponent, plugin.xml, Module Tree View .

, ProjectComponent. Project, . , .

<project-components> . IDE, "New | Project Component".

ModuleComponent. . <module-components> "New | Module Component".


, : JDOMExternalizable (, ) PersistentStateComponent.
PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
JDOMExternalizable, :
(.ipr), plugin.xml «workspace» – .iws; .iml .

:
– ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
:
– writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
getComponent() - . , , initComponent().


Intellij IDEA , IDEA.
, , . , . .

.
, , , . plugin.xml:
<extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

"interface" , . "beanClass" , @Attribute . , plugin.xml.
MyBeanClass1:
public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
MyExtPoint, "key" "implementationClass" .

:
«xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
, .

, ;
, : "interface", "implementation", – , ; "beanClass", , @Attribute .


(Actions)
Intellij IDEA (actions).
– , AnAction, actionPerformed() , .

, . . .
.


– , , getService() ServiceManager. Intellij IDEA , , .

, plugin.xml. .

, .. , , applicationService, projectService moduleService .

:
( , , ) ;
:
"serviceInterface" – ; "serviceImplementaion" – .


.
plugin.xml:
<extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
: , , .

: 1 , 2 , 3 , 4 , 5 , 6 , 7 .
  1. , com.intellij.modules . :
    <idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

    plugin.xml, IDEA. plugin.xml , .
    IntelliJ:
    com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
    :
    com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
    PhpStorm , PHP , : com.jetbrains.php .
    . , Java , :
    <depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
    , , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

    IntelliJ IDEA
    – IDEA. . .


    .
    – jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
    .IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
    – :
    .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
    Classes lib classpath.
    – jar-, lib:
    .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


    , IDEA . , IDEA .
    -, , . , plugin.xml, depends . , . .


    – . :
    ; ; .
    IntelliJ IDEA.
    Application getComponent(Class).

    Project ( ). Project getComponent(Class).

    , IDEA. Module.

    , . , . , (, , ) .

    , . getComponentName(). : < ><>< >.

    , , ApplicationComponent. , , . , , IDEA , .

    <application-components> plugin.xml.
    IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
    New Java Alt+Insert; New Application Component; New Application Component, OK.
    IDEA , ApplicationComponent, plugin.xml, Module Tree View .

    , ProjectComponent. Project, . , .

    <project-components> . IDE, "New | Project Component".

    ModuleComponent. . <module-components> "New | Module Component".


    , : JDOMExternalizable (, ) PersistentStateComponent.
    PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
    JDOMExternalizable, :
    (.ipr), plugin.xml «workspace» – .iws; .iml .

    :
    – ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
    :
    – writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
    getComponent() - . , , initComponent().


    Intellij IDEA , IDEA.
    , , . , . .

    .
    , , , . plugin.xml:
    <extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

    "interface" , . "beanClass" , @Attribute . , plugin.xml.
    MyBeanClass1:
    public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
    MyExtPoint, "key" "implementationClass" .

    :
    «xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
    , .

    , ;
    , : "interface", "implementation", – , ; "beanClass", , @Attribute .


    (Actions)
    Intellij IDEA (actions).
    – , AnAction, actionPerformed() , .

    , . . .
    .


    – , , getService() ServiceManager. Intellij IDEA , , .

    , plugin.xml. .

    , .. , , applicationService, projectService moduleService .

    :
    ( , , ) ;
    :
    "serviceInterface" – ; "serviceImplementaion" – .


    .
    plugin.xml:
    <extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
    : , , .

    : 1 , 2 , 3 , 4 , 5 , 6 , 7 .
  2. , com.intellij.modules . :
    <idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

    plugin.xml, IDEA. plugin.xml , .
    IntelliJ:
    com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
    :
    com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
    PhpStorm , PHP , : com.jetbrains.php .
    . , Java , :
    <depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
    , , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

    IntelliJ IDEA
    – IDEA. . .


    .
    – jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
    .IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
    – :
    .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
    Classes lib classpath.
    – jar-, lib:
    .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


    , IDEA . , IDEA .
    -, , . , plugin.xml, depends . , . .


    – . :
    ; ; .
    IntelliJ IDEA.
    Application getComponent(Class).

    Project ( ). Project getComponent(Class).

    , IDEA. Module.

    , . , . , (, , ) .

    , . getComponentName(). : < ><>< >.

    , , ApplicationComponent. , , . , , IDEA , .

    <application-components> plugin.xml.
    IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
    New Java Alt+Insert; New Application Component; New Application Component, OK.
    IDEA , ApplicationComponent, plugin.xml, Module Tree View .

    , ProjectComponent. Project, . , .

    <project-components> . IDE, "New | Project Component".

    ModuleComponent. . <module-components> "New | Module Component".


    , : JDOMExternalizable (, ) PersistentStateComponent.
    PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
    JDOMExternalizable, :
    (.ipr), plugin.xml «workspace» – .iws; .iml .

    :
    – ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
    :
    – writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
    getComponent() - . , , initComponent().


    Intellij IDEA , IDEA.
    , , . , . .

    .
    , , , . plugin.xml:
    <extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

    "interface" , . "beanClass" , @Attribute . , plugin.xml.
    MyBeanClass1:
    public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
    MyExtPoint, "key" "implementationClass" .

    :
    «xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
    , .

    , ;
    , : "interface", "implementation", – , ; "beanClass", , @Attribute .


    (Actions)
    Intellij IDEA (actions).
    – , AnAction, actionPerformed() , .

    , . . .
    .


    – , , getService() ServiceManager. Intellij IDEA , , .

    , plugin.xml. .

    , .. , , applicationService, projectService moduleService .

    :
    ( , , ) ;
    :
    "serviceInterface" – ; "serviceImplementaion" – .


    .
    plugin.xml:
    <extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
    : , , .

    : 1 , 2 , 3 , 4 , 5 , 6 , 7 .
  3. , com.intellij.modules . :
    <idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

    plugin.xml, IDEA. plugin.xml , .
    IntelliJ:
    com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
    :
    com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
    PhpStorm , PHP , : com.jetbrains.php .
    . , Java , :
    <depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
    , , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

    IntelliJ IDEA
    – IDEA. . .


    .
    – jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
    .IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
    – :
    .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
    Classes lib classpath.
    – jar-, lib:
    .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


    , IDEA . , IDEA .
    -, , . , plugin.xml, depends . , . .


    – . :
    ; ; .
    IntelliJ IDEA.
    Application getComponent(Class).

    Project ( ). Project getComponent(Class).

    , IDEA. Module.

    , . , . , (, , ) .

    , . getComponentName(). : < ><>< >.

    , , ApplicationComponent. , , . , , IDEA , .

    <application-components> plugin.xml.
    IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
    New Java Alt+Insert; New Application Component; New Application Component, OK.
    IDEA , ApplicationComponent, plugin.xml, Module Tree View .

    , ProjectComponent. Project, . , .

    <project-components> . IDE, "New | Project Component".

    ModuleComponent. . <module-components> "New | Module Component".


    , : JDOMExternalizable (, ) PersistentStateComponent.
    PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
    JDOMExternalizable, :
    (.ipr), plugin.xml «workspace» – .iws; .iml .

    :
    – ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
    :
    – writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
    getComponent() - . , , initComponent().


    Intellij IDEA , IDEA.
    , , . , . .

    .
    , , , . plugin.xml:
    <extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

    "interface" , . "beanClass" , @Attribute . , plugin.xml.
    MyBeanClass1:
    public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
    MyExtPoint, "key" "implementationClass" .

    :
    «xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
    , .

    , ;
    , : "interface", "implementation", – , ; "beanClass", , @Attribute .


    (Actions)
    Intellij IDEA (actions).
    – , AnAction, actionPerformed() , .

    , . . .
    .


    – , , getService() ServiceManager. Intellij IDEA , , .

    , plugin.xml. .

    , .. , , applicationService, projectService moduleService .

    :
    ( , , ) ;
    :
    "serviceInterface" – ; "serviceImplementaion" – .


    .
    plugin.xml:
    <extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
    : , , .

    : 1 , 2 , 3 , 4 , 5 , 6 , 7 .
, com.intellij.modules . :
<idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

plugin.xml, IDEA. plugin.xml , .
IntelliJ:
com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
:
com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
PhpStorm , PHP , : com.jetbrains.php .
. , Java , :
<depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
, , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

IntelliJ IDEA
– IDEA. . .


.
– jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
.IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
– :
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
Classes lib classpath.
– jar-, lib:
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


, IDEA . , IDEA .
-, , . , plugin.xml, depends . , . .


– . :
; ; .
IntelliJ IDEA.
Application getComponent(Class).

Project ( ). Project getComponent(Class).

, IDEA. Module.

, . , . , (, , ) .

, . getComponentName(). : < ><>< >.

, , ApplicationComponent. , , . , , IDEA , .

<application-components> plugin.xml.
IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
New Java Alt+Insert; New Application Component; New Application Component, OK.
IDEA , ApplicationComponent, plugin.xml, Module Tree View .

, ProjectComponent. Project, . , .

<project-components> . IDE, "New | Project Component".

ModuleComponent. . <module-components> "New | Module Component".


, : JDOMExternalizable (, ) PersistentStateComponent.
PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
JDOMExternalizable, :
(.ipr), plugin.xml «workspace» – .iws; .iml .

:
– ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
:
– writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
getComponent() - . , , initComponent().


Intellij IDEA , IDEA.
, , . , . .

.
, , , . plugin.xml:
<extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

"interface" , . "beanClass" , @Attribute . , plugin.xml.
MyBeanClass1:
public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
MyExtPoint, "key" "implementationClass" .

:
«xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
, .

, ;
, : "interface", "implementation", – , ; "beanClass", , @Attribute .


(Actions)
Intellij IDEA (actions).
– , AnAction, actionPerformed() , .

, . . .
.


– , , getService() ServiceManager. Intellij IDEA , , .

, plugin.xml. .

, .. , , applicationService, projectService moduleService .

:
( , , ) ;
:
"serviceInterface" – ; "serviceImplementaion" – .


.
plugin.xml:
<extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
: , , .

: 1 , 2 , 3 , 4 , 5 , 6 , 7 .
, com.intellij.modules . :
<idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

plugin.xml, IDEA. plugin.xml , .
IntelliJ:
com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
:
com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
PhpStorm , PHP , : com.jetbrains.php .
. , Java , :
<depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
, , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

IntelliJ IDEA
– IDEA. . .


.
– jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
.IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
– :
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
Classes lib classpath.
– jar-, lib:
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


, IDEA . , IDEA .
-, , . , plugin.xml, depends . , . .


– . :
; ; .
IntelliJ IDEA.
Application getComponent(Class).

Project ( ). Project getComponent(Class).

, IDEA. Module.

, . , . , (, , ) .

, . getComponentName(). : < ><>< >.

, , ApplicationComponent. , , . , , IDEA , .

<application-components> plugin.xml.
IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
New Java Alt+Insert; New Application Component; New Application Component, OK.
IDEA , ApplicationComponent, plugin.xml, Module Tree View .

, ProjectComponent. Project, . , .

<project-components> . IDE, "New | Project Component".

ModuleComponent. . <module-components> "New | Module Component".


, : JDOMExternalizable (, ) PersistentStateComponent.
PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
JDOMExternalizable, :
(.ipr), plugin.xml «workspace» – .iws; .iml .

:
– ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
:
– writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
getComponent() - . , , initComponent().


Intellij IDEA , IDEA.
, , . , . .

.
, , , . plugin.xml:
<extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

"interface" , . "beanClass" , @Attribute . , plugin.xml.
MyBeanClass1:
public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
MyExtPoint, "key" "implementationClass" .

:
«xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
, .

, ;
, : "interface", "implementation", – , ; "beanClass", , @Attribute .


(Actions)
Intellij IDEA (actions).
– , AnAction, actionPerformed() , .

, . . .
.


– , , getService() ServiceManager. Intellij IDEA , , .

, plugin.xml. .

, .. , , applicationService, projectService moduleService .

:
( , , ) ;
:
"serviceInterface" – ; "serviceImplementaion" – .


.
plugin.xml:
<extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
: , , .

: 1 , 2 , 3 , 4 , 5 , 6 , 7 .
, com.intellij.modules . :
<idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

plugin.xml, IDEA. plugin.xml , .
IntelliJ:
com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
:
com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
PhpStorm , PHP , : com.jetbrains.php .
. , Java , :
<depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
, , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

IntelliJ IDEA
– IDEA. . .


.
– jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
.IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
– :
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
Classes lib classpath.
– jar-, lib:
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


, IDEA . , IDEA .
-, , . , plugin.xml, depends . , . .


– . :
; ; .
IntelliJ IDEA.
Application getComponent(Class).

Project ( ). Project getComponent(Class).

, IDEA. Module.

, . , . , (, , ) .

, . getComponentName(). : < ><>< >.

, , ApplicationComponent. , , . , , IDEA , .

<application-components> plugin.xml.
IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
New Java Alt+Insert; New Application Component; New Application Component, OK.
IDEA , ApplicationComponent, plugin.xml, Module Tree View .

, ProjectComponent. Project, . , .

<project-components> . IDE, "New | Project Component".

ModuleComponent. . <module-components> "New | Module Component".


, : JDOMExternalizable (, ) PersistentStateComponent.
PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
JDOMExternalizable, :
(.ipr), plugin.xml «workspace» – .iws; .iml .

:
– ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
:
– writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
getComponent() - . , , initComponent().


Intellij IDEA , IDEA.
, , . , . .

.
, , , . plugin.xml:
<extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

"interface" , . "beanClass" , @Attribute . , plugin.xml.
MyBeanClass1:
public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
MyExtPoint, "key" "implementationClass" .

:
«xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
, .

, ;
, : "interface", "implementation", – , ; "beanClass", , @Attribute .


(Actions)
Intellij IDEA (actions).
– , AnAction, actionPerformed() , .

, . . .
.


– , , getService() ServiceManager. Intellij IDEA , , .

, plugin.xml. .

, .. , , applicationService, projectService moduleService .

:
( , , ) ;
:
"serviceInterface" – ; "serviceImplementaion" – .


.
plugin.xml:
<extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
: , , .

: 1 , 2 , 3 , 4 , 5 , 6 , 7 .
, com.intellij.modules . :
<idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

plugin.xml, IDEA. plugin.xml , .
IntelliJ:
com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
:
com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
PhpStorm , PHP , : com.jetbrains.php .
. , Java , :
<depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
, , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

IntelliJ IDEA
– IDEA. . .


.
– jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
.IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
– :
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
Classes lib classpath.
– jar-, lib:
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


, IDEA . , IDEA .
-, , . , plugin.xml, depends . , . .


– . :
; ; .
IntelliJ IDEA.
Application getComponent(Class).

Project ( ). Project getComponent(Class).

, IDEA. Module.

, . , . , (, , ) .

, . getComponentName(). : < ><>< >.

, , ApplicationComponent. , , . , , IDEA , .

<application-components> plugin.xml.
IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
New Java Alt+Insert; New Application Component; New Application Component, OK.
IDEA , ApplicationComponent, plugin.xml, Module Tree View .

, ProjectComponent. Project, . , .

<project-components> . IDE, "New | Project Component".

ModuleComponent. . <module-components> "New | Module Component".


, : JDOMExternalizable (, ) PersistentStateComponent.
PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
JDOMExternalizable, :
(.ipr), plugin.xml «workspace» – .iws; .iml .

:
– ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
:
– writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
getComponent() - . , , initComponent().


Intellij IDEA , IDEA.
, , . , . .

.
, , , . plugin.xml:
<extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

"interface" , . "beanClass" , @Attribute . , plugin.xml.
MyBeanClass1:
public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
MyExtPoint, "key" "implementationClass" .

:
«xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
, .

, ;
, : "interface", "implementation", – , ; "beanClass", , @Attribute .


(Actions)
Intellij IDEA (actions).
– , AnAction, actionPerformed() , .

, . . .
.


– , , getService() ServiceManager. Intellij IDEA , , .

, plugin.xml. .

, .. , , applicationService, projectService moduleService .

:
( , , ) ;
:
"serviceInterface" – ; "serviceImplementaion" – .


.
plugin.xml:
<extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
: , , .

: 1 , 2 , 3 , 4 , 5 , 6 , 7 .
, com.intellij.modules . :
<idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

plugin.xml, IDEA. plugin.xml , .
IntelliJ:
com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
:
com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
PhpStorm , PHP , : com.jetbrains.php .
. , Java , :
<depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
, , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

IntelliJ IDEA
– IDEA. . .


.
– jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
.IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
– :
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
Classes lib classpath.
– jar-, lib:
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


, IDEA . , IDEA .
-, , . , plugin.xml, depends . , . .


– . :
; ; .
IntelliJ IDEA.
Application getComponent(Class).

Project ( ). Project getComponent(Class).

, IDEA. Module.

, . , . , (, , ) .

, . getComponentName(). : < ><>< >.

, , ApplicationComponent. , , . , , IDEA , .

<application-components> plugin.xml.
IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
New Java Alt+Insert; New Application Component; New Application Component, OK.
IDEA , ApplicationComponent, plugin.xml, Module Tree View .

, ProjectComponent. Project, . , .

<project-components> . IDE, "New | Project Component".

ModuleComponent. . <module-components> "New | Module Component".


, : JDOMExternalizable (, ) PersistentStateComponent.
PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
JDOMExternalizable, :
(.ipr), plugin.xml «workspace» – .iws; .iml .

:
– ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
:
– writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
getComponent() - . , , initComponent().


Intellij IDEA , IDEA.
, , . , . .

.
, , , . plugin.xml:
<extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

"interface" , . "beanClass" , @Attribute . , plugin.xml.
MyBeanClass1:
public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
MyExtPoint, "key" "implementationClass" .

:
«xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
, .

, ;
, : "interface", "implementation", – , ; "beanClass", , @Attribute .


(Actions)
Intellij IDEA (actions).
– , AnAction, actionPerformed() , .

, . . .
.


– , , getService() ServiceManager. Intellij IDEA , , .

, plugin.xml. .

, .. , , applicationService, projectService moduleService .

:
( , , ) ;
:
"serviceInterface" – ; "serviceImplementaion" – .


.
plugin.xml:
<extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
: , , .

: 1 , 2 , 3 , 4 , 5 , 6 , 7 .
, com.intellij.modules . :
<idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

plugin.xml, IDEA. plugin.xml , .
IntelliJ:
com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
:
com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
PhpStorm , PHP , : com.jetbrains.php .
. , Java , :
<depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
, , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

IntelliJ IDEA
– IDEA. . .


.
– jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
.IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
– :
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
Classes lib classpath.
– jar-, lib:
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


, IDEA . , IDEA .
-, , . , plugin.xml, depends . , . .


– . :
; ; .
IntelliJ IDEA.
Application getComponent(Class).

Project ( ). Project getComponent(Class).

, IDEA. Module.

, . , . , (, , ) .

, . getComponentName(). : < ><>< >.

, , ApplicationComponent. , , . , , IDEA , .

<application-components> plugin.xml.
IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
New Java Alt+Insert; New Application Component; New Application Component, OK.
IDEA , ApplicationComponent, plugin.xml, Module Tree View .

, ProjectComponent. Project, . , .

<project-components> . IDE, "New | Project Component".

ModuleComponent. . <module-components> "New | Module Component".


, : JDOMExternalizable (, ) PersistentStateComponent.
PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
JDOMExternalizable, :
(.ipr), plugin.xml «workspace» – .iws; .iml .

:
– ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
:
– writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
getComponent() - . , , initComponent().


Intellij IDEA , IDEA.
, , . , . .

.
, , , . plugin.xml:
<extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

"interface" , . "beanClass" , @Attribute . , plugin.xml.
MyBeanClass1:
public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
MyExtPoint, "key" "implementationClass" .

:
«xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
, .

, ;
, : "interface", "implementation", – , ; "beanClass", , @Attribute .


(Actions)
Intellij IDEA (actions).
– , AnAction, actionPerformed() , .

, . . .
.


– , , getService() ServiceManager. Intellij IDEA , , .

, plugin.xml. .

, .. , , applicationService, projectService moduleService .

:
( , , ) ;
:
"serviceInterface" – ; "serviceImplementaion" – .


.
plugin.xml:
<extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
: , , .

: 1 , 2 , 3 , 4 , 5 , 6 , 7 .
, com.intellij.modules . :
<idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

plugin.xml, IDEA. plugin.xml , .
IntelliJ:
com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
:
com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
PhpStorm , PHP , : com.jetbrains.php .
. , Java , :
<depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
, , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

IntelliJ IDEA
– IDEA. . .


.
– jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
.IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
– :
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
Classes lib classpath.
– jar-, lib:
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


, IDEA . , IDEA .
-, , . , plugin.xml, depends . , . .


– . :
; ; .
IntelliJ IDEA.
Application getComponent(Class).

Project ( ). Project getComponent(Class).

, IDEA. Module.

, . , . , (, , ) .

, . getComponentName(). : < ><>< >.

, , ApplicationComponent. , , . , , IDEA , .

<application-components> plugin.xml.
IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
New Java Alt+Insert; New Application Component; New Application Component, OK.
IDEA , ApplicationComponent, plugin.xml, Module Tree View .

, ProjectComponent. Project, . , .

<project-components> . IDE, "New | Project Component".

ModuleComponent. . <module-components> "New | Module Component".


, : JDOMExternalizable (, ) PersistentStateComponent.
PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
JDOMExternalizable, :
(.ipr), plugin.xml «workspace» – .iws; .iml .

:
– ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
:
– writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
getComponent() - . , , initComponent().


Intellij IDEA , IDEA.
, , . , . .

.
, , , . plugin.xml:
<extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

"interface" , . "beanClass" , @Attribute . , plugin.xml.
MyBeanClass1:
public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
MyExtPoint, "key" "implementationClass" .

:
«xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
, .

, ;
, : "interface", "implementation", – , ; "beanClass", , @Attribute .


(Actions)
Intellij IDEA (actions).
– , AnAction, actionPerformed() , .

, . . .
.


– , , getService() ServiceManager. Intellij IDEA , , .

, plugin.xml. .

, .. , , applicationService, projectService moduleService .

:
( , , ) ;
:
"serviceInterface" – ; "serviceImplementaion" – .


.
plugin.xml:
<extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
: , , .

: 1 , 2 , 3 , 4 , 5 , 6 , 7 .
, com.intellij.modules . :
<idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

plugin.xml, IDEA. plugin.xml , .
IntelliJ:
com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
:
com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
PhpStorm , PHP , : com.jetbrains.php .
. , Java , :
<depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
, , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

IntelliJ IDEA
– IDEA. . .


.
– jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
.IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
– :
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
Classes lib classpath.
– jar-, lib:
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


, IDEA . , IDEA .
-, , . , plugin.xml, depends . , . .


– . :
; ; .
IntelliJ IDEA.
Application getComponent(Class).

Project ( ). Project getComponent(Class).

, IDEA. Module.

, . , . , (, , ) .

, . getComponentName(). : < ><>< >.

, , ApplicationComponent. , , . , , IDEA , .

<application-components> plugin.xml.
IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
New Java Alt+Insert; New Application Component; New Application Component, OK.
IDEA , ApplicationComponent, plugin.xml, Module Tree View .

, ProjectComponent. Project, . , .

<project-components> . IDE, "New | Project Component".

ModuleComponent. . <module-components> "New | Module Component".


, : JDOMExternalizable (, ) PersistentStateComponent.
PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
JDOMExternalizable, :
(.ipr), plugin.xml «workspace» – .iws; .iml .

:
– ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
:
– writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
getComponent() - . , , initComponent().


Intellij IDEA , IDEA.
, , . , . .

.
, , , . plugin.xml:
<extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

"interface" , . "beanClass" , @Attribute . , plugin.xml.
MyBeanClass1:
public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
MyExtPoint, "key" "implementationClass" .

:
«xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
, .

, ;
, : "interface", "implementation", – , ; "beanClass", , @Attribute .


(Actions)
Intellij IDEA (actions).
– , AnAction, actionPerformed() , .

, . . .
.


– , , getService() ServiceManager. Intellij IDEA , , .

, plugin.xml. .

, .. , , applicationService, projectService moduleService .

:
( , , ) ;
:
"serviceInterface" – ; "serviceImplementaion" – .


.
plugin.xml:
<extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
: , , .

: 1 , 2 , 3 , 4 , 5 , 6 , 7 .

, com.intellij.modules . :
<idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

plugin.xml, IDEA. plugin.xml , .
IntelliJ:
com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
:
com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
PhpStorm , PHP , : com.jetbrains.php .
. , Java , :
<depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
, , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

IntelliJ IDEA
– IDEA. . .


.
– jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
.IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
– :
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
Classes lib classpath.
– jar-, lib:
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


, IDEA . , IDEA .
-, , . , plugin.xml, depends . , . .


– . :
; ; .
IntelliJ IDEA.
Application getComponent(Class).

Project ( ). Project getComponent(Class).

, IDEA. Module.

, . , . , (, , ) .

, . getComponentName(). : < ><>< >.

, , ApplicationComponent. , , . , , IDEA , .

<application-components> plugin.xml.
IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
New Java Alt+Insert; New Application Component; New Application Component, OK.
IDEA , ApplicationComponent, plugin.xml, Module Tree View .

, ProjectComponent. Project, . , .

<project-components> . IDE, "New | Project Component".

ModuleComponent. . <module-components> "New | Module Component".


, : JDOMExternalizable (, ) PersistentStateComponent.
PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
JDOMExternalizable, :
(.ipr), plugin.xml «workspace» – .iws; .iml .

:
– ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
:
– writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
getComponent() - . , , initComponent().


Intellij IDEA , IDEA.
, , . , . .

.
, , , . plugin.xml:
<extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

"interface" , . "beanClass" , @Attribute . , plugin.xml.
MyBeanClass1:
public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
MyExtPoint, "key" "implementationClass" .

:
«xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
, .

, ;
, : "interface", "implementation", – , ; "beanClass", , @Attribute .


(Actions)
Intellij IDEA (actions).
– , AnAction, actionPerformed() , .

, . . .
.


– , , getService() ServiceManager. Intellij IDEA , , .

, plugin.xml. .

, .. , , applicationService, projectService moduleService .

:
( , , ) ;
:
"serviceInterface" – ; "serviceImplementaion" – .


.
plugin.xml:
<extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
: , , .

: 1 , 2 , 3 , 4 , 5 , 6 , 7 .

, com.intellij.modules . :
<idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

plugin.xml, IDEA. plugin.xml , .
IntelliJ:
com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
:
com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
PhpStorm , PHP , : com.jetbrains.php .
. , Java , :
<depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
, , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

IntelliJ IDEA
– IDEA. . .


.
– jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
.IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
– :
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
Classes lib classpath.
– jar-, lib:
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


, IDEA . , IDEA .
-, , . , plugin.xml, depends . , . .


– . :
; ; .
IntelliJ IDEA.
Application getComponent(Class).

Project ( ). Project getComponent(Class).

, IDEA. Module.

, . , . , (, , ) .

, . getComponentName(). : < ><>< >.

, , ApplicationComponent. , , . , , IDEA , .

<application-components> plugin.xml.
IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
New Java Alt+Insert; New Application Component; New Application Component, OK.
IDEA , ApplicationComponent, plugin.xml, Module Tree View .

, ProjectComponent. Project, . , .

<project-components> . IDE, "New | Project Component".

ModuleComponent. . <module-components> "New | Module Component".


, : JDOMExternalizable (, ) PersistentStateComponent.
PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
JDOMExternalizable, :
(.ipr), plugin.xml «workspace» – .iws; .iml .

:
– ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
:
– writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
getComponent() - . , , initComponent().


Intellij IDEA , IDEA.
, , . , . .

.
, , , . plugin.xml:
<extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

"interface" , . "beanClass" , @Attribute . , plugin.xml.
MyBeanClass1:
public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
MyExtPoint, "key" "implementationClass" .

:
«xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
, .

, ;
, : "interface", "implementation", – , ; "beanClass", , @Attribute .


(Actions)
Intellij IDEA (actions).
– , AnAction, actionPerformed() , .

, . . .
.


– , , getService() ServiceManager. Intellij IDEA , , .

, plugin.xml. .

, .. , , applicationService, projectService moduleService .

:
( , , ) ;
:
"serviceInterface" – ; "serviceImplementaion" – .


.
plugin.xml:
<extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
: , , .

: 1 , 2 , 3 , 4 , 5 , 6 , 7 .
 ,     com.intellij.modules . : 
<idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

plugin.xml, IDEA. plugin.xml , .
IntelliJ:
com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
:
com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
PhpStorm , PHP , : com.jetbrains.php .
. , Java , :
<depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
, , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

IntelliJ IDEA
– IDEA. . .


.
– jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
.IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
– :
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
Classes lib classpath.
– jar-, lib:
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


, IDEA . , IDEA .
-, , . , plugin.xml, depends . , . .


– . :
; ; .
IntelliJ IDEA.
Application getComponent(Class).

Project ( ). Project getComponent(Class).

, IDEA. Module.

, . , . , (, , ) .

, . getComponentName(). : < ><>< >.

, , ApplicationComponent. , , . , , IDEA , .

<application-components> plugin.xml.
IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
New Java Alt+Insert; New Application Component; New Application Component, OK.
IDEA , ApplicationComponent, plugin.xml, Module Tree View .

, ProjectComponent. Project, . , .

<project-components> . IDE, "New | Project Component".

ModuleComponent. . <module-components> "New | Module Component".


, : JDOMExternalizable (, ) PersistentStateComponent.
PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
JDOMExternalizable, :
(.ipr), plugin.xml «workspace» – .iws; .iml .

:
– ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
:
– writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
getComponent() - . , , initComponent().


Intellij IDEA , IDEA.
, , . , . .

.
, , , . plugin.xml:
<extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

"interface" , . "beanClass" , @Attribute . , plugin.xml.
MyBeanClass1:
public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
MyExtPoint, "key" "implementationClass" .

:
«xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
, .

, ;
, : "interface", "implementation", – , ; "beanClass", , @Attribute .


(Actions)
Intellij IDEA (actions).
– , AnAction, actionPerformed() , .

, . . .
.


– , , getService() ServiceManager. Intellij IDEA , , .

, plugin.xml. .

, .. , , applicationService, projectService moduleService .

:
( , , ) ;
:
"serviceInterface" – ; "serviceImplementaion" – .


.
plugin.xml:
<extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
: , , .

: 1 , 2 , 3 , 4 , 5 , 6 , 7 .
, com.intellij.modules . :
<idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

plugin.xml, IDEA. plugin.xml , .
IntelliJ:
com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
:
com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
PhpStorm , PHP , : com.jetbrains.php .
. , Java , :
<depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
, , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

IntelliJ IDEA
– IDEA. . .


.
– jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
.IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
– :
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
Classes lib classpath.
– jar-, lib:
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


, IDEA . , IDEA .
-, , . , plugin.xml, depends . , . .


– . :
; ; .
IntelliJ IDEA.
Application getComponent(Class).

Project ( ). Project getComponent(Class).

, IDEA. Module.

, . , . , (, , ) .

, . getComponentName(). : < ><>< >.

, , ApplicationComponent. , , . , , IDEA , .

<application-components> plugin.xml.
IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
New Java Alt+Insert; New Application Component; New Application Component, OK.
IDEA , ApplicationComponent, plugin.xml, Module Tree View .

, ProjectComponent. Project, . , .

<project-components> . IDE, "New | Project Component".

ModuleComponent. . <module-components> "New | Module Component".


, : JDOMExternalizable (, ) PersistentStateComponent.
PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
JDOMExternalizable, :
(.ipr), plugin.xml «workspace» – .iws; .iml .

:
– ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
:
– writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
getComponent() - . , , initComponent().


Intellij IDEA , IDEA.
, , . , . .

.
, , , . plugin.xml:
<extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

"interface" , . "beanClass" , @Attribute . , plugin.xml.
MyBeanClass1:
public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
MyExtPoint, "key" "implementationClass" .

:
«xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
, .

, ;
, : "interface", "implementation", – , ; "beanClass", , @Attribute .


(Actions)
Intellij IDEA (actions).
– , AnAction, actionPerformed() , .

, . . .
.


– , , getService() ServiceManager. Intellij IDEA , , .

, plugin.xml. .

, .. , , applicationService, projectService moduleService .

:
( , , ) ;
:
"serviceInterface" – ; "serviceImplementaion" – .


.
plugin.xml:
<extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
: , , .

: 1 , 2 , 3 , 4 , 5 , 6 , 7 .
 ,     com.intellij.modules . : 
<idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

plugin.xml, IDEA. plugin.xml , .
IntelliJ:
com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
:
com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
PhpStorm , PHP , : com.jetbrains.php .
. , Java , :
<depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
, , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

IntelliJ IDEA
– IDEA. . .


.
– jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
.IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
– :
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
Classes lib classpath.
– jar-, lib:
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


, IDEA . , IDEA .
-, , . , plugin.xml, depends . , . .


– . :
; ; .
IntelliJ IDEA.
Application getComponent(Class).

Project ( ). Project getComponent(Class).

, IDEA. Module.

, . , . , (, , ) .

, . getComponentName(). : < ><>< >.

, , ApplicationComponent. , , . , , IDEA , .

<application-components> plugin.xml.
IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
New Java Alt+Insert; New Application Component; New Application Component, OK.
IDEA , ApplicationComponent, plugin.xml, Module Tree View .

, ProjectComponent. Project, . , .

<project-components> . IDE, "New | Project Component".

ModuleComponent. . <module-components> "New | Module Component".


, : JDOMExternalizable (, ) PersistentStateComponent.
PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
JDOMExternalizable, :
(.ipr), plugin.xml «workspace» – .iws; .iml .

:
– ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
:
– writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
getComponent() - . , , initComponent().


Intellij IDEA , IDEA.
, , . , . .

.
, , , . plugin.xml:
<extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

"interface" , . "beanClass" , @Attribute . , plugin.xml.
MyBeanClass1:
public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
MyExtPoint, "key" "implementationClass" .

:
«xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
, .

, ;
, : "interface", "implementation", – , ; "beanClass", , @Attribute .


(Actions)
Intellij IDEA (actions).
– , AnAction, actionPerformed() , .

, . . .
.


– , , getService() ServiceManager. Intellij IDEA , , .

, plugin.xml. .

, .. , , applicationService, projectService moduleService .

:
( , , ) ;
:
"serviceInterface" – ; "serviceImplementaion" – .


.
plugin.xml:
<extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
: , , .

: 1 , 2 , 3 , 4 , 5 , 6 , 7 .
, com.intellij.modules . :
<idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

plugin.xml, IDEA. plugin.xml , .
IntelliJ:
com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
:
com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
PhpStorm , PHP , : com.jetbrains.php .
. , Java , :
<depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
, , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

IntelliJ IDEA
– IDEA. . .


.
– jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
.IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
– :
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
Classes lib classpath.
– jar-, lib:
.IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


, IDEA . , IDEA .
-, , . , plugin.xml, depends . , . .


– . :
; ; .
IntelliJ IDEA.
Application getComponent(Class).

Project ( ). Project getComponent(Class).

, IDEA. Module.

, . , . , (, , ) .

, . getComponentName(). : < ><>< >.

, , ApplicationComponent. , , . , , IDEA , .

<application-components> plugin.xml.
IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
New Java Alt+Insert; New Application Component; New Application Component, OK.
IDEA , ApplicationComponent, plugin.xml, Module Tree View .

, ProjectComponent. Project, . , .

<project-components> . IDE, "New | Project Component".

ModuleComponent. . <module-components> "New | Module Component".


, : JDOMExternalizable (, ) PersistentStateComponent.
PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
JDOMExternalizable, :
(.ipr), plugin.xml «workspace» – .iws; .iml .

:
– ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
:
– writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
getComponent() - . , , initComponent().


Intellij IDEA , IDEA.
, , . , . .

.
, , , . plugin.xml:
<extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

"interface" , . "beanClass" , @Attribute . , plugin.xml.
MyBeanClass1:
public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
MyExtPoint, "key" "implementationClass" .

:
«xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
, .

, ;
, : "interface", "implementation", – , ; "beanClass", , @Attribute .


(Actions)
Intellij IDEA (actions).
– , AnAction, actionPerformed() , .

, . . .
.


– , , getService() ServiceManager. Intellij IDEA , , .

, plugin.xml. .

, .. , , applicationService, projectService moduleService .

:
( , , ) ;
:
"serviceInterface" – ; "serviceImplementaion" – .


.
plugin.xml:
<extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
: , , .

: 1 , 2 , 3 , 4 , 5 , 6 , 7 .
  1. , com.intellij.modules . :
    <idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

    plugin.xml, IDEA. plugin.xml , .
    IntelliJ:
    com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
    :
    com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
    PhpStorm , PHP , : com.jetbrains.php .
    . , Java , :
    <depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
    , , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

    IntelliJ IDEA
    – IDEA. . .


    .
    – jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
    .IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
    – :
    .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
    Classes lib classpath.
    – jar-, lib:
    .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


    , IDEA . , IDEA .
    -, , . , plugin.xml, depends . , . .


    – . :
    ; ; .
    IntelliJ IDEA.
    Application getComponent(Class).

    Project ( ). Project getComponent(Class).

    , IDEA. Module.

    , . , . , (, , ) .

    , . getComponentName(). : < ><>< >.

    , , ApplicationComponent. , , . , , IDEA , .

    <application-components> plugin.xml.
    IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
    New Java Alt+Insert; New Application Component; New Application Component, OK.
    IDEA , ApplicationComponent, plugin.xml, Module Tree View .

    , ProjectComponent. Project, . , .

    <project-components> . IDE, "New | Project Component".

    ModuleComponent. . <module-components> "New | Module Component".


    , : JDOMExternalizable (, ) PersistentStateComponent.
    PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
    JDOMExternalizable, :
    (.ipr), plugin.xml «workspace» – .iws; .iml .

    :
    – ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
    :
    – writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
    getComponent() - . , , initComponent().


    Intellij IDEA , IDEA.
    , , . , . .

    .
    , , , . plugin.xml:
    <extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

    "interface" , . "beanClass" , @Attribute . , plugin.xml.
    MyBeanClass1:
    public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
    MyExtPoint, "key" "implementationClass" .

    :
    «xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < > , .

    , ;
    , : "interface", "implementation", – , ; "beanClass", , @Attribute .


    (Actions)
    Intellij IDEA (actions).
    – , AnAction, actionPerformed() , .

    , . . .
    .


    – , , getService() ServiceManager. Intellij IDEA , , .

    , plugin.xml. .

    , .. , , applicationService, projectService moduleService .

    :
    ( , , ) ;
    :
    "serviceInterface" – ; "serviceImplementaion" – .


    .
    plugin.xml:
    <extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
    : , , .

    : 1 , 2 , 3 , 4 , 5 , 6 , 7 .
    • , com.intellij.modules . :
      <idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

      plugin.xml, IDEA. plugin.xml , .
      IntelliJ:
      com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
      :
      com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
      PhpStorm , PHP , : com.jetbrains.php .
      . , Java , :
      <depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
      , , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

      IntelliJ IDEA
      – IDEA. . .


      .
      – jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
      .IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
      – :
      .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
      Classes lib classpath.
      – jar-, lib:
      .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


      , IDEA . , IDEA .
      -, , . , plugin.xml, depends . , . .


      – . :
      ; ; .
      IntelliJ IDEA.
      Application getComponent(Class).

      Project ( ). Project getComponent(Class).

      , IDEA. Module.

      , . , . , (, , ) .

      , . getComponentName(). : < ><>< >.

      , , ApplicationComponent. , , . , , IDEA , .

      <application-components> plugin.xml.
      IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
      New Java Alt+Insert; New Application Component; New Application Component, OK.
      IDEA , ApplicationComponent, plugin.xml, Module Tree View .

      , ProjectComponent. Project, . , .

      <project-components> . IDE, "New | Project Component".

      ModuleComponent. . <module-components> "New | Module Component".


      , : JDOMExternalizable (, ) PersistentStateComponent.
      PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
      JDOMExternalizable, :
      (.ipr), plugin.xml «workspace» – .iws; .iml .

      :
      – ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
      :
      – writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
      getComponent() - . , , initComponent().


      Intellij IDEA , IDEA.
      , , . , . .

      .
      , , , . plugin.xml:
      <extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

      "interface" , . "beanClass" , @Attribute . , plugin.xml.
      MyBeanClass1:
      public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
      MyExtPoint, "key" "implementationClass" .

      :
      «xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < > , .

      , ;
      , : "interface", "implementation", – , ; "beanClass", , @Attribute .


      (Actions)
      Intellij IDEA (actions).
      – , AnAction, actionPerformed() , .

      , . . .
      .


      – , , getService() ServiceManager. Intellij IDEA , , .

      , plugin.xml. .

      , .. , , applicationService, projectService moduleService .

      :
      ( , , ) ;
      :
      "serviceInterface" – ; "serviceImplementaion" – .


      .
      plugin.xml:
      <extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
      : , , .

      : 1 , 2 , 3 , 4 , 5 , 6 , 7 .
    • , com.intellij.modules . :
      <idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

      plugin.xml, IDEA. plugin.xml , .
      IntelliJ:
      com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
      :
      com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
      PhpStorm , PHP , : com.jetbrains.php .
      . , Java , :
      <depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
      , , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

      IntelliJ IDEA
      – IDEA. . .


      .
      – jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
      .IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
      – :
      .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
      Classes lib classpath.
      – jar-, lib:
      .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


      , IDEA . , IDEA .
      -, , . , plugin.xml, depends . , . .


      – . :
      ; ; .
      IntelliJ IDEA.
      Application getComponent(Class).

      Project ( ). Project getComponent(Class).

      , IDEA. Module.

      , . , . , (, , ) .

      , . getComponentName(). : < ><>< >.

      , , ApplicationComponent. , , . , , IDEA , .

      <application-components> plugin.xml.
      IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
      New Java Alt+Insert; New Application Component; New Application Component, OK.
      IDEA , ApplicationComponent, plugin.xml, Module Tree View .

      , ProjectComponent. Project, . , .

      <project-components> . IDE, "New | Project Component".

      ModuleComponent. . <module-components> "New | Module Component".


      , : JDOMExternalizable (, ) PersistentStateComponent.
      PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
      JDOMExternalizable, :
      (.ipr), plugin.xml «workspace» – .iws; .iml .

      :
      – ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
      :
      – writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
      getComponent() - . , , initComponent().


      Intellij IDEA , IDEA.
      , , . , . .

      .
      , , , . plugin.xml:
      <extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

      "interface" , . "beanClass" , @Attribute . , plugin.xml.
      MyBeanClass1:
      public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
      MyExtPoint, "key" "implementationClass" .

      :
      «xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
      , .

      , ;
      , : "interface", "implementation", – , ; "beanClass", , @Attribute .


      (Actions)
      Intellij IDEA (actions).
      – , AnAction, actionPerformed() , .

      , . . .
      .


      – , , getService() ServiceManager. Intellij IDEA , , .

      , plugin.xml. .

      , .. , , applicationService, projectService moduleService .

      :
      ( , , ) ;
      :
      "serviceInterface" – ; "serviceImplementaion" – .


      .
      plugin.xml:
      <extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
      : , , .

      : 1 , 2 , 3 , 4 , 5 , 6 , 7 .
    , com.intellij.modules . :
    <idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

    plugin.xml, IDEA. plugin.xml , .
    IntelliJ:
    com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
    :
    com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
    PhpStorm , PHP , : com.jetbrains.php .
    . , Java , :
    <depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
    , , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

    IntelliJ IDEA
    – IDEA. . .


    .
    – jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
    .IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
    – :
    .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
    Classes lib classpath.
    – jar-, lib:
    .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


    , IDEA . , IDEA .
    -, , . , plugin.xml, depends . , . .


    – . :
    ; ; .
    IntelliJ IDEA.
    Application getComponent(Class).

    Project ( ). Project getComponent(Class).

    , IDEA. Module.

    , . , . , (, , ) .

    , . getComponentName(). : < ><>< >.

    , , ApplicationComponent. , , . , , IDEA , .

    <application-components> plugin.xml.
    IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
    New Java Alt+Insert; New Application Component; New Application Component, OK.
    IDEA , ApplicationComponent, plugin.xml, Module Tree View .

    , ProjectComponent. Project, . , .

    <project-components> . IDE, "New | Project Component".

    ModuleComponent. . <module-components> "New | Module Component".


    , : JDOMExternalizable (, ) PersistentStateComponent.
    PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
    JDOMExternalizable, :
    (.ipr), plugin.xml «workspace» – .iws; .iml .

    :
    – ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
    :
    – writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
    getComponent() - . , , initComponent().


    Intellij IDEA , IDEA.
    , , . , . .

    .
    , , , . plugin.xml:
    <extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

    "interface" , . "beanClass" , @Attribute . , plugin.xml.
    MyBeanClass1:
    public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
    MyExtPoint, "key" "implementationClass" .

    :
    «xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
    , .

    , ;
    , : "interface", "implementation", – , ; "beanClass", , @Attribute .


    (Actions)
    Intellij IDEA (actions).
    – , AnAction, actionPerformed() , .

    , . . .
    .


    – , , getService() ServiceManager. Intellij IDEA , , .

    , plugin.xml. .

    , .. , , applicationService, projectService moduleService .

    :
    ( , , ) ;
    :
    "serviceInterface" – ; "serviceImplementaion" – .


    .
    plugin.xml:
    <extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
    : , , .

    : 1 , 2 , 3 , 4 , 5 , 6 , 7 .
    • , com.intellij.modules . :
      <idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

      plugin.xml, IDEA. plugin.xml , .
      IntelliJ:
      com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
      :
      com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
      PhpStorm , PHP , : com.jetbrains.php .
      . , Java , :
      <depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
      , , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

      IntelliJ IDEA
      – IDEA. . .


      .
      – jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
      .IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
      – :
      .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
      Classes lib classpath.
      – jar-, lib:
      .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


      , IDEA . , IDEA .
      -, , . , plugin.xml, depends . , . .


      – . :
      ; ; .
      IntelliJ IDEA.
      Application getComponent(Class).

      Project ( ). Project getComponent(Class).

      , IDEA. Module.

      , . , . , (, , ) .

      , . getComponentName(). : < ><>< >.

      , , ApplicationComponent. , , . , , IDEA , .

      <application-components> plugin.xml.
      IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
      New Java Alt+Insert; New Application Component; New Application Component, OK.
      IDEA , ApplicationComponent, plugin.xml, Module Tree View .

      , ProjectComponent. Project, . , .

      <project-components> . IDE, "New | Project Component".

      ModuleComponent. . <module-components> "New | Module Component".


      , : JDOMExternalizable (, ) PersistentStateComponent.
      PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
      JDOMExternalizable, :
      (.ipr), plugin.xml «workspace» – .iws; .iml .

      :
      – ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
      :
      – writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
      getComponent() - . , , initComponent().


      Intellij IDEA , IDEA.
      , , . , . .

      .
      , , , . plugin.xml:
      <extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

      "interface" , . "beanClass" , @Attribute . , plugin.xml.
      MyBeanClass1:
      public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
      MyExtPoint, "key" "implementationClass" .

      :
      «xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
      , .

      , ;
      , : "interface", "implementation", – , ; "beanClass", , @Attribute .


      (Actions)
      Intellij IDEA (actions).
      – , AnAction, actionPerformed() , .

      , . . .
      .


      – , , getService() ServiceManager. Intellij IDEA , , .

      , plugin.xml. .

      , .. , , applicationService, projectService moduleService .

      :
      ( , , ) ;
      :
      "serviceInterface" – ; "serviceImplementaion" – .


      .
      plugin.xml:
      <extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
      : , , .

      : 1 , 2 , 3 , 4 , 5 , 6 , 7 .
    • , com.intellij.modules . :
      <idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

      plugin.xml, IDEA. plugin.xml , .
      IntelliJ:
      com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
      :
      com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
      PhpStorm , PHP , : com.jetbrains.php .
      . , Java , :
      <depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
      , , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

      IntelliJ IDEA
      – IDEA. . .


      .
      – jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
      .IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
      – :
      .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
      Classes lib classpath.
      – jar-, lib:
      .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


      , IDEA . , IDEA .
      -, , . , plugin.xml, depends . , . .


      – . :
      ; ; .
      IntelliJ IDEA.
      Application getComponent(Class).

      Project ( ). Project getComponent(Class).

      , IDEA. Module.

      , . , . , (, , ) .

      , . getComponentName(). : < ><>< >.

      , , ApplicationComponent. , , . , , IDEA , .

      <application-components> plugin.xml.
      IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
      New Java Alt+Insert; New Application Component; New Application Component, OK.
      IDEA , ApplicationComponent, plugin.xml, Module Tree View .

      , ProjectComponent. Project, . , .

      <project-components> . IDE, "New | Project Component".

      ModuleComponent. . <module-components> "New | Module Component".


      , : JDOMExternalizable (, ) PersistentStateComponent.
      PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
      JDOMExternalizable, :
      (.ipr), plugin.xml «workspace» – .iws; .iml .

      :
      – ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
      :
      – writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
      getComponent() - . , , initComponent().


      Intellij IDEA , IDEA.
      , , . , . .

      .
      , , , . plugin.xml:
      <extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

      "interface" , . "beanClass" , @Attribute . , plugin.xml.
      MyBeanClass1:
      public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
      MyExtPoint, "key" "implementationClass" .

      :
      «xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
      , .

      , ;
      , : "interface", "implementation", – , ; "beanClass", , @Attribute .


      (Actions)
      Intellij IDEA (actions).
      – , AnAction, actionPerformed() , .

      , . . .
      .


      – , , getService() ServiceManager. Intellij IDEA , , .

      , plugin.xml. .

      , .. , , applicationService, projectService moduleService .

      :
      ( , , ) ;
      :
      "serviceInterface" – ; "serviceImplementaion" – .


      .
      plugin.xml:
      <extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
      : , , .

      : 1 , 2 , 3 , 4 , 5 , 6 , 7 .
    , com.intellij.modules . :
    <idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

    plugin.xml, IDEA. plugin.xml , .
    IntelliJ:
    com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
    :
    com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
    PhpStorm , PHP , : com.jetbrains.php .
    . , Java , :
    <depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
    , , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

    IntelliJ IDEA
    – IDEA. . .


    .
    – jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
    .IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
    – :
    .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
    Classes lib classpath.
    – jar-, lib:
    .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


    , IDEA . , IDEA .
    -, , . , plugin.xml, depends . , . .


    – . :
    ; ; .
    IntelliJ IDEA.
    Application getComponent(Class).

    Project ( ). Project getComponent(Class).

    , IDEA. Module.

    , . , . , (, , ) .

    , . getComponentName(). : < ><>< >.

    , , ApplicationComponent. , , . , , IDEA , .

    <application-components> plugin.xml.
    IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
    New Java Alt+Insert; New Application Component; New Application Component, OK.
    IDEA , ApplicationComponent, plugin.xml, Module Tree View .

    , ProjectComponent. Project, . , .

    <project-components> . IDE, "New | Project Component".

    ModuleComponent. . <module-components> "New | Module Component".


    , : JDOMExternalizable (, ) PersistentStateComponent.
    PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
    JDOMExternalizable, :
    (.ipr), plugin.xml «workspace» – .iws; .iml .

    :
    – ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
    :
    – writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
    getComponent() - . , , initComponent().


    Intellij IDEA , IDEA.
    , , . , . .

    .
    , , , . plugin.xml:
    <extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

    "interface" , . "beanClass" , @Attribute . , plugin.xml.
    MyBeanClass1:
    public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
    MyExtPoint, "key" "implementationClass" .

    :
    «xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
    , .

    , ;
    , : "interface", "implementation", – , ; "beanClass", , @Attribute .


    (Actions)
    Intellij IDEA (actions).
    – , AnAction, actionPerformed() , .

    , . . .
    .


    – , , getService() ServiceManager. Intellij IDEA , , .

    , plugin.xml. .

    , .. , , applicationService, projectService moduleService .

    :
    ( , , ) ;
    :
    "serviceInterface" – ; "serviceImplementaion" – .


    .
    plugin.xml:
    <extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
    : , , .

    : 1 , 2 , 3 , 4 , 5 , 6 , 7 .

    , com.intellij.modules . :
    <idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

    plugin.xml, IDEA. plugin.xml , .
    IntelliJ:
    com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
    :
    com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
    PhpStorm , PHP , : com.jetbrains.php .
    . , Java , :
    <depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
    , , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

    IntelliJ IDEA
    – IDEA. . .


    .
    – jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
    .IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
    – :
    .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
    Classes lib classpath.
    – jar-, lib:
    .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


    , IDEA . , IDEA .
    -, , . , plugin.xml, depends . , . .


    – . :
    ; ; .
    IntelliJ IDEA.
    Application getComponent(Class).

    Project ( ). Project getComponent(Class).

    , IDEA. Module.

    , . , . , (, , ) .

    , . getComponentName(). : < ><>< >.

    , , ApplicationComponent. , , . , , IDEA , .

    <application-components> plugin.xml.
    IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
    New Java Alt+Insert; New Application Component; New Application Component, OK.
    IDEA , ApplicationComponent, plugin.xml, Module Tree View .

    , ProjectComponent. Project, . , .

    <project-components> . IDE, "New | Project Component".

    ModuleComponent. . <module-components> "New | Module Component".


    , : JDOMExternalizable (, ) PersistentStateComponent.
    PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
    JDOMExternalizable, :
    (.ipr), plugin.xml «workspace» – .iws; .iml .

    :
    – ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
    :
    – writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
    getComponent() - . , , initComponent().


    Intellij IDEA , IDEA.
    , , . , . .

    .
    , , , . plugin.xml:
    <extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

    "interface" , . "beanClass" , @Attribute . , plugin.xml.
    MyBeanClass1:
    public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
    MyExtPoint, "key" "implementationClass" .

    :
    «xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
    , .

    , ;
    , : "interface", "implementation", – , ; "beanClass", , @Attribute .


    (Actions)
    Intellij IDEA (actions).
    – , AnAction, actionPerformed() , .

    , . . .
    .


    – , , getService() ServiceManager. Intellij IDEA , , .

    , plugin.xml. .

    , .. , , applicationService, projectService moduleService .

    :
    ( , , ) ;
    :
    "serviceInterface" – ; "serviceImplementaion" – .


    .
    plugin.xml:
    <extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
    : , , .

    : 1 , 2 , 3 , 4 , 5 , 6 , 7 .

    , com.intellij.modules . :
    <idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

    plugin.xml, IDEA. plugin.xml , .
    IntelliJ:
    com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
    :
    com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
    PhpStorm , PHP , : com.jetbrains.php .
    . , Java , :
    <depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
    , , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

    IntelliJ IDEA
    – IDEA. . .


    .
    – jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
    .IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
    – :
    .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
    Classes lib classpath.
    – jar-, lib:
    .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


    , IDEA . , IDEA .
    -, , . , plugin.xml, depends . , . .


    – . :
    ; ; .
    IntelliJ IDEA.
    Application getComponent(Class).

    Project ( ). Project getComponent(Class).

    , IDEA. Module.

    , . , . , (, , ) .

    , . getComponentName(). : < ><>< >.

    , , ApplicationComponent. , , . , , IDEA , .

    <application-components> plugin.xml.
    IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
    New Java Alt+Insert; New Application Component; New Application Component, OK.
    IDEA , ApplicationComponent, plugin.xml, Module Tree View .

    , ProjectComponent. Project, . , .

    <project-components> . IDE, "New | Project Component".

    ModuleComponent. . <module-components> "New | Module Component".


    , : JDOMExternalizable (, ) PersistentStateComponent.
    PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
    JDOMExternalizable, :
    (.ipr), plugin.xml «workspace» – .iws; .iml .

    :
    – ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
    :
    – writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
    getComponent() - . , , initComponent().


    Intellij IDEA , IDEA.
    , , . , . .

    .
    , , , . plugin.xml:
    <extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

    "interface" , . "beanClass" , @Attribute . , plugin.xml.
    MyBeanClass1:
    public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
    MyExtPoint, "key" "implementationClass" .

    :
    «xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
    , .

    , ;
    , : "interface", "implementation", – , ; "beanClass", , @Attribute .


    (Actions)
    Intellij IDEA (actions).
    – , AnAction, actionPerformed() , .

    , . . .
    .


    – , , getService() ServiceManager. Intellij IDEA , , .

    , plugin.xml. .

    , .. , , applicationService, projectService moduleService .

    :
    ( , , ) ;
    :
    "serviceInterface" – ; "serviceImplementaion" – .


    .
    plugin.xml:
    <extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
    : , , .

    : 1 , 2 , 3 , 4 , 5 , 6 , 7 .

    , com.intellij.modules . :
    <idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

    plugin.xml, IDEA. plugin.xml , .
    IntelliJ:
    com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
    :
    com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
    PhpStorm , PHP , : com.jetbrains.php .
    . , Java , :
    <depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
    , , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

    IntelliJ IDEA
    – IDEA. . .


    .
    – jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
    .IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
    – :
    .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
    Classes lib classpath.
    – jar-, lib:
    .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


    , IDEA . , IDEA .
    -, , . , plugin.xml, depends . , . .


    – . :
    ; ; .
    IntelliJ IDEA.
    Application getComponent(Class).

    Project ( ). Project getComponent(Class).

    , IDEA. Module.

    , . , . , (, , ) .

    , . getComponentName(). : < ><>< >.

    , , ApplicationComponent. , , . , , IDEA , .

    <application-components> plugin.xml.
    IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
    New Java Alt+Insert; New Application Component; New Application Component, OK.
    IDEA , ApplicationComponent, plugin.xml, Module Tree View .

    , ProjectComponent. Project, . , .

    <project-components> . IDE, "New | Project Component".

    ModuleComponent. . <module-components> "New | Module Component".


    , : JDOMExternalizable (, ) PersistentStateComponent.
    PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
    JDOMExternalizable, :
    (.ipr), plugin.xml «workspace» – .iws; .iml .

    :
    – ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
    :
    – writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
    getComponent() - . , , initComponent().


    Intellij IDEA , IDEA.
    , , . , . .

    .
    , , , . plugin.xml:
    <extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

    "interface" , . "beanClass" , @Attribute . , plugin.xml.
    MyBeanClass1:
    public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
    MyExtPoint, "key" "implementationClass" .

    :
    «xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
    , .

    , ;
    , : "interface", "implementation", – , ; "beanClass", , @Attribute .


    (Actions)
    Intellij IDEA (actions).
    – , AnAction, actionPerformed() , .

    , . . .
    .


    – , , getService() ServiceManager. Intellij IDEA , , .

    , plugin.xml. .

    , .. , , applicationService, projectService moduleService .

    :
    ( , , ) ;
    :
    "serviceInterface" – ; "serviceImplementaion" – .


    .
    plugin.xml:
    <extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
    : , , .

    : 1 , 2 , 3 , 4 , 5 , 6 , 7 .

    , com.intellij.modules . :
    <idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

    plugin.xml, IDEA. plugin.xml , .
    IntelliJ:
    com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
    :
    com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
    PhpStorm , PHP , : com.jetbrains.php .
    . , Java , :
    <depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
    , , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

    IntelliJ IDEA
    – IDEA. . .


    .
    – jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
    .IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
    – :
    .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
    Classes lib classpath.
    – jar-, lib:
    .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


    , IDEA . , IDEA .
    -, , . , plugin.xml, depends . , . .


    – . :
    ; ; .
    IntelliJ IDEA.
    Application getComponent(Class).

    Project ( ). Project getComponent(Class).

    , IDEA. Module.

    , . , . , (, , ) .

    , . getComponentName(). : < ><>< >.

    , , ApplicationComponent. , , . , , IDEA , .

    <application-components> plugin.xml.
    IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
    New Java Alt+Insert; New Application Component; New Application Component, OK.
    IDEA , ApplicationComponent, plugin.xml, Module Tree View .

    , ProjectComponent. Project, . , .

    <project-components> . IDE, "New | Project Component".

    ModuleComponent. . <module-components> "New | Module Component".


    , : JDOMExternalizable (, ) PersistentStateComponent.
    PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
    JDOMExternalizable, :
    (.ipr), plugin.xml «workspace» – .iws; .iml .

    :
    – ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
    :
    – writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
    getComponent() - . , , initComponent().


    Intellij IDEA , IDEA.
    , , . , . .

    .
    , , , . plugin.xml:
    <extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

    "interface" , . "beanClass" , @Attribute . , plugin.xml.
    MyBeanClass1:
    public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
    MyExtPoint, "key" "implementationClass" .

    :
    «xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
    , .

    , ;
    , : "interface", "implementation", – , ; "beanClass", , @Attribute .


    (Actions)
    Intellij IDEA (actions).
    – , AnAction, actionPerformed() , .

    , . . .
    .


    – , , getService() ServiceManager. Intellij IDEA , , .

    , plugin.xml. .

    , .. , , applicationService, projectService moduleService .

    :
    ( , , ) ;
    :
    "serviceInterface" – ; "serviceImplementaion" – .


    .
    plugin.xml:
    <extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
    : , , .

    : 1 , 2 , 3 , 4 , 5 , 6 , 7 .
    • , com.intellij.modules . :
      <idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

      plugin.xml, IDEA. plugin.xml , .
      IntelliJ:
      com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
      :
      com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
      PhpStorm , PHP , : com.jetbrains.php .
      . , Java , :
      <depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
      , , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

      IntelliJ IDEA
      – IDEA. . .


      .
      – jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
      .IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
      – :
      .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
      Classes lib classpath.
      – jar-, lib:
      .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


      , IDEA . , IDEA .
      -, , . , plugin.xml, depends . , . .


      – . :
      ; ; .
      IntelliJ IDEA.
      Application getComponent(Class).

      Project ( ). Project getComponent(Class).

      , IDEA. Module.

      , . , . , (, , ) .

      , . getComponentName(). : < ><>< >.

      , , ApplicationComponent. , , . , , IDEA , .

      <application-components> plugin.xml.
      IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
      New Java Alt+Insert; New Application Component; New Application Component, OK.
      IDEA , ApplicationComponent, plugin.xml, Module Tree View .

      , ProjectComponent. Project, . , .

      <project-components> . IDE, "New | Project Component".

      ModuleComponent. . <module-components> "New | Module Component".


      , : JDOMExternalizable (, ) PersistentStateComponent.
      PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
      JDOMExternalizable, :
      (.ipr), plugin.xml «workspace» – .iws; .iml .

      :
      – ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
      :
      – writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
      getComponent() - . , , initComponent().


      Intellij IDEA , IDEA.
      , , . , . .

      .
      , , , . plugin.xml:
      <extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

      "interface" , . "beanClass" , @Attribute . , plugin.xml.
      MyBeanClass1:
      public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
      MyExtPoint, "key" "implementationClass" .

      :
      «xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
      , .

      , ;
      , : "interface", "implementation", – , ; "beanClass", , @Attribute .


      (Actions)
      Intellij IDEA (actions).
      – , AnAction, actionPerformed() , .

      , . . .
      .


      – , , getService() ServiceManager. Intellij IDEA , , .

      , plugin.xml. .

      , .. , , applicationService, projectService moduleService .

      :
      ( , , ) ;
      :
      "serviceInterface" – ; "serviceImplementaion" – .


      .
      plugin.xml:
      <extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
      : , , .

      : 1 , 2 , 3 , 4 , 5 , 6 , 7 .
      • , com.intellij.modules . :
        <idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

        plugin.xml, IDEA. plugin.xml , .
        IntelliJ:
        com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
        :
        com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
        PhpStorm , PHP , : com.jetbrains.php .
        . , Java , :
        <depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
        , , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

        IntelliJ IDEA
        – IDEA. . .


        .
        – jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
        .IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
        – :
        .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
        Classes lib classpath.
        – jar-, lib:
        .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


        , IDEA . , IDEA .
        -, , . , plugin.xml, depends . , . .


        – . :
        ; ; .
        IntelliJ IDEA.
        Application getComponent(Class).

        Project ( ). Project getComponent(Class).

        , IDEA. Module.

        , . , . , (, , ) .

        , . getComponentName(). : < ><>< >.

        , , ApplicationComponent. , , . , , IDEA , .

        <application-components> plugin.xml.
        IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
        New Java Alt+Insert; New Application Component; New Application Component, OK.
        IDEA , ApplicationComponent, plugin.xml, Module Tree View .

        , ProjectComponent. Project, . , .

        <project-components> . IDE, "New | Project Component".

        ModuleComponent. . <module-components> "New | Module Component".


        , : JDOMExternalizable (, ) PersistentStateComponent.
        PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
        JDOMExternalizable, :
        (.ipr), plugin.xml «workspace» – .iws; .iml .

        :
        – ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
        :
        – writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
        getComponent() - . , , initComponent().


        Intellij IDEA , IDEA.
        , , . , . .

        .
        , , , . plugin.xml:
        <extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

        "interface" , . "beanClass" , @Attribute . , plugin.xml.
        MyBeanClass1:
        public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
        MyExtPoint, "key" "implementationClass" .

        :
        «xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
        , .

        , ;
        , : "interface", "implementation", – , ; "beanClass", , @Attribute .


        (Actions)
        Intellij IDEA (actions).
        – , AnAction, actionPerformed() , .

        , . . .
        .


        – , , getService() ServiceManager. Intellij IDEA , , .

        , plugin.xml. .

        , .. , , applicationService, projectService moduleService .

        :
        ( , , ) ;
        :
        "serviceInterface" – ; "serviceImplementaion" – .


        .
        plugin.xml:
        <extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
        : , , .

        : 1 , 2 , 3 , 4 , 5 , 6 , 7 .
      • , com.intellij.modules . :
        <idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

        plugin.xml, IDEA. plugin.xml , .
        IntelliJ:
        com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
        :
        com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
        PhpStorm , PHP , : com.jetbrains.php .
        . , Java , :
        <depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
        , , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

        IntelliJ IDEA
        – IDEA. . .


        .
        – jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
        .IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
        – :
        .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
        Classes lib classpath.
        – jar-, lib:
        .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


        , IDEA . , IDEA .
        -, , . , plugin.xml, depends . , . .


        – . :
        ; ; .
        IntelliJ IDEA.
        Application getComponent(Class).

        Project ( ). Project getComponent(Class).

        , IDEA. Module.

        , . , . , (, , ) .

        , . getComponentName(). : < ><>< >.

        , , ApplicationComponent. , , . , , IDEA , .

        <application-components> plugin.xml.
        IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
        New Java Alt+Insert; New Application Component; New Application Component, OK.
        IDEA , ApplicationComponent, plugin.xml, Module Tree View .

        , ProjectComponent. Project, . , .

        <project-components> . IDE, "New | Project Component".

        ModuleComponent. . <module-components> "New | Module Component".


        , : JDOMExternalizable (, ) PersistentStateComponent.
        PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
        JDOMExternalizable, :
        (.ipr), plugin.xml «workspace» – .iws; .iml .

        :
        – ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
        :
        – writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
        getComponent() - . , , initComponent().


        Intellij IDEA , IDEA.
        , , . , . .

        .
        , , , . plugin.xml:
        <extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

        "interface" , . "beanClass" , @Attribute . , plugin.xml.
        MyBeanClass1:
        public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
        MyExtPoint, "key" "implementationClass" .

        :
        «xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
        , .

        , ;
        , : "interface", "implementation", – , ; "beanClass", , @Attribute .


        (Actions)
        Intellij IDEA (actions).
        – , AnAction, actionPerformed() , .

        , . . .
        .


        – , , getService() ServiceManager. Intellij IDEA , , .

        , plugin.xml. .

        , .. , , applicationService, projectService moduleService .

        :
        ( , , ) ;
        :
        "serviceInterface" – ; "serviceImplementaion" – .


        .
        plugin.xml:
        <extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
        : , , .

        : 1 , 2 , 3 , 4 , 5 , 6 , 7 .
      , com.intellij.modules . :
      <idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

      plugin.xml, IDEA. plugin.xml , .
      IntelliJ:
      com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
      :
      com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
      PhpStorm , PHP , : com.jetbrains.php .
      . , Java , :
      <depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
      , , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

      IntelliJ IDEA
      – IDEA. . .


      .
      – jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
      .IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
      – :
      .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
      Classes lib classpath.
      – jar-, lib:
      .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


      , IDEA . , IDEA .
      -, , . , plugin.xml, depends . , . .


      – . :
      ; ; .
      IntelliJ IDEA.
      Application getComponent(Class).

      Project ( ). Project getComponent(Class).

      , IDEA. Module.

      , . , . , (, , ) .

      , . getComponentName(). : < ><>< >.

      , , ApplicationComponent. , , . , , IDEA , .

      <application-components> plugin.xml.
      IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
      New Java Alt+Insert; New Application Component; New Application Component, OK.
      IDEA , ApplicationComponent, plugin.xml, Module Tree View .

      , ProjectComponent. Project, . , .

      <project-components> . IDE, "New | Project Component".

      ModuleComponent. . <module-components> "New | Module Component".


      , : JDOMExternalizable (, ) PersistentStateComponent.
      PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
      JDOMExternalizable, :
      (.ipr), plugin.xml «workspace» – .iws; .iml .

      :
      – ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
      :
      – writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
      getComponent() - . , , initComponent().


      Intellij IDEA , IDEA.
      , , . , . .

      .
      , , , . plugin.xml:
      <extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

      "interface" , . "beanClass" , @Attribute . , plugin.xml.
      MyBeanClass1:
      public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
      MyExtPoint, "key" "implementationClass" .

      :
      «xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
      , .

      , ;
      , : "interface", "implementation", – , ; "beanClass", , @Attribute .


      (Actions)
      Intellij IDEA (actions).
      – , AnAction, actionPerformed() , .

      , . . .
      .


      – , , getService() ServiceManager. Intellij IDEA , , .

      , plugin.xml. .

      , .. , , applicationService, projectService moduleService .

      :
      ( , , ) ;
      :
      "serviceInterface" – ; "serviceImplementaion" – .


      .
      plugin.xml:
      <extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
      : , , .

      : 1 , 2 , 3 , 4 , 5 , 6 , 7 .
       ,     com.intellij.modules . : 
      <idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

      plugin.xml, IDEA. plugin.xml , .
      IntelliJ:
      com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
      :
      com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
      PhpStorm , PHP , : com.jetbrains.php .
      . , Java , :
      <depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
      , , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

      IntelliJ IDEA
      – IDEA. . .


      .
      – jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
      .IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
      – :
      .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
      Classes lib classpath.
      – jar-, lib:
      .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


      , IDEA . , IDEA .
      -, , . , plugin.xml, depends . , . .


      – . :
      ; ; .
      IntelliJ IDEA.
      Application getComponent(Class).

      Project ( ). Project getComponent(Class).

      , IDEA. Module.

      , . , . , (, , ) .

      , . getComponentName(). : < ><>< >.

      , , ApplicationComponent. , , . , , IDEA , .

      <application-components> plugin.xml.
      IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
      New Java Alt+Insert; New Application Component; New Application Component, OK.
      IDEA , ApplicationComponent, plugin.xml, Module Tree View .

      , ProjectComponent. Project, . , .

      <project-components> . IDE, "New | Project Component".

      ModuleComponent. . <module-components> "New | Module Component".


      , : JDOMExternalizable (, ) PersistentStateComponent.
      PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
      JDOMExternalizable, :
      (.ipr), plugin.xml «workspace» – .iws; .iml .

      :
      – ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
      :
      – writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
      getComponent() - . , , initComponent().


      Intellij IDEA , IDEA.
      , , . , . .

      .
      , , , . plugin.xml:
      <extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

      "interface" , . "beanClass" , @Attribute . , plugin.xml.
      MyBeanClass1:
      public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
      MyExtPoint, "key" "implementationClass" .

      :
      «xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
      , .

      , ;
      , : "interface", "implementation", – , ; "beanClass", , @Attribute .


      (Actions)
      Intellij IDEA (actions).
      – , AnAction, actionPerformed() , .

      , . . .
      .


      – , , getService() ServiceManager. Intellij IDEA , , .

      , plugin.xml. .

      , .. , , applicationService, projectService moduleService .

      :
      ( , , ) ;
      :
      "serviceInterface" – ; "serviceImplementaion" – .


      .
      plugin.xml:
      <extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
      : , , .

      : 1 , 2 , 3 , 4 , 5 , 6 , 7 .
      , com.intellij.modules . :
      <idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

      plugin.xml, IDEA. plugin.xml , .
      IntelliJ:
      com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
      :
      com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
      PhpStorm , PHP , : com.jetbrains.php .
      . , Java , :
      <depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
      , , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

      IntelliJ IDEA
      – IDEA. . .


      .
      – jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
      .IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
      – :
      .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
      Classes lib classpath.
      – jar-, lib:
      .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


      , IDEA . , IDEA .
      -, , . , plugin.xml, depends . , . .


      – . :
      ; ; .
      IntelliJ IDEA.
      Application getComponent(Class).

      Project ( ). Project getComponent(Class).

      , IDEA. Module.

      , . , . , (, , ) .

      , . getComponentName(). : < ><>< >.

      , , ApplicationComponent. , , . , , IDEA , .

      <application-components> plugin.xml.
      IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
      New Java Alt+Insert; New Application Component; New Application Component, OK.
      IDEA , ApplicationComponent, plugin.xml, Module Tree View .

      , ProjectComponent. Project, . , .

      <project-components> . IDE, "New | Project Component".

      ModuleComponent. . <module-components> "New | Module Component".


      , : JDOMExternalizable (, ) PersistentStateComponent.
      PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
      JDOMExternalizable, :
      (.ipr), plugin.xml «workspace» – .iws; .iml .

      :
      – ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
      :
      – writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
      getComponent() - . , , initComponent().


      Intellij IDEA , IDEA.
      , , . , . .

      .
      , , , . plugin.xml:
      <extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

      "interface" , . "beanClass" , @Attribute . , plugin.xml.
      MyBeanClass1:
      public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
      MyExtPoint, "key" "implementationClass" .

      :
      «xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
      , .

      , ;
      , : "interface", "implementation", – , ; "beanClass", , @Attribute .


      (Actions)
      Intellij IDEA (actions).
      – , AnAction, actionPerformed() , .

      , . . .
      .


      – , , getService() ServiceManager. Intellij IDEA , , .

      , plugin.xml. .

      , .. , , applicationService, projectService moduleService .

      :
      ( , , ) ;
      :
      "serviceInterface" – ; "serviceImplementaion" – .


      .
      plugin.xml:
      <extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
      : , , .

      : 1 , 2 , 3 , 4 , 5 , 6 , 7 .
      , com.intellij.modules . :
      <idea-plugin version="2"> ... <depends>com.intellij.modules.lang</depends> ... </idea-plugin>

      plugin.xml, IDEA. plugin.xml , .
      IntelliJ:
      com.intellij.modules.platform; com.intellij.modules.lang; com.intellij.modules.vcs; com.intellij.modules.xml; com.intellij.modules.xdebugger.
      :
      com.intellij.modules.java – IntelliJ IDEA; com.intellij.modules.ruby – RubyMine; com.intellij.modules.python – PyCharm; com.intellij.modules.objc – AppCode.
      PhpStorm , PHP , : com.jetbrains.php .
      . , Java , :
      <depends optional="true" config-file="my-java-features.xml">com.intellij.modules.java</depends>
      , , API IntelliJ IDEA. , SDK RubyMine PyCharm, SDK .

      IntelliJ IDEA
      – IDEA. . .


      .
      – jar-, plugins. (META-INF/plugin.xml) , . , , , IDE, , , .
      .IntelliJIDEAx0 plugins sample.jar/ com/foo/..... ... ... META-INF plugin.xml
      – :
      .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar classes com/foo/..... ... ... META-INF plugin.xml
      Classes lib classpath.
      – jar-, lib:
      .IntelliJIDEAx0 plugins Sample lib libfoo.jar libbar.jar Sample.jar/ com/foo/..... ... ... META-INF plugin.xml


      , IDEA . , IDEA .
      -, , . , plugin.xml, depends . , . .


      – . :
      ; ; .
      IntelliJ IDEA.
      Application getComponent(Class).

      Project ( ). Project getComponent(Class).

      , IDEA. Module.

      , . , . , (, , ) .

      , . getComponentName(). : < ><>< >.

      , , ApplicationComponent. , , . , , IDEA , .

      <application-components> plugin.xml.
      IntelliJ IDEA , . IDEA <application-component> plugin.xml. :
      New Java Alt+Insert; New Application Component; New Application Component, OK.
      IDEA , ApplicationComponent, plugin.xml, Module Tree View .

      , ProjectComponent. Project, . , .

      <project-components> . IDE, "New | Project Component".

      ModuleComponent. . <module-components> "New | Module Component".


      , : JDOMExternalizable (, ) PersistentStateComponent.
      PersistentStateComponent, XML , @State @Storage (-, < >.xml ).
      JDOMExternalizable, :
      (.ipr), plugin.xml «workspace» – .iws; .iml .

      :
      – ; – initComponent ( ApplicationComponent); – readExternal ( JDOMExternalizable) loadState ( PersistentStateComponent -); – moduleAdded ( ModuleComponent); – projectOpened ( ProjectComponent).
      :
      – writeExternal ( JDOMExternalizable) getState ( PersistentStateComponent); – disposeComponent.
      getComponent() - . , , initComponent().


      Intellij IDEA , IDEA.
      , , . , . .

      .
      , , , . plugin.xml:
      <extensionPoints> <extensionPoint name="MyExtensionPoint1" beanClass="MyPlugin.MyBeanClass1"> <extensionPoint name="MyExtensionPoint2 interface="MyPlugin.MyInterface"> </extensionPoints>

      "interface" , . "beanClass" , @Attribute . , plugin.xml.
      MyBeanClass1:
      public class MyBeanClass1 extends AbstractExtensionPointBean { @Attribute("key") public String key; @Attribute("implementationClass") public String implementationClass; public String getKey() { return key; } public String getClass() { return implementationClass; } }
      MyExtPoint, "key" "implementationClass" .

      :
      «xmlns» () «defaultExtensionNs» : "com.intellij", IDEA; < >
      , .

      , ;
      , : "interface", "implementation", – , ; "beanClass", , @Attribute .


      (Actions)
      Intellij IDEA (actions).
      – , AnAction, actionPerformed() , .

      , . . .
      .


      – , , getService() ServiceManager. Intellij IDEA , , .

      , plugin.xml. .

      , .. , , applicationService, projectService moduleService .

      :
      ( , , ) ;
      :
      "serviceInterface" – ; "serviceImplementaion" – .


      .
      plugin.xml:
      <extensions defaultExtensionNs="com.intellij"> <!-- --> <applicationService serviceInterface="Mypackage.MyServiceInterfaceClass" serviceImplementation="Mypackage.MyServiceImplClass"> </applicationService> <!-- --> <projectService serviceInterface="Mypackage.MyProjectServiceImplClass" serviceImplementation="Mypackage.MyProjectServiceImplClass"> </projectService> </extensions>
      : , , .

      : 1 , 2 , 3 , 4 , 5 , 6 , 7 .

Source: https://habr.com/ru/post/187106/


All Articles