Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » plugin.properties mechanism not working?
plugin.properties mechanism not working? [message #559718] Fri, 17 September 2010 12:51 Go to next message
Nicolai Czempin is currently offline Nicolai Czempin
Messages: 21
Registered: July 2009
Junior Member
I want to display text from an external file (possibly internationalized) in the about box of an RCP application.

Apparently (as intensive Googling has led me to believe) one can achieve this by adding a (or changing the) property "aboutText" with a value that has a prefix '%' that will be dereferenced from the plugin.properties file, like this:

plugin.xml:
 <extension
         id="product"
         point="org.eclipse.core.runtime.products">
      <product
            application="com.example.application"
            name="RCP Product">
         <property
               name="aboutText"
               value="%aboutText">
         </property>
         <property
               name="windowImages"
               value="icons/sample2.gif">
         </property>
         <property
               name="aboutImage"
               value="product_lg.gif">
         </property>
      </product>
   </extension>


plugin.properties:
aboutText=This is HelloWorld\n\
\n\
Version 1.0


1. I used the "new Plug-In Project" to generate the RCP Mail Application.
2. I changed the value of the "aboutText" property to "%aboutText".
3. I added a file plugin.properties as above.
4. When I run the product and open the About Box, the text "%aboutText" is shown instead of the expected dereferenced text from the plugin.properties file.

I tried this with a vanilla 3.5.1 Eclipse IDE as well as a more featured Yoxos-based 3.6 installation, with the same results.

I also tried it with a separate "something.product" file, which didn't help.

=====

Is my expectation about the behaviour wrong?
Or can someone confirm that they see this behaviour, and that this may perhaps be a bug in Eclipse (RCP/PDE/...?)?
Or does going through the above steps work for you?

Thanks for reading this far,
Nicolai Czempin
Re: plugin.properties mechanism not working? [message #644803 is a reply to message #559718] Tue, 14 December 2010 04:49 Go to previous messageGo to next message
Juergen Weber is currently offline Juergen Weber
Messages: 54
Registered: July 2009
Member
Try to put
Bundle-Localization: plugin
into MANIFEST.MF in the plugin editor.
Re: plugin.properties mechanism not working? [message #644813 is a reply to message #644803] Tue, 14 December 2010 05:14 Go to previous messageGo to next message
Wim Jongman is currently offline Wim Jongman
Messages: 276
Registered: July 2009
Senior Member

and don't forget to include the file in the build.properties
Re: plugin.properties mechanism not working? [message #644825 is a reply to message #644813] Tue, 14 December 2010 05:17 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5296
Registered: July 2009
Senior Member
or put your file in the default location OSGI-INF/l10n/bundle.properties
and naturally as Wim said don't forget to add it to the build.properties

Tom

Am 14.12.10 11:14, schrieb Wim Jongman:
> and don't forget to include the file in the build.properties
Re: plugin.properties mechanism not working? [message #1060086 is a reply to message #644803] Wed, 22 May 2013 23:31 Go to previous message
hunt jesse is currently offline hunt jesse
Messages: 1
Registered: May 2013
Junior Member
Juergen Weber wrote on Tue, 14 December 2010 04:49
Try to put
Bundle-Localization: plugin
into MANIFEST.MF in the plugin editor.

Juergen's answer is right








Previous Topic:JFace TableViewer Listener to deselect previously selected row
Next Topic:Questions re. some basic RCP concepts
Goto Forum:
  


Current Time: Mon Sep 01 09:59:30 EDT 2014

Powered by FUDForum. Page generated in 0.02265 seconds