PlusLibrary 

HOME INDEX SEARCH GO  

 <<O>>  Difference Topic PlusLibrary (r1.15 - 27 Oct 2004 - AlexeyEfimov)
Deleted:
<
<

  • PlusLibraryGuide? help.gif (PLUS API details)
Added:
>
>

  • Done Pattern for GUI form creation.
  • Done Colors panel for making configuration of custom editors.
Changed:
<
<

-- AlexeyEfimov - 08 Aug 2004

>
>

-- AlexeyEfimov - 27 Oct 2004

Changed:
<
<

%META:FILEATTACHMENT{name="plus-0.1.4-src.zip" attr="" comment="PLUS Sources 0.1.4 " date="1084357909" path="I:\development\projects\JetBrains\plugins.releases\plus-0.1.4-src.zip" size="34385" user="AlexeyEfimov" version="1.1"}% %META:FILEATTACHMENT{name="plus-0.1.4-docs.zip" attr="" comment="PLUS 0.1.4 JavaDocs " date="1084357928" path="I:\development\projects\JetBrains\plugins.releases\plus-0.1.4-docs.zip" size="84476" user="AlexeyEfimov" version="1.1"}%

>
>

%META:FILEATTACHMENT{name="plus-0.1.4-src.zip" attr="h" comment="PLUS Sources 0.1.4 " date="1084357909" path="I:\development\projects\JetBrains\plugins.releases\plus-0.1.4-src.zip" size="34385" user="AlexeyEfimov" version="1.1"}% %META:FILEATTACHMENT{name="plus-0.1.4-docs.zip" attr="h" comment="PLUS 0.1.4 JavaDocs " date="1084357928" path="I:\development\projects\JetBrains\plugins.releases\plus-0.1.4-docs.zip" size="84476" user="AlexeyEfimov" version="1.1"}% %META:FILEATTACHMENT{name="plus-0.1.6_build-140.zip" attr="" comment="PLUS 0.1.6 Library Kit" date="1098883168" path="plus-0.1.6_build-140.zip" size="113550" user="AlexeyEfimov" version="1.1"}% %META:FILEATTACHMENT{name="plus-0.1.6_build-140-src.zip" attr="" comment="PLUS 0.1.6 Sources" date="1098883256" path="plus-0.1.6_build-140-src.zip" size="38973" user="AlexeyEfimov" version="1.1"}%


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

>
>

Deleted:
<
<

  • Done "About Splash". Automatical creation of splash with information about plugin.
Deleted:
<
<

  • Planned Error reporting system
  • Planned Highlighter service
Changed:
<
<

Plugin Features

>
>

Changes

Changed:
<
<

  • Done Settings for default system locale, called "Language"
  • Planned Highlighter service configuration central
>
>

Development

Changed:
<
<

Changes

>
>

Please see the topic PlusLibraryDev, any feedback is welcome smile

Deleted:
<
<

Plugin Development

Deleted:
<
<

Please see the topic PlusLibraryDev, any feedback is welcome smile

Changed:
<
<

Plugins installation

tip.gif Please, you PluginManager from Intellij IDEA 4.0 or above.

Related Topics: PluginDocumentation, ProjectPluginTemplate, OpenAPI, IntellijPluginDocumentation, IntellijPluginDocumentation, PluginDeployment, IdeasForPlugins

-- AlexeyEfimov - 12 May 2004 %META:FORM{name="IntelliJPluginWebForm"}% %META:FIELD{name="IntelliJPluginName" title="IntelliJPluginName" value="PLUS"}% %META:FIELD{name="IntelliJPluginVersion" title="IntelliJPluginVersion" value="0.1.4"}% %META:FIELD{name="IntelliJPluginVendor" title="IntelliJPluginVendor" value="Alexey Efimov"}% %META:FIELD{name="IntelliJPluginBinary" title="IntelliJPluginBinary" value="http://plugins.intellij.net/pluginManager?action=download&id=PLUS"}% %META:FIELD{name="IntelliJPluginSource" title="IntelliJPluginSource" value="http://www.intellij.org/twiki/pub/Main/PlusPlugin/plus-0.1.4-src.zip"}% %META:FIELD{name="IntelliJPluginClassification" title="IntelliJPluginClassification" value="SystemPlugin"}% %META:FIELD{name="TopicClassification" title="TopicClassification" value="IntelliJPluginPackage"}% %META:FIELD{name="TopicShortDescription" title="TopicShortDescription" value="This is PLUS. Is a %_Q_%Plugin Light Utility Services%_Q_%. In other words - it a services and API for other plugins."}% %META:FIELD{name="TestedOnOS" title="TestedOnOS" value="OsWinXP"}% %META:FIELD{name="ShouldRunOnOS" title="ShouldRunOnOS" value="AnyOS"}%

