|
|
| Changed: |
< < |
%META:TOPICPARENT{name="PlusPlugin"}%
Development of PlusPlugin?
| > > |
%META:TOPICPARENT{name="PlusLibrary"}%
|
| Added: |
> > |
%META:TOPICMOVED{by="AlexeyEfimov" date="1091948848" from="Main.PlusPluginDev" to="Main.PlusLibraryDev"}% |
|
|
| Deleted: |
< < |
FAQ
|
| Changed: |
< < |
What is PLUS?
- PLUS is a Plugin Light Utility Services. It provide to plugin developers
all common "little services", such as "reading XML descriptor of my plugin", localizing string by unified localizer system, "about my plugin" authomatical service etc.
- I have more that one plugin, and forced to clone my code. I think, that's no good
- Yes, here list of them:
- org.intellij.plus.services.PluginDescriptorService, the service for reading XML descriptor of plugin. For example if you need to get plugin name or version from plugin.xml of your plugin. Using this service you can get all information stored in plugin.xml. Also you can print initialization and disposition messages in log, when your plugin initialized and disposed.
- org.intellij.plus.services.AboutPluginService, the service for show JOptionPane for "About plugin" action. This service do it automaticaly.
- Yes you can write your own services as IDEA plugin, and register it in services repository of ServiceManager class.
How much classes in API i must learn to understand it?
- Yes, first you must extends Service interface by your ouw:
package org.intellij.plus.services;
import org.intellij.plus.Service;
public interface Sample extends Service {
public void doSomethig();
}
- Next, you must implement it:
package org.intellij.plus.services.impl;
import org.intellij.plus.AbstractService;
import org.intellij.plus.services.Sample;
class SampleImpl extends AbstractService implements Sample {
private static final String SERVICE_NAME = "Sample";
public void doSomethig() {
System.out.println("Hello World!");
}
public String getServiceName() {
return SERVICE_NAME;
}
}
- Go to plugin.xml and add application component:
<application-components>
<!-- Sample service -->
<component>
<interface-class>org.intellij.plus.services.Sample</interface-class>
<implementation-class>org.intellij.plus.services.impl.SampleImpl</implementation-class>
</component>
</application-components>
- Deploy plugin into IDEA and you can use your service from all your plugins:
Sample sample = ServiceManager.getService(Sample.class);
sample.doSomething();
- This is base interface for building your services. It extends
ApplicaitonComponent and have only one method - getServiceName. To implement your services you must extends this interface and add methods to your interface.
- Base abstract implementation of Service. This class perform service registration in ServiceManager class.
- This is main manager for Services. You can use ServiceManager for new Service registration, unregistration and getting registred Service. Also you can attach ServiceManagerListener, to listen registration and unregistration events.
- This is listener interface for listen two events - the new Service registered and then existing registered Service is unregistered.
-- AlexeyEfimov - 05 Mar 2004
| > > |
-- AlexeyEfimov - 08 Mar 2004 |
|
|
| Added: |
> > |
%META:TOPICINFO{author="AlexeyEfimov" date="1078483560" format="1.0" version="1.1"}%
%META:TOPICPARENT{name="PlusPlugin"}%
Development of PlusPlugin?
FAQ
What is PLUS?
- PLUS is a Plugin Light Utility Services. It provide to plugin developers
all common "little services", such as "reading XML descriptor of my plugin", localizing string by unified localizer system, "about my plugin" authomatical service etc.
- I have more that one plugin, and forced to clone my code. I think, that's no good
- Yes, here list of them:
- org.intellij.plus.services.PluginDescriptorService, the service for reading XML descriptor of plugin. For example if you need to get plugin name or version from plugin.xml of your plugin. Using this service you can get all information stored in plugin.xml. Also you can print initialization and disposition messages in log, when your plugin initialized and disposed.
- org.intellij.plus.services.AboutPluginService, the service for show JOptionPane for "About plugin" action. This service do it automaticaly.
- Yes you can write your own services as IDEA plugin, and register it in services repository of ServiceManager class.
How much classes in API i must learn to understand it?
- Yes, first you must extends Service interface by your ouw:
package org.intellij.plus.services;
import org.intellij.plus.Service;
public interface Sample extends Service {
public void doSomethig();
}
- Next, you must implement it:
package org.intellij.plus.services.impl;
import org.intellij.plus.AbstractService;
import org.intellij.plus.services.Sample;
class SampleImpl extends AbstractService implements Sample {
private static final String SERVICE_NAME = "Sample";
public void doSomethig() {
System.out.println("Hello World!");
}
public String getServiceName() {
return SERVICE_NAME;
}
}
- Go to plugin.xml and add application component:
<application-components>
<!-- Sample service -->
<component>
<interface-class>org.intellij.plus.services.Sample</interface-class>
<implementation-class>org.intellij.plus.services.impl.SampleImpl</implementation-class>
</component>
</application-components>
- Deploy plugin into IDEA and you can use your service from all your plugins:
Sample sample = ServiceManager.getService(Sample.class);
sample.doSomething();
- This is base interface for building your services. It extends
ApplicaitonComponent and have only one method - getServiceName. To implement your services you must extends this interface and add methods to your interface.
- Base abstract implementation of Service. This class perform service registration in ServiceManager class.
- This is main manager for Services. You can use ServiceManager for new Service registration, unregistration and getting registred Service. Also you can attach ServiceManagerListener, to listen registration and unregistration events.
- This is listener interface for listen two events - the new Service registered and then existing registered Service is unregistered.
-- AlexeyEfimov - 05 Mar 2004 |
View
| Diffs | r1.3 | > | r1.2 | > | r1.1
| More
|
|