Build: NetBeans IDE Dev (Build 100503-343fb0de9337)
VM: OpenJDK Client VM, 14.0-b16, OpenJDK Runtime Environment, 1.6.0_18-b18
jtulach: Typed "LookAnd" in the branding dialog
Created attachment 98496 [details]
*** Bug 184305 has been marked as a duplicate of this bug. ***
ResourceBundleBrandingPanel and BrandingSupport do not operate on the same list of platform modules available for user branding.
1) BrandingSupport.getActivePlatform() contains a code which calls getPlatform() on the suite project but mistakenly does not return its result and always fallbacks to NbPlatform.getDefaultPlatform() - this means that if the suite project has a non-default platform active, RBBP operates on this non-default platform's modules but BrandingSupport still operates on modules of default platform
fixed in core-main #a7f57937eb5c
2) RBBP gets its list of module jars from LayerUtils.getPlatformJarsForSuiteComponentProject(suite) which includes also JARs of suite's module projects (see related issue #185519) and BrandingSupport operates only on list of platform modules. Possible changes:
a) I could either change RBBP to get its list the same way BrandingSupport does it
b) or LayerUtils.getPlatformJarsForSuiteComponentProject(suite) could be changed to return really only JARs of the suite's defined platform
Jesse, please comment on this. I think a) would be preferable here.
3) Jesse, also note what I noticed when a non-default platform is active for a suite project, LayerUtils.getPlatformJarsForSuiteComponentProject(suite) returns modules of *all* clusters, not only of those which are not excluded (for the default platform it does behave correctly and ignores excluded clusters) - but this will not be relevant to this bug if I fix 2) with a).
Well, I realized that BrandingSupport does not exclude clusters, so using its list as is for RBBP (option 2a) does not work.
Jesse, can 2b) and 3) be fixed in LayerUtils.getPlatformJarsForSuiteComponentProject?
Once more - I must have been wrong about 3) - now excluded clusters don't appear in RBBP for me even for non-default platform. Hmm.
So, what remains is 2b)... What do you think about it, Jesse?
*** Bug 185597 has been marked as a duplicate of this bug. ***
(In reply to comment #3)
> RBBP gets its list of module jars from
> LayerUtils.getPlatformJarsForSuiteComponentProject(suite) which includes also
> JARs of suite's module projects
> a) I could either change RBBP to get its list the same way BrandingSupport does
Sounds right, but it depends on exactly what RBBP does with the result. Obviously it makes no sense to branding your own resources.
> b) or LayerUtils.getPlatformJarsForSuiteComponentProject(suite) could be
> changed to return really only JARs of the suite's defined platform
Do not do this.
(In reply to comment #4)
> I realized that BrandingSupport does not exclude clusters
So fix that.
>> I realized that BrandingSupport does not exclude clusters
> So fix that.
I decided to let BrandingSupport continue operating on the whole list of platform's modules, and instead fix this in RBBP by excluding modules which are not in BrandingSupport's list - i.e. for example suite's modules.
the second fix in core-main #e8c96391a007
Integrated into 'main-golden', will be available in build *201005100200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)