-
Language:
English
-
Language:
English
Windup Eclipse Plugin Guide
Simplify Migration of Java Applications
Abstract
Chapter 1. Introduction
1.1. About the Windup Eclipse Plugin Guide
This guide is for engineers, consultants, and others who want to use the Windup Eclipse Plugin to assist with migrating applications.
This guide uses Eclipse to refer to an installation of Eclipse or JBoss Developer Studio.
See the Windup User Guide to learn more about Windup features, supported migration paths, reports, and rules.
1.2. About the Windup Eclipse Plugin
The Windup Eclipse Plugin makes application migrations and upgrades faster and easier by bringing Windup’s migration assistance to Eclipse and Red Hat JBoss Developer Studio. It analyzes your projects using Windup, marks migration issues in the source code, provides guidance to fix the issues, and offers automatic code replacement when possible.
1.3. Supported Configurations
The Windup Eclipse Plugin is tested in following development environments.
- Eclipse 4.6 (Neon)
- Red Hat JBoss Developer Studio 10.2
Chapter 2. Install the Windup Eclipse Plugin
Review the supported configurations to make sure that you are using a development environment that is compatible with the Windup Eclipse Plugin.
Install the Plugin
If you do not already have an existing installation, download Eclipse or JBoss Developer Studio and install it.
NoteThis guide uses Eclipse to refer to an installation of Eclipse or JBoss Developer Studio.
- Launch Eclipse.
- From the menu bar, select Help → Install New Software.
Add the Windup update site.
- Next to the Work with field, click Add.
-
In the Name field, enter
Windup
. -
In the Location field, enter
http://download.jboss.org/jbosstools/neon/stable/updates/windup/composite/
and press OK. - Select all of the checkboxes under JBoss Tools - Windup and press Next.
- Review the installation details and press Next.
- Accept the terms of the license agreement and press Finish to install the plugin.
- Restart Eclipse for the changes to take effect.
Chapter 3. Access the Windup Eclipse Tools
Once the plugin is installed, the Windup Eclipse tools are available in the Windup perspective. To open the Windup perspective, navigate to Window → Perspective → Open Perspective → Other. Select Windup and press OK.
Review the plugin components and then get started identifying and resolving migration issues. You can also view the embedded help for the plugin by selecting Help → Getting Started in Eclipse.
3.1. Windup Eclipse Plugin Components
The following components are available in the Windup perspective when using the Windup Eclipse Plugin to analyze projects.
- Issue Explorer
This view allows you to explore the Windup issues for projects that have been analyzed.
If this view is not visible in the Windup Perspective, you can open it by selecting Window → Show View → Issue Explorer.
- Windup Server
The Windup server is a separate process that executes the Windup analysis, flags the migration issues, and generates the reports.
You can start, stop, and view the status of the Windup server from the Issue Explorer.
- Issue Details
This view shows detailed information about the selected Windup issue, including the hint, severity, and any additional resources.
If this view is not visible in the Windup Perspective, you can open it by selecting Window → Show View → Issue Details.
- Windup Report
This view shows the HTML reports that are generated when Windup is executed. From the report landing page you can navigate to detailed reports, such as Migration Issues, Application Details, and Dependencies.
Note that the Windup run configuration used must have the Generate Report option selected in order for the Windup reports to be generated.
If this view is not visible in the Windup Perspective, you can open it by selecting Window → Show View → Windup Report.
Chapter 4. Identify and Resolve Migration Issues
Follow these steps to use the Windup Eclipse Plugin to identify and resolve migration issues.
- Import the project to analyze into Eclipse.
Create a Windup run configuration. From the Issue Explorer, press the Windup button ( ).
At a minimum, select the project to analyze. Set additional options as needed.
- Click Run to execute Windup.
- Review Windup issues listed in the Issue Explorer.
- Resolve Windup issues by manually updating code or by using quick fixes when available.
- Run Windup again as necessary. Use the drop down next to the Run button ( ) to run an existing configuration.
4.1. Create a Windup Run Configuration
Windup run configurations can be created using the Windup button ( ). A run configuration specifies the project to analyze, migration path, and additional options for the execution. You can create multiple run configurations, and each must have a unique name.
Input
- Migration Path
- Select a migration path, which determines which Windup rulesets are used. The migration path defaults to Anything to EAP 7, but can be changed to any supported migration path.
- Projects
- Select one or more projects to analyze. Hold the Ctrl key to select multiple projects in the list.
- Packages
- Select one or more packages to scan. It is recommended to select only those packages that you need to analyze to reduce the overall Windup execution time. If no packages are selected, all packages in the project will be scanned. Hold the Ctrl key to select multiple packages in the list.
Options
- Report
- Check the Generate Report checkbox if you want to generate the Windup HTML report. The report will be shown in the Windup Report tab and can be found in the Issue Explorer when you group by File.
- Options
Set additional Windup options. Any option that is a boolean flag, such as
enableTattletale
, should usetrue
as the value.See the Windup Command-line Arguments section of the Windup User Guide for a description of each Windup argument.
Rules
- Custom Rules Repositories
- Add a custom rules directory if you have any custom Windup rules.
4.2. Execute Windup
Once a run configuration has been created, you can execute Windup using that configuration in one of the following ways:
- Select the run configuration from the Run Configurations dialog and click Run.
- Select a recent run configuration from the drop down next to the Run button ( ).
If the Windup server is not currently running, it will start once a run configuration is executed.
If you do not plan on running Windup in the near future, it is recommended to stop the Windup server to conserve memory on your machine.
Once execution is complete, the Issue Explorer will be populated with Windup issues.
4.3. Review Windup Issues
Use the Issue Explorer to review migration issues identified by Windup. Different icons indicate the issue’s severity and state.
Change how issues are grouped by adjusting the Group By selections: Severity, Migration Rule, and File.
Double-click the Windup issue in the Issue Explorer to open the associated line of code in an editor. Right-click and select Issue Details to view information about the Windup issue, including its severity and how to address it.
4.4. Resolve Windup Issues
You can resolve Windup issues by updating the code manually or by applying a quick fix when available.
4.4.1. Resolve an Issue Manually
Review the Windup issue details and additional resources and update the source code as necessary. When you update a line of code marked as a Windup issue, the Windup issue will be marked with the stale icon ( ) until the next time that Windup is run on the project.
You can also manually mark a Windup issue as fixed, which will mark the issue with the resolved icon ( ) until the next time that Windup is run on the project. To mark an issue as fixed, right-click the Windup issue in the Issue Explorer and select Mark as Fixed.
4.4.2. Resolve an Issue Using a Quick Fix
Some Windup issues provide a quick fix, which assists in making the necessary edits to address the issue. See the icon legend to see the icons that indicate the Windup issue has a quick fix available.
- Preview a Quick Fix
- Right-click the issue and select Preview Quick Fix. This will bring up a window that allows you to preview the change. From here, you can apply the fix or close the window.
- Apply a Quick Fix
- Right-click the issue and select Apply Quick Fix. This will update the source code as required and will mark the Windup issue as resolved.
Appendix A. Reference Material
A.1. Windup Issue Icon Legend
In the Issue Explorer and file editors, Windup issues use an icon to indicate their severity level and status. The following table describes the meaning of the various icons.
Table A.1. Windup Issue Icons
Icon | Description |
---|---|
The issue is mandatory to fix for a successful migration. | |
The issue is optional to fix for migration. | |
The issue may potentially be an issue during migration. | |
The issue has been resolved. | |
The issue is stale because the code marked as an issue has been modified since the last time that Windup was run on the project. | |
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. |
Revised on 2017-02-17 00:07:24 EST