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.

Bug 228448

Summary: No ability to split current top component
Product: platform Reporter: Theofanis Oikonomou <theofanis>
Component: Window SystemAssignee: Theofanis Oikonomou <theofanis>
Status: VERIFIED FIXED    
Severity: normal CC: anebuzelsky, apireviews, hmichel, uireviews
Priority: P3 Keywords: API, API_REVIEW_FAST, PLAN, UI
Version: 7.4   
Hardware: PC   
OS: Linux   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: patch
new View menu entry
new Window menu entry
new popup menu entry
Horizontal split in action
new View menu entry
patch

Description Theofanis Oikonomou 2013-04-10 15:00:01 UTC
Currently one needs to clone a top component and then drag it beside the original one in order to have different views showing without needing to use the multiview toggle buttons at the beginning of the toolbar. There should be ability to split a Multiview top component inside the same top component window.
Comment 1 Theofanis Oikonomou 2013-04-10 15:04:31 UTC
Created attachment 133424 [details]
patch

I will start a review for the two methods that need to be added in TopComponent.SubComponent class but thought to put all the implementation in the patch for better overview.
Comment 2 Theofanis Oikonomou 2013-04-10 15:19:23 UTC
Created attachment 133426 [details]
new View menu entry
Comment 3 Theofanis Oikonomou 2013-04-10 15:19:52 UTC
Created attachment 133427 [details]
new Window menu entry
Comment 4 Theofanis Oikonomou 2013-04-10 15:20:30 UTC
Created attachment 133428 [details]
new popup menu entry
Comment 5 Theofanis Oikonomou 2013-04-10 15:20:53 UTC
Created attachment 133429 [details]
Horizontal split in action
Comment 6 Theofanis Oikonomou 2013-04-10 15:22:12 UTC
Created attachment 133430 [details]
new View menu entry
Comment 7 Theofanis Oikonomou 2013-04-10 15:43:50 UTC
Please review the addition of two methods in TopComponent.SubComponent class. Any comments on the split implementation are more than welcomed. Thank you
Comment 8 Jaroslav Tulach 2013-04-11 14:32:36 UTC
Y01 Typo 'cunjunction'

Y02 I don't see what an API user has to do the make the splitting work. A <usecase> in arch.xml would be nice. Or is the splitting automatic.

Y03 What can an API user do to disable the splitting?

Y04 Why are actions registered via layer and not via @ActionRegistration and @ActionReference annotations?

Y05 Are the new methods in SubComponent needed only because of PaletteController? How does one find out that the values of these methods changed?

Y06 No tests.
Comment 9 Theofanis Oikonomou 2013-04-11 15:53:51 UTC
(In reply to comment #8)
> Y01 Typo 'cunjunction'

sorry

> 
> Y02 I don't see what an API user has to do the make the splitting work. A
> <usecase> in arch.xml would be nice. Or is the splitting automatic.

the splitting is automatic for Multiview elements

> 
> Y03 What can an API user do to disable the splitting?

I can add a branding token so that someone wanting multiviews but not splitting can disable it and all the relevant menu-items would become invisible

> 
> Y04 Why are actions registered via layer and not via @ActionRegistration and
> @ActionReference annotations?

I need different names for the menu-items, Split vs Split Document. Can this be done with the annotation?

> 
> Y05 Are the new methods in SubComponent needed only because of
> PaletteController? How does one find out that the values of these methods
> changed?

the list of subcomponent you get from the SubComponent class is "a snapshot valid at the time of the call and shouldn't be held for too long" as stated in the javadoc so the user does not need to be notified if something changes.

> 
> Y06 No tests.

will add some
Comment 10 Theofanis Oikonomou 2013-04-15 14:07:19 UTC
Created attachment 133503 [details]
patch

addressing Y01, Y03 and Y06. Also added support so that when tc is split and the user invokes Clone action the split is also cloned. If there will be no more comments I intend to integrate on Wednesday. Thank you
Comment 11 Theofanis Oikonomou 2013-04-17 07:09:41 UTC
Since there are no more comments I will integrate later today. Thank you for the review.
Comment 12 Theofanis Oikonomou 2013-04-17 09:51:22 UTC
Fixed: http://hg.netbeans.org/core-main/rev/859f42827ac4
Comment 13 Quality Engineering 2013-04-19 03:23:33 UTC
Integrated into 'main-golden', will be available in build *201304182301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/859f42827ac4
User: Theofanis Oikonomou <theofanis@netbeans.org>
Log: #228448 - No ability to split current top component
Comment 14 Michel Graciano 2013-10-08 16:23:17 UTC
Really awesome feature. Thanks.