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 23273

Summary: Wrong implementation of WindowDriver.close()
Product: qa Reporter: Jiri Skrivanek <jskrivanek>
Component: CodeAssignee: issues@qa <issues>
Status: CLOSED FIXED    
Severity: blocker    
Priority: P1    
Version: 3.x   
Hardware: Sun   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Jiri Skrivanek 2002-05-09 10:15:15 UTC
In class DefaultWindowDriver there is following
implementation of the close method:

eDriver.dispatchEvent(oper.getSource(), 
      new WindowEvent((Window)oper.getSource(),
		      WindowEvent.WINDOW_CLOSED));
	((WindowOperator)oper).setVisible(false);

There should be WindowEvent.WINDOW_CLOSING instead
as was in WindowOperator before.

Test case to reproduce (run in IDE):

        JFrameOperator frame = new
JFrameOperator("Explorer [");
        JTreeOperator tree = new
JTreeOperator(frame);
        String sampledir =
System.getProperty("netbeans.user")+File.separator+"sampledir";
        TreePath path =
tree.findPath(sampledir+"|examples|advanced|README",
"|");
        tree.clickOnPath(path, 2);
        JFrameOperator editor = new
JFrameOperator("Source Editor [");
        editor.close();
        tree.clickOnPath(path, 2);

Source editor is made unvisible but not actually
closed. That is why IDE doesn't open source editor
again.
Comment 1 Alexandre Iline 2002-05-11 03:42:45 UTC
53c53
< 					      
WindowEvent.WINDOW_CLOSED));
---
> 					      
WindowEvent.WINDOW_CLOSING));

Comment 2 Jiri Skrivanek 2002-05-13 08:01:33 UTC
Verified.