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 129337 - SaveAs action updates itself even if it is not visible
Summary: SaveAs action updates itself even if it is not visible
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Actions (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Stanislav Aubrecht
URL:
Keywords: PERFORMANCE
Depends on:
Blocks: 126018
  Show dependency tree
 
Reported: 2008-03-05 19:28 UTC by Jaroslav Tulach
Modified: 2008-12-22 10:03 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Snapshot from profiler (272.53 KB, application/octet-stream)
2008-03-05 19:28 UTC, Jaroslav Tulach
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2008-03-05 19:28:14 UTC
I am working on fix for issue 126018 and now, when running the test in
performance/scalability
project, the slowest operation while switching tabs seems to be update of SaveAs action. That is curious, because the 
action is not even visible.

Please fix it by counting listeners attached to your action and disabling all refreshes when no are present.
Comment 1 Jaroslav Tulach 2008-03-05 19:28:58 UTC
Created attachment 57828 [details]
Snapshot from profiler
Comment 2 Jaroslav Tulach 2008-03-05 19:34:13 UTC
If you want to work on the same data as me, you can use bundle with my changes:
hg unbundle http://www.netbeans.org/nonav/issues/showattachment.cgi/57829/tabs.Mar3.2008.hg

Comment 3 Stanislav Aubrecht 2008-03-06 11:53:19 UTC
fixed

3cd8e5e3bf34
Comment 4 Jaroslav Tulach 2008-03-06 20:54:43 UTC
+            public void propertyChange(PropertyChangeEvent evt) {
+                //action needs at least one listener, otherwise it won't refresh its enabled state
+            }

Well, the isEnabled method shall work correctly even if there is no listener. Just no need to refresh, until one 
really asks for isEnabled. I am not sure if this is your implementation.
Comment 5 Stanislav Aubrecht 2008-03-07 12:36:35 UTC
you're right

beef255756c6