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.
Created attachment 143609 [details] proposed patch v1 Hey, while doing tests with the mantis integration, I noticed, that the context menus of the Tasklist partly show non-applicable actions. For example I don't yet provide a ScheduleProvider, non the less the menu is shown in the context menu of the tasks. The attached patch fixes the places I noticed.
Thanks for reporting and for the patch. I'll just change it a bit - not-supported actions will be disabled as it is in case of e.g. local repository actions.
fix: http://hg.netbeans.org/core-main/rev/e6ef34c2f542
Integrated into 'main-silver', will be available in build *201401070002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/e6ef34c2f542 User: Jan Peska <JPESKA@netbeans.org> Log: Issue #240003 - Task-Dashboard Actions need to check for support Disable scheduling and markAsRead actions if they are not supported
Hey Jan, I checked main-golden (your changes migrated there and are present in the nightly build) - looks good apart from the schedule menu, which is still enabled. The menu is still enabled, although you code changes are sensible (=> the action is disabled). Looks like you need to either change getPopupPresenter, to return a disabled menu when called on a disabled action, or override setEnabled and also disable the menu, when called this way. This change in DashboardUtils.java (class ScheduleMenuAction): # This patch file was generated by NetBeans IDE # It uses platform neutral UTF-8 encoding and \n newlines. --- Base (BASE) +++ Locally Modified (Based On LOCAL) @@ -710,5 +710,11 @@ public JMenuItem getPopupPresenter() { return menu; } + + @Override + public void setEnabled(boolean newValue) { + super.setEnabled(newValue); + menu.setEnabled(newValue); } } +} Should do it. BTW: I'm ok with disabling actions, instead of not showing at all, my implementation was based on the way Open vs. Edit Task were handled).
Thanks for validation and additional patch. fix: http://hg.netbeans.org/core-main/rev/bdd287eb73a1