Community
Participate
Working Groups
Build ID: I20071101-2000 Steps To Reproduce: N/A More information: This problem exists in org.eclipse.pde.internal.core.plugin.WorkspacePluginModelBase. Specifically, see the createNLResourceHelper() method - it has the name of the localization resource hardcoded as "plugin". This is incorrect since the name of the resource is driven from the "Bundle-Localization" manifest header. ----------------------------------------------------------------------------- protected NLResourceHelper createNLResourceHelper() { return new NLResourceHelper("plugin" , PDEManager.getNLLookupLocations(this)); //$NON-NLS-1$ } ----------------------------------------------------------------------------- Compare this with other implementations of this method, for example createNLResourceHelper() in org.eclipse.pde.internal.core.bundle.BundlePluginModelBase: ----------------------------------------------------------------------------- protected NLResourceHelper createNLResourceHelper() { String localization = getBundleLocalization(); return localization == null ? null : new NLResourceHelper(localization, PDEManager.getNLLookupLocations(this)); } -----------------------------------------------------------------------------
Perhaps, just to clarify a little further - consider the scenario of creating a new plug-in project using a template. If the version of the plug-in project is 3.0, the model is an instance of org.eclipse.pde.internal.core.plugin.WorkspacePluginModel. In this case, the hardcoded value of "plugin" probably isn't so much of a problem. If the version of the plug-in project is 3.3, the model is an instance of org.eclipse.pde.internal.core.bundle.WorkspaceBundlePluginModel. In this case, the hardcoded value is wrong and the value should be obtained via the manifest. Therefore, perhaps the error isn't so much with the fact that WorkspacePluginModelBase has the value hardcoded, more with the fact that it's defined too high up the inheritance tree and the bundle versions of the model haven't overridden createNLResourceHelper() appropriately.
Les, thanks for your fine tooth review of PDE. We appreciate you spending the time to find potential programming problems. I think this should be a relatively easy fix, do you want to put another notch in your belt?
Not problems picking it up; but it won't be for a week or so - off on vacation. Should be easy to solve so pleased you've marked it as a bugday candidate, in case someone stumbles across it in the next week or so and wants to give it a go. Additionally, although not a dependency as such, this will be easier to test with the template scenario I've given once bug 185477 is applied.
I hope you enjoy your vacation! I have been trying to take mine here and there which is why we haven't gotten through our backlog of patches yet. I will go ahead and look at bug 185477 and hopefully have it all committed by the time you get back.
patch :P?
Hey Brian, I think this is INVALID since WorkspacePluginModelBase is for 3.0 era plug-ins. Correct?
Chris, See comment 1 - specifically "If the version of the plug-in project is 3.3, the model is an instance of org.eclipse.pde.internal.core.bundle.WorkspaceBundlePluginModel. In this case, the hardcoded value is wrong and the value should be obtained via the manifest. Therefore, perhaps the error isn't so much with the fact that WorkspacePluginModelBase has the value hardcoded, more with the fact that it's defined too high up the inheritance tree and the bundle versions of the model haven't overridden createNLResourceHelper() appropriately."
> Therefore, perhaps the error isn't so much with the fact that > WorkspacePluginModelBase has the value hardcoded, more with the fact that it's > defined too high up the inheritance tree and the bundle versions of the model > haven't overridden createNLResourceHelper() appropriately." Les, you are right, this is the issue exactly. Chris is right on saying WorkspacePluginModelBase is used for representing 3.0 plug-ins. Our models make sense once you understand the way they are set up, but are a little confusing if you aren't familiar with them :)
Ok, I get it now :)
Created attachment 84534 [details] org.eclipse.pde.core.patch This makes WorkspaceBundlePluginModelBase properly implement the nls helper method.
Created attachment 84535 [details] mylyn/context/zip
Fixed in HEAD.
verified on I20071211-0010