>
>

-- AlexeyEfimov - 08 Aug 2004

Added:
>
>

%META:TOPICMOVED{by="AlexeyEfimov" date="1091948455" from="Main.PlusPlugin" to="Main.PlusLibrary"}%


 <<O>>  Difference Topic PlusLibrary (r1.13 - 12 May 2004 - AlexeyEfimov)
Changed:
<
<

  • Done Custom FileType registration.
>
>

  • Done Custom FileType registration.
Changed:
<
<

-- AlexeyEfimov - 29 Apr 2004

>
>

-- AlexeyEfimov - 12 May 2004

Changed:
<
<

%META:FIELD{name="IntelliJPluginVersion" title="IntelliJPluginVersion" value="0.1.3"}%

>
>

%META:FIELD{name="IntelliJPluginVersion" title="IntelliJPluginVersion" value="0.1.4"}%

Changed:
<
<

%META:FIELD{name="IntelliJPluginSource" title="IntelliJPluginSource" value="http://www.intellij.org/twiki/pub/Main/PlusPlugin/plus-0.1.3-src.zip"}%

>
>

%META:FIELD{name="IntelliJPluginSource" title="IntelliJPluginSource" value="http://www.intellij.org/twiki/pub/Main/PlusPlugin/plus-0.1.4-src.zip"}%

Changed:
<
<

%META:FILEATTACHMENT{name="plus-0.1.3-src.zip" attr="" comment="PLUS Sources 0.1.3" date="1083187249" path="D:\development\projects\JetBrains\plugins.releases\plus-0.1.3-src.zip" size="31481" user="AlexeyEfimov" version="1.1"}% %META:FILEATTACHMENT{name="plus-0.1.3-docs.zip" attr="" comment="PLUS 0.1.3 JavaDocs" date="1083187292" path="D:\development\projects\JetBrains\plugins.releases\plus-0.1.3-docs.zip" size="70045" user="AlexeyEfimov" version="1.1"}%

>
>

%META:FILEATTACHMENT{name="plus-0.1.3-src.zip" attr="h" comment="PLUS Sources 0.1.3" date="1083187249" path="D:\development\projects\JetBrains\plugins.releases\plus-0.1.3-src.zip" size="31481" user="AlexeyEfimov" version="1.1"}% %META:FILEATTACHMENT{name="plus-0.1.3-docs.zip" attr="h" comment="PLUS 0.1.3 JavaDocs" date="1083187292" path="D:\development\projects\JetBrains\plugins.releases\plus-0.1.3-docs.zip" size="70045" user="AlexeyEfimov" version="1.1"}% %META:FILEATTACHMENT{name="plus-0.1.4-src.zip" attr="" comment="PLUS Sources 0.1.4 " date="1084357909" path="I:\development\projects\JetBrains\plugins.releases\plus-0.1.4-src.zip" size="34385" user="AlexeyEfimov" version="1.1"}% %META:FILEATTACHMENT{name="plus-0.1.4-docs.zip" attr="" comment="PLUS 0.1.4 JavaDocs " date="1084357928" path="I:\development\projects\JetBrains\plugins.releases\plus-0.1.4-docs.zip" size="84476" user="AlexeyEfimov" version="1.1"}%


 <<O>>  Difference Topic PlusLibrary (r1.12 - 28 Apr 2004 - AlexeyEfimov)
Changed:
<
<

>
>

Changed:
<
<

-- AlexeyEfimov - 29 Mar 2004

>
>

-- AlexeyEfimov - 29 Apr 2004

Changed:
<
<

%META:FIELD{name="IntelliJPluginVersion" title="IntelliJPluginVersion" value="0.1.2"}%

>
>

%META:FIELD{name="IntelliJPluginVersion" title="IntelliJPluginVersion" value="0.1.3"}%

Changed:
<
<

%META:FIELD{name="IntelliJPluginSource" title="IntelliJPluginSource" value="http://www.intellij.org/twiki/pub/Main/PlusPlugin/plus-0.1.2-src.zip"}%

>
>

%META:FIELD{name="IntelliJPluginSource" title="IntelliJPluginSource" value="http://www.intellij.org/twiki/pub/Main/PlusPlugin/plus-0.1.3-src.zip"}%

Changed:
<
<

