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 38610 - FileNotFoundException when you delete a file opened in editor
Summary: FileNotFoundException when you delete a file opened in editor
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: PC All
: P1 blocker (vote)
Assignee: issues@editor
URL:
Keywords:
: 34143 38739 38829 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-01-12 10:07 UTC by Jiri Skrivanek
Modified: 2007-11-05 13:44 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
stack trace (1.62 KB, text/plain)
2004-01-12 10:08 UTC, Jiri Skrivanek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2004-01-12 10:07:44 UTC
FileNotFoundException is thrown when you delete a
file opened in editor. To reproduce:

- run IDE
- create a Java file from teplate
- delete that file (assuming it is opened in editor)
- exception is thrown (see attachment)

Tested in build 200401111900, JDK1.4.2_03, WindowsXP.
I don't know whether it belongs to openide or
editor. Please, re-assign if needed.
Comment 1 Jiri Skrivanek 2004-01-12 10:08:12 UTC
Created attachment 12822 [details]
stack trace
Comment 2 Petr Nejedly 2004-01-13 17:03:33 UTC
OK, easily reproduced.
Comment 3 Petr Nejedly 2004-01-14 13:25:25 UTC
In release 3.5 and before, the IDE used to close the opened file when
it was about to be deleted (It closed it even when the file was
modified in the editor, which is a bit questionable).
Now it doesn't work for some reason.
Comment 4 Petr Nejedly 2004-01-14 13:47:17 UTC
*** Issue 34143 has been marked as a duplicate of this issue. ***
Comment 5 Petr Nejedly 2004-01-14 14:37:45 UTC
I've found it.
It is the editor's LayerFoldMaintainerListProvider which is
responsible for it.
It plans an update on any change of the document (including file
deletion, it seems) and does openDocument call then (why?)
which tries to open already closed document.

I'm not sure how this relates to the issue 34143 I've marked as
duplicate, as it predates the editor merge, but I'm not able to
reproduce 34143 anymore after I hacked the editor to not cause this issue.
Comment 6 Petr Nejedly 2004-01-14 14:47:35 UTC
*** Issue 38739 has been marked as a duplicate of this issue. ***
Comment 7 Petr Nejedly 2004-01-15 16:12:41 UTC
*** Issue 38829 has been marked as a duplicate of this issue. ***
Comment 8 Martin Roskanin 2004-01-19 10:54:09 UTC
fixed in [maintrunk]

/cvs/editor/src/org/netbeans/modules/editor/LayerFoldMaintainerListProvider.java,v
 <--  LayerFoldMaintainerListProvider.java
new revision: 1.3; previous revision: 1.2
Comment 9 Jiri Skrivanek 2004-01-22 14:42:53 UTC
Verified in build 20040122-0424.