SDK with VSCode. Is it possible?

funk101

Member
Joined
Nov 19, 2023
Posts
11
Likes
0
I'd prefer to use VSCode for developing for MotiveWave rather than Eclipse. Can someone point me in a direction in getting this setup please?
 
I use VS Code with dev containers. Here you can find my Dockerfile plus instructions on how to build and use the environment.


If you don't want to use dev containers, all you need to do is to set up ANT (you could perform the same actions I do in the Dockerfile) on your native system, and then just execute the "ant" command from the build directory.
 
I use VS Code with dev containers. Here you can find my Dockerfile plus instructions on how to build and use the environment.


If you don't want to use dev containers, all you need to do is to set up ANT (you could perform the same actions I do in the Dockerfile) on your native system, and then just execute the "ant" command from the build directory.
What a great resource !!! ?


Many thanks for putting all that togehter, @ruah !!!
I am sure your clear instructions will help many aspiring MW-coders !
 
Last edited:
I decided to see if I could get the (VSCode-based) Cursor IDE working for MotiveWave development since I've pretty much switched all of my non-Java development over to that a year+ ago, opting to pay them $20/mo and cancelling my OpenAI/ChatGPT subscription (haven't regretted either choice so far; Cursor has the ability to basically use ALL LLMs out there - you get to pick which ones to use/ignore via Settings).

I've been using the IntelliJ Community edition for all MotiveWave development thus far (per instructions/suggestions in the forum here) but like most IDEs these days, any AI-support costs additional $$$ so figured I'd see how difficult it would be to switch over to Cursor (or even just vanilla VSCode).

I already had Java JDK/SDK & Ant installed (on Windows 11);
>java -version
java version "21.0.3" 2024-04-16 LTS
Java(TM) SE Runtime Environment (build 21.0.3+7-LTS-152)
Java HotSpot(TM) 64-Bit Server VM (build 21.0.3+7-LTS-152, mixed mode, sharing)

>javac -version
javac 21.0.3

>ant -version
Apache Ant(TM) version 1.10.15 compiled on August 25 2024

Java I installed per the usual methods; Ant I installed via Scoop. There are other instructions for using Cursor, but all I really got from that was to make sure I had the "Extension Pack for Java" installed (on either VSCode or Cursor).

Then, I just created a .vscode/tasks.json file containing:
{
"version": "2.0.0",
"tasks": [
{
"label": "ant: compile",
"type": "process",
"command": "cmd.exe",
"args": [
"/c",
"ant",
"-f",
"build\\build.xml",
"compile"
],
"options": {
"cwd": "${workspaceFolder}"
},
"group": "build",
"presentation": {
"reveal": "always",
"panel": "new",
"focus": false,
"clear": true
},
"problemMatcher": {
"owner": "java",
"fileLocation": ["relative", "${workspaceFolder}"],
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
},
"background": {
"activeOnStart": true,
"beginsPattern": "^.*javac.*$",
"endsPattern": "^.*BUILD.*(SUCCESS|FAILED).*$"
}
}
},
{
"label": "ant: deploy",
"type": "process",
"command": "cmd.exe",
"args": [
"/c",
"ant",
"-f",
"build\\build.xml",
"deploy"
],
"options": {
"cwd": "${workspaceFolder}"
},
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"reveal": "always",
"panel": "new",
"focus": false,
"clear": true
},
"problemMatcher": {
"owner": "java",
"fileLocation": ["relative", "${workspaceFolder}"],
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
},
"dependsOn": "ant: compile"
},
{
"label": "ant: jar",
"type": "process",
"command": "cmd.exe",
"args": [
"/c",
"ant",
"-f",
"build\\build.xml",
"jar"
],
"options": {
"cwd": "${workspaceFolder}"
},
"group": "build",
"presentation": {
"reveal": "always",
"panel": "new",
"focus": false,
"clear": true
},
"problemMatcher": {
"owner": "java",
"fileLocation": ["relative", "${workspaceFolder}"],
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
},
"dependsOn": "ant: compile"
},
{
"label": "ant: deploy_jar",
"type": "process",
"command": "cmd.exe",
"args": [
"/c",
"ant",
"-f",
"build\\build.xml",
"deploy_jar"
],
"options": {
"cwd": "${workspaceFolder}"
},
"group": "build",
"presentation": {
"reveal": "always",
"panel": "new",
"focus": false,
"clear": true
},
"problemMatcher": {
"owner": "java",
"fileLocation": ["relative", "${workspaceFolder}"],
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
},
"dependsOn": "ant: jar"
},
{
"label": "ant: clean",
"type": "process",
"command": "cmd.exe",
"args": [
"/c",
"ant",
"-f",
"build\\build.xml",
"clean"
],
"options": {
"cwd": "${workspaceFolder}"
},
"group": "build",
"presentation": {
"reveal": "always",
"panel": "new",
"focus": false,
"clear": true
},
"problemMatcher": []
}
]
}
...I have Ctrl-Shift-B assigned to compile/deploy via the usual build.xml file (i.e. what worked in IntelliJ already - I changed nothing). You can also run it via the "Terminal" menu drop-down menu->Run Build Task, etc.

"Just worked" - and now I can have AI fix/suggest/break whatever. I literally just told it to fix all type warnings throughout ALL MW Java studies to clean up the mess of "Problems" and it did them all in a few minutes.

My .02 - YMMV
 
Top