%META:FILEATTACHMENT{name="plus-0.1.2-src.zip" attr="" comment="PLUS Sources 0.1.2" date="1082280818" path="I:\development\projects\JetBrains\plugins\plus\plus-0.1.2-src.zip" size="289687" user="AlexeyEfimov" version="1.1"}%

>
>

%META:FILEATTACHMENT{name="plus-0.1.2-src.zip" attr="h" comment="PLUS Sources 0.1.2" date="1082280818" path="I:\development\projects\JetBrains\plugins\plus\plus-0.1.2-src.zip" size="289687" user="AlexeyEfimov" version="1.1"}% %META:FILEATTACHMENT{name="plus-0.1.3-src.zip" attr="" comment="PLUS Sources 0.1.3" date="1083187249" path="D:\development\projects\JetBrains\plugins.releases\plus-0.1.3-src.zip" size="31481" user="AlexeyEfimov" version="1.1"}% %META:FILEATTACHMENT{name="plus-0.1.3-docs.zip" attr="" comment="PLUS 0.1.3 JavaDocs" date="1083187292" path="D:\development\projects\JetBrains\plugins.releases\plus-0.1.3-docs.zip" size="70045" user="AlexeyEfimov" version="1.1"}%


 <<O>>  Difference Topic PlusLibrary (r1.11 - 28 Apr 2004 - AlexeyEfimov)
Changed:
<
<

>
>

Changed:
<
<

  • Done "About Splash". Automatical creation of splash with information about plugin.
>
>

  • Done "About Splash". Automatical creation of splash with information about plugin.
Changed:
<
<

  • Done Custom FileType registration.
  • Planned Help system
>
>

  • Done Custom FileType registration.

 <<O>>  Difference Topic PlusLibrary (r1.10 - 18 Apr 2004 - AlexeyEfimov)
Added:
>
>

%META:FILEATTACHMENT{name="plus-0.1.2-src.zip" attr="" comment="PLUS Sources 0.1.2" date="1082280818" path="I:\development\projects\JetBrains\plugins\plus\plus-0.1.2-src.zip" size="289687" user="AlexeyEfimov" version="1.1"}%


 <<O>>  Difference Topic PlusLibrary (r1.9 - 29 Mar 2004 - AlexeyEfimov)
Added:
>
>

  • Done Custom FileType registration.
Changed:
<
<

-- AlexeyEfimov - 28 Mar 2004

>
>

-- AlexeyEfimov - 29 Mar 2004

Changed:
<
<

%META:FIELD{name="IntelliJPluginVersion" title="IntelliJPluginVersion" value="0.1.1"}%

>
>

%META:FIELD{name="IntelliJPluginVersion" title="IntelliJPluginVersion" value="0.1.2"}%

Changed:
<
<

%META:FIELD{name="IntelliJPluginSource" title="IntelliJPluginSource" value="http://www.intellij.org/twiki/pub/Main/PlusPlugin/plus-0.1.1-src.zip"}%

>
>

%META:FIELD{name="IntelliJPluginSource" title="IntelliJPluginSource" value="http://www.intellij.org/twiki/pub/Main/PlusPlugin/plus-0.1.2-src.zip"}%


 <<O>>  Difference Topic PlusLibrary (r1.8 - 27 Mar 2004 - AlexeyEfimov)
Changed:
<
<

Features Overview

Working with plugin.xml

Such function provide access to plugin.xml content information. Unfortunaly, IDEA now not support such API, but there are plugin, where this information is required. For example, then you need to show "About..." plugin information.

With using PLUS, you can use PluginDescriptorService, that can let you get:

  • Plugin name
  • Plugin version (also build number, and build date, but this is not official supported by plugin.dtd)
  • Plugin description and URL
  • Vendor information (name, email, url)
  • Change notes
  • Path to plugin home
  • Path to JAR file, where plugin.xml allocated
  • Plugin classpath (array of URLs of all lib jars of plugin)
  • Get access to XML directly (by JDOM Element)

Universal "About" box

Such information, as for "About plugin" box, can be taken authomaticaly, and with out additional programming. PLUS can plug your plugin to "About Plugin" action with show such splash screen as on screen shot:
Click to view

