Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 187621 - Main-project-sensitive actions not consistently run when keystroke first pressed
Main-project-sensitive actions not consistently run when keystroke first pressed
Status: VERIFIED FIXED
Product: projects
Classification: Unclassified
Component: Generic Projects UI
6.x
PC Linux
: P3 (vote)
: 7.0
Assigned To: Jesse Glick
issues@projects
69patch1
: REGRESSION
Depends on:
Blocks: 178848
  Show dependency treegraph
 
Reported: 2010-06-15 23:32 UTC by Jesse Glick
Modified: 2010-06-24 22:07 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2010-06-15 23:32:07 UTC
Probably due to fix of bug #178848, sometimes when you press F11, F6, etc. with a capable project selected, nothing happens until you press it again. Probably the action is still disabled. I am running with all toolbars disabled, in case it matters.
Comment 1 Jesse Glick 2010-06-22 16:20:13 UTC
If the Run toolbar is hidden there is no remaining property change listener to most main-project-sensitive actions. (Debug Project has a couple anyway, but Build Project etc. does not.) If the action was formerly disabled, and the selection is changed so that a valid project is selected, the action is marked "dirty" but not eagerly refreshed. However, in 6.8, if the keyboard shortcut (e.g. F11) is pressed, the IDE's keystroke handler checks action.isEnabled(), which forces an immediate refresh of action state. After refresh for m-p-s actions was made asynchronous in 6.9, the keystroke handler would call isEnabled and a refresh would be scheduled, but isEnabled would still return false on that call; that is why pressing the key a second time would work.

(When the Run toolbar is visible - the default setup for the IDE - all visible actions are refreshed eagerly as soon as selection changes, so the problem is not visible.)

The fix is to force synchronous refresh when action state is directly queried, while continuing to run asynchronous refresh in response to change events (usually change in selection). core-main #b10dc54b7c2e
Comment 2 Quality Engineering 2010-06-23 03:30:35 UTC
Integrated into 'main-golden', will be available in build *201006230001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/b10dc54b7c2e
User: Jesse Glick <jglick@netbeans.org>
Log: Issue #187621: update enablement state for (main-)project actions immediately if the keyboard shortcut is invoked.
Comment 3 rbalada 2010-06-23 22:30:50 UTC
Please verify bugfix for this bug ASAP, so it can be integrated into release691
repository.

Thanks,
-R
Comment 4 Jesse Glick 2010-06-23 23:31:37 UTC
Anyone available to help verify?
Comment 5 Antonin Nebuzelsky 2010-06-24 14:22:45 UTC
I am able to reproduce reliably in 6.9 with the following steps:

* have 2 projects open, none of them as a main project
* unselect project A
* show Run menu in the main menu bar, actions shown as disabled
* select project A
* F6 - fails
* F6 - succeeds
* repeat from step 2

In the latest trunk build I am not able to reproduce anymore.

Verified.
Comment 6 rbalada 2010-06-24 22:07:28 UTC
main #b10dc54b7c2e transplanted to release691 #f7c4e62beb1e


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