Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Looking for a way to reference the product and plugin information from a common callback method
Looking for a way to reference the product and plugin information from a common callback method [message #642493] Wed, 01 December 2010 15:17 Go to next message
drew frantz is currently offline drew frantzFriend
Messages: 340
Registered: July 2009
Senior Member
Typically we have placed the plugin product strings in the plugin.properties
file. The new project has a common mechanism that stuffs this info in a
separate callable class, is there a way for plugin.xml to call out to a java
method instead of read it from the plugin.properties.
Re: Looking for a way to reference the product and plugin information from a common callback method [message #642543 is a reply to message #642493] Wed, 01 December 2010 17:56 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

drew wrote:
> Typically we have placed the plugin product strings in the
> plugin.properties file. The new project has a common mechanism that
> stuffs this info in a separate callable class, is there a way for
> plugin.xml to call out to a java method instead of read it from the
> plugin.properties.

No, OSGi uses Bundle-Localization to load a ResourceBundle. That's
where it has to come from.

Eclipse plugins can use the NLS classes, but not MANIFEST.MF or plugin.xml

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: Looking for a way to reference the product and plugin information from a common callback method [message #642644 is a reply to message #642543] Thu, 02 December 2010 07:19 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 5463
Registered: July 2009
Senior Member
Am 01.12.10 18:57, schrieb Paul Webster:
> drew wrote:
>> Typically we have placed the plugin product strings in the
>> plugin.properties file. The new project has a common mechanism that
>> stuffs this info in a separate callable class, is there a way for
>> plugin.xml to call out to a java method instead of read it from the
>> plugin.properties.
>
> No, OSGi uses Bundle-Localization to load a ResourceBundle. That's
> where it has to come from.
>
> Eclipse plugins can use the NLS classes, but not MANIFEST.MF or plugin.xml
>
> PW
>
>

I've been looking this translation system into this lately because of
the translation story in Eclipse 4.0 and the lookup of those
translations is handled by an OSGi-Service named BundleLocalization.

If the extension registry is a good citizen of OSGi and uses this
service you can at least in theory install a BundleLocalization-Service
ranked higher than the default one but this would mean that you need to
do what the orginal service does and only handle your special use case.

Tom
Previous Topic:Debug JDK source code
Next Topic:[DataBinding]TreeViewer ComboBoxViewerCellEditor validation
Goto Forum:
  


Current Time: Sun Nov 23 22:43:02 GMT 2014

Powered by FUDForum. Page generated in 0.02122 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software