Skip to content

Commit

Permalink
use windup-cli instead of mta-cli. refactor some wording to help with…
Browse files Browse the repository at this point in the history
… the rebranding process.
  • Loading branch information
johnsteele committed Aug 6, 2022
1 parent 4294bae commit cd91744
Show file tree
Hide file tree
Showing 14 changed files with 37 additions and 32 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,8 @@ gradle-app.setting
Thumbs.db
.directory
.DS_Store

#################################
# Dev related files #
#################################
*.run.xml
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ Migration Toolkit for Runtimes (MTR) (the product of the downstream project [Win

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

## 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 Windup simplify migration?
Windup 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 MTR command-line tool, and provides assistance directly into the IntelliJ IDE.
The IntelliJ plugin integrates with the Windup 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 mtr-cli can be installed from within IntelliJ once the plugin has been installed.
> Tip: The windup-cli can be installed from within IntelliJ once the plugin has been installed.
=======

Expand Down
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("mtr-cli");
String mtaCli = (String)configuration.getOptions().get("windup-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 (MTR)";
String name = "Console (Windup)";
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("MTR results.xml not serialized with IDs. Please try re-running the analysis with the latest version of the MTR plugin.");
MtaNotifier.notifyError("Windup results.xml not serialized with IDs. Please try re-running the analysis with the latest version of the Windup 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("MTR results.xml not serialized with IDs. Please try re-running the analysis with the latest version of the MTR plugin.");
MtaNotifier.notifyError("Windup results.xml not serialized with IDs. Please try re-running the analysis with the latest version of the Windup plugin.");
}

if (configuration.getSummary().completeIssues.contains(id)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 mtr-cli process...");
progressIndicator.setText("Starting windup-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 @@ -35,7 +35,7 @@ public void clear() {
public void open(Issue issue) {
Runnable r = () -> {
ToolWindowManager manager = ToolWindowManager.getInstance(project);
String name = "Issue Details (MTR)";
String name = "Issue Details";
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("mtr-cli");
String executable = (String)configuration.getOptions().get("windup-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("mtr-cli");
String cliLocation = (String)configuration.getOptions().get("windup-cli");
if (cliLocation == null || "".equals(cliLocation)) {
valid = false;
MtaNotifier.notifyError("Path to mtr-cli executable required.");
MtaNotifier.notifyError("Path to windup-cli executable required.");
}
else if (cliLocation != null) {
cliLocation = this.resolveCliPath(cliLocation);
configuration.getOptions().put("mtr-cli", cliLocation);
configuration.getOptions().put("windup-cli", cliLocation);
if (!new File(cliLocation).exists()) {
valid = false;
MtaNotifier.notifyError("Path to mtr-cli executable does not exist.");
MtaNotifier.notifyError("Path to windup-cli executable does not exist.");
}
else if (!Files.isExecutable(Paths.get(cliLocation))) {
valid = false;
MtaNotifier.notifyError("Path to mtr-cli executable is not executable.");
MtaNotifier.notifyError("Path to windup-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("mtr-cli");
String mtaCli = (String)mtaConfiguration.getOptions().get("windup-cli");
if (mtaCli == null || "".equals(mtaCli)) {
mtaConfiguration.getOptions().put("mtr-cli", modelService.computeMtaCliLocation());
mtaConfiguration.getOptions().put("windup-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 = "mtrConfiguration";
public static final String CONFIGURATION_ELEMENT_PREFIX = "configuration";

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("mtr-cli", this.computeMtaCliLocation());
configuration.getOptions().put("windup-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("mtr-cli");
String cli = (String) config.getOptions().get("windup-cli");
return cli != null && !"".equals(cli);
}).findFirst().orElse(null);
if (configuration != null) {
return (String) configuration.getOptions().get("mtr-cli");
return (String) configuration.getOptions().get("windup-cli");
}
return "";
}

public static String getDefaultOutputLocation() {
return FileUtils.getUserDirectoryPath()
+ File.separator + ".mtr"
+ File.separator + ".windup"
+ File.separator + "tooling"
+ File.separator + "intellij";
}
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 MTR');
$('#progress').text('error starting Windup');
}

$('.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 MTR');
$('#progress').text('error starting Windup');
}

$('.stop.enabled').click(function() {
Expand Down
10 changes: 5 additions & 5 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": "mtr-cli",
"description": "Path to mtr-cli executable.",
"name": "windup-cli",
"description": "Path to windup-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, *.mtr.groovy and *.mtr.xml).",
"description": "User Rules Directory (Search pattern: *.windup.groovy, *.windup.xml).",
"type": "Path",
"ui-type": ["many", "file_or_directory", "text"],
"placeholder": "No Directories Specified",
Expand Down Expand Up @@ -122,7 +122,7 @@
},
{
"name": "userIgnorePath",
"description": "A path to the list of path patterns to skip during execution. If it points to a directory, all contained files named '*mta-ignore.txt' or '*windup-ignore.txt' will be considered as such list.",
"description": "A path to the list of path patterns to skip during execution. If it points to a directory, all contained files named or '*windup-ignore.txt' will be considered as such list.",
"type": "File",
"ui-type": ["file_or_directory"],
"placeholder": "No Files or Directories Specified",
Expand Down Expand Up @@ -295,7 +295,7 @@
},
{
"name": "keepWorkDirs",
"description": "If set, MTR will not delete the temporary working files, like graph database and unzipped archives. Debugging purposes.",
"description": "If set, Windup 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 cd91744

Please sign in to comment.