From 6fc52096b92a4003e55b75c61a31e423f5737927 Mon Sep 17 00:00:00 2001 From: sciencewhiz Date: Thu, 7 Nov 2024 17:07:57 -0800 Subject: [PATCH] Importer: Update for Java Units changes --- vscode-wpilib/resources/java_replacements.json | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/vscode-wpilib/resources/java_replacements.json b/vscode-wpilib/resources/java_replacements.json index c4d1b40f..a48c62f0 100644 --- a/vscode-wpilib/resources/java_replacements.json +++ b/vscode-wpilib/resources/java_replacements.json @@ -139,7 +139,15 @@ { "from": "Preferences[.]getInstance[(][)][.]", "to": "Preferences." }, { "from": "SendableRegistry[.]getInstance[(][)][.]", "to": "SendableRegistry." }, { "from": "[.]get(\\w*)[(](?:GenericHID[.])?Hand[.]k(\\w*)[)]", "to": ".get$2$1()" }, - { "from": "CommandBase", "to": "Command" } + { "from": "CommandBase", "to": "Command" }, + { "from": "import edu[.]wpi[.]first[.]units[.]measure[.]Measure;", "to": "" }, + { "from": "edu[.]wpi[.]first[.]units[.](.*);", "to": "edu.wpi.first.units.measure.$1;" }, + { "from": "edu[.]wpi[.]first[.]units[.]measure[.]Units[.](\\w*);", "to": "edu.wpi.first.units.Units.$1;" }, + { "from": "Measure<(\\w*)>", "to": "$1" }, + { "from": "Measure>", "to": "LinearVelocity" }, + { "from": "Measure>", "to": "AngularVelocity" }, + { "from": "Measure>>", "to": "LinearAcceleration" }, + { "from": "Measure>>", "to": "AngularAcceleration" } ] } ]