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 218760 - Remove canWrite call from DataEditorSupport.Env constructor
Summary: Remove canWrite call from DataEditorSupport.Env constructor
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Data Systems (show other bugs)
Version: 7.2
Hardware: All All
: P3 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: PERFORMANCE
: 218746 (view as bug list)
Depends on:
Blocks: 218138
  Show dependency tree
 
Reported: 2012-09-21 12:41 UTC by Egor Ushakov
Modified: 2012-12-20 14:20 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
stacktrace (2.34 KB, text/plain)
2012-09-21 12:41 UTC, Egor Ushakov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Egor Ushakov 2012-09-21 12:41:11 UTC
When selection in projects view change NB recreate EditorSupport for c++ files, this causes filesystem access in EDT and probable ui freeze.
See attached stack trace.
Comment 1 Egor Ushakov 2012-09-21 12:41:47 UTC
Created attachment 124704 [details]
stacktrace
Comment 2 Jan Peska 2012-09-24 14:04:12 UTC
Well I really don't know what should I do with it in Navigator. I only expose panel's lookup in the Navigator TC (needed for cpp editor, see bug #201661). Reassigning to Cnd/Editor, please evaluate.
Comment 3 Alexander Simon 2012-10-11 10:00:25 UTC
I also do not know what to do in CppEditorSupport.
I suppose one of following:
1. do not instantiate unneeded node lookups in the NavigatorController. Ie. do not call n.getLookup().lookupResult(Object.class).allInstances()
2. do not initialize canWrite field in the constructor DataEditorSupport.Env.

Reassign to evaluation.
Comment 4 Jaroslav Tulach 2012-10-24 09:16:16 UTC
Are you sure you reassigned to the right place? Try again, please.
Comment 5 Alexander Simon 2012-10-24 10:46:12 UTC
Ok, I try again.

The issue can be fixed by several ways:
1. Remove unneeded IO in DataEditorSupport.Env constructor.
I do not see any reason to initialize canWrite field in the constructor.
2. NavigatorController calls Node.getLookup().lookupResult(Object.class).allInstances() to merge lookups.
Navigator should provide more clever lookup merger that do not instantiate all objects.
3. NavigatorController merges lookups of DataNode and selected in the navigator node. C/C++ navigator is needed only lookup of selected node. So do not put self DataNode in the lookup.
Comment 6 Jaroslav Tulach 2012-10-24 16:08:32 UTC
I think I got it now.
Comment 7 Jaroslav Tulach 2012-11-21 16:33:34 UTC
ergonomics#6e83fbac6267
Comment 8 Quality Engineering 2012-11-28 02:36:28 UTC
Integrated into 'main-golden', will be available in build *201211280002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/6e83fbac6267
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #218760: Don't check canWrite status in constructor of Env. Wait for some I/O operation
Comment 9 David Strupl 2012-12-20 14:20:10 UTC
*** Bug 218746 has been marked as a duplicate of this bug. ***