Eclipse RCP: what does the percent symbol mean? -


I've seen it many times that the plugin The Xml label or other string values ​​have a leading % symbol like these:

  and  command command id = "Org.eclipse.ui.examples.contributions.item2" icon = "icons / editor.gif" id = "contribution.trimItem" label = "% trim.item" tooltip = "% trim.tem.toolTip" & gt; ; & Lt; / Order & gt;  

In.

What does the percentage symbol mean? Is this some kind of reference? If a string value is referenced by it, then where is it defined?

This means the value or tooltip for labels is actually a plugin.properties Or OSGI-INFO / i10n / bundle.properties in the file. The value after% is a property key for viewing in that file.

Then there will be a line with '% trim.item':

  Trim.item = Trim label in properties file  

It is used to internationalize international readers because Eclipse will search for national language versions of properties files. Plugin is used for plug-ins in the entry bundle-localization: plugin in MANIFEST.MF so there is no bundle-localization entry OSGI-INFO / I10n / bundle.properties is used is.

If you right click on plugin.xml (or other files) then you can select 'plug-in tools' to make string extension ...' in this format plugin.xml and Convert MANIFEST.MF strings.

Plug-ins XML / MANIFEST.MF Editor can generate warnings when you use strings that are not 'external' in this way.


Comments