Skip to content

[WIP] Mod docs + DITA preps work for the VSCode Guide #170

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions docs/topics/installing-vs-code-extension.adoc

This file was deleted.

25 changes: 0 additions & 25 deletions docs/topics/vs-code-extension-interface.adoc

This file was deleted.

32 changes: 0 additions & 32 deletions docs/topics/vs-code-extension-resolving-issues.adoc

This file was deleted.

20 changes: 0 additions & 20 deletions docs/topics/vs-code-extension-reviewing-issues.adoc

This file was deleted.

34 changes: 0 additions & 34 deletions docs/topics/vs-code-extension-run-configuration.adoc

This file was deleted.

29 changes: 29 additions & 0 deletions docs/topics/vscode/con_intro-to-vscode-for-mta.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
:_newdoc-version: 2.18.5
:_template-generated: 2025-07-21
:_mod-docs-content-type: CONCEPT

[id="intro-to-vscode-for-mta_{context}"]
= Introduction to the {ProductShortName} extension for Microsoft Visual Code

You can migrate and modernize applications by using the {ProductName} ({ProductShortName}) {AddonType} for {IDEName}.

The {ProductShortName} {AddonType} can perform the following actions:

* Analyze your projects with customizable rulesets.
* Mark issues in the source code.
* Provide guidance to fix the issues.
* Perform automatic code replacement, if possible.

ifdef::vsc-extension-guide[]
The {ProductShortName} extension is also compatible with Visual Studio Codespaces, the Microsoft cloud-hosted development environment.
endif::[]

ifdef::idea-plugin-guide[]
The {AddonType} supports both the Community Edition and the Ultimate version of {IDEName}.
endif::[]


// This module can be reused in the following files, if needed:
//
// * docs/intellij-idea-plugin-guide/master.adoc
// * docs/eclipse-code-ready-guide/master.adoc
16 changes: 16 additions & 0 deletions docs/topics/vscode/con_vscode-extension-interface.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
:_mod-docs-content-type: CONCEPT
[id="vscode-extension-interface_{context}"]
= {ProductShortName} Visual Studio Code extension interface

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

* In the left pane, you can see the *Analysis Results* directory tree that includes the following elements:

** A report icon. You can click the icon to open the {ProductShortName} report in your browser.
** The applications analyzed by {ProductShortName}.
** The rulesets used for the analysis.
** 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:https://docs.redhat.com/en/documentation/migration_toolkit_for_applications/7.3/html-single/cli_guide/index#reviewing-analysis-reports_cli-guide[Reviewing an analysis report].

1 change: 1 addition & 0 deletions docs/topics/vscode/images
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,33 @@

[id="configuring-kantra-directory_{context}"]
= Configuring the .kantra directory


[role="_abstract"]
Starting from {ProductFullName} 7.2.0, you can perform an application analysis in the containerless mode. Before running the analysis, you must create and configure the `.kantra` directory.

.Prerequisites

* You installed the {ProductShortName} extension version 7.2.0 or later on your system. For more information, see xref:installing-vs-code-extension_vsc-extension-guide[Installing the MTA extension for Visual Studio Code].
* You installed the {ProductShortName} extension version 7.2.0 or later on your system. For more information, see xref:installing-vscode-extension_vsc-extension-guide[Installing the {ProductShortName} extension for Visual Studio Code].
* You installed the {ProductShortName} distribution version 7.2.0 or later. For more information, see link:https://docs.redhat.com/en/documentation/migration_toolkit_for_applications/7.2/html/cli_guide/installing_and_running_the_cli#installing-downloadable-cli-zip_cli-guide[Installing the CLI .zip file].

.Procedure

