Processing for Visual Studio Code
What this extension is
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.
What this extension isn't
- 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 definetly out of the scope of my abilities. Langauge servers take entire teams from big companies such as Microsoft to make.
- This extension cannot provide intellesence, for example
Why the fork?
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!
Documentation on hover
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
- Runs the current Processing project (from current working directory). Will automatically detect if the project is Processing Java or Python
- Runs the current Processing Java project (from CWD)
- 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
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
- Download the proper Java version for your operating system
- Configure the extension
- Change the following configuration options
processing.py.jarPath: the path to your
processing-py.jar file. Preferably, this is an absolute path. In this example, it will be
processing.py.javaPath: the path to your
java executable. For example,
- Make sure
processing.py.isEnabled is set to
true (true by default)
- Downloads stub definitions (optional)