PlusLibraryDev 

HOME INDEX SEARCH GO  

 <<O>>  Difference Topic PlusLibraryDev (r1.3 - 08 Aug 2004 - AlexeyEfimov)
Changed:
<
<

%META:TOPICPARENT{name="PlusPlugin"}%

Development of PlusPlugin?

>
>

%META:TOPICPARENT{name="PlusLibrary"}%

Development of PlusLibrary

Added:
>
>

%META:TOPICMOVED{by="AlexeyEfimov" date="1091948848" from="Main.PlusPluginDev" to="Main.PlusLibraryDev"}%


 <<O>>  Difference Topic PlusLibraryDev (r1.2 - 07 Mar 2004 - AlexeyEfimov)
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.

Why this plugin is created?

  • I have more that one plugin, and forced to clone my code. I think, that's no good smile

Is where any services implemented already?

  • 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.

Is it extensible?

  • 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?

  • 2 interfaces, 2 classes.

Can you provide sample of Service?

  • 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();

What is Service interface?

  • 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.

What is AbstractService class?

  • Base abstract implementation of Service. This class perform service registration in ServiceManager class.

What is 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.

What is ServiceManagerListener interface?

  • 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


 <<O>>  Difference Topic PlusLibraryDev (r1.1 - 05 Mar 2004 - AlexeyEfimov)
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.

Why this plugin is created?

  • I have more that one plugin, and forced to clone my code. I think, that's no good smile

Is where any services implemented already?

  • 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.

Is it extensible?

  • 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?

  • 2 interfaces, 2 classes.

Can you provide sample of Service?

  • 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();

What is Service interface?

  • 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.

What is AbstractService class?

  • Base abstract implementation of Service. This class perform service registration in ServiceManager class.

What is 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.

What is ServiceManagerListener interface?

  • 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

e d i t a t t a c h r e f - b y d i f f s
Ideas,requests,problems regarding this site? Send feedback.
Copyright @ 2000-2003 by the contribution authors. All material on this collaboration tool is the property of the contributing authors.

Revision r1.1 - 05 Mar 2004 - 10:46 GMT - AlexeyEfimov
Revision r1.3 - 08 Aug 2004 - 07:02 GMT - AlexeyEfimov
Copyright © 2001 by the contributing authors. All material on this collaboration tool is the property of the contributing authors.
Ideas, requests, problems regarding this site? Send feedback.