diff --git a/.gitignore b/.gitignore index 3ef62c0..21ab07c 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,8 @@ gradle-app.setting Thumbs.db .directory .DS_Store + +################################# +# Dev related files # +################################# +*.run.xml \ No newline at end of file diff --git a/README.md b/README.md index 3c56839..03ba8ef 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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. ======= diff --git a/src/main/java/org/jboss/tools/intellij/mta/cli/MtaCliRunner.java b/src/main/java/org/jboss/tools/intellij/mta/cli/MtaCliRunner.java index 3926e07..4e3b335 100644 --- a/src/main/java/org/jboss/tools/intellij/mta/cli/MtaCliRunner.java +++ b/src/main/java/org/jboss/tools/intellij/mta/cli/MtaCliRunner.java @@ -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 params = MtaCliParamBuilder.buildParams(configuration, mtaCli); MtaCliRunner.executeAnalysis(mtaCli, javaHome, params, progressMonitor, listener); } diff --git a/src/main/java/org/jboss/tools/intellij/mta/cli/MtaConsole.java b/src/main/java/org/jboss/tools/intellij/mta/cli/MtaConsole.java index e4ea7c4..9acc514 100644 --- a/src/main/java/org/jboss/tools/intellij/mta/cli/MtaConsole.java +++ b/src/main/java/org/jboss/tools/intellij/mta/cli/MtaConsole.java @@ -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) { diff --git a/src/main/java/org/jboss/tools/intellij/mta/cli/MtaResultsParser.java b/src/main/java/org/jboss/tools/intellij/mta/cli/MtaResultsParser.java index e2af310..86962d3 100644 --- a/src/main/java/org/jboss/tools/intellij/mta/cli/MtaResultsParser.java +++ b/src/main/java/org/jboss/tools/intellij/mta/cli/MtaResultsParser.java @@ -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)) { @@ -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)) { diff --git a/src/main/java/org/jboss/tools/intellij/mta/cli/RunAnalysisCommandHandler.java b/src/main/java/org/jboss/tools/intellij/mta/cli/RunAnalysisCommandHandler.java index c46c38e..6f652e9 100644 --- a/src/main/java/org/jboss/tools/intellij/mta/cli/RunAnalysisCommandHandler.java +++ b/src/main/java/org/jboss/tools/intellij/mta/cli/RunAnalysisCommandHandler.java @@ -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(); diff --git a/src/main/java/org/jboss/tools/intellij/mta/details/DetailsViewConsole.java b/src/main/java/org/jboss/tools/intellij/mta/details/DetailsViewConsole.java index da1dd39..f5a5689 100644 --- a/src/main/java/org/jboss/tools/intellij/mta/details/DetailsViewConsole.java +++ b/src/main/java/org/jboss/tools/intellij/mta/details/DetailsViewConsole.java @@ -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(); diff --git a/src/main/java/org/jboss/tools/intellij/mta/explorer/actions/RunConfigurationAction.java b/src/main/java/org/jboss/tools/intellij/mta/explorer/actions/RunConfigurationAction.java index 4f434ab..10ccea4 100644 --- a/src/main/java/org/jboss/tools/intellij/mta/explorer/actions/RunConfigurationAction.java +++ b/src/main/java/org/jboss/tools/intellij/mta/explorer/actions/RunConfigurationAction.java @@ -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 params = MtaCliParamBuilder.buildParams(configuration, windupHome); @@ -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 input = (List)configuration.getOptions().get("input"); diff --git a/src/main/java/org/jboss/tools/intellij/mta/model/MtaModelParser.java b/src/main/java/org/jboss/tools/intellij/mta/model/MtaModelParser.java index dae43b8..39bdb85 100644 --- a/src/main/java/org/jboss/tools/intellij/mta/model/MtaModelParser.java +++ b/src/main/java/org/jboss/tools/intellij/mta/model/MtaModelParser.java @@ -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)) { diff --git a/src/main/java/org/jboss/tools/intellij/mta/model/NameUtil.java b/src/main/java/org/jboss/tools/intellij/mta/model/NameUtil.java index abeb1af..21834a6 100644 --- a/src/main/java/org/jboss/tools/intellij/mta/model/NameUtil.java +++ b/src/main/java/org/jboss/tools/intellij/mta/model/NameUtil.java @@ -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]+)"); diff --git a/src/main/java/org/jboss/tools/intellij/mta/services/ModelService.java b/src/main/java/org/jboss/tools/intellij/mta/services/ModelService.java index 3216085..9b609ef 100644 --- a/src/main/java/org/jboss/tools/intellij/mta/services/ModelService.java +++ b/src/main/java/org/jboss/tools/intellij/mta/services/ModelService.java @@ -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 target = (List)configuration.getOptions().get("target"); @@ -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"; } diff --git a/src/main/resources/META-INF/web/webroot/configuration-editor/views/body.html b/src/main/resources/META-INF/web/webroot/configuration-editor/views/body.html index c258ae1..8d11db1 100644 --- a/src/main/resources/META-INF/web/webroot/configuration-editor/views/body.html +++ b/src/main/resources/META-INF/web/webroot/configuration-editor/views/body.html @@ -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() { diff --git a/src/main/resources/META-INF/web/webroot/configuration-editor/views/unified.html b/src/main/resources/META-INF/web/webroot/configuration-editor/views/unified.html index 4571385..48e61ec 100644 --- a/src/main/resources/META-INF/web/webroot/configuration-editor/views/unified.html +++ b/src/main/resources/META-INF/web/webroot/configuration-editor/views/unified.html @@ -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() { diff --git a/src/main/resources/META-INF/web/webroot/help.json b/src/main/resources/META-INF/web/webroot/help.json index 76816c1..81f2a6a 100644 --- a/src/main/resources/META-INF/web/webroot/help.json +++ b/src/main/resources/META-INF/web/webroot/help.json @@ -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 @@ -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", @@ -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", @@ -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