There are three ways to use AboutPluginService:

  • Extend AbstractAboutAction, and put it to plugin XML as:
    <action id="Wizard.About" text="Wizard" class="org.intellij.wizard.actions.AboutAction">
      <add-to-group group-id="AboutPluginMenu" anchor="last"/>
    </action>

  • Extend AbstractAboutAction, and use API to include action to group, instead of plugin XML editing:
   AboutAction action = new AboutAction();
   AboutPluginService aps = ServiceManager.getService(AboutPluginService.class);
   aps.addAboutAction(action);
  • Use API to include default action to group, instead of custom action class extension:
   AboutPluginService aps = ServiceManager.getService(AboutPluginService.class);
   aps.addAboutAction(MyPluginClass.class);

I18N in your plugins

Localization of plugins - is most priority task, i guess. PLUS have special API to solve it partialy. Follow simple example, will show how you can use it.

class PluginLocalizer extends AbstractLocalizer {
  private static final String BUNDLE_NAME = "org.intellij.wizard.resources.strings";
  private static final Localizer instance = new PluginLocalizer();
<nop>
>
>

Features

API Features

  • Done Working with plugin.xml. You can use PLUS API to read plugin information.
    • Done Plugin name
    • Done Plugin version (also build number, and build date, but this is not official supported by plugin.dtd)
    • Done Plugin description and URL
    • Done Vendor information (name, email, url)
    • Done Change notes
    • Done Path to plugin home
    • Done Path to JAR file, where plugin.xml allocated
    • Done Get access to XML directly (by JDOM Element)
  • Done "About Splash". Automatical creation of splash with information about plugin.
  • Done Universal localizer for plugins.
  • Planned Help system
  • Planned Error reporting system
  • Planned Highlighter service
Changed:
<
<

public static Localizer getInstance() { return instance; }

private PluginLocalizer?() { super(BUNDLE_NAME); } }

You must have in your plugin project then same singleton (or not singleton) class. Next step - is using such class:

  Localizer localizer = PluginLocalizer.getInstance();
  System.out.println(localizer.getString("my.key"));
  System.out.println(localizer.format("my.formatedValue.key", new Object['Hello Word!']));

You can also set up the global prefix for your "PluginLocalizer", this string will append before any key, passed to localizer. For example, you every key in you project begin with "my.super.key." prefix, then you should implement PluginLocalizer as:

class PluginLocalizer extends AbstractLocalizer {
  private static final String BUNDLE_NAME = "org.intellij.wizard.resources.strings";
  private static final Localizer instance = new PluginLocalizer();

  public static Localizer getInstance() {
    return instance;
  }

  private PluginLocalizer() {
    super(BUNDLE_NAME);
    // Here set prefix
    setPrefix("my.super.key.");
  }
}

After this, calls like:

  Localizer localizer = PluginLocalizer.getInstance();
  System.out.println(localizer.getString("my.key"));
  System.out.println(localizer.format("my.formatedValue.key", new Object['Hello Word!']));

Will be referenced to keys "my.super.key.my.key" and "my.super.key.my.formatedValue.key".

>
>

Plugin Features

Changed:
<
<

Locale in LocalizerService

>
>

  • Done Settings for default system locale, called "Language"
  • Planned Highlighter service configuration central
Changed:
<
<

Locale in localization service is controlled by user preferences, as you can see on screenshot:
Click to view

After user has choosed locale, then method Locale.setDefault locale is called, and default locale of JVM after this setted to user defined locale. Locale also can be stored in config, so, after restart this locale is will be seted as default again.

Using

This plugin have plus.jar file and src.zip (contains all required API sources). You must attach it to your plugin project and use API from org.intellij.plus package.

Road Map

  • Done Core
    • Done Light Services API
    • Done Extension support
  • Done Inline Light Services
    • Done PluginDescriptor service. This service get information for your plugin from plugin.xmlof your plugin classpath.
    • Done AboutPlugin service. This service can construct simple about JOptionPane for your plugin. For example, after installing PLUS, you can see how it look, clicking on Help->About PLUS.
    • Done Localizer service. This service provide localization service for string of your plugin. Also this service must provide service to control localization mechanizm.
  • Done Documentation
    • Done Development FAQ (see PlusLibraryFAQ)
    • Done Services Documentation
    • Done Tutorial of Writing new Services

Changes

0.0.4
  • Bug fixes

0.0.3


  • Added method canUnregister to Service interface
  • Bug fixes

0.0.2


  • Sources of API bundled into binary distribution
  • Localizer service configuration for default system locale
  • Localizer service
  • JOptionPane in AboutPlugin service replaced by special splash
  • AboutPlugin service improvements
  • PluginDescriptor service improvements
  • Bug fixes

0.0.1


  • Service core
  • PluginDescriptor service
  • AboutPlugin service
>
>

Changes

Changed:
<
<