. Create a directory named `.kantra` in your `$HOME` directory:
+
[source, terminal,subs="attributes+"]
----
$ mkdir ~/.kantra/
----
[subs="+quotes"]
....
$ *mkdir ~/.kantra/*
....

. Move all the files from the link:https://docs.redhat.com/en/documentation/migration_toolkit_for_applications/7.2/html/cli_guide/installing_and_running_the_cli#installing-downloadable-cli-zip_cli-guide[extracted {ProductShortName} directory], except the `mta-cli` binary, into the `~/.kantra` directory.
+
[source, terminal,subs="attributes+"]
----
$ mv !(mta-cli) ~/.kantra/
----
[subs="+quotes"]
....
$ *mv !(mta-cli) ~/.kantra/*
....


.Verification

* Verify that you created and configured the `.kantra` directory correctly by running the application analysis. For more information, see xref:analyzing-projects-with-vs-code-extension_vsc-extension-guide[Analyzing your projects with the MTA extension].

* Verify that you created and configured the `.kantra` directory correctly by running the application analysis. For more information, see xref:vscode-analyzing-application_vsc-extension-guide[Configuring and running an application analysis].
33 changes: 33 additions & 0 deletions docs/topics/vscode/proc_installing-vscode-extension.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
:_mod-docs-content-type: PROCEDURE
[id="installing-vscode-extension_{context}"]
= Installing the {ProductShortName} extension for Visual Studio Code

[role="_abstract"]
You can install the {ProductShortName} extension for Visual Studio Code (VS Code).

.Prerequisites

* You installed the Java Development Kit (JDK). {ProductShortName} supports the following JDKs:

** Oracle JDK 17 or later
** Eclipse Temurin™ JDK 17 or later
** OpenJDK 17 or later

* You have 8 GB of RAM available.

* For macOS installation, you have the value of `maxproc` set to `2048` or greater.

.Procedure

. Set the `JAVA_HOME` environmental variable:
+
[subs="+quotes"]
....
$ *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.
34 changes: 34 additions & 0 deletions docs/topics/vscode/proc_vscode-analyzing-application.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
:_mod-docs-content-type: PROCEDURE
[id="vscode-analyzing-application_{context}"]
= Configuring and running an application analysis

[role="_abstract"]
To analyze an application with the {ProductShortName} extension for Visual Studio Code, you must create a run configuration first. You can configure multiple run configurations to run against each project you import to Visual Studio Code.

.Prerequisites

* You installed the `{mta-cli}` executable. You can download `{mta-cli}` from the link:https://developers.redhat.com/products/mta/download[{ProductShortName} download page].

.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.
. Specify the following configuration fields:

** *Name*: Enter a name for the analysis configuration or accept the default suggestion.

** *cli*: Enter the path to the `{mta-cli}` executable, for example: `$HOME/{mta-cli}-{ProductDistributionVersion}/bin/{mta-cli}`.

** *Input*: Set to the path of the project that you have open within your IDE:

... Click *Add*.
... Perform one of the following actions:

**** 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 the issues you need to address before you migrate or modernize your application. For more information, see link:https://docs.redhat.com/en/documentation/migration_toolkit_for_applications/7.3/html-single/cli_guide/index#reviewing-analysis-reports_cli-guide[Reviewing an analysis report].
36 changes: 36 additions & 0 deletions docs/topics/vscode/proc_vscode-reviewing-and-resolving-issues.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
:_mod-docs-content-type: PROCEDURE
[id="vscode-reviewing-and-resolving-issues_{context}"]
= Reviewing and resolving migration issues

[role="_abstract"]
You can use the {ProductShortName} extension icons to prioritize issues based on their severity.

.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]: You must fix the issue for a successful migration.
** image:vs_potential.png[Warning]: You might need to address the issue during the migration.

. Resolve issues by editing the code of a file with a hint:

.. 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*.

////
== 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*.
////

1 change: 1 addition & 0 deletions docs/vs-code-extension-guide/assemblies
4 changes: 2 additions & 2 deletions docs/vs-code-extension-guide/master-docinfo.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<title>Visual Studio Code Extension Guide</title>
<productname>{DocInfoProductName}</productname>
<productnumber>{DocInfoProductNumber}</productnumber>
<subtitle>Identify and resolve migration issues by analyzing your applications with the {ProductName} extension for Visual Studio Code.</subtitle>
<subtitle>Using the {ProductName} extension for Visual Studio Code to identify and resolve migration issues</subtitle>
<abstract>
<para>This guide describes how to use the {ProductName} extension for Visual Studio Code to accelerate large-scale application modernization efforts across hybrid cloud environments on Red Hat OpenShift..</para>
<para>You can use the {ProductName} extension for Visual Studio Code to accelerate large-scale application modernization efforts across hybrid cloud environments on Red Hat OpenShift. You can analyze your applications and identify and resolve issues to prepare these applications for a successful migration.</para>
</abstract>
<authorgroup>
<orgname>Red Hat Customer Content Services</orgname>
Expand Down
Loading