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 218774

Summary: Accessing file system in EDT: selecting library files in go to file dialog
Product: cnd Reporter: Egor Ushakov <gorrus>
Component: Code ModelAssignee: Andrew Krasny <akrasny>
Status: RESOLVED FIXED    
Severity: normal Keywords: PERFORMANCE
Priority: P3    
Version: 7.3   
Hardware: All   
OS: All   
See Also: http://netbeans.org/bugzilla/show_bug.cgi?id=223668
Issue Type: DEFECT Exception Reporter:
Bug Depends on: 223668    
Bug Blocks: 218138    
Attachments: stacktrace
Proposed fix

Description Egor Ushakov 2012-09-21 13:19:41 UTC
when there are some library files in the results in "go to file" dialog and user clicks on them NB to get file name displayed below goes to file system in EDT, see attached stacktrace
Comment 1 Egor Ushakov 2012-09-21 13:20:02 UTC
Created attachment 124717 [details]
stacktrace
Comment 2 Vladimir Voskresensky 2012-12-11 06:22:52 UTC
Andrew, please, have a look
Comment 3 Andrew Krasny 2012-12-11 09:11:50 UTC
I would propose to made changes in the infrastructure rather than trying to overcome the problem in the cnd's code... 
IMO a good solution would be to extend FileDescriptor with a method like 
String getFilePath() and use it for selection/tooltips.
Comment 4 Andrew Krasny 2012-12-11 09:48:03 UTC
Created attachment 129195 [details]
Proposed fix
Comment 5 Vladimir Voskresensky 2012-12-12 15:39:29 UTC
not a problem after caching FO in FileBuffer
http://hg.netbeans.org/cnd-main/rev/bcec3659efdd

*** This bug has been marked as a duplicate of bug 218790 ***
Comment 6 Vladimir Voskresensky 2012-12-12 16:28:41 UTC
Andrew, after issue #223668 was fixed. May it's still better to provide FO independent file name on our side?
Comment 7 Andrew Krasny 2012-12-12 20:49:06 UTC
What I cannot understand is why the status of the bug (that I'm working on) is changed by others (vv) while nothing was done for it's resolution yet. 

Yes, it requires a fix (the proposed one) on our side. Yes, I will do this - I was waiting for a fix in the API.
Comment 8 Andrew Krasny 2012-12-13 09:18:20 UTC
http://hg.netbeans.org/cnd-main/rev/3c6bd7c5e1c8
Comment 9 Quality Engineering 2012-12-14 02:44:43 UTC
Integrated into 'main-golden', will be available in build *201212140001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/0546c30ff36e
User: Andrew Krasny <akrasny@netbeans.org>
Log: Bug #218774 - Accessing file system in EDT: selecting library files in go to file dialog
Use CsmModelAccessor.getModel().enqueue() instead of own RP for opening a file.