Windup Eclipse Plugin Guide

Red Hat JBoss Migration Toolkit 3.0

Simplify Migration of Java Applications

Red Hat Customer Content Services

Abstract

This guide describes how to use the Windup Eclipse Plugin to simplify migration of Java applications.

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.

Note

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

  1. If you do not already have an existing installation, download Eclipse or JBoss Developer Studio and install it.

    Note

    This guide uses Eclipse to refer to an installation of Eclipse or JBoss Developer Studio.

  2. Launch Eclipse.
  3. From the menu bar, select HelpInstall New Software.
  4. Add the Windup update site.

    1. Next to the Work with field, click Add.
    2. In the Name field, enter Windup.
    3. In the Location field, enter http://download.jboss.org/jbosstools/neon/stable/updates/windup/composite/ and press OK.
    4. Select all of the checkboxes under JBoss Tools - Windup and press Next.
  5. Review the installation details and press Next.
  6. Accept the terms of the license agreement and press Finish to install the plugin.
  7. 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 WindowPerspectiveOpen PerspectiveOther. 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 HelpGetting 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 WindowShow ViewIssue 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 WindowShow ViewIssue 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 WindowShow ViewWindup Report.

Chapter 4. Identify and Resolve Migration Issues

Follow these steps to use the Windup Eclipse Plugin to identify and resolve migration issues.

  1. Import the project to analyze into Eclipse.
  2. Create a Windup run configuration. From the Issue Explorer, press the Windup button ( Windup button ).

    Select Windup button

    At a minimum, select the project to analyze. Set additional options as needed.

  3. Click Run to execute Windup.
  4. Review Windup issues listed in the Issue Explorer.
  5. Resolve Windup issues by manually updating code or by using quick fixes when available.
  6. Run Windup again as necessary. Use the drop down next to the Run button ( Run button ) to run an existing configuration.

4.1. Create a Windup Run Configuration

Windup run configurations can be created using the Windup button ( 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 use true 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 ( Run button ).

If the Windup server is not currently running, it will start once a run configuration is executed.

Note

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.

Issue Explorer group by options

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 ( Stale issue 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 ( Resolved issue 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

IconDescription
Mandatory

The issue is mandatory to fix for a successful migration.

Optional

The issue is optional to fix for migration.

Warning

The issue may potentially be an issue during migration.

Resolved

The issue has been resolved.

Stale

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.

Mandatory with quick fix

A quick fix is available for this issue, which is mandatory to fix for a successful migration.

Optional with quick fix

A quick fix is available for this issue, which is optional to fix for migration.

Warning with quick fix

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

Legal Notice

Copyright © 2017 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat Software Collections is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.