DVT Eclipse IDE Quick Fix Proposals - How to Align Declarations and Implementations of Extern Method
Description
DVT helps you easily fix signature mismatches between the “extern” prototype and out of body implementation of functions and tasks.
Explore the design and verification tools: www.dvteclipse.com
Or request a license: www.dvteclipse.com/request-license
Transcript
Introduction
DVT helps you easily fix signature mismatches between the extern prototype and out-of-body implementation of functions and tasks.
Fixing Parameter Type Mismatches
Take this function for example, where the parameter types in the implementation differ from the ones in the prototype. Place the editor cursor on the error line, press Ctrl+1, and select Update Prototype to Match Extern Implementation.
Similarly, for this task, the parameter name mismatch can easily be fixed using Update Extern Implementation to Match Prototype.
Fixing Signature Mismatches with Additional Arguments
Now, let's suppose someone changed the signature and added more arguments but forgot to update the implementation too. Fixing this issue is again one quick fix away.
Fixing Return Type Mismatches
Even mismatches in return types can benefit from this automation, as it happens in this case.
Implementing Extern Functions from Prototypes
Imagine you just started working on a new class, and you only want to focus on the big picture at the beginning. Simply create the prototypes for all the required functions and, when done, go through each of the errors, press Ctrl+1 and select Implement Extern Function.
Creating Missing Extern Prototypes Automatically
Now let's create another function similar to this. This time the extern prototype is missing, but DVT can create it for you automatically in the right place. No need to switch context and lose focus by navigating to the class body.