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.
EditorCookie.Observable has three problems: 1) EditorCookie.Observable notifies you for "openedPanes", but the new and old values are null. 2) It is therefore (see 1) impossible to distinguish open and close events: both trigger "openedPanes" and both have null values for old and new 3) The "openedPanes" event is triggered before any panes are available: the EditorCookie.getOpenPanes return null. Very annoying. It seems I am still blocked with the current implementation of EditorCookie.Observable: I cannot register my listeners (Caret) to the opened panes since the event is triggered before they actually exist. Any idea about a workaround?
It is apparently related to bug #23491. The latter shouldn't be closed since it seems not to be fixed...
Found a work around: openedPanes is fire twice when opening: 1) from CloneableEditor.componentOpened() where the panes are still null 2) a bit latter CloneableEditor.$DoInitialize.initVisual() where the panes are not null this time. I use the second one and it is OK. However I have two remarks: 1) Why is this event trigger twice? Especially from CloneableEditor.componentOpened() where the panes are not opened at all. It should be a "openTopComponent" event instead 2) When closing the editor, trigerring a "openedPanes" with the same arguments as when actually opening it is not nice at all. Whether another event like "closedPanes" should be triggered or use the arguments better: old!=null, new==null
Reported by NetCAT 6.9 participant.