Sort and Rearrange Delphi and C# source code

Sorting and rearranging your code helps to keep your code organized. Sorted code makes is easier to maintain and to navigate in. Whether you group related members based on functionality or sort members based on entity type, visibility and name: ModelMaker Code Explorer has a rich set of features to help you re-order your code.

ModelMaker Code Explorer has extended support to Sort and Rearrange Delphi and C# .NET source code:


Instant Drag- Drop Rearrange members

The Members view Rearrange Mode allows instantly dragging entities (classes, members) to a new location. Comments and attributes are moved with the entities. For pascal there are two rearrange modes: Ctrl+Alt+R for class interface order and Ctrl+Alt+I for method implementation order.

Rearrange Mode


Sort Classes using predefined sorting schemes

Sort (class) members according the customizable default scheme. Sort selected class, all classes. Pascal Module procedures can also be sorted.

Apply default sorting


User defined default sorting scheme

The default C# code sorting scheme is adjusted using this dialog. Kind and visibility order are defined by placing entities in ordered groups. Region sorting behavior is defined: move to top / bottom, sort within regions. For pascal a set of options is available to define class interface and implementation order.

Apply default sorting


Rearrange class members using predefined sorting schemes.

The Rearrange dialog is used to custom-sort a class. For Pascal both class interface and class implementation can be rearranged. Predefined sorting schemes are ready available.

Custom rearrange code


Sorting Hints

Sorting hints are emitted for classes not matching the user definable default sorting scheme. Clicking the hint detail in the members view locates the first member conflicting with the sort order.

Sorting Hints