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.
Product Version: NetBeans IDE Dev (Build 200806111204) Java: 1.5.0_12; Java HotSpot(TM) Client VM 1.5.0_12-b04 System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb) Steps to reproduce: -create j2se project -type something into the Main class -save the Main class -open local history for the Main class -delete project -->>the local history tab stays in the editor even when switching to the tab the warning dialog appears - see attached screenshot
Created attachment 62723 [details] Screenshot attached...
Reassign to localhistory component.
> Local history stays opened when the project is deleted 1.) speaking for my self - i would sell it as a feature that the LH stays open when the file for which its opened gets deleted. 2.) nice screenshot. do you also have a messages.log? i could not reproduce the warning
1.)Maybe I don't get it what is this feature for. When the project is deleted then I expect that nothing related to this project is available. 2.)The dialog appears when you switch to e.g. Start Page and then back to the tab with the local history. 100% reproducible on my Win XP machine.
Created attachment 62745 [details] messages.log attached...
> 1.)Maybe I don't get it what is this feature for. to restore removed files? > 2.)The dialog appears when you switch to e.g. Start Page and then back to the tab with the local history. > 100% reproducible on my Win XP machine. can't reproduce on linux. could be win specific the exception comes from org.openide.text reassigning for further evaluation
Yes, this issue is platform specific - I cannot reproduce on Mac. Removing INOCMPLETE keyword because all required info was attached.
What do you expect from openide/editor? It tries to reload document but there is no file for it so it throws FileNotFoundException. I think I have no clue if such exception is important or not ie. if it is result of user action and can be swallowed as used knows what he does or if it is result of some failure accidental deletion of file. To me it looks like result of local history which still uses document for deleted file. I think it should be handled in local history module. IMO CloneableEditor should be released. I can just find out who keeps reference to it and pass it to owner.
I investigated: diff module listens to document property change and when file is deleted it tried to refresh (reload) document. It is definitely wrong IMO as it results in FileNotFoundException on Windows. I do not think CloneableEditor (or DataEditorSupport in this case) can know context and decide if exception should be swallowed or not. If local history really thinks it is important to show local history of deleted files you should handle this case somehow in diff module. Easy fix is to close local history for deleted file. I will attach call stack from CloneableEditorSupport.openDocument.
EditableDiffView loads document twice.
Created attachment 63120 [details] Log
Note: Ignore first line of attached log. DataEditorSupport log comes after Loading document as it is run asynchronously in another thread. So first loading is for C:\Documents and Settings\Administrator\My Documents\NetBeansProjects\JavaApplication5\src\javaapplication5\Main.java (listed below call stack) and second loading is again for the same file.
CloneableEditorSupport.loadDocument() should not be popping up error dialogs but rather leave error resolution to its clients. EditableDiffView is already handling all document loading problems.
Yes. CES.loadDocument(EditorKit, StyledDocument) shows this dialog but it should not. I have to check history why it is there.
Fixed main #faa6f8b8a24c
Integrated into 'main-golden', will be available in build *200810161401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/faa6f8b8a24c User: Marek Slama <mslama@netbeans.org> Log: #137078: Do not show Warning dialog from CES.loadDocument for IOException.
*** Issue 38889 has been marked as a duplicate of this issue. ***
*** Issue 103215 has been marked as a duplicate of this issue. ***
*** Issue 158342 has been marked as a duplicate of this issue. ***