Gangnus
Gangnus

Reputation: 24474

What do "%" and "$" mean in the packages names in plugin.xml?

Here is a piece of plugin.xml file of a standard Eclipse plugin

<!-- Extension points -->
<extension-point id="pluginContent" name="%expoint.pluginContent.name" schema="schema/pluginContent.exsd"/>
<extension-point id="newExtension" name="%expoint.newExtension.name" schema="schema/newExtension.exsd"/>
<extension-point id="templates" name="%expoint.templates.name" schema="schema/templates.exsd"/>
<extension-point id="samples" name="%expoint.samples.name" schema="schema/samples.exsd"/>
<extension-point id="targetProvisioners" name="%extension-point.name.0" schema="schema/targetProvisioners.exsd"/>
<extension-point id="launchShortcuts" name="%extension-point.name.1" schema="schema/launchShortcuts.exsd"/>

<!-- Extensions -->
<extension
     point="org.eclipse.ui.perspectives">
  <perspective
        name="%perspective.name"
        icon="$nl$/icons/eview16/plugins.gif"
        class="org.eclipse.pde.internal.ui.PDEPerspective"
        id="org.eclipse.pde.ui.PDEPerspective">
     <description>
        %perspective.description
     </description>
  </perspective>
</extension>

Please, what do these % and $ mean?

Upvotes: 0

Views: 122

Answers (1)

Bananeweizen
Bananeweizen

Reputation: 22070

This is for internationalization of strings in the Eclipse UI. A (quite old) article on Eclipse explains it.

  • % is for getting those strings from the properties file besides the plugin manifest
  • $nl$ is for automatically selecting locale dependent sub directories (if you have for instance html files depending on the language)

Upvotes: 2

Related Questions