Pattern Matching

From The Real BLU AGE® Wiki
Jump to: navigation, search
Updating Wiki - Mise à jour du Wiki

The Wiki is currently being updated to the Blu Age 5.4 version. - Le Wiki est en cours de migration vers la version 5.4 de Blu Age.

— The Blu Age Team

Last updated : 11/24/2014
Apply to versions : Blu Age II 5.0 and higher, any technologies.

Introduction

Pattern matching is a powerfull feature to avoid repeating the same modernization actions across multiple programs. It also enables sharing knowledge between team members. Before using the pattern matching feature, ensure that

Usage

Once a recurring coding pattern has been detected in your legacy code

1. Select the line(s) involved in the pattern.

Pattern-1.jpg

2. Right click > select Define pattern.

Pattern-2.jpg

3. Type a name and optionally a description.

Pattern-3.jpg

4. The next page will display all the matching elements. Click Next.

Pattern-4.jpg

5. Select the annotation you want to use. In this case we want to tie this pattern with an already developed function. We will therefore use the Modernized as annotation.

Pattern-5.jpg

6. Select the operation and click Ok.

Pattern-6.jpg

Pattern-7.jpg

7. Your annotations are displayed in the Patterns view.

Pattern-8.jpg

8. Right click on your newly created annotation and select Match Patterns.

Pattern-9.jpg

9. Click on Search.

Pattern-10.jpg

10. Control the results.

Pattern-11.jpg