Skip to content
Paolo Ciccarese edited this page Jul 11, 2013 · 1 revision

The directory named 'info' normally contains the descriptors of plugins and resources related to the plugin. In the case of the 'PostIt' plugin the directory contains only the plugin descriptor PostitPlugin, which is a Singleton and extends APlugin:

public class PostitPlugin extends APlugin {

    public static final String VERSION = "0.1";
    public static final String TYPE = "Annotation";
    public static final String SUB_TYPE = "Post it";
    public static final String PLUGIN = PostitPlugin.class.getName().substring(0, PostitPlugin.class.getName().indexOf(".info"));

    private static PostitPlugin instance;
    private PostitPlugin() {}

    public static PostitPlugin getInstance() {
         if(instance==null) instance = new PostitPlugin();
         return instance;
    }
    ... getters (see APlugin)
}

If we dissect the code we see the version of the plugin, the type Annotation (another type for the plugin could be Resource when we develop code for integration) and its sub-type Post it and the full name of the plugin that is basically identified by the full package of the plugin (minus .info). These data will be important later on for registration purposes.