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 window system needs access to individual tabs in a multi-view window. (The primary use case is the new Ctrl+Tab popup switcher requested by JDev team).
Created attachment 116247 [details] proposed API changes
The new API can be also used to implement access to e.g. Output window sub-tabs or to switch views in Navigator window...
[JG01] Would want to see at least one impl, say in core.multiview, and at least one caller, say the popup switcher. [JG02] The default impl is documented to return null but it is unclear what this means and whether subclasses can do the same. Would prefer to return an empty array unless there is a specialized meaning for null. [JG03] The lifecycle and threading behavior of SubComponent is unclear. Hold long may the caller hold on to these objects? What happens if a new tab appears? Or a tab that has already been returned is closed? Or a different tab is selected so that the 'active' fields in two tabs are now wrong? Must all calls to getSubComponents, and calls to SubComponent methods, be on EQ? [JG04] Constructors for abstract classes should be marked protected as a stylistic matter.
Created attachment 116284 [details] API implementation in core.multiview
Created attachment 116285 [details] proposed API changes
JG01: i've added core.multiview implementation. the new popup switcher is still work in progress so i can't provide a working patch. but the idea is to allow Ctrl+Tab switching to individual sub-tabs in multiview windows (and also possibly to e.g. Output window's sub-tabs), see UI specification here: http://aseng-wiki.us.oracle.com/asengwiki/pages/viewpage.action?pageId=-1890418465 JG02: i've changed that, see the new patch JG03: i've clarified the javadoc JG04: fixed, see the new patch
Y01 I was hoping this API will be more hidden. tc.getClientProperty("subComponents"). Y02 Make SubComponent final. Pass in an ActionListener instead of overriding activate method.
Created attachment 116345 [details] proposed API changes
Created attachment 116346 [details] API implementation in core.multiview
Y01: client property makes API implementation and API usage very awkward Y02: i've changed the API, see the new patch
i'll integrate the changes tomorrow
core-main 058c610fdcbe
Integrated into 'main-golden', will be available in build *201203080400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/058c610fdcbe User: S. Aubrecht <saubrecht@netbeans.org> Log: #209051 - TopComponent.getSubComponents()