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.
Summary: | File editor tab disappears when file is deleted | ||
---|---|---|---|
Product: | platform | Reporter: | pekarna <pekarna> |
Component: | Text | Assignee: | issues@editor <issues> |
Status: | NEW --- | ||
Severity: | blocker | CC: | jtulach |
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Bug Depends on: | 158177 | ||
Bug Blocks: |
Description
pekarna
2009-02-19 23:54:24 UTC
I know this behaviour is OK when a file is deleted from Projects/Files/Favorites view. So one would need to distinguish the two cases. Maybe FileEvent.isExpected() could help... So you mean the case when file is deleted externally? (even during running build script ie. not when deleted explicitly by user by delete action). CloneableOpenSupport has property change listener on data object. There is no way how to distinguish why/where file was deleted (internal/external or expected/not expected). In addition I have to test what events are fired by file system. It would require new API between loaders (DataObject) and window system (CloneableOpenSupport) If file is deleted and then created again original dataobject is invalid and not reused. I must check if it would be possible to keep DataEditorSupport and refresh it ie. to check if file with given path exists and if yes create new DataObject and reload content to editor pane. I assume if file is deleted and not recreated you mean user would close it manually? There would stay just pane with message "File was deleted". 1.If file is deleted I could place dummy component with "File deleted". 2.If component is activated/focused refresh could be performed. Change to RFE as current status is by design. In addition I am not sure if this behavior would be good for all users. This could be hopefully fixed by issue #158177 when automatic filesystem refresh would be switched off. Then external changes would not cause automatic closing of editors. Hi mslama, thanks for taking this.
Yes, I mean the case when the file is deleted externally.
You wrote:
> If file is deleted and then created again original dataobject is invalid and not reused.
But currently, sometimes it happens, that the IDE doesn't refresh the view (e.g. when the IDE window is inactive), and
when I get back to IDE and the file is already re-created, the editor content just redraws. So I thought this is already
solved somehow, and it's only a matter of not closing the window... Wrong guess?
As said before: If there is automatic file system refresh which is propagated to view/UI then editor is closed when file is deleted. So if automatic refresh could be switched off then this problem should be solved too. User would perform manual refresh to get external changes at right moment. If file is already recreated it would be only reloaded as it should have newer time stamp ie. external change is assumed but not file deletion. |