New attribute AutoTypeMenuAttribute
Description
AutoTypeMenuAttribute does the same thing as AddTypeMenuAttribute but specifying the path is not needed. It will automatically add the path recursively to all the sub classes as well. You can add it to both the parent class or the sub class. Adding it just for the sub class is useful for case when you still want to customize the path for other classes. Basically, this attribute is usefull if you have a lot of subclass and you don't want to specify each one.
Example 1: A1 [AutoTypeMenu] - B1 - B2 -- C1 -- C2 --- D1 --- D2 --- D3 ---- E1 ---- E2 -- C3 - B3 the search dropdown will be B1 B2 B2/C1 B2/C2 B2/C2/D1 B2/C2/D2 B2/C2/D3 B2/C2/D3/E1 B2/C2/D3/E2 B2/C3 B3
Example 2: A1 - B1 - B2 -- C1 -- C2 [AutoTypeMenu] --- D1 --- D2 --- D3 ---- E1 ---- E2 -- C3 - B3 the search dropdown will be B1 B2 C1 C2 C2/D1 C2/D2 C2/D3 C2/D3/E1 C2/D3/E2 C3 B3
Changes made
- New class AutoTypeMenuAttribute
- More example
- AdvancedTypePopup needs to receive information about the base type which will be passed to the AddTo function and passed to the GetSplittedTypePath function. It also have extra logic to set the isSingleNamespace to false if any of the type has this attribute attached to them.
- Caching for the result of the recursive search to find the AutoTypeMenuAttribute.