I can’t find instructions how to use, for instance, Visual Studio Code as a replacement for the Java IDE.
I came to Processing after using P5.js,
The default IDE feels very out of date, and why spend resources on something that is not really part of Processing functionality?
Calling it “PDE” and not IDE seems like top of the iceberg of non-standard implementation.
Does not have intellisense, but an opt-in crude “code completion” that does nothing of the kind, method-completion at the most and even then does not seem to present the help information on mouse over?
Does not have dark mode by default (is it even selectable)?
please remember that with questions about using other IDE or editors
it might be difficult to find someone here who can respond.
also when you have coding questions
please post code ( as a MCVE )
only in a version what runs ( copy / paste ) in the Processing IDE 3.5.3
( or when required add files supplied as zip )
using external tools you might miss reference, examples, library help …
you might come back to PDE, ( even if just for learning )
The goal of PDE is to be a simple, introductory learning environment – and it supports the Processing .pde language / Java dialect by default.
If you want to use the Processing API in Java then you should check out Eclipse – this setup doesn’t use the PDE compiler.
If you want to compile .pde files and run sketches in a full programming editor, there are several choices with various bundles / plugins to handle sketch launching – Visual Studio Code, Atom, Sublime, Textmate…
In VS Code I struggled a while before I found a good example of what to include in the classpath, and how to structure the public class App extends PApplet.
Here’s how to at least run a basic “script”, possibly with OpenGL:
Create Java project in VS Code. ctrl + shift + P then Java: Create ...
In the VS Code projects .classpath file visible in the project tree to the left, add all of this for basic functions and OpenGL, check the folders for your architecture and processing library path:
NOT just the .pde file, like you would do from the Processing IDE
run Processing: Create Task File
Cmd-P + > + Create Task File
Run project: Cmd-Shift P
The above was from a Mac; on Windows there is a little more to be done to get JAVA onto the PATH - there are instructions on the extensions github page. Additionally, Cmd would be Ctrl
That’s a shame. I got stuck in the Create Task File, on my Mac.
After I proceeded to install “processing-java”, I installed the process-vscode extension, restarted vscode, created a *pde file with basic processing code, but got the message: “No build task to run found. Configure build task” when running Create Task File command. If I click on it, it will prompt me to create some json file from template, but none seems to be adequate.
You are trying to create a task file from VSCode’s native option. Instead, you need to use “Command: Create Task File” provided by processing-vscode. I don’t have it installed now so I forgot how to open it, but according to the readme you should be able to find it by Ctrl(cmd?)+Shift+B then type “create task file”.
By the way it’s cool you took a screenshot with gif, but to be honest I had to downloaded and open with gimp to pause it to see it in detail, so next time it would be more helpful if you take several screenshots as static files
Oh, which browser are you using to visualize the gif? I can see it playing right away in my browser without even having to click on it (in Chrome, and Safari).
By the way, in the GIF example I used the VSCode’s native option but none of those other options I had were useful. When I type Cmd+shift+B, that is what happen in my screen. First, a “No build task to run found” message… And then, as you see, nothing leads to the so called “Create task file” as I see on the Read me. I tend to think the processing-java path might be a little weirder on a m1 Mac? But couldn’t find a way to set up it manually either.
Ok, some progress. By writing the command " Create Task File " on the search bar, it gives me an error telling me to create a pde file the same name as the workspace. Something I know it happens in processing but somehow I was completely not aware that would be the case on vscode too. After fixing the workspace/filename it looks like the json file is now correct. Yet, a message comes warning me to setup processing path… But, I can finally run shift+cmd+B “Run Build File” and the pde is running. Thank you!
Glad that you figured it out! The file name is perhaps the limitation of processing (I guess the command line version also looks for the pde with same name) and has nothing to do with vscode. The task file is to simply generate CLI command to launch processing compiler within vscode.