Skip to content

Commit

Permalink
Updating
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Arnold <anarnold@redhat.com>
  • Loading branch information
anarnold97 committed Feb 20, 2024
1 parent 3e9fb64 commit 255e6af
Show file tree
Hide file tree
Showing 6 changed files with 140 additions and 6 deletions.
27 changes: 27 additions & 0 deletions docs/topics/mtr-installing-vs-code-extension.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Module included in the following assemblies:
//
// * docs/vsc-extension-guide/master.adoc

:_content-type: PROCEDURE
[id="installing-vs-code-extension_{context}"]
= Installing the {ProductShortName} extension for Visual Studio Code

You can install the {ProductShortName} extension for Visual Studio Code (VS Code).

.Prerequisites
include::snippet_jdk-hardware-mac-prerequisites.adoc[]

.Procedure

. Set the environmental variable `JAVA_HOME`:
+
[source, terminal,subs="attributes+"]
----
$ export JAVA_HOME=jdk11
----

. In VS Code, click the *Extensions* icon on the Activity bar to open the *Extensions* view.
. Enter `{ProductName}` in the Search field.
. Select the *{ProductName}* extension and click *Install*.
+
The {ProductShortName} extension icon (image:vs_extension_icon.png[{ProductShortName} code extension]) is displayed on the Activity bar.
20 changes: 20 additions & 0 deletions docs/topics/mtr-vs-code-extension-interface.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Module included in the following assemblies:
//
// * docs/vsc-extension-guide/master.adoc

:_content-type: CONCEPT
[id="vs-code-extension-interface_{context}"]
= {ProductShortName} extension interface



The interface of the {ProductName} ({ProductShortName}) extension is designed to make it easier for you to find information and perform actions:

* In the left pane, you can see a directory tree named *Analysis Results* with a report icon at its top. You can click the icon to open the {ProductShortName} report in your browser. Beneath the report icon are the other elements of the tree: the applications analyzed by {ProductShortName}, the rulesets used, and the issues discovered by the analysis.
* In the upper right pane, you can configure an analysis.
* In the lower right pane, you can see the settings of the configuration, including source, target, and advanced options. You can view the progress of an analysis in this pane. When the analysis is completed, you can click the *Open Report* button to open the {ProductShortName} report, which describes any issues you need to address before you migrate or modernize your application. For more information, see link:{ProductDocUserGuideURL}#review-reports_cli-guide[Reviewing the reports] in the _{UserCLIBookName}_.
.{ProductShortName} extension interface

image::mtr-extension-interface.png[{ProductShortName} extension interface]

34 changes: 34 additions & 0 deletions docs/topics/mtr-vs-code-extension-resolving-issues.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// Module included in the following assemblies:
//
// * docs/vsc-extension-guide/master.adoc

:_content-type: PROCEDURE
[id="vs-code-extension-resolving-issues_{context}"]
= Resolving issues

You can resolve issues by doing one of the following:

* Using a _Quick Fix_ automatic code replacement
* Editing the code of a file with a hint
You can keep track of resolved issues by using the *Delete* or *Mark as Complete* options. Files marked deleted or completed will be analyzed again the next time you analyze a project that contains them.

== Using a Quick Fix

You can use a Quick Fix automatic code replacement to save time and ensure consistency in resolving repetitive issues.

.Procedure

. In the left pane, right-click an issue that has the Quick Fix icon (image:vs_optional.png[Optional or Quick Fix]) and select *Preview Quick Fix*.
. To accept the suggested fix, right-click the issue again and select *Apply Quick Fix.*
. Optional: Right-click the issue and select *Mark as Complete* or *Delete*.

== Editing the code of a file

You can edit the file of a project imported to VS Code.

.Procedure

. In the left pane, right-click an issue and select *Open Code*.
. Make any changes needed to the code and save the file.
. Optional: Right-click the issue and select *Mark as Complete* or *Delete*.
21 changes: 21 additions & 0 deletions docs/topics/mtr-vs-code-extension-reviewing-issues.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Module included in the following assemblies:
//
// * docs/vsc-extension-guide/master.adoc

:_content-type: PROCEDURE
[id="vs-code-extension-reviewing-issues_{context}"]
= Reviewing issues

