This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
The J2EE platform should also provide an icon. This is useful for nodes which represent the platform. For example a Libraries node will be added to projects allowing to browse the libraries. For web and ejbjar projects this node will also contain a child node representing the J2EE platform. This change implies adding a new getIcon() method to J2eePlatformImpl. This method will be implemented by server plugins and will usually return the same icon that the plugin uses for server instances (this is not mandatory). Another getIcon() method will be added to J2eePlatform, which will use J2eePlatformImpl.getIcon() to obtain the icon from the plugin and return it or a default icon if the icon from the plugin was null.
Created attachment 19494 [details] Diff with changes
Created attachment 19495 [details] New Javadoc for J2eePlatform
Created attachment 19496 [details] New Javadoc for J2eePlatformImpl
Missing @since tags in new methods that would refer to entry in apichanges.xml You could save one class and make the Image garbage collectable by removing DefaultImageProvider and using - if (result == null) - result = DefaultImageProvider.IMAGE; + if (result == null) + result = Utilities.loadImage(".../ServerRegistry.gif"); speed shall stay comparable for a method that is called one over a time or not at all (if the icon is correctly provided).
Created attachment 19521 [details] Updated diff
I increased the specification version and added the @since tags, see the updated diff. Regarding the DefaultImageProvider inner class: I made the change you suggested. In which circumstances do you think the idiom I used would be appropriate?
Diff looks ok to me. According to my knowledge of classloading. The solution with innerclass is good for synchronization as it guarantees that the field is going to be initialized just once. However it will not release the field from memory while the module classloader is active. Both is solved by Utilities.loadImage. It is synchronized itself and it maintains internal cache of images using SoftReferences (maybe with some timeout). I think that the current code is simpler and not worse.
Thank you for the explanation. Do I understand correctly that I'm now allowed to commit?
According to the fasttrack described at http://openide.netbeans.org/tutorial/review-steps.html the first step is to wait a week after begining of review and resolve problems. the second step is to reassign to you saying that you are going to integrate and wait 24h. the third is to integrate. De jure - you should wait. De facto - I do not know if anybody else is going to review your request, I have not seen too much comments on j2eeserver in the past. So maybe you can shorten the first step a bit.
I will commit the last attached diff tomorrow if there are no more comments to this.
Integrated.