Note on Processing 4: I'm not sure how this extension will handle Processing 4. I will wait for it to be out of beta and fix the extension if needed.
- What this extension is
- What this extension isn't
- Why the fork?
- Screenshots
- Feature list
- Using task files
- Processing Python
- Credits
This is a fork of a Visual Studio Code extension created by Tobiah Zarlez to add Processing language support, with added documentation on hover, diagnostics, and more.
- This extension does not allow you to debug Java or Processing projects.
- This is NOT a language server, and hence cannot provide the features a language server can. There simply is not enough demand for a Processing language server, and that type of thing is definitely out of the scope of my abilities. Language servers take entire teams from big companies such as Microsoft to make.
- This extension cannot provide IntelliSense, for example
The original extension was missing some features that I wanted and it seemed as if the repo was no longer being maintained. So, forked the extension and changed some things.
- Better syntax highlighting (from Red Hat Java)
- Documentation on hover (via Regex)
- A run button (both Processing Java and Processing Python)
- Simple diagnostics (via the processing-java CLI, which can be extremely slow, and is disabled by default)
- Strings are auto closing and surrounding (didn't work in the old extension)
See the CHANGELOG for all changes
Open any .pde file, or choose "Processing" from the drop down menu in the bottom right corner. Syntax highlighting is from Red Hat's Java extension.
Once the language has been set, you will see code snippets pop up automatically as you type!
When you hover over a function such as square
, documentation for this function will appear! Documentation is scraped directly from the Processing reference page, so anything missing from there will be missing here too.
Installing this extension will add the following commands to your command pallette (CTRL+SHIFT+P
, or opened by View -> Command Pallette
). These commands can be selected and run from there, to complete the corresponding tasks.
- Open Extension Documentation
- Opens this documentation.
- Open Documentation for Selection
- Use the pallet command "Processing: Open Documentation for Selection" to open the processing documentation for the current selection.
- By default uses processing.org's documentation. Can change to p5js's if preferred using the
processing.docs
setting.
- Run
- Runs the current Processing project (from current working directory). Will automatically detect if the project is Processing Java or Python.
- If the setting
processing.shouldSendSigint
is set totrue
, run will interrupt the current running processing program before running the new one.
- RunJava
- Runs the current Processing Java project (from CWD)
- RunPy
- Runs the current Processing Python project (from CWD)
- Search Processing Website
- Use the pallet command "Processing: Search Processing Website" to quickly search whatever you want on the processing website.
- By default uses Google for search. Can change to DuckDuckGo if preferred using the
processing.search
setting.
The original extension made use of a tasks.json file to run processing projects. This has been replaced with the run command and run button (processing.Run). You can bind this command to a keybinding.
Alternatively, if you prefer the tasks.json
file, you can continue to use it, but the command
field should be changed to "${config:processing.path}"
.
This extension attempts to make Processing with Python easier to use. Follow these steps:
- Download the processing-python library for your operating system
- Take note of the location of this file. For example, I might store mine in
~/processing.py-linux64/processing.py-3056-linux64/processing-py.jar
- Take note of the location of this file. For example, I might store mine in
- Download the proper Java version for your operating system
- Follow the steps in the Processing docs
- Configure the extension
- Change the following configuration options
processing.py.jarPath
: the path to yourprocessing-py.jar
file. Preferably, this is an absolute path. In this example, it will be~/processing.py-linux64/processing.py-3056-linux64/processing-py.jar
processing.py.javaPath
: the path to yourjava
executable. For example,/usr/bin/java
- Make sure
processing.py.isEnabled
is set totrue
(true by default)
- Change the following configuration options
- Downloads stub definitions (optional)
- Definitions can be found here
- After than, follow the imports in this example
- Snippets are based on the Processing Sublime Text plugin.
- Syntax highlighting is based on the VSCode Java grammar
- Thanks to Tobiah Zarlez for making the original extension
- Run
yarn vsce package
- Run
code --install-extension processing-vscode-<VERSION>.vsix