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 55818

Summary: [41cat] Problem then try to close a tab
Product: guibuilder Reporter: emargineanu <emargineanu>
Component: CodeAssignee: Jan Stola <jstola>
Status: CLOSED FIXED    
Severity: blocker CC: issues, mkleint
Priority: P2    
Version: 4.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:
Attachments: Uninstallation of JTextComponent before window is really closed

Description emargineanu 2005-03-03 08:47:02 UTC
[ JDK VERSION : 1.5.0 ]

Steps to reproduce:
1. create new Java Application project.
2. add to this project a new JFrame form.
3. make some modifications in source editor, or in
form editor.
4. try to close this tab
5. click cancel on opened dialog box

you will obtain a empty screen
Comment 1 Miloslav Metelka 2005-03-03 09:23:25 UTC
I was able to reproduce. This does not qualify as P1 so lowering to P2
but it's ugly and must definitely be fixed in 4.1. 
Comment 2 Martin Roskanin 2005-03-10 10:40:48 UTC
It is caused by uninstalling JTextComponent from EditorUI.
For stacktrace, look at the attachement. It is probably problem of MultiView or
Form editor (or openide's editor) . Reassigning to MultiView for further
evaluation. 
Comment 3 Martin Roskanin 2005-03-10 10:44:52 UTC
Created attachment 20739 [details]
Uninstallation of JTextComponent before window is really closed
Comment 4 Milos Kleint 2005-03-10 15:00:19 UTC
the problem results from fix of issue #52286

FormEditorSupport.JavaEditorTopComponent.canCloseElement() calls
CloneableEditor.canClose(), which will post a tast to remove the editorKit and
document. However the overall CloseOperationHandler for form editor later shows
a dialog asking user to confirm closing. If user cancels, the scheduled task is
done anyway.
I guess the canClose() should not be called from where it's called now, but from
a place where it can react on user's cancel action.
Comment 5 Jan Stola 2005-03-11 13:35:32 UTC
"Fixed" - CloneableEditor.canClose() is called from
JavaEditorTopComponent.componentClosed(). It would be better to call it from
CloseHandler.resolveCloseOperation(), but we don't have a reference to
JavaEditorTopComponent there.
Comment 6 Marek Grummich 2005-07-11 12:30:47 UTC
Verified