Auto Call Super On Overridden Methods

Is there a way, eg with attributes, to get the IDE to automatically call super.functionName(p1,p2) when a subclass overrides a method?
Same as constructor does on subclasses.

Eg i have a Removed method which calls a protected Internal_Removed() function, allowing the class to remove itself from something. All subclasses need to handle this and overriding the Internal_Removed() it is easy to forget to call super.Internal_Removed().

No. It’s up to you to call the super - sometimes you may not want to do that at all and sometimes you may want it early in the overload, sometimes you may want it later. There’s no way for the IDE or compiler to know which, if any of those, is right.

Consider raising an event to the subclasses instead of relying on them to override. After (or before) the event is raised, you can perform any common actions you’d like. If you need to know if the subclass actually implemented the event, have it return a boolean.

This also makes implementation of the subclasses easier as you have a blueprint to follow by implementing events.

Sorry i didnt mean auto calling it, but litterally adding the line of code into the new empty method

super.methodName(Params)

I thought maybe, with me setting an attribute eg, callsuper = true then when I overload it will auto add super.methodname(params) into the new method, the same as overriding constructor. Then I know I need to call super for things to work properly and call move it into the correct line.

I only want to do this on select methods, not all methods. So I would have managed it all myself. It is just something that stops very hard to track down bugs.

[quote=403021:@Kem Tekinay]Consider raising an event to the subclasses instead of relying on them to override. After (or before) the event is raised, you can perform any common actions you’d like. If you need to know if the subclass actually implemented the event, have it return a boolean.

This also makes implementation of the subclasses easier as you have a blueprint to follow by implementing events.[/quote]

Once the event has been consumed then I would have to re-raise it (a new one as well). This , in my mind, is even more work.
I have a format of protected Internal_MethodName() which I know are the methods to override.

Auto adding the super.methodname call might be possible. There may be a feedback case for this already but I didn’t see it after a quick look.