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.
Given a known @ActionID(category=Constants.CATEGORY, id=Constants.ID) ... it is often useful to load that Action for some sort of programmatic presentation. Currently you need to do FileUtil.getConfigObject("Actions/" + Constants.CATEGORY + "/" + Constants.ID.replace('.', '-') + ".instance", Action.class) which is awkward. This should rather be a utility method in Actions.
Created attachment 114514 [details] Proposed patch
Please review.
Employed the new method in a bunch more places. Also changed it to throw IAE when the corresponding @ActionID would have been rejected during compilation, to defend against likely mistakes such as using '-' as a package separator. core-main #f5e9614e5a7d
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/f5e9614e5a7d User: Jesse Glick <jglick@netbeans.org> Log: #205798: API to retrieve a specific action by ID.