Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 4. Analyzing your projects with the MTR plugin
You can analyze your projects with the MTR plugin by creating a run configuration, running an analysis, and then reviewing and resolving migration issues detected by the MTR plugin.
4.1. Creating a run configuration
You can create a run configuration in the Issue Explorer. A run configuration specifies the project to analyze, migration path, and additional options.
You can create multiple run configurations. Each run configuration must have a unique name.
Prerequisite
- You must import your projects into the Eclipse IDE.
Procedure
- In the Issue Explorer, click the MTR icon ( ) to create a run configuration.
On the Input tab, complete the following fields:
- Select a migration path.
- Beside the Projects field, click Add and select one or more projects.
Beside the Packages field, click Add and select one or more the packages.
NoteSpecifying the packages for analysis reduces the run time. If you do not select any packages, all packages in the project are scanned.
On the Options tab, you can select Generate Report to generate an HTML report. The report is displayed in the Report tab and saved as a file.
Other options are displayed. See About MTR command-line arguments in the CLI Guide for details.
- On the Rules tab, you can select custom rulesets that you have imported or created for the MTR plugin.
- Click Run to start the analysis.
4.2. Analyzing projects
You can analyze your projects by running the MTR plugin with a saved run configuration.
Procedure
In the MTR perspective, click the Run button ( ) and select a run configuration.
The MTR plugin analyzes your projects. The Issue Explorer displays migration issues that are detected with the ruleset.
- When you have finished analyzing your projects, stop the MTR server in the Issue Explorer to conserve memory.
4.3. Reviewing issues
You can review issues identified by the MTR plugin.
Procedure
-
Click Window
Show View Issue Explorer. Optional: Filter the issues by clicking the Options menu , selecting Group By and an option.
Right-click and select Issue Details to view information about the issue, including its severity and how to address it.
The following icons indicate the severity and state of an issue:
Table 4.1. Issue icons Icon Description The issue must be fixed for a successful migration.
The issue is optional to fix for migration.
The issue might need to be addressed during migration.
The issue was resolved.
The issue is stale. The code marked as an issue was modified since the last time that MTR identified it as an issue.
A quick fix is available for this issue, which is mandatory to fix for a successful migration.
A quick fix is available for this issue, which is optional to fix for migration.
A quick fix is available for this issue, which may potentially be an issue during migration.
- Double-click an issue to open the associated line of code in an editor.
4.4. Resolving issues
You can resolve issues detected by the MTR plugin by performing one of the following actions:
You can double-click the issue to open it in an editor and edit the source code.
The issue displays a Stale icon ( ) until the next time you run the MTR plugin.
- You can right-click the issue and select Mark as Fixed.
- If the issue displays a Quick Fix icon ( ), you can right-click the issue and select Preview Quick Fix and then Apply Quick Fix.