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.
[Source: XML module - xml/tree-edit/src/org/netbeans/modules/xml/tree/editor/TreeEditorComponent.java] TreeEditorComponent extends CloneableTopComponent. It adds ExplorerPanel into itself. When TreeEditorComponent is activated|deactivated (method call componentActivated() | componentDeactivated()), this should be applied on whole component tree. So, this should be called also on explorerPanel instance, but it is not. ExplorerPanel enable | disable component actions in component(De)Activated methods, so I have to call such methods by reflection to have correctly enabled Cut, Copy, ... actions. I would like to suggest to implement methods component(De)Activated in TopComponent to go thorough component tree and call this method on all TopComponent subclasses.
This sounds more like enhancements to me, nesting of top components is generally not supported. Cc'ing Petr N. - could it mean some significant performance penalty? I don't think so, we can hopefully cache relations somehow.
It really looks like enhancement, but it is not. I do not really think, it is enhancement, when I must use reflection to gain common behaviour.
Nobody ever wanted it before, so I doubt if it is common behaviour. Still it looks like enh to me, I repeat that nesting of tcs is not supported. I can't understand your approach - subclass ExplorerPanel and install needed relationship yourself, no need for reflection....?
Nobody before used TC so complex, but it does not mean that it is not bug. I need to have CloneableTopComponent and use ExplorerPanel, simple use case. If ExplorerPanel extends CloneableTopComponent, I will be happy. I do not understand, why is not nesting of tcs supported? Is it some where described? -- It is changed back to DEFECT, because I still have to use reflection.
Reflection usage can be workarounded using following approach (hopefully) - create your own subclass MyLittleExplorerPanel extends ExplorerPanel, possibly as inner class of your MyBigTopComponent extends CloneableTopComponent. Then simply delegate from MyBigTopComponent.componentActivated to MyLittleExplorerPanel.componentActivated. Side question for David Strupl - why explorer panel doesn't support cloning (extends CloneableTC), do you know?
I have no idea.
Workaround applied, thanks. Closed as WONTFIX.
Resolved for 3.4.x or earlier, no new info since then -> verified
Resolved for 3.4.x or earlier, no new info since then -> closing.