-- AlexeyEfimov - 10 Mar 2004

>
>

-- AlexeyEfimov - 28 Mar 2004

Changed:
<
<

%META:FIELD{name="IntelliJPluginVersion" title="IntelliJPluginVersion" value="0.0.3"}%

>
>

%META:FIELD{name="IntelliJPluginVersion" title="IntelliJPluginVersion" value="0.1.1"}%

Changed:
<
<

%META:FIELD{name="IntelliJPluginSource" title="IntelliJPluginSource" value="http://www.intellij.org/twiki/pub/Main/PlusPlugin/plus-0.1.0-src.zip"}%

>
>

%META:FIELD{name="IntelliJPluginSource" title="IntelliJPluginSource" value="http://www.intellij.org/twiki/pub/Main/PlusPlugin/plus-0.1.1-src.zip"}%

Changed:
<
<

%META:FIELD{name="TopicShortDescription" title="TopicShortDescription" value="This is PLUS. Is a %_Q_%Plugin Light Utility Services%_Q_%. In other words - it a services for other plugins."}%

>
>

%META:FIELD{name="TopicShortDescription" title="TopicShortDescription" value="This is PLUS. Is a %_Q_%Plugin Light Utility Services%_Q_%. In other words - it a services and API for other plugins."}%

Changed:
<
<

%META:FILEATTACHMENT{name="plus-0.0.4-src.zip" attr="" comment="PLUS Sources 0.0.4 (build 72)" date="1079199623" path="D:\development\projects\JetBrains\plugins\plus\build\plus-0.0.4-src.zip" size="270701" user="AlexeyEfimov" version="1.1"}%

>
>

%META:FILEATTACHMENT{name="plus-0.0.4-src.zip" attr="h" comment="PLUS Sources 0.0.4 (build 72)" date="1079199623" path="D:\development\projects\JetBrains\plugins\plus\build\plus-0.0.4-src.zip" size="270701" user="AlexeyEfimov" version="1.1"}%


 <<O>>  Difference Topic PlusLibrary (r1.7 - 24 Mar 2004 - AlexeyEfimov)
Changed:
<
<

%META:FIELD{name="IntelliJPluginSource" title="IntelliJPluginSource" value="http://www.intellij.org/twiki/pub/Main/PlusPlugin/plus-0.0.3-src.zip"}%

>
>

%META:FIELD{name="IntelliJPluginSource" title="IntelliJPluginSource" value="http://www.intellij.org/twiki/pub/Main/PlusPlugin/plus-0.1.0-src.zip"}%


 <<O>>  Difference Topic PlusLibrary (r1.6 - 14 Mar 2004 - AlexeyEfimov)
Changed:
<
<

%META:FIELD{name="IntelliJPluginBinary" title="IntelliJPluginBinary" value="Avaible from Plugin Manager"}%

>
>

%META:FIELD{name="IntelliJPluginBinary" title="IntelliJPluginBinary" value="http://plugins.intellij.net/pluginManager?action=download&id=PLUS"}%


 <<O>>  Difference Topic PlusLibrary (r1.5 - 13 Mar 2004 - AlexeyEfimov)
Added:
>
>

0.0.4


  • Bug fixes
Added:
>
>

  • Added method canUnregister to Service interface
Changed:
<
<

%META:FILEATTACHMENT{name="plus-0.0.3-src.zip" attr="" comment="PLUS Sources 0.0.3 (build 70)" date="1078784836" path="I:\development\projects\JetBrains\plugins\plus\plus-0.0.3-src.zip" size="269467" user="AlexeyEfimov" version="1.2"}%

>
>

%META:FILEATTACHMENT{name="plus-0.0.3-src.zip" attr="h" comment="PLUS Sources 0.0.3 (build 70)" date="1078784836" path="I:\development\projects\JetBrains\plugins\plus\plus-0.0.3-src.zip" size="269467" user="AlexeyEfimov" version="1.2"}% %META:FILEATTACHMENT{name="plus-0.0.4-src.zip" attr="" comment="PLUS Sources 0.0.4 (build 72)" date="1079199623" path="D:\development\projects\JetBrains\plugins\plus\build\plus-0.0.4-src.zip" size="270701" user="AlexeyEfimov" version="1.1"}%


 <<O>>  Difference Topic PlusLibrary (r1.4 - 10 Mar 2004 - AlexeyEfimov)
Changed:
<
<

>
>

  • PlusLibraryGuide? help.gif (how to use PLUS services)
  • PlusLibraryTutorial help.gif (how to define new PLUS services)
