Bug 168060 - Request Mode.getOpenTopComponents
Request Mode.getOpenTopComponents
Status: RESOLVED FIXED
Product: platform
Classification: Unclassified
Component: Window System
6.x
All All
: P3 (vote)
: 6.x
Assigned To: Stanislav Aubrecht
issues@platform
: PERFORMANCE
Depends on:
Blocks: 168453
  Show dependency treegraph
 
Reported: 2009-07-02 19:22 UTC by Jesse Glick
Modified: 2009-07-16 05:59 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments
Profiler snapshot (76.65 KB, image/png)
2009-07-02 19:23 UTC, Jesse Glick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2009-07-02 19:22:08 UTC
Currently if you want to find a list of open TC's in a Mode, you can call Mode.getTopComponents() and check isOpened()
on each. Unfortunately, loading non-open TC's can involve a lot of work.

The fix for issue #156647 requires using WindowManager.modes followed by Mode.topComponents to iterate open editor TC's
in visible order. This can cause lengthy delays when closing projects - see the profiler snapshot, where the window
system is loading the Bugzilla window, which I have opened maybe once and never again.

An API method Mode.getOpenTopComponents, which did not even try to load serialized data and classes from TC's known to
not be open, would be useful here.
Comment 1 Jesse Glick 2009-07-02 19:23:08 UTC
Created attachment 84315 [details]
Profiler snapshot
Comment 2 Jesse Glick 2009-07-14 19:27:10 UTC
*** Issue 168453 has been marked as a duplicate of this issue. ***
Comment 3 Stanislav Aubrecht 2009-07-15 12:15:42 UTC
fixed, core-main cbc223a0ed28

i cannot add new methods to Mode interface but you can use WindowManager.getOpenedTopComponents(Mode)
Comment 4 Quality Engineering 2009-07-16 05:59:50 UTC
Integrated into 'main-golden', will be available in build *200907160201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/cbc223a0ed28
User: S. Aubrecht <saubrecht@netbeans.org>
Log: #168060 - faster method to retrieve the list of TopComponents opened in a Mode


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo