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.
Summary: | Provide an API for adding icon in the output window tab | ||
---|---|---|---|
Product: | platform | Reporter: | Sherold Dev <sherold> |
Component: | Output Window | Assignee: | t_h <t_h> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | anebuzelsky, mkleint, pjiricka |
Priority: | P1 | Keywords: | API |
Version: | 5.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Attachments: |
api+impl diff
Little trick how to make the API return final class from methods that used to return InputOutput, IOProvider.getDefault is simplified, would need a bridge for old API |
Description
Sherold Dev
2005-07-12 10:10:29 UTC
this is still important? yes, this issue is still important for us. the current server output implementation is kind of unfinished w/o the status icon. with the status icon it should be much easier to find/discover the server output tab among the other output tabs. ok. from API point of view it should be a fairly straightforward change. Adding a icon setting method to InputOutput. Where I see a problem is the case where a single output tab is visible, in such case the tabs are gone altogether and the output takes whole space, The tab's name becomes the output window's name. That cannot be done with the icon. 1. output window's icon is only visible in sliding mode and is already occupied and should not change. I know about this limitation, but I don't think it should be a big problem. If there is only a single output tab, it won't be covered by a different tab and the hard to find problem will thus disappear. It is clear that it would be better if the status icon could be there always, but even without it in the single tab mode the usability of the server output window will improve a lot, IMO. Ok, I've sketched out the API and implementation as well, seems to work fine, except for the macosx where it never paints the icon, but shows empty space. A simple swing JTabbedPane application with icons works fine on macosx. mystery... Re the mystery, probably CloseButtonTabbedPane is somehow the culprit - maybe test it compared with a JTabbedPane in isolation. Given the number of API requests here, it might be nice to actually deprecate the whole IO API and provide something more suitable to how the output window is used today - we're adding an awful lot of funky methods to IOProvider, and it seems like some kind of output descriptor would be cleaner. Created attachment 33157 [details]
api+impl diff
please review this minor change to the output apis. It allows to set icon to InputOutput to show output's status. There is one known issue on macosx. when the output is running we show the tab's title as html. it seems that under such conditions, the icon is not painting. I filed a bug against apple's jdk. TCR: Please do not add new methods into already published interfaces, thanks. jtulach: Thanks for noticing this incompatibility, I will need to update the arch/apichange document. However there is hardly any other way. And given that the interface and whole IO spi is to be implemented by just a known and limited set of modules, I don't see a problem with it. 1. Adding it to OutputWriter just because it's an abstract class is equivalent to the proposed solution. 2. creating yet another interface and force people to cast it or create additional set of factory methods in IOProvider is possible but requires more work. Additionally it's a one time solution and can hardly be used multiple times anyway.. I am not sure, but I have a feeling that you still want to add new method into the interface. If you insisted o adding that method, I would have to replace API_REVIEW_FAST with API_REVIEW. As the change would not be compatible, neither non-controversial. Anyway, having standard review for this API would be beneficial. Not only the InputOutput is non-extensible in compatible way, but also the whole API resides in a package shared with Windows API and it is desirable to create new one in org.netbeans.api.io or anything like that. So if you decide to use this issue as opportunity to do a little rewrite, I'll try to participate and help. If you decide that you still want to do a fast track than I suggest to create new "public final class IO" that would replace the deprecated InputOutput and be extensible in future. However there are multiple options how to do this, so I leave the details for later discussions. Created attachment 33369 [details]
Little trick how to make the API return final class from methods that used to return InputOutput, IOProvider.getDefault is simplified, would need a bridge for old API
well, let's just pull the issue from review for now. Not easy for 6.0. Output API is not extensible in this direction. Keeping this enhancement open for future, when we will evalute complete Output API redesign. Reassigning to new module owner Tomas Holy. core-main #3234c129f8ca |