Refactoring in the DVT Eclipse IDE - Split a Method into 'extern' Prototype and Implementation

Overview

It is convenient to move function or task implementations outside the body of the class declaration.

With DVT, you can easily refactor existing method declarations into an 'extern' prototype and implementation pair. Simply click on a method's declaration and press Ctrl+1 to access this functionality.

Explore the design and verification tools: https://www.dvteclipse.com
Or request a license: https://www.dvteclipse.com/request-license

Details

Splitting a Method into Extern Prototype and Implementation

In DVT, you can easily move method implementations outside the body of the class declaration.

To split a method into an extern prototype and implementation:

  1. Click on the function declaration and press CTRL+1.
  2. Select Split into Extern Prototype and Implementation.
  3. Press Enter.

The method declaration is replaced with the extern prototype signature and the method implementation is inserted after endclass.

Navigating to the Implementation

To quickly jump to the implementation:

  • Hold down the CTRL key.
  • Hover over the function name.
  • Click Open Implementation.

Joining Extern Prototype and Implementation

The reverse operation is also available. Simply select Join Extern Prototype and Implementation from the proposals list.

Accessing Refactoring Operations from the Right-Click Menu

You can also access refactoring operations from the editor's right-click menu.