Changed:
<
<

  • Partial Documentation
>
>

  • Done Documentation
Changed:
<
<

    • Partial Services Documentation
    • Planned Tutorial
>
>

    • Done Services Documentation
    • Done Tutorial of Writing new Services
Changed:
<
<

-- AlexeyEfimov - 08 Mar 2004

>
>

-- AlexeyEfimov - 10 Mar 2004


 <<O>>  Difference Topic PlusLibrary (r1.3 - 08 Mar 2004 - AlexeyEfimov)
Added:
>
>

0.0.3


  • Bug fixes
Changed:
<
<

%META:FIELD{name="IntelliJPluginVersion" title="IntelliJPluginVersion" value="0.0.2"}%

>
>

%META:FIELD{name="IntelliJPluginVersion" title="IntelliJPluginVersion" value="0.0.3"}%

Changed:
<
<

%META:FIELD{name="IntelliJPluginSource" title="IntelliJPluginSource" value="http://www.intellij.org/twiki/pub/Main/PlusPlugin/plus-0.0.2-src.zip"}%

>
>

%META:FIELD{name="IntelliJPluginSource" title="IntelliJPluginSource" value="http://www.intellij.org/twiki/pub/Main/PlusPlugin/plus-0.0.3-src.zip"}%

Changed:
<
<

%META:FILEATTACHMENT{name="plus-0.0.2-src.zip" attr="" comment="PLUS Sources 0.0.2 (build 64) " date="1078702843" path="I:\development\projects\JetBrains\plugins\plus\plus-0.0.2-src.zip" size="269706" user="AlexeyEfimov" version="1.1"}%

>
>

%META:FILEATTACHMENT{name="plus-0.0.2-src.zip" attr="h" comment="PLUS Sources 0.0.2 (build 64) " date="1078702843" path="I:\development\projects\JetBrains\plugins\plus\plus-0.0.2-src.zip" size="269706" user="AlexeyEfimov" version="1.1"}% %META:FILEATTACHMENT{name="plus-0.0.3-src.zip" attr="" comment="PLUS Sources 0.0.3 (build 70)" date="1078784836" path="I:\development\projects\JetBrains\plugins\plus\plus-0.0.3-src.zip" size="269467" user="AlexeyEfimov" version="1.2"}%


 <<O>>  Difference Topic PlusLibrary (r1.2 - 07 Mar 2004 - AlexeyEfimov)
Changed:
<
<
>
>

Changed:
<
<

>
>

TOC: No TOC in "Main.PlusLibrary"


Changed:
<
<

Using

>
>

Documentation

Features Overview

Working with plugin.xml

Such function provide access to plugin.xml content information. Unfortunaly, IDEA now not support such API, but there are plugin, where this information is required. For example, then you need to show "About..." plugin information.

With using PLUS, you can use PluginDescriptorService, that can let you get:

  • Plugin name
  • Plugin version (also build number, and build date, but this is not official supported by plugin.dtd)
  • Plugin description and URL
  • Vendor information (name, email, url)
  • Change notes
  • Path to plugin home
  • Path to JAR file, where plugin.xml allocated
  • Plugin classpath (array of URLs of all lib jars of plugin)
  • Get access to XML directly (by JDOM Element)

Universal "About" box

Such information, as for "About plugin" box, can be taken authomaticaly, and with out additional programming. PLUS can plug your plugin to "About Plugin" action with show such splash screen as on screen shot:
Click to view

There are three ways to use AboutPluginService:

  • Extend AbstractAboutAction, and put it to plugin XML as:
    <action id="Wizard.About" text="Wizard" class="org.intellij.wizard.actions.AboutAction">
      <add-to-group group-id="AboutPluginMenu" anchor="last"/>
    </action>

  • Extend AbstractAboutAction, and use API to include action to group, instead of plugin XML editing:
   AboutAction action = new AboutAction();
   AboutPluginService aps = ServiceManager.getService(AboutPluginService.class);
   aps.addAboutAction(action);
  • Use API to include default action to group, instead of custom action class extension:
   AboutPluginService aps = ServiceManager.getService(AboutPluginService.class);
   aps.addAboutAction(MyPluginClass.class);

I18N in your plugins

Localization of plugins - is most priority task, i guess. PLUS have special API to solve it partialy. Follow simple example, will show how you can use it.

class PluginLocalizer extends AbstractLocalizer {
  private static final String BUNDLE_NAME = "org.intellij.wizard.resources.strings";
  private static final Localizer instance = new PluginLocalizer();