You can use the {ProductShortName} extension icons to prioritize issues based on their severity. You can also see which issues have a _Quick Fix_ automatic code replacement.

.Procedure

. Select a run configuration directory on the left pane.
. Expand its folders to view the *Hints* generated for each application file.
. Select a hint to view the source code.
. Right-click a hint and select *View Details* to view the Rule ID and other information.
. Prioritize issues based on the following icons, which are displayed next to each hint:

** image:vs_mandatory.png[Mandatory] : The issue must be fixed for a successful migration.
** image:vs_potential.png[Warning] : The issue might need to be addressed during migration.
** image:vs_optional.png[Optional or Quick Fix] : The issue is optional to fix for migration. This icon is also used to indicate any Quick Fixes available for an issue.
32 changes: 32 additions & 0 deletions docs/topics/mtr-vs-code-extension-run-configuration.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Module included in the following assemblies:
//
// * docs/vsc-extension-guide/master.adoc

:_content-type: PROCEDURE
[id="vs-code-extension-run-configuration_{context}"]
= Configuring a run configuration

You can configure multiple run configurations to run against each project you import to VS Code.

.Prerequisites

* `windup-cli` executable installed. You can download the `windup-cli` executable from link:{DevDownloadPageURL}[{LC_PSN} download].
.Procedure

. In *Extensions* view, click the {ProductName} icon (image:vs_extension_icon.png[{ProductShortName} code extension]) on the Activity bar.
. Click the *+* (plus sign) next to *{ProductName}* to add a run configuration.
. Complete the following configuration fields:

** *Name*: Enter a meaningful name for the analysis configuration or accept the default.
** *cli*: Enter the path to the cli executable. For example: `$HOME/{LC_PSN}-cli-{ProductDistributionVersion}/bin/windup-cli`.
** *Input*: Set to the path of the project that you have open within your IDE by clicking *Add* and doing one of the following:

*** Enter the input file or directory and press Enter.
*** Click *Open File Explorer* and select the directory.

** *Target*: Select one or more target migration paths.

. Right-click the run configuration and select *Run*.
+
When the analysis is completed, you can click the *Open Report* button to open the {ProductShortName} report, which describes any issues you need to address before you migrate or modernize your application. For more information, see link:{ProductDocUserGuideURL}#review-reports_cli-guide[Reviewing the reports] in the _{UserCLIBookName}_.
12 changes: 6 additions & 6 deletions docs/vs-code-extension-guide-mtr/master.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,31 @@ include::topics/making-open-source-more-inclusive.adoc[]
== Introduction

// About the VS Code extension
include::topics/about-ide-addons.adoc[leveloffset=+2]
include::topics/mtr-about-ide-addons.adoc[leveloffset=+2]

// About {ProductName}
include::topics/mtr-what-is-the-toolkit.adoc[leveloffset=+2]

// Install the extension
include::topics/installing-vs-code-extension.adoc[leveloffset=+1]
include::topics/mtr-installing-vs-code-extension.adoc[leveloffset=+1]

[id="analyzing-projects-with-vs-code-extension_{context}"]
== Analyzing your projects with the {ProductShortName} extension

You can analyze your projects with the {ProductShortName} extension by creating a run configuration and running an analysis.

include::topics/vs-code-extension-interface.adoc[leveloffset=+2]
include::topics/mtr-vs-code-extension-interface.adoc[leveloffset=+2]

include::topics/vs-code-extension-run-configuration.adoc[leveloffset=+2]
include::topics/mtr-vs-code-extension-run-configuration.adoc[leveloffset=+2]

[id="reviewing-and-resolving-issues-with-vs-code-extension_{context}"]
== Reviewing and resolving migration issues

You can review and resolve migration issues identified by the {ProductShortName} extension in the left pane.

include::topics/vs-code-extension-reviewing-issues.adoc[leveloffset=+2]
include::topics/mtr-vs-code-extension-reviewing-issues.adoc[leveloffset=+2]

include::topics/vs-code-extension-resolving-issues.adoc[leveloffset=+2]
include::topics/mtr-vs-code-extension-resolving-issues.adoc[leveloffset=+2]


:!vsc-extension-guide:

0 comments on commit 255e6af

Please sign in to comment.