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.
Summary: | Main-project-sensitive actions not consistently run when keystroke first pressed | ||
---|---|---|---|
Product: | projects | Reporter: | Jesse Glick <jglick> |
Component: | Generic Projects UI | Assignee: | Jesse Glick <jglick> |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | anebuzelsky, rbalada |
Priority: | P3 | Keywords: | REGRESSION |
Version: | 6.x | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 178848 |
Description
Jesse Glick
2010-06-15 23:32:07 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 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. Please verify bugfix for this bug ASAP, so it can be integrated into release691 repository. Thanks, -R Anyone available to help verify? 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. main #b10dc54b7c2e transplanted to release691 #f7c4e62beb1e |