Well, I have created a similar Add-In for classes. The goal of that Add-In is the same as the find(..) & exists(..) Add-In, to speed up code implementation.
What's the functionality?
- It creates required abstract and interface methods
- If the class is not abstract, a protected new(..) and a static construct(..) constructor will be created
- If the class is in the RunBase tree, a static main(..) method is created
- Already created methods will not be touched
How to install:
- Import this XPO containing a private project with a class and a menu item.
- Add the menu Item to the menu SysContextMenu (you can decide on what position)
- Add a the code below to the class method SysContextMenu/verifyItem before line 217 (switch menuItem)
case menuItemActionStr(DEV_CreateDefClsMeths):
return ! docNode && _firstType == UtilElementType::Class; - In AOT, select a class and open context menu/Add-Ins. You will see now the new entry named Create default class methods. Klick it to process.
It works in AX 2009. Not tested for AX 4.0
(this article is available in English only)
