MLReplaceDeprecatedAPI

MacroModule
author MeVis Medical Solutions AG
package MeVisLab/Standard
definition MLReplaceDeprecatedAPI.def
keywords deprecation

Purpose

The module MLReplaceDeprecatedAPI can warn or replace ML deprecated API usage on recursive file trees.

It is a simple whole word parser, so it may replace more than you intended, so make sure that you review the code after applied replacements.

Details

An alternative is to add:

DEFINES += ML_WARN_DEPRECATED

to your profiles to find usage of deprecated API.

Note: The Warn mode will report more than the replace mode will replace, since some replacements are ambiguous.

Warning: If this tool runs in Replace mode, it will replace text in your files without backups.

Windows

Default Panel

../../../Modules/Macros/Helpers/mhelp/Images/Screenshots/MLReplaceDeprecatedAPI._default.png

Parameter Fields

Field Index

Extensions: String
Filter: String
Level: Integer
Mode: Enum
No Namespace Check: Bool
Path: String
Run: Trigger
Verbose: Bool

Visible Fields

Path

name: path, type: String

Sets the root path for recursive file search.

Extensions

name: extensions, type: String, default: h cpp

Sets the file extensions that are used for searching.

Mode

name: mode, type: Enum, default: Warn

Defines the mode the tool is running in.

Values:

Title Name
Warn Warn
Replace Replace

Run

name: run, type: Trigger

If pressed, the tool searches / replaces uses of deprecated ML API.

Verbose

name: verbose, type: Bool, default: FALSE

If checked, the tool prints log messages to the console.

Level

name: level, type: Integer, default: 4, minimum: 0, maximum: 4

The higher the level, the more API is warned/replaced.

No Namespace Check

name: noNamespaceCheck, type: Bool, default: FALSE

Disable check for ML namespace existence in files.

Filter

name: filter, type: String

Regexp to filter what should be replaced.