हाल ही में, मैंने IntelliJ IDEA के लिए प्लगइन्स के विकास पर पर्याप्त सामग्री जमा की है, जिसे मैं हाइब्रिडोसिटी के साथ साझा करने जा रहा हूं।
विकास पर्यावरण और आधारभूत संरचना
इससे पहले कि आप एक प्लगइन प्रोग्रामिंग शुरू करें, यह विकास के पर्यावरण उपकरण, समर्थित कार्यों और उनके कार्यान्वयन पर विचार करने के लायक है, और निश्चित रूप से, प्लगइन्स को विकसित करने के लिए आवश्यक आईडीई सेटअप।
Intellij IDEA का कोई भी आधुनिक संस्करण प्लग-इन विकास के लिए उपयुक्त है - इसमें पहले से ही आवश्यक उपकरणों का एक पूरा सेट शामिल है।
अपने विकास के माहौल को स्थापित करने के लिए, आपको कई कदम उठाने होंगे:
- Intellij IDEA सामुदायिक संस्करण के संगत संस्करण के लिए स्रोत कोड डाउनलोड करें;
- "Intellij Platform Plugin SDK" प्रकार का SDK बनाएँ (नीचे दिए गए चित्र में) और स्थापित कम्युनिटी एडिशन का पथ निर्दिष्ट करें (आप अंतिम संस्करण का उपयोग कर सकते हैं, लेकिन आंतरिक API के कार्यों को डीबग करना केवल CE में काम करता है);
- एसडीके सेटिंग्स में, सोर्सपैथ पेज पर, आपको चरण 1 में डाउनलोड किए गए स्रोत कोड के लिए पथ निर्दिष्ट करना होगा;
- "प्लेटफ़ॉर्म प्लगइन" प्रकार के साथ एक नया मॉड्यूल बनाएं और इसे पहले बनाए गए एसडीके को असाइन करें।

फिर आप एक नियमित जावा प्रोजेक्ट के रूप में प्लगइन को विकसित करना शुरू कर सकते हैं, लेकिन आंतरिक एपीआई के स्रोत कोड को देखने और डीबगर में इसके निष्पादन का पता लगाने की अतिरिक्त क्षमता के साथ।
विधानसभा संख्या
ये एकीकृत वातावरण द्वारा उपयोग किए जाने वाले समर्थित संस्करणों की सीमा पर प्रतिबंध हैं, यह निर्धारित करने के लिए कि कोई विशेष प्लगइन सही ढंग से काम कर सकता है या नहीं। स्टार्ट और एंड बिल्ड बिल्ड नंबरों को plugin.xml फ़ाइल, साथ ही अन्य मेटा-इंफॉर्मेशन में दर्शाया गया है।
इंटेलीज आईडीईए 9 के साथ शुरुआत करते हुए, समग्र बिल्ड नंबरिंग का उपयोग किया जाता है: उदाहरण के लिए, IU-90.94। इस संख्या में निम्नलिखित भाग होते हैं:
- उत्पाद पहचानकर्ता (IDEA समुदाय के लिए IC, IDEA अल्टीमेट के लिए IU, RubyMine के लिए RM और PyCharm के लिए PY);
- शाखा संख्या;
- इस सूत्र में संख्या बनाएँ।
हर बार इंटेलीज प्लेटफॉर्म पर आधारित उत्पादों में से एक की अगली रिलीज शाखा बनाई जाती है, शाखा संख्या 1 से बढ़ जाती है, और ट्रंक में संख्या 2 से बढ़ जाती है, इसलिए अस्थिर बिल्ड में एक समान संख्या होती है, और स्थिर लोगों की विषम संख्या होती है।
कंपोजिट बिल्ड नंबर्स का उपयोग प्लगइन -xml फ़ाइल में से-बिल्ड और जब तक बिल्ड टैग में किया जा सकता है। आमतौर पर, उत्पाद पहचानकर्ता केवल शाखा और बिल्ड नंबर का उपयोग करके छोड़ा जाता है:
<idea-version since-build="94.539"/>
IntelliJ मंच प्लगइन संगतता
सभी IntelliJ प्लेटफ़ॉर्म-आधारित उत्पाद (IntelliJ IDEA, RubyMine, WebStorm, PhpStorm, PyCharm, और AppCode) एक सामान्य अंतर्निहित प्लेटफ़ॉर्म API साझा करते हैं। इस प्रकार, प्लगइन्स जो किसी विशिष्ट जावा कार्यक्षमता का उपयोग नहीं करते हैं उन्हें अन्य उत्पादों के साथ संगत के रूप में चिह्नित किया जा सकता है, न कि केवल आईडीईए के साथ। आप plugin.xml फ़ाइल में मॉड्यूल निर्भरता को परिभाषित करके ऐसा कर सकते हैं।
आश्रितों को टैग के अंदर रखा जाता है।
, 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 .
, 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 .
, 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 .
, 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 .