  public static Localizer getInstance() {
    return instance;
  }

  private PluginLocalizer() {
    super(BUNDLE_NAME);
  }
}

You must have in your plugin project then same singleton (or not singleton) class. Next step - is using such class:

  Localizer localizer = PluginLocalizer.getInstance();
  System.out.println(localizer.getString("my.key"));
  System.out.println(localizer.format("my.formatedValue.key", new Object['Hello Word!']));

You can also set up the global prefix for your "PluginLocalizer", this string will append before any key, passed to localizer. For example, you every key in you project begin with "my.super.key." prefix, then you should implement PluginLocalizer as:

class PluginLocalizer extends AbstractLocalizer {
  private static final String BUNDLE_NAME = "org.intellij.wizard.resources.strings";
  private static final Localizer instance = new PluginLocalizer();

  public static Localizer getInstance() {
    return instance;
  }

  private PluginLocalizer() {
    super(BUNDLE_NAME);
    // Here set prefix
    setPrefix("my.super.key.");
  }
}

After this, calls like:

  Localizer localizer = PluginLocalizer.getInstance();
  System.out.println(localizer.getString("my.key"));
  System.out.println(localizer.format("my.formatedValue.key", new Object['Hello Word!']));

Will be referenced to keys "my.super.key.my.key" and "my.super.key.my.formatedValue.key".

Locale in LocalizerService

Changed:
<
<

This plugin have plus.jar file. You must attach it to your plugin project and use API from org.intellij.plus package.

>
>

Locale in localization service is controlled by user preferences, as you can see on screenshot:
Click to view

Changed:
<
<

tip.gif See PlusPluginDev? for more documentation information.

>
>

After user has choosed locale, then method Locale.setDefault locale is called, and default locale of JVM after this setted to user defined locale. Locale also can be stored in config, so, after restart this locale is will be seted as default again.

Using

This plugin have plus.jar file and src.zip (contains all required API sources). You must attach it to your plugin project and use API from org.intellij.plus package.

Changed:
<
<

  • Partial Inline Light Services
>
>

  • Done Inline Light Services
Changed:
<
<

    • Planned Localizer service. This service provide localization service for string of your plugin. Also this service must provide service to control localization mechanizm.
>
>

    • Done Localizer service. This service provide localization service for string of your plugin. Also this service must provide service to control localization mechanizm.
  • Partial Documentation
    • Done Development FAQ (see PlusLibraryFAQ)
    • Partial Services Documentation
    • Planned Tutorial
Added:
>
>

0.0.2


  • Sources of API bundled into binary distribution
  • Localizer service configuration for default system locale
  • Localizer service
  • JOptionPane in AboutPlugin service replaced by special splash
  • AboutPlugin service improvements
  • PluginDescriptor service improvements
  • Bug fixes
Changed:
<
<

-- AlexeyEfimov - 05 Mar 2004

>
>

-- AlexeyEfimov - 08 Mar 2004

Changed:
<
<

%META:FIELD{name="IntelliJPluginVersion" title="IntelliJPluginVersion" value="0.0.1"}%

>
>

%META:FIELD{name="IntelliJPluginVersion" title="IntelliJPluginVersion" value="0.0.2"}%

Changed:
<
<

%META:FIELD{name="IntelliJPluginSource" title="IntelliJPluginSource" value="http://www.intellij.org/twiki/pub/Main/PlusPlugin/plus-0.0.1-src.zip"}%

>
>

%META:FIELD{name="IntelliJPluginSource" title="IntelliJPluginSource" value="http://www.intellij.org/twiki/pub/Main/PlusPlugin/plus-0.0.2-src.zip"}%

Changed:
<
<

%META:FILEATTACHMENT{name="plus-0.0.1-src.zip" attr="" comment="PLUS Sources 0.0.1 (build 14)" date="1078483867" path="I:\development\projects\JetBrains\plugins\plus\plus-0.0.1-src.zip" size="25503" user="AlexeyEfimov" version="1.1"}%

>
>

