Community
Participate
Working Groups
Have plugin action like so - <action label="%foo.label" class="mycorp.FooAction" menubarPath="mycorp.menu1/group1" enablesFor="1" id="mycorp.restartContainerAction"> </action> And of course plugin.properties has the string - foo.label=Label for Foo action. Now at runtime I have reason to swith the text of the action between above text and 'Label Foo sometimes has.' To accomplish this so that a.) label is correct before my logic runs b.) I don't have redundant resource defs in my code. I use the the normal mechanism for labeling the menu ( what was shown above ) and in conjunction with a method like so - private void changeLabel() { final String lbl; if ( operations[ 0 ].container.isStarted() ) { lbl = MyPlugin.getResourceString( "sometimes.foo.label" ); } else { lbl = MyPlugin.getPluginResourceString( "%foo.label" ); } this.action.setText( lbl ); this.action.setEnabled( true ); } where getPluginResourceString uses Platform.getResourceString( Bundle, String ) to resolve the string and MyPlugin.getResourceStrings resolves the resource using the normal Java mechanisms for resolving the resource. Now the problem, if I use the update mechanism to update an install of my feature and then shutdown eclipse one of the following symptoms become visible on restart : o foo.label does not resolve ( I see %foo.label in the menu ) o foo.label resolves but the feature name, feature provider, plugin name, and plugin provider fields in the about box are blank for my feature and my plugin. A couple of final details. o My project is a '3.0 only' plugin project. It did not have a META-INF dir. When I added a META-INF\MANIFEST.MF and moved what data I could from plugin.xml to MANIFEST.MF the problem went away. I added the MANIFEST.MF because some what I saw during debugging made me think that it might make my problem go away. o My project was created with some build that was between m5 and 3.0 final. ( Mention this in case projects are always supposed to have MANIFEST.MF. ) And now given all the above, I would say that either o MANIFEST.MF is required and I should have received some error that it was missing, or o I shouldn't have had any problems at all.
It looks like a dup of bug 70176. I am waiting for some comments from Pascal (who may be on vacation now). *** This bug has been marked as a duplicate of 70176 ***