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 68133

Summary: [50cat] using CloneableTopComponent or other abstract classes in formeditor
Product: guibuilder Reporter: lordy <lordy>
Component: CodeAssignee: issues@guibuilder <issues>
Status: NEW ---    
Severity: blocker    
Priority: P3    
Version: 5.x   
Hardware: Other   
OS: Other   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: patch of /form/src/org/netbeans/modules/form/GandalfPersistenceManager.java

Description lordy 2005-11-04 23:03:54 UTC
[ BUILD # : 200511031800 ]
[ JDK VERSION : 1.5.0_05 ]

I try to use CloneableTopComponent in FormEditor.

reproduce:
* New File
* choose "NetBeans Module Development"
* choose "Window Component"
* next next next finish
* change "final class testTopComponent extends TopComponent 
{" to "final class testTopComponent extends 
CloneableTopComponent {"
* change to designer view
* i get a exception... "check if it real a javabean"

I take a look at the CloneableTopComponent source and see that 
it is a abstract class which extends TopComponent. I wonder a 
little around that and try to find a way to fix it.

I was able to fix it. I want to use CloneableTopComponent, but 
i'm not sure if this is a good solution. But i'm interessed what 
you think about.
Comment 1 lordy 2005-11-04 23:05:04 UTC
Created attachment 26644 [details]
patch of /form/src/org/netbeans/modules/form/GandalfPersistenceManager.java
Comment 2 Tomas Pavek 2005-12-02 15:44:09 UTC
Thanks for the idea and patch. I think we could do it this way, i.e. find the
first non-abstract class if the form superclass is abstract. The user will be
cheated a bit - as the class the form editor works with is different than
declared superclass, but it is perhaps better than if it can't be edited at all.
Should consider a warning.

An enhancement for a future release.