Skip to content

Commit

Permalink
start rebrand from mta to mtr
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsteele committed Aug 2, 2022
1 parent 3f087e3 commit 4294bae
Show file tree
Hide file tree
Showing 18 changed files with 48 additions and 48 deletions.
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ node('rhel7'){
if(params.UPLOAD_LOCATION) {
stage('Upload') {
def filesToPush = findFiles(glob: '**/*.zip')
sh "sftp -C ${UPLOAD_LOCATION}/snapshots/intellij-mta/ <<< \$'put -p ${filesToPush[0].path}'"
sh "sftp -C ${UPLOAD_LOCATION}/snapshots/intellij-mtr/ <<< \$'put -p ${filesToPush[0].path}'"
stash name:'zip', includes:filesToPush[0].path
}
}
Expand All @@ -46,7 +46,7 @@ node('rhel7'){
if (!isSnapshot) {
stage("Promote the build to stable") {
def zip = findFiles(glob: '**/*.zip')
sh "sftp -C ${UPLOAD_LOCATION}/stable/intellij-mta/ <<< \$'put -p ${zip[0].path}'"
sh "sftp -C ${UPLOAD_LOCATION}/stable/intellij-mtr/ <<< \$'put -p ${zip[0].path}'"
}
}
}
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# Migration Toolkit for Applications (MTA) for IntelliJ
# Migration Toolkit for Runtimes (MTR) for IntelliJ


## Description

The IntelliJ plugin for the <b>Migration Toolkit for Applications</b> (MTA).
The IntelliJ plugin for the <b>Migration Toolkit for Runtimes</b> (MTR).

Migration Toolkit for Applications (MTA) (the product of the downstream project [Windup](https://github.com/windup/windup)) is a command-line Application Migration and Modernization Assessment tool.
Migration Toolkit for Runtimes (MTR) (the product of the downstream project [Windup](https://github.com/windup/windup)) is a command-line Application Migration and Modernization Assessment tool.

> The documentation for MTA can be found [here](https://developers.redhat.com/products/mta/overview).
> The documentation for MTR can be found [here](https://developers.redhat.com/products/mta/overview).
## What is MTA?
MTA is an extensible and customizable rule-based tool that simplifies the migration and modernization of Java applications.
## What is MTR?
MTR is an extensible and customizable rule-based tool that simplifies the migration and modernization of Java applications.

## How does MTA simplify migration?
MTA looks for common resources and known trouble spots when migrating applications. It provides a high-level view of the technologies used by the application.
## How does MTR simplify migration?
MTR looks for common resources and known trouble spots when migrating applications. It provides a high-level view of the technologies used by the application.

## How does the IntelliJ plugin assist with application migrations?
The IntelliJ plugin integrates with the MTA command-line tool, and provides assistance directly into the IntelliJ IDE.
The IntelliJ plugin integrates with the MTR command-line tool, and provides assistance directly into the IntelliJ IDE.

This plugin expedites the process of analyzing your projects directly from within your IDE.
The tooling marks migration issues in the source code, provides guidance to fix the issues, and offers automatic code replacement when possible.
Expand All @@ -42,7 +42,7 @@ Use the generated reports to better understand and assess the migration efforts.
* Java Platform, `JDK version 11` with `JAVA_HOME` environment variable
* A minimum of `4 GB RAM`; 8 GB recommended

> Tip: The mta-cli can be installed from within IntelliJ once the plugin has been installed.
> Tip: The mtr-cli can be installed from within IntelliJ once the plugin has been installed.
=======

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ version projectVersion

intellij {
version ideaVersion
pluginName 'org.jboss.tools.intellij.mta'
pluginName 'org.jboss.tools.intellij.mtr'
updateSinceUntilBuild false
plugins 'java'
}
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
rootProject.name = 'intellij-mta'
rootProject.name = 'intellij-mtr'

Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public static void run(MtaConfiguration configuration,
ProgressMonitor progressMonitor,
CliListener listener) {
String javaHome = "";
String mtaCli = (String)configuration.getOptions().get("mta-cli");
String mtaCli = (String)configuration.getOptions().get("mtr-cli");
List<String> params = MtaCliParamBuilder.buildParams(configuration, mtaCli);
MtaCliRunner.executeAnalysis(mtaCli, javaHome, params, progressMonitor, listener);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class MtaConsole {
public void init(Project project, OSProcessHandler handler, String commandLine) {
Runnable r = () -> {
ToolWindowManager manager = ToolWindowManager.getInstance(project);
String name = "Console (MTA)";
String name = "Console (MTR)";
ToolWindow window = manager.getToolWindow(name);

if (window == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ private static void parseHints(Document doc, MtaConfiguration configuration) {
if ("".equals(hint.id)) {
hint.id = MtaConfiguration.generateUniqueId();
System.out.println("MTA results.xml not serialized with IDs");
MtaNotifier.notifyError("MTA results.xml not serialized with IDs. Please try re-running the analysis with the latest version of the MTA plugin.");
MtaNotifier.notifyError("MTR results.xml not serialized with IDs. Please try re-running the analysis with the latest version of the MTR plugin.");
}

if (configuration.getSummary().completeIssues.contains(id)) {
Expand Down Expand Up @@ -229,7 +229,7 @@ private static void parseClassifications(Document doc, MtaConfiguration configur
if ("".equals(classification.id)) {
classification.id = MtaConfiguration.generateUniqueId();
System.out.println("MTA results.xml not serialized with IDs");
MtaNotifier.notifyError("MTA results.xml not serialized with IDs. Please try re-running the analysis with the latest version of the MTA plugin.");
MtaNotifier.notifyError("MTR results.xml not serialized with IDs. Please try re-running the analysis with the latest version of the MTR plugin.");
}

if (configuration.getSummary().completeIssues.contains(id)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public void onComplete() {

public void runAnalysis() {
final ProgressManager manager = ProgressManager.getInstance();
manager.run(new Task.Backgroundable(this.project, "Migration Toolkit for Applications", true) {
manager.run(new Task.Backgroundable(this.project, "Migration Toolkit for Runtimes", true) {
public void run(final ProgressIndicator indicator) {
try {
progressIndicator = indicator;
Expand All @@ -76,7 +76,7 @@ public void run(final ProgressIndicator indicator) {
handler = new MtaCliProcessHandler(process, commandLine, progressMonitor, progressIndicator, console);
console.init(project, handler, commandLine.toString());
handler.startNotify();
progressIndicator.setText("Starting mta-cli process...");
progressIndicator.setText("Starting mtr-cli process...");
progressIndicator.setIndeterminate(true);
progressIndicator.setFraction(0.01);
handler.waitFor();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
public class ConsoleWindowFactory implements ToolWindowFactory, DumbAware {

private static final String OUTPUT_WINDOW_CONTENT_ID = "MtaOutputWindowContent";
public static final String TOOL_WINDOW_ID = "MTA";
public static final String TOOL_WINDOW_ID = "R";

public static Project project;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public void clear() {
public void open(Issue issue) {
Runnable r = () -> {
ToolWindowManager manager = ToolWindowManager.getInstance(project);
String name = "Issue Details (MTA)";
String name = "Issue Details (MTR)";
ToolWindow window = manager.getToolWindow(name);
if (window == null) {
TextConsoleBuilderFactory factory = TextConsoleBuilderFactory.getInstance();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public void actionPerformed(AnActionEvent anActionEvent, TreePath path, Object s
MtaConfiguration configuration = node.getValue();
ModelService modelService = node.getModelService();
if (this.validateConfiguration(configuration)) {
String executable = (String)configuration.getOptions().get("mta-cli");
String executable = (String)configuration.getOptions().get("mtr-cli");
try {
String windupHome = new File(executable).getParentFile().getParent();
List<String> params = MtaCliParamBuilder.buildParams(configuration, windupHome);
Expand Down Expand Up @@ -81,21 +81,21 @@ private void loadAnalysisResults(MtaConfiguration configuration, ModelService mo

private boolean validateConfiguration(MtaConfiguration configuration) {
boolean valid = true;
String cliLocation = (String)configuration.getOptions().get("mta-cli");
String cliLocation = (String)configuration.getOptions().get("mtr-cli");
if (cliLocation == null || "".equals(cliLocation)) {
valid = false;
MtaNotifier.notifyError("Path to mta-cli executable required.");
MtaNotifier.notifyError("Path to mtr-cli executable required.");
}
else if (cliLocation != null) {
cliLocation = this.resolveCliPath(cliLocation);
configuration.getOptions().put("mta-cli", cliLocation);
configuration.getOptions().put("mtr-cli", cliLocation);
if (!new File(cliLocation).exists()) {
valid = false;
MtaNotifier.notifyError("Path to mta-cli executable does not exist.");
MtaNotifier.notifyError("Path to mtr-cli executable does not exist.");
}
else if (!Files.isExecutable(Paths.get(cliLocation))) {
valid = false;
MtaNotifier.notifyError("Path to mta-cli executable is not executable.");
MtaNotifier.notifyError("Path to mtr-cli executable is not executable.");
}
}
List<String> input = (List<String>)configuration.getOptions().get("input");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ private static MtaConfiguration parseConfigurationObject(JSONObject configuratio
if (summary != null) {
MtaModelParser.parseSummary(summary, mtaConfiguration, modelService);
}
String mtaCli = (String)mtaConfiguration.getOptions().get("mta-cli");
String mtaCli = (String)mtaConfiguration.getOptions().get("mtr-cli");
if (mtaCli == null || "".equals(mtaCli)) {
mtaConfiguration.getOptions().put("mta-cli", modelService.computeMtaCliLocation());
mtaConfiguration.getOptions().put("mtr-cli", modelService.computeMtaCliLocation());
}
String output = (String)mtaConfiguration.getOptions().get("output");
if (output == null || "".equals(output)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

public class NameUtil {

public static final String CONFIGURATION_ELEMENT_PREFIX = "mtaConfiguration";
public static final String CONFIGURATION_ELEMENT_PREFIX = "mtrConfiguration";

private static Pattern namePattern = Pattern.compile("([a-zA-Z_]*)([0-9]+)");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public MtaConfiguration createConfiguration() {
MtaConfiguration configuration = new MtaConfiguration();
configuration.setId(MtaConfiguration.generateUniqueId());
configuration.setName(NameUtil.generateUniqueConfigurationName(model));
configuration.getOptions().put("mta-cli", this.computeMtaCliLocation());
configuration.getOptions().put("mtr-cli", this.computeMtaCliLocation());
configuration.getOptions().put("output", ModelService.getConfigurationOutputLocation(configuration));
configuration.getOptions().put("sourceMode", "true");
List<String> target = (List<String>)configuration.getOptions().get("target");
Expand Down Expand Up @@ -189,18 +189,18 @@ public String computeMtaCliLocation() {
return "";
}
MtaConfiguration configuration = Lists.reverse(this.getModel().getConfigurations()).stream().filter(config -> {
String cli = (String) config.getOptions().get("mta-cli");
String cli = (String) config.getOptions().get("mtr-cli");
return cli != null && !"".equals(cli);
}).findFirst().orElse(null);
if (configuration != null) {
return (String) configuration.getOptions().get("mta-cli");
return (String) configuration.getOptions().get("mtr-cli");
}
return "";
}

public static String getDefaultOutputLocation() {
return FileUtils.getUserDirectoryPath()
+ File.separator + ".mta"
+ File.separator + ".mtr"
+ File.separator + "tooling"
+ File.separator + "intellij";
}
Expand Down
8 changes: 4 additions & 4 deletions src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<idea-plugin>
<id>org.jboss.tools.intellij.mta</id>
<name>Migration Toolkit for Applications (MTA) by Red Hat</name>
<name>Migration Toolkit for Runtimes (MTR) by Red Hat</name>
<vendor email="[email protected]" url="http://www.redhat.com">Red-Hat</vendor>

<description><![CDATA[
<img src=" https://raw.githubusercontent.com/windup/intellij-mta/master/src/main/resources/META-INF/web/webroot/migration_toolkit.png" width="32" height="32"/>
<h2>Overview</h2>
<p>The Migration Toolkit for Applications (MTA) plugin for IntelliJ Platform-based IDEs.</p>
<p>The Migration Toolkit for Runtimes (MTR) plugin for IntelliJ Platform-based IDEs.</p>
<p>Provides tooling to accelerate application migration by marking migration issues in the source code, provides guidance to fix the issues, and offers automatic code replacement when possible.</p>
<p>Read more about MTA <a href="https://developers.redhat.com/products/mta/overview">here</a>.</p>
<p>Read more about MTR <a href="https://developers.redhat.com/products/mta/overview">here</a>.</p>
]]></description>

<!-- please see http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/build_number_ranges.html for description -->
Expand All @@ -19,7 +19,7 @@
<depends>com.intellij.modules.platform</depends>

<extensions defaultExtensionNs="com.intellij">
<toolWindow id="Migration Toolkit for Applications"
<toolWindow id="Migration Toolkit for Runtimes"
anchor="left"
factoryClass="org.jboss.tools.intellij.mta.explorer.MtaExplorerFactory"/>
</extensions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@
$('#cancel').hide();
$('#run').text('Run');
$('#progress-container').show();
$('#progress').text('error starting MTA');
$('#progress').text('error starting MTR');
}

$('.stop.enabled').click(function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@
$('#cancel').hide();
$('#run').text('Run');
$('#progress-container').show();
$('#progress').text('error starting MTA');
$('#progress').text('error starting MTR');
}

$('.stop.enabled').click(function() {
Expand Down
14 changes: 7 additions & 7 deletions src/main/resources/META-INF/web/webroot/help.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"required": true
},
{
"name": "mta-cli",
"description": "Path to mta-cli executable.",
"name": "mtr-cli",
"description": "Path to mtr-cli executable.",
"type": "File",
"ui-type": ["file"],
"required": true
Expand Down Expand Up @@ -58,7 +58,7 @@
},
{
"name": "userRulesDirectory",
"description": "User Rules Directory (Search pattern: *.windup.groovy, *.windup.xml, *.mta.groovy and *.mta.xml).",
"description": "User Rules Directory (Search pattern: *.windup.groovy, *.windup.xml, *.mtr.groovy and *.mtr.xml).",
"type": "Path",
"ui-type": ["many", "file_or_directory", "text"],
"placeholder": "No Directories Specified",
Expand Down Expand Up @@ -108,7 +108,7 @@
},
{
"name": "skipReports",
"description": "If set, MTA will not generate reports.",
"description": "If set, MTR will not generate reports.",
"type": "Boolean",
"ui-type": ["single"],
"required": false
Expand Down Expand Up @@ -145,7 +145,7 @@
},
{
"name": "mavenizeGroupId",
"description": "Used in conjunction with the `mavenize` option. All pom.xml files will use this value as their <groupId>. If the parameter is omitted, MTA tries to guess some value based on the application, but this guess may be wrong. Last resort default value is 'com.mycompany.mavenized'.",
"description": "Used in conjunction with the `mavenize` option. All pom.xml files will use this value as their <groupId>. If the parameter is omitted, MTR tries to guess some value based on the application, but this guess may be wrong. Last resort default value is 'com.mycompany.mavenized'.",
"type": "String",
"ui-type": ["single"],
"required": false
Expand Down Expand Up @@ -221,7 +221,7 @@
},
{
"name": "enableCompatibleFilesReport",
"description": "If set, MTA will generate a report of 'Compatible Files'. Keep in mind that generating this report may take a long time for large applications.",
"description": "If set, MTR will generate a report of 'Compatible Files'. Keep in mind that generating this report may take a long time for large applications.",
"type": "Boolean",
"ui-type": ["single"],
"required": false
Expand Down Expand Up @@ -295,7 +295,7 @@
},
{
"name": "keepWorkDirs",
"description": "If set, MTA will not delete the temporary working files, like graph database and unzipped archives. Debugging purposes.",
"description": "If set, MTR will not delete the temporary working files, like graph database and unzipped archives. Debugging purposes.",
"type": "Boolean",
"ui-type": ["single"],
"required": false
Expand Down

0 comments on commit 4294bae

Please sign in to comment.