%META:FILEATTACHMENT{name="plus-0.0.1-src.zip" attr="h" comment="PLUS Sources 0.0.1 (build 14)" date="1078483867" path="I:\development\projects\JetBrains\plugins\plus\plus-0.0.1-src.zip" size="25503" user="AlexeyEfimov" version="1.1"}% %META:FILEATTACHMENT{name="AboutPluginService-0.0.2.png" attr="h" comment="" date="1078698670" path="D:\AboutPluginService-0.0.2.png" size="35513" user="AlexeyEfimov" version="1.1"}% %META:FILEATTACHMENT{name="LocalizerService-0.0.2.png" attr="h" comment="" date="1078699166" path="D:\LocalizerService-0.0.2.png" size="7760" user="AlexeyEfimov" version="1.1"}% %META:FILEATTACHMENT{name="AboutPluginService-0.0.2-th.png" attr="h" comment="" date="1078699195" path="D:\AboutPluginService-0.0.2-th.png" size="11345" user="AlexeyEfimov" version="1.1"}% %META:FILEATTACHMENT{name="LocalizerService-0.0.2-th.png" attr="h" comment="" date="1078699221" path="D:\LocalizerService-0.0.2-th.png" size="6432" user="AlexeyEfimov" version="1.1"}% %META:FILEATTACHMENT{name="plus-0.0.2-src.zip" attr="" comment="PLUS Sources 0.0.2 (build 64) " date="1078702843" path="I:\development\projects\JetBrains\plugins\plus\plus-0.0.2-src.zip" size="269706" user="AlexeyEfimov" version="1.1"}%


 <<O>>  Difference Topic PlusLibrary (r1.1 - 05 Mar 2004 - AlexeyEfimov)
Added:
>
>

%META:TOPICINFO{author="AlexeyEfimov" date="1078482960" format="1.0" version="1.1"}%

PlusLibrary

Description

This is PLUS. Is a "Plugin Light Utility Services". In other words - it a services for other plugins.

Using

This plugin have plus.jar file. You must attach it to your plugin project and use API from org.intellij.plus package.

tip.gif See PlusPluginDev? for more documentation information.

Road Map

  • Done Core
    • Done Light Services API
    • Done Extension support
  • Partial Inline Light Services
    • Done PluginDescriptor service. This service get information for your plugin from plugin.xmlof your plugin classpath.
    • Done AboutPlugin service. This service can construct simple about JOptionPane for your plugin. For example, after installing PLUS, you can see how it look, clicking on Help->About PLUS.
    • Planned Localizer service. This service provide localization service for string of your plugin. Also this service must provide service to control localization mechanizm.

Changes

0.0.1
  • Service core
  • PluginDescriptor service
  • AboutPlugin service

Plugin Development

Please see the topic PlusLibraryDev, any feedback is welcome smile

Plugins installation

tip.gif Please, you PluginManager from Intellij IDEA 4.0 or above.

Related Topics: PluginDocumentation, ProjectPluginTemplate, OpenAPI, IntellijPluginDocumentation, IntellijPluginDocumentation, PluginDeployment, IdeasForPlugins

-- AlexeyEfimov - 05 Mar 2004 %META:FORM{name="IntelliJPluginWebForm"}% %META:FIELD{name="IntelliJPluginName" title="IntelliJPluginName" value="PLUS"}% %META:FIELD{name="IntelliJPluginVersion" title="IntelliJPluginVersion" value="0.0.1"}% %META:FIELD{name="IntelliJPluginVendor" title="IntelliJPluginVendor" value="Alexey Efimov"}% %META:FIELD{name="IntelliJPluginBinary" title="IntelliJPluginBinary" value="Avaible from Plugin Manager"}% %META:FIELD{name="IntelliJPluginSource" title="IntelliJPluginSource" value="http://www.intellij.org/twiki/pub/Main/PlusPlugin/plus-0.0.1-src.zip"}% %META:FIELD{name="IntelliJPluginClassification" title="IntelliJPluginClassification" value="SystemPlugin"}% %META:FIELD{name="TopicClassification" title="TopicClassification" value="IntelliJPluginPackage"}% %META:FIELD{name="TopicShortDescription" title="TopicShortDescription" value="This is PLUS. Is a %_Q_%Plugin Light Utility Services%_Q_%. In other words - it a services for other plugins."}% %META:FIELD{name="TestedOnOS" title="TestedOnOS" value="OsWinXP"}% %META:FIELD{name="ShouldRunOnOS" title="ShouldRunOnOS" value="AnyOS"}% %META:FILEATTACHMENT{name="plus-0.0.1-src.zip" attr="" comment="PLUS Sources 0.0.1 (build 14)" date="1078483867" path="I:\development\projects\JetBrains\plugins\plus\plus-0.0.1-src.zip" size="25503" user="AlexeyEfimov" version="1.1"}%


View | Diffs | r1.15 | > | r1.14 | > | r1.13 | 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:36 GMT - AlexeyEfimov
Revision r1.15 - 27 Oct 2004 - 13:28 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.