diff --git a/.all-contributorsrc b/.all-contributorsrc
index 5f1aa5cc6..eea6f9e5e 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -1465,6 +1465,53 @@
"contributions": [
"code"
]
+ },
+ {
+ "login": "Rishab87",
+ "name": "Rishab Kumar Jha",
+ "avatar_url": "https://avatars.githubusercontent.com/u/138858208?v=4",
+ "profile": "https://github.com/Rishab87",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "yehiarasheed",
+ "name": "Yehia Rasheed",
+ "avatar_url": "https://avatars.githubusercontent.com/u/157399068?v=4",
+ "profile": "https://github.com/yehiarasheed",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "babaissarkar",
+ "name": "Subhraman Sarkar",
+ "avatar_url": "https://avatars.githubusercontent.com/u/8469888?v=4",
+ "profile": "https://github.com/babaissarkar",
+ "contributions": [
+ "code",
+ "a11y"
+ ]
+ },
+ {
+ "login": "SushantBansal-tech",
+ "name": "SushantBansal-tech",
+ "avatar_url": "https://avatars.githubusercontent.com/u/189839531?v=4",
+ "profile": "https://github.com/SushantBansal-tech",
+ "contributions": [
+ "ideas",
+ "code"
+ ]
+ },
+ {
+ "login": "Konsl",
+ "name": "Konsl",
+ "avatar_url": "https://avatars.githubusercontent.com/u/82901383?v=4",
+ "profile": "https://github.com/Konsl",
+ "contributions": [
+ "doc"
+ ]
}
],
"repoType": "github",
diff --git a/.github/workflows/build-gradle.yml b/.github/workflows/build-gradle.yml
index e53355d29..254433edd 100644
--- a/.github/workflows/build-gradle.yml
+++ b/.github/workflows/build-gradle.yml
@@ -1,4 +1,4 @@
-name: Pre-releases with Gradle
+name: Branch Builds
on:
push:
paths-ignore:
@@ -6,31 +6,58 @@ on:
- '.all-contributorsrc'
jobs:
+ test:
+ runs-on: ubuntu-latest
+ name: Test Processing
+ steps:
+ - name: Checkout Repository
+ uses: actions/checkout@v4
+ - name: Install Java
+ uses: actions/setup-java@v4
+ with:
+ java-version: '17'
+ distribution: 'temurin'
+ - name: Setup Gradle
+ uses: gradle/actions/setup-gradle@v4
+
+ - name: Build with Gradle
+ run: ./gradlew test
build:
- name: Create Pre-release for ${{ matrix.os_prefix }} (${{ matrix.arch }})
+ name: (${{ matrix.os_prefix }}/${{ matrix.arch }}) Create Processing Build
runs-on: ${{ matrix.os }}
- permissions:
- contents: write
+ needs: test
strategy:
fail-fast: false
matrix:
include:
- - os: [self-hosted, linux, ARM64]
+ - os: ubuntu-24.04-arm
os_prefix: linux
arch: aarch64
+ binary: processing*.snap
- os: ubuntu-latest
os_prefix: linux
arch: x64
+ binary: processing*.snap
- os: windows-latest
os_prefix: windows
arch: x64
+ binary: msi/Processing-*.msi
- os: macos-latest
os_prefix: macos
arch: x64
+ binary: dmg/Processing-*.dmg
- os: macos-latest
os_prefix: macos
arch: aarch64
+ binary: dmg/Processing-*.dmg
steps:
+ - name: Install Snapcraft
+ if: runner.os == 'Linux'
+ uses: samuelmeuli/action-snapcraft@v3
+ - name: Install LXD
+ if: runner.os == 'Linux'
+ uses: canonical/setup-lxd@main
+
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Java
@@ -41,19 +68,13 @@ jobs:
architecture: ${{ matrix.arch }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
+
- name: Build with Gradle
run: ./gradlew packageDistributionForCurrentOS
- - name: Add instructions
- if: ${{ matrix.os_prefix == 'macos' }}
- run: |
- echo "run 'xattr -d com.apple.quarantine Processing-${version}.dmg' to remove the quarantine flag" > ./app/build/compose/binaries/main/dmg/INSTRUCTIONS_FOR_TESTING.txt
+
- name: Add artifact
uses: actions/upload-artifact@v4
with:
- name: processing-${{ github.ref_name }}-${{github.sha}}-${{ matrix.os_prefix }}-${{ matrix.arch }}-gradle
- path: |
- ./app/build/compose/binaries/main/dmg/Processing-*.dmg
- ./app/build/compose/binaries/main/dmg/INSTRUCTIONS_FOR_TESTING.txt
- ./app/build/compose/binaries/main/msi/Processing-*.msi
- ./app/build/compose/binaries/main/deb/processing*.deb
+ name: processing-${{ matrix.os_prefix }}-${{ matrix.arch }}-br_${{ github.ref_name }}
retention-days: 1
+ path: app/build/compose/binaries/main/${{ matrix.binary }}
\ No newline at end of file
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 4182c98b0..b1b7f9ad6 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -1,4 +1,4 @@
-name: Pre-releases
+name: Branch Builds (Legacy)
on:
push:
paths-ignore:
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
deleted file mode 100644
index b66dcdeed..000000000
--- a/.github/workflows/maven.yml
+++ /dev/null
@@ -1,37 +0,0 @@
-name: Maven Release
-on:
- workflow_dispatch:
- inputs:
- version:
- description: 'Version to release'
- required: true
- default: '1.0.0'
-
-
-jobs:
- publish:
- name: Create Processing Core Release on Maven Central
- runs-on: ubuntu-latest
- steps:
- - name: Checkout Repository
- uses: actions/checkout@v4
- - name: Setup Java
- uses: actions/setup-java@v4
- with:
- distribution: 'temurin'
- java-version: 17
- - name: Setup Gradle
- uses: gradle/actions/setup-gradle@v4
- - name: Build with Gradle
- run: ./gradlew publish
- env:
- MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
- MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
-
- ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
- ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
-
- ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_IN_MEMORY_KEY }}
- ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_IN_MEMORY_KEY_PASSWORD }}
-
- ORG_GRADLE_PROJECT_version: ${{ github.event.inputs.version }}
\ No newline at end of file
diff --git a/.github/workflows/pull_request-gradle.yml b/.github/workflows/pull_request-gradle.yml
index 11ae6f05a..4ea0bcc9d 100644
--- a/.github/workflows/pull_request-gradle.yml
+++ b/.github/workflows/pull_request-gradle.yml
@@ -7,12 +7,26 @@ on:
- main
jobs:
- build:
- name: Create Pull Request Build for ${{ matrix.os_prefix }} (${{ matrix.arch }})
+ test:
+ runs-on: ubuntu-latest
+ name: Test Processing
+ steps:
+ - name: Checkout Repository
+ uses: actions/checkout@v4
+ - name: Install Java
+ uses: actions/setup-java@v4
+ with:
+ java-version: '17'
+ distribution: 'temurin'
+ - name: Setup Gradle
+ uses: gradle/actions/setup-gradle@v4
+
+ - name: Build with Gradle
+ run: ./gradlew test
+ build:
+ name: (${{ matrix.os_prefix }}/${{ matrix.arch }}) Create Processing Build
runs-on: ${{ matrix.os }}
- permissions:
- pull-requests: write
- contents: read
+ needs: test
strategy:
fail-fast: false
matrix:
@@ -20,19 +34,31 @@ jobs:
- os: ubuntu-24.04-arm
os_prefix: linux
arch: aarch64
+ binary: processing*.snap
- os: ubuntu-latest
os_prefix: linux
arch: x64
+ binary: processing*.snap
- os: windows-latest
os_prefix: windows
arch: x64
+ binary: msi/Processing-*.msi
- os: macos-latest
os_prefix: macos
arch: x64
+ binary: dmg/Processing-*.dmg
- os: macos-latest
os_prefix: macos
arch: aarch64
+ binary: dmg/Processing-*.dmg
steps:
+ - name: Install Snapcraft
+ if: runner.os == 'Linux'
+ uses: samuelmeuli/action-snapcraft@v3
+ - name: Install LXD
+ if: runner.os == 'Linux'
+ uses: canonical/setup-lxd@main
+
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Java
@@ -43,19 +69,13 @@ jobs:
architecture: ${{ matrix.arch }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
+
- name: Build with Gradle
run: ./gradlew packageDistributionForCurrentOS
- - name: Add instructions
- if: ${{ matrix.os_prefix == 'macos' }}
- run: |
- echo "run 'xattr -d com.apple.quarantine Processing-${version}.dmg' to remove the quarantine flag" > ./app/build/compose/binaries/main/dmg/INSTRUCTIONS_FOR_TESTING.txt
+
- name: Add artifact
uses: actions/upload-artifact@v4
with:
- name: processing-pr${{ github.event.pull_request.number }}-${{github.sha}}-${{ matrix.os_prefix }}-${{ matrix.arch }}-gradle
- path: |
- ./app/build/compose/binaries/main/dmg/Processing-*.dmg
- ./app/build/compose/binaries/main/dmg/INSTRUCTIONS_FOR_TESTING.txt
- ./app/build/compose/binaries/main/msi/Processing-*.msi
- ./app/build/compose/binaries/main/deb/processing*.deb
+ name: processing-${{ matrix.os_prefix }}-${{ matrix.arch }}-pr_${{ github.event.pull_request.number }}
retention-days: 5
+ path: app/build/compose/binaries/main/${{ matrix.binary }}
\ No newline at end of file
diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml
index 02a71ba3c..5831a166a 100644
--- a/.github/workflows/pull_request.yml
+++ b/.github/workflows/pull_request.yml
@@ -1,4 +1,4 @@
-name: Pull Requests
+name: Pull Requests (Legacy)
on:
pull_request:
paths-ignore:
diff --git a/.github/workflows/release-gradle.yml b/.github/workflows/release-gradle.yml
index fb7700cea..16e8984e3 100644
--- a/.github/workflows/release-gradle.yml
+++ b/.github/workflows/release-gradle.yml
@@ -7,22 +7,50 @@ jobs:
version:
runs-on: ubuntu-latest
outputs:
- build_number: ${{ steps.tag_info.outputs.build_number }}
+ revision: ${{ steps.tag_info.outputs.revision }}
version: ${{ steps.tag_info.outputs.version }}
steps:
- - name: Extract version and build number
+ - name: Extract version and revision
id: tag_info
shell: bash
run: |
TAG_NAME="${GITHUB_REF#refs/tags/}"
- BUILD_NUMBER=$(echo "$TAG_NAME" | cut -d'-' -f2)
+ REVISION=$(echo "$TAG_NAME" | cut -d'-' -f2)
VERSION=$(echo "$TAG_NAME" | cut -d'-' -f3)
# Set outputs for use in later jobs or steps
- echo "build_number=$BUILD_NUMBER" >> $GITHUB_OUTPUT
+ echo "revision=$REVISION" >> $GITHUB_OUTPUT
echo "version=$VERSION" >> $GITHUB_OUTPUT
+ reference:
+ name: Publish Processing Reference to release
+ runs-on: ubuntu-latest
+ permissions:
+ contents: write
+ needs: version
+ steps:
+ - name: Checkout Website Repository
+ uses: actions/checkout@v4
+ with:
+ repository: processing/processing-website
+ - name: Use Node.js 16
+ uses: actions/setup-node@v3
+ with:
+ node-version: 16
+ - name: Install dependencies
+ run: npm ci
+ - name: Build
+ run: npm run build
+ - name: Make reference.zip
+ run: npm run zip
+ - name: Upload reference to release
+ uses: svenstaro/upload-release-action@v2
+ with:
+ repo_token: ${{ secrets.GITHUB_TOKEN }}
+ asset_name: processing-${{ needs.version.outputs.version }}-reference.zip
+ file: reference.zip
+
publish:
- name: Publish Processing Core to Maven Central
+ name: Publish Processing Libraries to Maven Central
runs-on: ubuntu-latest
needs: version
steps:
@@ -35,6 +63,7 @@ jobs:
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
+
- name: Build with Gradle
run: ./gradlew publish
env:
@@ -48,9 +77,9 @@ jobs:
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_IN_MEMORY_KEY_PASSWORD }}
ORG_GRADLE_PROJECT_version: ${{ needs.version.outputs.version }}
- ORG_GRADLE_PROJECT_group: ${{ vars.PROCESSING_GROUP }}
+ ORG_GRADLE_PROJECT_group: ${{ vars.GRADLE_GROUP }}
build:
- name: Publish Release for ${{ matrix.os_prefix }} (${{ matrix.arch }})
+ name: (${{ matrix.os_prefix }}/${{ matrix.arch }}) Create Processing Release
runs-on: ${{ matrix.os }}
needs: version
permissions:
@@ -59,55 +88,106 @@ jobs:
fail-fast: false
matrix:
include:
- # compiling for arm32 needs a self-hosted runner on Raspi OS (32-bit)
- - os: [self-hosted, linux, ARM]
+ - os: ubuntu-24.04-arm
os_prefix: linux
- arch: arm
+ arch: aarch64
+ binary: ${{ vars.SNAP_NAME }}_${{ needs.version.outputs.version }}_arm64
+ extension: snap
- os: ubuntu-latest
os_prefix: linux
arch: x64
+ binary: ${{ vars.SNAP_NAME }}_${{ needs.version.outputs.version }}_amd64
+ extension: snap
- os: windows-latest
os_prefix: windows
arch: x64
+ binary: msi/Processing-${{ needs.version.outputs.version }}
+ extension: msi
- os: macos-latest
os_prefix: macos
arch: x64
+ binary: dmg/Processing-${{ needs.version.outputs.version }}
+ extension: dmg
- os: macos-latest
os_prefix: macos
arch: aarch64
- - os: macos-latest
- os_prefix: linux
- arch: aarch64
+ binary: dmg/Processing-${{ needs.version.outputs.version }}
+ extension: dmg
steps:
+ - name: Install Certificates for Code Signing
+ if: runner.os == 'macOS'
+ continue-on-error: true
+ uses: apple-actions/import-codesign-certs@v3
+ with:
+ p12-file-base64: ${{ secrets.CERTIFICATES_P12 }}
+ p12-password: ${{ secrets.CERTIFICATES_P12_PASSWORD }}
+
+ - name: Install Snapcraft
+ if: runner.os == 'Linux'
+ uses: samuelmeuli/action-snapcraft@v3
+ - name: Install LXD
+ if: runner.os == 'Linux'
+ uses: canonical/setup-lxd@main
+
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Java
uses: actions/setup-java@v4
with:
- java-version: '17'
+ java-version: '17.0.8'
distribution: 'temurin'
architecture: ${{ matrix.arch }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- # - name: Install Certificates for Code Signing
- # if: ${{ matrix.os_prefix == 'macos' }}
- # uses: apple-actions/import-codesign-certs@v3
- # with:
- # p12-file-base64: ${{ secrets.CERTIFICATES_P12 }}
- # p12-password: ${{ secrets.CERTIFICATES_P12_PASSWORD }}
+
- name: Build with Gradle
run: ./gradlew packageDistributionForCurrentOS
- env:
+ env:
ORG_GRADLE_PROJECT_version: ${{ needs.version.outputs.version }}
- ORG_GRADLE_PROJECT_group: ${{ vars.PROCESSING_GROUP }}
+ ORG_GRADLE_PROJECT_group: ${{ vars.GRADLE_GROUP }}
+ ORG_GRADLE_PROJECT_revision: ${{ needs.version.outputs.revision }}
+ ORG_GRADLE_PROJECT_compose.desktop.verbose: true
+ ORG_GRADLE_PROJECT_compose.desktop.mac.sign: ${{ secrets.PROCESSING_SIGNING }}
+ ORG_GRADLE_PROJECT_compose.desktop.mac.signing.identity: ${{ secrets.PROCESSING_SIGNING_IDENTITY }}
+ ORG_GRADLE_PROJECT_compose.desktop.mac.notarization.appleID: ${{ secrets.PROCESSING_APPLE_ID }}
+ ORG_GRADLE_PROJECT_compose.desktop.mac.notarization.password: ${{ secrets.PROCESSING_APP_PASSWORD }}
+ ORG_GRADLE_PROJECT_compose.desktop.mac.notarization.teamID: ${{ secrets.PROCESSING_TEAM_ID }}
+ ORG_GRADLE_PROJECT_snapname: ${{ vars.SNAP_NAME }}
+
+ - name: Sign files with Trusted Signing
+ if: runner.os == 'Windows'
+ uses: azure/trusted-signing-action@v0
+ with:
+ azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
+ azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
+ azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }}
+ endpoint: https://eus.codesigning.azure.net/
+ trusted-signing-account-name: ${{ secrets.AZURE_SIGNING_ACCOUNT_NAME }}
+ certificate-profile-name: ${{ secrets.AZURE_CERTIFICATE_PROFILE_NAME }}
+ files-folder: app/build/compose/binaries/main/msi
+ files-folder-filter: msi
+ file-digest: SHA256
+ timestamp-rfc3161: http://timestamp.acs.microsoft.com
+ timestamp-digest: SHA256
- - name: Upload binaries to release
+ - name: Upload portables to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
- file: |
- ./app/build/compose/binaries/main/dmg/Processing-*.dmg
- ./app/build/compose/binaries/main/dmg/INSTRUCTIONS_FOR_TESTING.txt
- ./app/build/compose/binaries/main/msi/Processing-*.msi
- ./app/build/compose/binaries/main/deb/processing*.deb
- file_glob: true
+ asset_name: processing-${{ needs.version.outputs.version }}-${{ matrix.os_prefix }}-${{ matrix.arch }}-portable.zip
+ file: app/build/compose/binaries/main/Processing-${{ needs.version.outputs.version }}.zip
+
+ - name: Upload installers to release
+ uses: svenstaro/upload-release-action@v2
+ with:
+ repo_token: ${{ secrets.GITHUB_TOKEN }}
+ asset_name: processing-${{ needs.version.outputs.version }}-${{ matrix.os_prefix }}-${{ matrix.arch }}.${{ matrix.extension }}
+ file: app/build/compose/binaries/main/${{ matrix.binary }}.${{ matrix.extension }}
+
+ - name: Upload snap to Snap Store
+ if: runner.os == 'Linux'
+ run: snapcraft upload --release=beta app/build/compose/binaries/main/${{ matrix.binary }}.${{ matrix.extension }}
+ env:
+ SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.PROCESSING_SNAPCRAFT_TOKEN }}
+
+
\ No newline at end of file
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 44681a78f..bf4d33cd8 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -1,4 +1,4 @@
-name: Releases
+name: Releases (Legacy)
on:
release:
types: [published]
diff --git a/.gitignore b/.gitignore
index 0c8f2cfa1..67057f942 100644
--- a/.gitignore
+++ b/.gitignore
@@ -121,3 +121,6 @@ generated/
/java/mode/org.eclipse.lsp4j.jsonrpc.jar
!java/libraries/pdf/library/itext.jar
!java/libraries/serial/library/jssc.jar
+/app/windows/obj
+/java/gradle/build
+/java/gradle/example/.processing
diff --git a/.idea/icon.svg b/.idea/icon.svg
new file mode 100644
index 000000000..796997b91
--- /dev/null
+++ b/.idea/icon.svg
@@ -0,0 +1,40 @@
+
diff --git a/.idea/runConfigurations/Processing.xml b/.idea/runConfigurations/Processing.xml
index 0c7c99651..648638250 100644
--- a/.idea/runConfigurations/Processing.xml
+++ b/.idea/runConfigurations/Processing.xml
@@ -4,7 +4,6 @@
diff --git a/BUILD.md b/BUILD.md
index 672716639..8172a5313 100644
--- a/BUILD.md
+++ b/BUILD.md
@@ -8,6 +8,8 @@ First, [download the IntelliJ IDEA Community Edition](https://www.jetbrains.com/
1. Clone the Processing4 repository to your machine locally
1. Open the cloned repository in IntelliJ IDEA CE
+1. When prompted, select **Trust Project**. You can preview the project in Safe Mode but you won't be able to build Processing.
+1. IntelliJ may start loading Gradle dependencies automatically. Wait for this process to complete.
1. In the main menu, go to File > Project Structure > Project Settings > Project.
1. In the SDK Dropdown option, select a JDK version 17 or Download the jdk
1. Click the green Run Icon in the top right of the window. This is also where you can find the option to debug Processing.
@@ -25,36 +27,37 @@ Instructions for other editors are welcome and feel free to contribute the docum
## Architecture
-Processing is made of three distinct parts, the `Core`, `Java` and the `App`. The `Core` currently stands alone and `Java` and `App` depend on it. `Java` and `App` are currently interdependent but we are working on decoupling those two.
+Processing consists of three main components: `Core`, `Java`, and `App`. The `Core` is independent, while `Java` and `App` depend on it. Currently, `Java` and `App` are interdependent, but efforts are underway to decouple them.
-`Core`: The part of the code that gets bundled with your sketches, so the functionality like `ellipse(25,25,50,50);` The inner workings of that function can be found here.
+- **Core**: The essential code included with your sketches that provides Processing’s basic functions. When you use functions like `ellipse(25,25,50,50)` or `background(255)`, their underlying code is part of `Core`.
-`Java`: This is the pipeline that will take your `.pde` file and compile and run it. The PDE understands different _modes_ with `Java` being the primary one.
+- **Java**: The part of Processing that compiles and runs `.pde` files. It supports different *modes* which implement support for different languages or versions of Processing. The default mode is `Java`.
+
+- **App**: This is the Processing Development Environment (PDE), the visual part of the editor that you see and work within when you use Processing.
-`App`: This is the PDE, the visual part of the editor that you see and work within when you use Processing.
### Examples
- You want to fix a bug with one of the argument of a function that you use in a sketch. The `Core` is probably where you would find the implementation of the function that you would like to modify.
-- A feature/bug of the PDE editor has been driving you nuts, and you can no longer stand it. You would probably find your bug in the `App` section of this project.
-- You've written a large sketch and Processing has become slow to compile, a place to improve this code can probably be found in the `Java` section.
+- A bug of the PDE editor has been keeping you up at night, you would likely find the relevant code in the `App` section of this project.
+- If you've written a large sketch and Processing has become slow to compile and run it, a place to improve this code can most likely be found in the `Java` section.
## User interface
-Traditionally Processing has been written in Java swing and Flatlaf (and some html & css). Since 2025 we have switched to include Jetpack Compose, for a variety of reasons but mostly for it's inter-compatibility. There were ideas to switch to a React based editor, but this approach allows us to slowly replace Java swing components to Jetpack Compose, Ship of Theseus style.
+Historically, Processing's UI has been written in Java Swing and Flatlaf (and some html & css). Since 2025 we have switched to include Jetpack Compose, mostly for it's backwards-compatibility with Swing. This approach allows us to gradually replace Java Swing components with Jetpack Compose ones, instead of doing a complete overhaul of the editor.
## Build system
-We use `Gradle` as the build system for Processing. This used to be `Ant` but we have switched to be more in line with modern standards and to hopefully switch the internal build system in the `Java` mode to `Gradle` as well, unifying both systems for simplicity.
+We use `Gradle` as the build system for Processing. Until 2025, Processing used `Ant` but we have switched to `Gradle` to be more in line with modern standards. We plan to migrate the internal build system of the `Java` mode to `Gradle` as well, unifying both systems for simplicity.
## Kotlin vs Java
-Since introducing the Gradle build system we also support Kotlin within the repository. Refactors from Java to Kotlin are not really necessary at this stage, but all new functionality should be written in Kotlin.
+With the introduction of the Gradle build system we now support Kotlin within the repository. Refactors from Java to Kotlin are not necessary at this stage, but all new functionality should be written in Kotlin.
-Any classes that end in `..Kt.Java` are there for backwards compatibility with the `Ant` build system and can be removed when that is no longer necessary.
+Any classes that end up being written in Kotlin have their equivalent Java class under `app/ant/` source directory.
### Running Processing
-The main task to run or debug the PDE is `app:run` this run the application with `compose desktop`
+The main task to run or debug the PDE is `run`. That means you just need to run `./gradlew run` (Linux) or `./gradlew.bat run` (Windows) to build and run Processing.
-If your main concern is with the `Core` you don't need to start the whole PDE to test your changes. In IntelliJ IDEA you can select any of the sketches in `core/examples/src/.../` to run by click on the green arrow next to their main functions. This will just compile core and the example sketch. Feel free to also new examples for your newly added functionality.
+If your main concern is with the `Core` you don't need to build and start the whole PDE to test your changes. In IntelliJ IDEA you can select any of the sketches in `core/examples/src/.../` to run by click on the green arrow next to their main functions. This will just compile core and the example sketch. Feel free to create additional examples for your new functionality.
## Other editors
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 8676bf662..f542aeef4 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,6 +1,121 @@
-## Welcome to Processing!
+# Contributing to Processing on GitHub
-Thanks for your interest in contributing to Processing! Processing is a collaborative project with contributions from many volunteers. Our community is always looking for contributors and appreciates involvement in all forms. We acknowledge that not everyone has the capacity, time, or financial means to participate actively or in the same ways. We want to expand the meaning of the word “contributor.” Whether you're an experienced developer or just starting out, we value your involvement. Your unique perspectives, skills, and experiences enrich our community, and we encourage you to get involved in a way that works for you. It includes documentation, teaching, writing code, making art, writing, design, activism, organizing, curating, or anything else you might imagine. The [p5.js contribute page](https://p5js.org/contribute/) gives a great overview of different ways to get involved and contribute.
+Welcome to the contributor guidelines!
+
+This document is for new contributors looking to contribute code to Processing, contributors refreshing their memory on some technical steps, or anyone interested in working on Processing’s codebase. We believe that anyone can be a contributor. You don’t need to be an expert. We also know that not everyone has the same time, energy, or resources to spend on Processing. That’s okay. We’re glad you’re here!
+
+> [!TIP]
+> For questions about your own sketches, or broader conversations about coding in Processing, our [online forum](https://discourse.processing.org/) is a fantastic resource (make sure to read the [forum guidelines](https://discourse.processing.org/t/welcome-to-the-processing-foundation-discourse/8) before posting). You can also visit the [Processing Community Discord](https://discord.gg/8pFwMVATh8).
+
+## About GitHub
+Processing’s codebase is hosted on [GitHub](https://github.com/processing). GitHub is a website where people can collaborate on code. It’s widely used for open source projects and makes it easier to keep track of changes, report issues with the software, and contribute improvements to the code.
+
+If you're new to GitHub, a good place to start is [this tutorial](https://github.com/firstcontributions/first-contributions/blob/main/docs/gui-tool-tutorials/github-desktop-tutorial.md) guide, which walks you through the basics of contributing to a project using GitHub Desktop. For more information, we recommend [Git and GitHub for Poets](https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZF9C0YMKuns9sLDzK6zoiV), a beginner-friendly video series by Dan Shiffman.
+
+## About issues
+
+Most activity on Processing’s GitHub happens in _issues_. Issues are GitHub posts which can contain bug reports, feature requests, or broader discussions about the development of Processing. It’s a great place to begin contributing.
+
+To file a new issue, visit the [Issues](https://github.com/processing/processing4/issues) tab on the repository and click `New issue` then select the most appropriate template and follow the included instructions. These templates help maintainers understand and respond to issues faster.
+
+## Working on the Processing codebase
+
+### Prerequisites
+
+To contribute to Processing, we recommend using [GitHub Desktop](https://github.com/apps/desktop) and [IntelliJ IDEA (Community Edition)](https://www.jetbrains.com/idea/download/), as that’s the toolchain we’re best able to support. If you’re comfortable using Git on the command line or prefer a different editor, that’s totally fine too! Use what works best for you. Some familiarity with the [command line](https://developer.mozilla.org/en-US/docs/Learn_web_development/Getting_started/Environment_setup/Command_line) can help, but it’s not required.
+
+You'll need to set up a local development environment—see our [build instructions](https://github.com/processing/processing4/blob/main/BUILD.md) to get started.
+
+### Making your first contribution
+
+Most issues marked [help wanted](https://github.com/processing/processing4/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) or [good first issue](https://github.com/processing/processing4/issues?q=is%3Aissue%20is%3Aopen%20label%3A%22good%20first%20issue%22%20) are a good place to start.
+
+Before beginning work on a code contribution, please make sure that:
+
+- The issue has been discussed and a proposed solution has been approved.
+- You have been **assigned** to the issue.
+
+If an implementation has been agreed upon but no one has volunteered to take it on, feel free to comment and offer to help. A maintainer can then assign the issue to you.
+
+Please do **not** open a pull request for an issue that is already assigned to someone else. We follow a “first assigned, first served” approach to avoid duplicated work. If you open a PR for an issue that someone else is already working on, your PR will be closed.
+
+If an issue has been inactive for a long time, you’re welcome to check in politely by commenting to see if the assignee still plans to work on it or would be open to someone else taking over.
+
+There’s no hard deadline for completing contributions. We understand that people often contribute on a volunteer basis and timelines may vary. That said, if you run into trouble or have questions at any point, don’t hesitate to ask for help in the issue thread. Maintainers and other community members are here to support you.
+
+### Follow the style guidelines
+Keep the [style guidelines](https://github.com/processing/processing/wiki/Style-Guidelines) in mind when making changes to the code. If you don’t, someone else will have to reformat your code so that it fits everything else (or we’ll have to reject your changes if it’ll take us too long to clean things up).
+
+### Test locally
+Before you contribute your changes, it's essential that you make sure that Processing still builds, runs, and functions on your machine. Here again, the [build instructions](https://github.com/processing/processing4/blob/main/BUILD.md) are your best friend. Pay special attention to any features that may be affected by your changes. Does everything still work as before? Great!
+
+## Submit a pull request (PR)
+
+Once your changes are ready:
+
+1. Push your branch to your fork
+2. Open a pull request from your branch into `main` on the official repository
+3. Fill out the pull request information:
+
+ - **Title**: clear and descriptive
+ - **Resolves**: add `Resolves #[issue-number]` if applicable
+ - **Changes**: explain what you changed and why
+ - **Tests**: mention if you added tests or validated your changes
+ - **Checklist**: ensure tests pass and the branch is up-to-date
+
+Maintainers usually review pull requests within one to two weeks. If changes are requested, follow up by pushing additional commits. The PR will automatically update.
+
+If there hasn’t been any activity after two weeks, feel free to gently follow up. We kindly ask that you don’t request a review or tag maintainers before that time. Thanks for your patience!
+
+Before opening a pull request, please make sure to discuss the related issue and get assigned to it first. This helps us stay aligned and avoid unnecessary work. Thank you!
+
+## Adding New Features to Processing
+
+If you have an idea for something Processing doesn’t yet support, **creating a library** is often the best way to contribute. The [Processing Library Template](https://github.com/processing/processing-library-template) provides a starting point for developing, packaging, and distributing Processing libraries. For more instructions, see the [library template documentation](https://processing.github.io/processing-library-template/).
+
+Once your library is complete, you can submit it to the official [Processing Contributions](https://github.com/processing/processing-contributions) repository. This makes it discoverable through the PDE’s Contribution Manager. Follow the guidelines in the [Processing Library Guidelines](https://github.com/processing/processing4/wiki/Library-Guidelines).
+
+### Libraries as the Starting Point for Features
+Nearly all new features are first introduced as a Library or a Mode, or even as an example. The current [OpenGL renderer](http://glgraphics.sourceforge.net/) and Video library began as separate projects by Andrés Colubri, who needed a more performant, more sophisticated version of what we had in Processing for work that he was creating. The original `loadShape()` implementation came from the “Candy” library by Michael Chang (“mflux“). Similarly, Tweak Mode began as a [separate project](http://galsasson.com/tweakmode/) by Gal Sasson before being incorporated. PDE X was a Google Summer of code [project](https://github.com/processing/processing-experimental) by Manindra Moharana that updated the PDE to include basic refactoring and better error checking.
+
+### Why Develop Outside the Core?
+Working outside the main Processing codebase has several advantages:
+
+* It’s easier for the contributor to develop the software without it needing to work for tens or hundreds of thousands of Processing users.
+* It provides a way to get feedback on that code independently of everything else, and the ability to iterate on it rapidly.
+* This feedback process also helps gauge the level of interest for the community, and how it should be prioritized for the software.
+* We can delay the process of “normalizing” the features so that they’re consistent with the rest of Processing (function naming, structure, etc).
+
+### What Guides the Inclusion of New Features?
+We take maintenance seriously. A feature added to the core becomes a long-term responsibility. If it breaks, it needs fixing. Sometimes the original developer is no longer active (which is normal), and the burden falls on others.
+
+Processing is a massive project that has existed for more than 20 years. Part of its longevity comes from the effort that’s gone into keeping things as simple as we can, and in particular, making a lot of difficult decisions about *what to leave out*.
+
+Adding a new feature always has to be weighed against the potential confusion of one more thing—whether it’s a menu item, a dialog box, a function that needs to be added to the reference, etc. Adding a new graphics function means making it work across all the renderers that we ship (Java2D, OpenGL, JavaFX, PDF, etc) and across platforms (macOS, Windows, Linux).
+
+It may also mean new interface elements, updates to the reference, and more documentation.
+
+So when we consider a new feature, we ask ourselves:
+
+> Does this solve a problem for many users? Is it worth the added complexity and extra maintenance work?
+
+These are not easy decisions, especially when volunteers are offering their time and ideas. But we have to make them carefully to keep Processing sustainable.
+
+## Editor
+
+The current Editor component is based on the ancient [JEditSyntax](http://syntax.jedit.org/) package and has held up long past its expiration date. [Exhaustive work](https://github.com/processing/processing4/blob/master/app/src/processing/app/syntax/README.md) has been done to look at replacing the component with something more modern, like `RSyntaxArea`, but that approach was considered too risky.
+
+With Processing 4.4.0, we’ve started transitioning the Processing UI from Swing to Jetpack Compose Multiplatform, allowing us to replace Swing components gradually, without a full rewrite. Any work on updating the PDE and adding new features should focus on this migration. Replacing JEditSyntax will likely be the last step in the process. In the meantime, the editor does what it needs to do, for the intended audience. Features like code-folding, refactoring, or symbol navigation are currently out of scope.
+
+For users who want editor features beyond what the PDE offers, we’re working to make Processing easier to use in other environments. [Migrating the Processing CLI to Gradle](https://github.com/orgs/processing/projects/32/views/2?filterQuery=CLI&pane=issue&itemId=81026317) and [better Language Server support](https://github.com/orgs/processing/projects/32/views/2?filterQuery=LSP&pane=issue&itemId=90809690) will help make that possible. This should reduce the pressure to add these features to the PDE itself, allowing it to stay focused on being a minimal, beginner-friendly coding sketchbook. If you'd like to help, [let us know](https://github.com/processing/processing4/issues/883)!
+
+## Refactoring
+
+Refactoring is fun! There’s always more cleaning to do. It’s also often not very helpful.
+
+Broadly speaking, the code is built the way it is for a reason. There are so many things that can be improved, but those improvements need to come from an understanding of what’s been built so far. Changes that include refactoring are typically only accepted from contributors who have an established record of working on the code. With a better understanding of the software, the refactoring decisions come from a better, more useful place.
+
+## Contributor Recognition
The Processing project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification, recognizing all types of contributions, not just code. We use the @all-contributors bot to handle adding people to the README.md file. You can ask the @all-contributors bot to add you in an issue or PR comment like so:
@@ -10,70 +125,15 @@ The Processing project follows the [all-contributors](https://github.com/kentcdo
We usually add contributors automatically after merging a PR, but feel free to request addition yourself by commenting on [this issue](https://github.com/processing/processing4-carbon-aug-19/issues/839).
-## Found a Bug?
+## Other Ways to Contribute
-First, please visit our [troubleshooting](https://github.com/processing/processing/wiki/Troubleshooting) page for common issues—you might find the answer there!
+We're always grateful for your help fixing bugs and implementing new features BUT You don’t have to write code to contribute to Processing! Here are just a few other ways to get involved:
-For coding questions or help getting started, our [online forum](https://discourse.processing.org/) is a fantastic resource. Make sure to read the [forum guidelines](https://discourse.processing.org/t/welcome-to-the-processing-foundation-discourse/8) before posting.
-
-If your issue remains unresolved after exploring these options, we'd appreciate it if you could [file a bug report](https://github.com/processing/processing4/issues). Your feedback is crucial as it helps us address issues we might not be aware of yet.
-
-## Making Your First Contribution
-
-* **Help Wanted** – Most [issues marked help wanted](https://github.com/processing/processing4/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) are a good place to start. Issues are marked with this tag when:
-
- * They are isolated enough that someone can jump into it without significant reworking of other code.
- * Ben knows that it’s unlikely that he’ll have time to work on them.
-
-* **The Old Repository** – There are also many “help wanted” [issues in the 3.x repository](https://github.com/processing/processing4/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22). Some of these are very old, so if you're interested in one of these, check in about the priority before putting in too much work!
-
-* **JavaFX** – There are several [active issues](https://github.com/processing/processing4-javafx/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) for the JavaFX renderer as well.
-
-* **The `todo.txt` File** – This is *not* a good place to start. It’s Ben’s rambling to-do list, and dates back to the very start of the project over twenty years ago. It shouldn’t be used as a guideline for work to be done, because there are lots of things there that are no longer relevant. Consider it the dusty attic of what’s inside his head. If you see something of interest there, open an issue to see if it’s still a priority, or how it should be approached. But really, there are *so many open issues*, which represent actual problems identified by community members, and they are by far the best place to start.
-
-* **Style Guidelines** – Keep the [style guidelines](https://github.com/processing/processing/wiki/Style-Guidelines) in mind when submitting pull requests. If you don’t, someone else will have to reformat your code so that it fits everything else (or we’ll have to reject it if it’ll take us too long to clean it up).
-
-* **Larger Projects** – If you’re looking for a larger project, check out the [Project List](https://github.com/processing/processing/wiki/Project-List#processing) for other ideas.
-
-
-## New Features
-
-Nearly all new features are first introduced as a Library or a Mode, or even as an example. The current [OpenGL renderer](http://glgraphics.sourceforge.net/) and Video library began as separate projects by Andrés Colubri, who needed a more performant, more sophisticated version of what we had in Processing for work that he was creating. The original `loadShape()` implementation came from the “Candy” library by Michael Chang (“mflux“).
-
-Similarly, Tweak Mode began as a [separate project](http://galsasson.com/tweakmode/) by Gal Sasson before being incorporated. PDE X was a Google Summer of code [project](https://github.com/processing/processing-experimental) by Manindra Moharana that updated the PDE to include basic refactoring and better error checking.
-
-Developing features separately from the main software has several benefits:
-
-* It’s easier for the contributor to develop the software without it needing to work for tens or hundreds of thousands of Processing users.
-* It provides a way to get feedback on that code independently of everything else, and the ability to iterate on it rapidly.
-* This feedback process also helps gauge the level of interest for the community, and how it should be prioritized for the software.
-* We can delay the process of “normalizing” the features so that they’re consistent with the rest of Processing (function naming, structure, etc).
-
-A major consideration for any new feature is the level of maintenance that it might require in the future. If the original maintainer loses interest over time (which is normal), any ongoing work usually falls to Ben, or it sits on the issues list unfixed, which isn’t good for the community, or for Ben, who has plenty of issues of his own—whether Processing or otherwise.
-
-Processing is a massive project that has existed for more than 20 years. Part of its longevity comes from the effort that’s gone into keeping things as simple as we can, and in particular, making a lot of difficult decisions about *what to leave out*. Adding a new feature always has to be weighed against the potential confusion of one more thing—whether it’s a menu item, a dialog box, a function that needs to be added to the reference, etc. Adding a new graphics function means making it work across all the renderers that we ship (Java2D, OpenGL, JavaFX, PDF, etc) and across platforms (macOS, Windows, Linux). Does the feature help enough people that it's worth making the reference longer? Or the additional burden of maintaining that feature? It's no fun to say “no,” especially to people volunteering their time, but we often have to.
-
-
-## Editor
-
-The current Editor, based on the ancient [JEditSyntax](http://syntax.jedit.org/) package has held up long past its expiration date. [Exhaustive work](https://github.com/processing/processing4/blob/master/app/src/processing/app/syntax/README.md) has been done to look at replacing the component with something more modern, like `RSyntaxArea`, but it’s simply not feasible without breaking a massive amount of code, and likely introducing a lot of regressions in the process. All for… code folding? An incrementally better experience? But with potential for major setbacks in low-level code? It’s simply not a path that makes sense.
-
-With that in mind, any work on updating the editor and adding new features should be focused on further [adapting the preprocessor and compiler](https://github.com/processing/processing4/issues/117) to be wrapped using the [Language Server Protocol](https://en.wikipedia.org/wiki/Language_Server_Protocol), so that we can link to other existing editors (Visual Studio Code and many others). It should be possible to create a Java-only, headless implementation that wraps the current source in this repository and can communicate via LSP.
-
-The initial work was completed in Processing 4.1, and now needs more testing and implementation of Language Server clients such as [this one](https://github.com/kgtkr/processing-language-server-vscode).
-
-We can start building a new PDE that’s as simple to use as the current application, based on something like [Theia](https://theia-ide.org/), a new editor platform that uses LSP as its basis.
-
-With that in mind, nearly all editor enhancement requests will be redirected to this aim. The current editor does what we want it to, for the intended audience, and improving it requires a better foundation as a starting point.
-
-
-## Refactoring
-
-Refactoring is fun! There’s always more cleaning to do. It’s also often not very helpful.
-
-Broadly speaking, the code is built the way it is for a reason. There are so many things that can be improved, but those improvements need to come from an understanding of what’s been built so far. Changes that include refactoring are typically only accepted from contributors who have an established record of working on the code. With a better understanding of the software, the refactoring decisions come from a better, more useful place.
-
-
-## Other Details
-
-This document was hastily thrown together in an attempt to improve the bug reporting and development/contribution process. It doesn’t yet include detail about our intent with the project, the community behind it, our values, and an explanation of how the code itself is designed.
+- **Translation** – Help localize the software and documentation in your language. Many of us made our first contribution this way.
+- **Testing** – Try out new releases (especially the betas) and [report bugs](https://github.com/processing/processing4/issues/new/choose).
+- **Documentation** – Improve tutorials, reference pages, or even this guide!
+- **Design** – Contribute UI design ideas or help improve user experience.
+- **Community Support** – Answer questions on the [forum](https://discourse.processing.org/).
+- **Education** – Create learning resources, curriculums, organize workshops, or share your teaching experiences.
+- **Art and Projects** – Share what you’re making with Processing and use the #BuiltWithProcessing hashtag 💙
+- **Outreach and Advocacy** – Help others discover and get excited about the project.
diff --git a/README.md b/README.md
index 313e4596c..04d7c4b79 100644
--- a/README.md
+++ b/README.md
@@ -1,20 +1,23 @@
+> [!IMPORTANT]
+> Processing Foundation is excited to announce our open call for the [Processing Project Lead position](https://processingfoundation.org/employment/processing-project-lead)! This fully remote, full-time role starts on July 15, 2025. For full consideration, please submit your application by **May 15, 2025 11:59 EST**. [Apply here!](https://docs.google.com/forms/u/1/d/e/1FAIpQLSeBGWD87Yg1Prbc34c2fmwgY71rSCL4LJVO2GaF9I2eLCi83g/viewform?usp=send_form)
+
Processing is a flexible software sketchbook and a programming language designed for learning how to code.
This repository contains the source code for the [Processing](https://processing.org/) project for people who want to help improve the code.
-## Announcing Processing 4.3.1
+## Welcome to Processing 4.4!
-We’re excited to announce the release of Processing 4.3.1! This update brings tooling improvements and a friendlier experience for contributors. To learn more, read the [Processing 4.3.1 announcement](https://github.com/processing/processing4-carbon-aug-19/wiki/Announcing-Processing-4.3.1).
+We’re excited to announce the release of Processing 4.4! This update modernizes Processing under the hood to make future development easier. Key changes include switching the build system from Ant to Gradle, starting the transition from Swing to Jetpack Compose Multiplatform for the UI, and adding Kotlin support to the codebase. To learn more, check out [Changes in 4.4.0](https://github.com/processing/processing4/wiki/Changes-in-4.4).
-Processing was initiated in 2001 by Ben Fry and Casey Reas, who lead the development and maintenance of the project until 2023. We are grateful for their vision and dedication to the project. Processing is also indebted to over two decades of contributions from the broader Processing community.
+We hope these updates will make it easier for more people to contribute to Processing. If you'd like to get involved, have a look at our [Contributor Guide](CONTRIBUTING.md).
-> [!NOTE]
-> Due to platform limitations, the GitHub Contributors page for this repository does not show the complete list of contributors. However, the [git commit history](https://github.com/processing/processing4/commits/main/) provides a full record of the project's contributions. For contributor graphs before November 13th, refer to [this page](https://github.com/benfry/processing4/graphs/contributors). A comprehensive [list of all contributors](#contributors) is also included below. To see all commits by a contributor, click on the [💻](https://github.com/processing/processing4/commits?author=benfry) emoji below their name.
+## Acknowledgement
+Processing was initiated in 2001 by Ben Fry and Casey Reas, who led the development and maintenance of the project until 2023. We are grateful for their vision and dedication to the project. Processing is also indebted to over two decades of contributions from the broader Processing community.
## Using Processing
@@ -66,8 +69,9 @@ For licensing information about the Processing website see the [processing-websi
Copyright (c) 2015-now The Processing Foundation
## Contributors
+The Processing project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification, recognizing all forms of contributions (not just code!). A list of all contributors is included below. You can add yourself to the contributors list [here](https://github.com/processing/processing4-carbon-aug-19/issues/839)!
-Add yourself to the contributors list [here](https://github.com/processing/processing4-carbon-aug-19/issues/839)!
+_Note: due to GitHub's limitations, this repository's [Contributors](https://github.com/processing/processing4/graphs/contributors) page only shows accurate contribution data starting from late 2024. Contributor graphs from before November 13th 2024 can be found on [this page](https://github.com/benfry/processing4/graphs/contributors). The [git commit history](https://github.com/processing/processing4/commits/main/) provides a full record of the project's contributions. To see all commits by a contributor, click on the [💻](https://github.com/processing/processing4/commits?author=benfry) emoji below their name._
@@ -287,6 +291,13 @@ Add yourself to the contributors list [here](https://github.com/processing/proce
diff --git a/SCHEMA.md b/SCHEMA.md
index 23244be7f..b4a09f786 100644
--- a/SCHEMA.md
+++ b/SCHEMA.md
@@ -1,5 +1,14 @@
# Processing URI Schema Definition
+The Processing URI schema defines a custom protocol for launching and interacting with the Processing Development Environment (PDE) via specially formatted `pde://` links. These links can be used to open sketches, create new ones, load hosted or base64-encoded files, and set preferences, all through a simple URI-based interface.
+
+This feature is primarily intended for integration with web platforms, tutorials, documentation, or third-party tools that want to streamline the experience of launching sketches in Processing from a web page.
+
+Because these links can be generated dynamically, they support a range of interactive use cases. For example, an online editor could generate a unique link for each sketch, or a forum could create links based on user-submitted code snippets.
+
+>[!WARNING]
+> Be cautious when opening `pde://` links from unknown sources. Always review the contents of a sketch before running it, especially if it was shared by someone you don’t know. To protect your system, Processing runs downloaded sketches in a temporary folder, but you should still treat untrusted code with care.
+
## Local File Schema
```
pde:///path/to/sketch.pde
@@ -60,4 +69,4 @@ Sets and saves multiple preferences in a single operation.
- URL-based operations automatically prepend https:// if no scheme is provided
- All URLs and query parameters are decoded using UTF-8
- File downloads occur asynchronously in a separate thread
-- Base64 and remote sketches are saved to temporary folders
\ No newline at end of file
+- Base64 and remote sketches are saved to temporary folders
diff --git a/app/src/processing/app/Messages.java b/app/ant/processing/app/Messages.java
similarity index 100%
rename from app/src/processing/app/Messages.java
rename to app/ant/processing/app/Messages.java
diff --git a/app/ant/processing/app/ui/WelcomeToBeta.java b/app/ant/processing/app/ui/WelcomeToBeta.java
new file mode 100644
index 000000000..3127e4adc
--- /dev/null
+++ b/app/ant/processing/app/ui/WelcomeToBeta.java
@@ -0,0 +1,11 @@
+package processing.app.ui;
+
+
+// Stub class for backwards compatibility with the ant-build system
+// This class is not used in the Gradle build system
+// The actual implementation is in src/.../Schema.kt
+public class WelcomeToBeta {
+ public static void showWelcomeToBeta(){
+
+ }
+}
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index e7ef2e5b3..72a922c60 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -1,6 +1,14 @@
+import org.gradle.internal.jvm.Jvm
+import org.gradle.internal.os.OperatingSystem
import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
+import org.jetbrains.compose.desktop.application.tasks.AbstractJPackageTask
import org.jetbrains.compose.internal.de.undercouch.gradle.tasks.download.Download
+import java.io.FileOutputStream
+import java.util.zip.ZipEntry
+import java.util.zip.ZipOutputStream
+
+// TODO: Update to 2.10.20 and add hot-reloading: https://github.com/JetBrains/compose-hot-reload
plugins{
id("java")
@@ -12,9 +20,6 @@ plugins{
alias(libs.plugins.download)
}
-group = rootProject.group
-version = rootProject.version
-
repositories{
mavenCentral()
google()
@@ -29,45 +34,55 @@ sourceSets{
kotlin{
srcDirs("src")
}
+ resources{
+ srcDirs("resources", listOf("languages", "fonts", "theme").map { "../build/shared/lib/$it" })
+ }
+ }
+ test{
+ kotlin{
+ srcDirs("test")
+ }
}
}
compose.desktop {
application {
- mainClass = "processing.app.ui.Start"
+ mainClass = "processing.app.ProcessingKt"
jvmArgs(*listOf(
- Pair("processing.version", version),
- Pair("processing.revision", "1300"),
- Pair("processing.contributions.source", "https://contributions-preview.processing.org/contribs.txt"),
+ Pair("processing.version", rootProject.version),
+ Pair("processing.revision", findProperty("revision") ?: Int.MAX_VALUE),
+ Pair("processing.contributions.source", "https://contributions.processing.org/contribs"),
Pair("processing.download.page", "https://processing.org/download/"),
Pair("processing.download.latest", "https://processing.org/download/latest.txt"),
Pair("processing.tutorials", "https://processing.org/tutorials/"),
).map { "-D${it.first}=${it.second}" }.toTypedArray())
nativeDistributions{
- modules("jdk.jdi", "java.compiler", "jdk.accessibility")
+ modules("jdk.jdi", "java.compiler", "jdk.accessibility", "java.management.rmi", "java.scripting")
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
packageName = "Processing"
macOS{
- bundleID = "org.processing.app"
- iconFile = project.file("../build/macos/processing.icns")
+ bundleID = "${rootProject.group}.app"
+ iconFile = rootProject.file("build/macos/processing.icns")
infoPlist{
- extraKeysRawXml = layout.projectDirectory.file("info.plist").asFile.readText()
+ extraKeysRawXml = file("macos/info.plist").readText()
}
- entitlementsFile.set(project.file("entitlements.plist"))
- runtimeEntitlementsFile.set(project.file("entitlements.plist"))
+ entitlementsFile.set(file("macos/entitlements.plist"))
+ runtimeEntitlementsFile.set(file("macos/entitlements.plist"))
+ appStore = true
+ jvmArgs("-Dsun.java2d.metal=true")
}
windows{
- iconFile = project.file("../build/windows/processing.ico")
+ iconFile = rootProject.file("build/windows/processing.ico")
menuGroup = "Processing"
upgradeUuid = "89d8d7fe-5602-4b12-ba10-0fe78efbd602"
}
linux {
appCategory = "Programming"
- menuGroup = "Processing"
- iconFile = project.file("../build/linux/processing.png")
+ menuGroup = "Development;Programming;"
+ iconFile = rootProject.file("build/linux/processing.png")
// Fix fonts on some Linux distributions
jvmArgs("-Dawt.useSystemAAFontSettings=on")
@@ -82,6 +97,7 @@ compose.desktop {
dependencies {
implementation(project(":core"))
+ runtimeOnly(project(":java"))
implementation(libs.flatlaf)
@@ -99,12 +115,216 @@ dependencies {
implementation(libs.compottie)
implementation(libs.kaml)
+ implementation(libs.markdown)
+ implementation(libs.markdownJVM)
+
+ testImplementation(kotlin("test"))
+ testImplementation(libs.mockitoKotlin)
+ testImplementation(libs.junitJupiter)
+ testImplementation(libs.junitJupiterParams)
+
+ implementation(libs.clikt)
+}
+
+tasks.test {
+ useJUnitPlatform()
+ workingDir = file("build/test")
+ workingDir.mkdirs()
}
tasks.compileJava{
options.encoding = "UTF-8"
}
+tasks.register("lsp-develop"){
+ group = "processing"
+ // This task is used to run the LSP server when developing the LSP server itself
+ // to run the LSP server for end-users use `processing lsp` instead
+ dependencies.add("runtimeOnly", project(":java"))
+
+ // Usage: ./gradlew lsp-develop
+ // Make sure the cwd is set to the project directory
+ // or use -p to set the project directory
+
+ // Modify run configuration to start the LSP server rather than the Processing IDE
+ val run = tasks.named("run").get()
+ run.standardInput = System.`in`
+ run.standardOutput = System.out
+ dependsOn(run)
+
+ // TODO: Remove after command line is integrated, then add the `lsp` argument instead, `lsp-develop` can't be removed because we still need to pipe the input and output
+ run.jvmArgs("-Djava.awt.headless=true")
+ compose.desktop.application.mainClass = "processing.mode.java.lsp.PdeLanguageServer"
+}
+
+val version = if(project.version == "unspecified") "1.0.0" else project.version
+
+tasks.register("installCreateDmg") {
+ onlyIf { OperatingSystem.current().isMacOsX }
+ commandLine("arch", "-arm64", "brew", "install", "--quiet", "create-dmg")
+}
+tasks.register("packageCustomDmg"){
+ onlyIf { OperatingSystem.current().isMacOsX }
+ group = "compose desktop"
+
+ val distributable = tasks.named("createDistributable").get()
+ dependsOn(distributable, "installCreateDmg")
+
+ val packageName = distributable.packageName.get()
+ val dir = distributable.destinationDir.get()
+ val dmg = dir.file("../dmg/$packageName-$version.dmg").asFile
+ val app = dir.file("$packageName.app").asFile
+
+ dmg.parentFile.deleteRecursively()
+ dmg.parentFile.mkdirs()
+
+ val extra = mutableListOf()
+ val isSigned = compose.desktop.application.nativeDistributions.macOS.signing.sign.get()
+
+ if(!isSigned) {
+ val content = """
+ run 'xattr -d com.apple.quarantine Processing-${version}.dmg' to remove the quarantine flag
+ """.trimIndent()
+ val instructions = dmg.parentFile.resolve("INSTRUCTIONS.txt")
+ instructions.writeText(content)
+ extra.add("--add-file")
+ extra.add("INSTRUCTIONS.txt")
+ extra.add(instructions.path)
+ extra.add("200")
+ extra.add("25")
+ }
+
+ commandLine("create-dmg",
+ "--volname", packageName,
+ "--volicon", file("macos/volume.icns"),
+ "--background", file("macos/background.png"),
+ "--icon", "$packageName.app", "190", "185",
+ "--window-pos", "200", "200",
+ "--window-size", "658", "422",
+ "--app-drop-link", "466", "185",
+ "--hide-extension", "$packageName.app",
+ *extra.toTypedArray(),
+ dmg,
+ app
+ )
+}
+
+tasks.register("packageCustomMsi"){
+ onlyIf { OperatingSystem.current().isWindows }
+ dependsOn("createDistributable")
+ workingDir = file("windows")
+ group = "compose desktop"
+
+ val version = if(version == "unspecified") "1.0.0" else version
+
+ commandLine(
+ "dotnet",
+ "build",
+ "/p:Platform=x64",
+ "/p:Version=$version",
+ "/p:DefineConstants=\"Version=$version;\""
+ )
+}
+
+
+tasks.register("generateSnapConfiguration"){
+ val name = findProperty("snapname") ?: rootProject.name
+ val arch = when (System.getProperty("os.arch")) {
+ "amd64", "x86_64" -> "amd64"
+ "aarch64" -> "arm64"
+ else -> System.getProperty("os.arch")
+ }
+
+ onlyIf { OperatingSystem.current().isLinux }
+ val distributable = tasks.named("createDistributable").get()
+ dependsOn(distributable)
+
+ val dir = distributable.destinationDir.get()
+ val content = """
+ name: $name
+ version: $version
+ base: core22
+ summary: A creative coding editor
+ description: |
+ Processing is a flexible software sketchbook and a programming language designed for learning how to code.
+ confinement: strict
+
+ apps:
+ processing:
+ command: opt/processing/bin/Processing
+ desktop: opt/processing/lib/processing-Processing.desktop
+ environment:
+ LD_LIBRARY_PATH: ${'$'}SNAP/opt/processing/lib/runtime/lib:${'$'}LD_LIBRARY_PATH
+ LIBGL_DRIVERS_PATH: ${'$'}SNAP/usr/lib/${'$'}SNAPCRAFT_ARCH_TRIPLET/dri
+ plugs:
+ - desktop
+ - desktop-legacy
+ - wayland
+ - x11
+ - network
+ - opengl
+ - home
+ - removable-media
+
+ parts:
+ processing:
+ plugin: dump
+ source: deb/processing_$version-1_$arch.deb
+ source-type: deb
+ stage-packages:
+ - openjdk-17-jre
+ override-prime: |
+ snapcraftctl prime
+ rm -vf usr/lib/jvm/java-17-openjdk-*/lib/security/cacerts
+ """.trimIndent()
+ dir.file("../snapcraft.yaml").asFile.writeText(content)
+}
+
+tasks.register("packageSnap"){
+ onlyIf { OperatingSystem.current().isLinux }
+ dependsOn("packageDeb", "generateSnapConfiguration")
+ group = "compose desktop"
+
+ val distributable = tasks.named("createDistributable").get()
+ workingDir = distributable.destinationDir.dir("../").get().asFile
+ commandLine("snapcraft")
+}
+tasks.register("zipDistributable"){
+ dependsOn("createDistributable", "setExecutablePermissions")
+ group = "compose desktop"
+
+ val distributable = tasks.named("createDistributable").get()
+ val dir = distributable.destinationDir.get()
+ val packageName = distributable.packageName.get()
+
+ from(dir){ eachFile{ permissions{ unix("755") } } }
+ archiveBaseName.set(packageName)
+ destinationDirectory.set(dir.file("../").asFile)
+}
+
+afterEvaluate{
+ // Override the default DMG task to use our custom one
+ tasks.named("packageDmg").configure{
+ dependsOn("packageCustomDmg")
+ group = "compose desktop"
+ actions = emptyList()
+ }
+ // Override the default MSI task to use our custom one
+ tasks.named("packageMsi").configure{
+ dependsOn("packageCustomMsi")
+ group = "compose desktop"
+ actions = emptyList()
+ }
+ tasks.named("packageDistributionForCurrentOS").configure {
+ if(OperatingSystem.current().isMacOsX
+ && compose.desktop.application.nativeDistributions.macOS.notarization.appleID.isPresent
+ ){
+ dependsOn("notarizeDmg")
+ }
+ dependsOn("packageSnap", "zipDistributable")
+ }
+}
+
// LEGACY TASKS
// Most of these are shims to be compatible with the old build system
@@ -127,39 +347,9 @@ tasks.register("includeJavaMode") {
into(composeResources("modes/java/mode"))
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
-tasks.register("includeJdk") {
- val os = DefaultNativePlatform.getCurrentOperatingSystem()
- val arch = when (System.getProperty("os.arch")) {
- "amd64", "x86_64" -> "x64"
- else -> System.getProperty("os.arch")
- }
- val platform = when {
- os.isWindows -> "windows"
- os.isMacOsX -> "mac"
- else -> "linux"
- }
-
- val javaVersion = System.getProperty("java.version").split(".")[0]
- val imageType = "jdk"
-
- src("https://api.adoptium.net/v3/binary/latest/" +
- "$javaVersion/ga/" +
- "$platform/" +
- "$arch/" +
- "$imageType/" +
- "hotspot/normal/eclipse?project=jdk")
-
- val extension = if (os.isWindows) "zip" else "tar.gz"
- val jdk = layout.buildDirectory.file("tmp/jdk-$platform-$arch.$extension")
- dest(jdk)
- overwrite(false)
- doLast {
- copy {
- val archive = if (os.isWindows) { zipTree(jdk) } else { tarTree(jdk) }
- from(archive){ eachFile{ permissions{ unix("755") } } }
- into(composeResources(""))
- }
- }
+tasks.register("includeJdk") {
+ from(Jvm.current().javaHome.absolutePath)
+ destinationDir = composeResources("jdk").get().asFile
}
tasks.register("includeSharedAssets"){
from("../build/shared/")
@@ -205,6 +395,7 @@ tasks.register("includeJavaModeResources") {
from(java.layout.buildDirectory.dir("resources-bundled"))
into(composeResources("../"))
}
+// TODO: Move to java mode
tasks.register("renameWindres") {
dependsOn("includeSharedAssets","includeJavaModeResources")
val dir = composeResources("modes/java/application/launch4j/bin/")
@@ -221,37 +412,123 @@ tasks.register("renameWindres") {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
into(dir)
}
-afterEvaluate {
- tasks.named("prepareAppResources").configure {
- dependsOn(
- "includeCore",
- "includeJavaMode",
- "includeJdk",
- "includeSharedAssets",
- "includeProcessingExamples",
- "includeProcessingWebsiteExamples",
- "includeJavaModeResources",
- "renameWindres"
- )
- }
- tasks.register("setExecutablePermissions") {
- description = "Sets executable permissions on binaries in Processing.app resources"
- group = "compose desktop"
+tasks.register("includeProcessingResources"){
+ dependsOn(
+ "includeJdk",
+ "includeCore",
+ "includeJavaMode",
+ "includeSharedAssets",
+ "includeProcessingExamples",
+ "includeProcessingWebsiteExamples",
+ "includeJavaModeResources",
+ "renameWindres"
+ )
+ finalizedBy("signResources")
+}
- doLast {
- val resourcesPath = layout.buildDirectory.dir("compose/binaries")
- fileTree(resourcesPath) {
- include("**/resources/**/bin/**")
- include("**/resources/**/*.sh")
- include("**/resources/**/*.dylib")
- include("**/resources/**/*.so")
- include("**/resources/**/*.exe")
- }.forEach { file ->
- if (file.isFile) {
- file.setExecutable(true, false)
+tasks.register("signResources"){
+ onlyIf {
+ OperatingSystem.current().isMacOsX
+ &&
+ compose.desktop.application.nativeDistributions.macOS.signing.sign.get()
+ }
+ group = "compose desktop"
+ val resourcesPath = composeResources("")
+
+ // find jars in the resources directory
+ val jars = mutableListOf()
+ doFirst{
+ fileTree(resourcesPath)
+ .matching { include("**/Info.plist") }
+ .singleOrNull()
+ ?.let { file ->
+ copy {
+ from(file)
+ into(resourcesPath)
}
}
+ fileTree(resourcesPath) {
+ include("**/*.jar")
+ exclude("**/*.jar.tmp/**")
+ }.forEach { file ->
+ val tempDir = file.parentFile.resolve("${file.name}.tmp")
+ copy {
+ from(zipTree(file))
+ into(tempDir)
+ }
+ file.delete()
+ jars.add(tempDir)
+ }
+ fileTree(resourcesPath){
+ include("**/bin/**")
+ include("**/*.jnilib")
+ include("**/*.dylib")
+ include("**/*aarch64*")
+ include("**/*x86_64*")
+ include("**/*ffmpeg*")
+ include("**/ffmpeg*/**")
+ exclude("jdk/**")
+ exclude("*.jar")
+ exclude("*.so")
+ exclude("*.dll")
+ }.forEach{ file ->
+ exec {
+ commandLine("codesign", "--timestamp", "--force", "--deep","--options=runtime", "--sign", "Developer ID Application", file)
+ }
+ }
+ jars.forEach { file ->
+ FileOutputStream(File(file.parentFile, file.nameWithoutExtension)).use { fos ->
+ ZipOutputStream(fos).use { zos ->
+ file.walkTopDown().forEach { fileEntry ->
+ if (fileEntry.isFile) {
+ // Calculate the relative path for the zip entry
+ val zipEntryPath = fileEntry.relativeTo(file).path
+ val entry = ZipEntry(zipEntryPath)
+ zos.putNextEntry(entry)
+
+ // Copy file contents to the zip
+ fileEntry.inputStream().use { input ->
+ input.copyTo(zos)
+ }
+ zos.closeEntry()
+ }
+ }
+ }
+ }
+
+ file.deleteRecursively()
+ }
+ file(composeResources("Info.plist")).delete()
+ }
+
+
+}
+tasks.register("setExecutablePermissions") {
+ description = "Sets executable permissions on binaries in Processing.app resources"
+ group = "compose desktop"
+
+ doLast {
+ val resourcesPath = layout.buildDirectory.dir("compose/binaries")
+ fileTree(resourcesPath) {
+ include("**/resources/**/bin/**")
+ include("**/resources/**/lib/**")
+ include("**/resources/**/*.sh")
+ include("**/resources/**/*.dylib")
+ include("**/resources/**/*.so")
+ include("**/resources/**/*.exe")
+ }.forEach { file ->
+ if (file.isFile) {
+ file.setExecutable(true, false)
+ }
}
}
- tasks.findByName("createDistributable")?.finalizedBy("setExecutablePermissions")
-}
\ No newline at end of file
+}
+
+afterEvaluate {
+ tasks.named("prepareAppResources").configure {
+ dependsOn("includeProcessingResources")
+ }
+ tasks.named("createDistributable").configure {
+ finalizedBy("setExecutablePermissions")
+ }
+}
diff --git a/app/macos/background.png b/app/macos/background.png
new file mode 100644
index 000000000..4c0cd97fa
Binary files /dev/null and b/app/macos/background.png differ
diff --git a/app/entitlements.plist b/app/macos/entitlements.plist
similarity index 100%
rename from app/entitlements.plist
rename to app/macos/entitlements.plist
diff --git a/app/info.plist b/app/macos/info.plist
similarity index 100%
rename from app/info.plist
rename to app/macos/info.plist
diff --git a/app/macos/volume.icns b/app/macos/volume.icns
new file mode 100644
index 000000000..460610c03
Binary files /dev/null and b/app/macos/volume.icns differ
diff --git a/app/src/main/resources/about-processing.svg b/app/src/main/resources/about-processing.svg
new file mode 100644
index 000000000..11abb1078
--- /dev/null
+++ b/app/src/main/resources/about-processing.svg
@@ -0,0 +1,74 @@
+
diff --git a/app/src/main/resources/bird.svg b/app/src/main/resources/bird.svg
new file mode 100644
index 000000000..90d69c899
--- /dev/null
+++ b/app/src/main/resources/bird.svg
@@ -0,0 +1,5 @@
+
diff --git a/app/src/main/resources/defaults.txt b/app/src/main/resources/defaults.txt
new file mode 100644
index 000000000..6e3e00f0d
--- /dev/null
+++ b/app/src/main/resources/defaults.txt
@@ -0,0 +1,309 @@
+# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+
+# DO NOT MAKE CHANGES TO THIS FILE!!!
+
+# These are the default preferences. If you want to modify
+# them directly, use the per-user local version of the file:
+
+# Users -> [username] -> AppData -> Roaming ->
+# Processing -> preferences.txt (on Windows 10)
+
+# ~/Library -> Processing -> preferences.txt (on macOS)
+
+# ~/.config/processing -> preferences.txt (on Linux)
+
+# The exact location of your preferences file can be found at
+# the bottom of the Preferences window inside Processing.
+
+# Because AppData and Application Data may be considered
+# hidden or system folders on Windows, you'll have to ensure
+# that they're visible in order to get at preferences.txt
+
+# You'll have problems running Processing if you incorrectly
+# modify lines in this file. It will probably not start at all.
+
+# AGAIN, DO NOT ALTER THIS FILE! I'M ONLY YELLING BECAUSE I LOVE YOU!
+
+
+# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+
+# If you don't want users to have their sketchbook default to
+# "My Documents/Processing" on Windows and "Documents/Processing" on OS X,
+# set this to another path that will be used by default.
+# Note that this path must exist already otherwise it won't see
+# the sketchbook folder, and will instead assume the sketchbook
+# has gone missing, and that it should instead use the default.
+# In 4.0, the location has changed.
+#sketchbook.path.four=
+
+# Whether or not to show the Welcome screen for 4.0
+# (It's always available under Help → Welcome)
+welcome.four.show = true
+welcome.four.seen = false
+
+# Set 'true' for the default behavior before 4.0, where the
+# main tab must have the same name as the sketch folder
+editor.sync_folder_and_filename = true
+
+# By default, contributions are moved to backup folders when
+# they are removed or replaced. The backups can be found at
+# sketchbook/libraries/old, sketchbook/tools/old, and sketchbook/modes/old
+
+# true to backup contributions when "Remove" button is pressed
+contribution.backup.on_remove = true
+# true to backup contributions when installing a newer version
+contribution.backup.on_install = true
+
+recent.count = 10
+
+# Default to the native (AWT) file selector where possible
+chooser.files.native = true
+# We were shutting this off on macOS because it broke Copy/Paste:
+# https://github.com/processing/processing/issues/1035
+# But removing again for 4.0 alpha 5, because the JFileChooser is awful,
+# and worse on Big Sur, so a bigger problem than the Copy/Paste issue.
+# https://github.com/processing/processing4/issues/77
+#chooser.files.native.macos = false
+
+# set to 'lab' to interpolate theme gradients using L*a*b* color space
+theme.gradient.method = rgb
+
+
+# by default, check the processing server for any updates
+# (please avoid disabling, this also helps us know basic numbers
+# on how many people are using Processing)
+update.check = true
+
+# on windows, automatically associate .pde files with processing.exe
+platform.auto_file_type_associations = true
+
+
+# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+
+# default size for the main window
+editor.window.width.default = 700
+editor.window.height.default = 600
+
+editor.window.width.min = 400
+editor.window.height.min = 500
+# tested as approx 440 on OS X
+editor.window.height.min.macos = 450
+# tested to be 515 on Windows XP, this leaves some room
+editor.window.height.min.windows = 530
+# tested with Raspberry Pi display
+editor.window.height.min.linux = 480
+
+# scaling for the interface (to handle Windows and Linux HiDPI displays)
+editor.zoom = 100%
+# automatically set based on system dpi (only helps on Windows)
+editor.zoom.auto = true
+
+# Use the default monospace font included in lib/fonts.
+# (As of Processing 4 alpha 5, that's Source Code Pro)
+editor.font.family = processing.mono
+editor.font.size = 12
+
+# To reset everyone's default, replaced editor.antialias with editor.smooth
+# for 2.1. Fonts are unusably gross on OS X (and Linux) w/o smoothing and
+# the Oracle JVM, and many longtime users have anti-aliasing turned off.
+editor.smooth = true
+
+# blink the caret by default
+editor.caret.blink = true
+# change to true to use a block (instead of a bar)
+editor.caret.block = false
+
+# enable ctrl-ins, shift-ins, shift-delete for cut/copy/paste
+# on windows and linux, but disable on the mac
+editor.keys.alternative_cut_copy_paste = true
+editor.keys.alternative_cut_copy_paste.macos = false
+
+# true if shift-backspace sends the delete character,
+# false if shift-backspace just means backspace
+editor.keys.shift_backspace_is_delete = false
+
+# home and end keys should only travel to the start/end of the current line
+editor.keys.home_and_end_travel_far = false
+# home and end keys move to the first/last non-whitespace character,
+# and move to the actual start/end when pressed a second time.
+# Only works if editor.keys.home_and_end_travel_far is false.
+editor.keys.home_and_end_travel_smart = true
+# The OS X HI Guidelines say that home/end are relative to the document,
+# but that drives some people nuts. This pref enables/disables it.
+editor.keys.home_and_end_travel_far.macos = true
+
+# Enable/disable support for complex scripts. Used for Japanese and others,
+# but disable when not needed, otherwise basic Western European chars break.
+editor.input_method_support = false
+
+# convert tabs to spaces? how many spaces?
+editor.tabs.expand = true
+editor.tabs.size = 2
+
+# Set to true to automatically close [ { ( " and '
+editor.completion.auto_close = false
+
+# automatically indent each line
+editor.indent = true
+
+# Whether to check files to see if they've been modified externally
+editor.watcher = true
+# Set true to enable debugging, since this is quirky on others' machines
+editor.watcher.debug = false
+# The window of time (in milliseconds) in which a change won't be counted
+editor.watcher.window = 1500
+
+# Format and search engine to use for online queries
+search.format = https://google.com/search?q=%s
+
+# font choice and size for the console
+console.font.size = 12
+
+# number of lines to show by default
+console.lines = 4
+
+# Number of blank lines to advance/clear console.
+# Note that those lines are also printed in the terminal when
+# Processing is executed there.
+# Setting to 0 stops this behavior.
+console.head_padding = 10
+
+# Set to false to disable automatically clearing the console
+# each time 'run' is hit
+# If one sets it to false, one may also want to set 'console.head_padding'
+# to a positive number to separate outputs from different runs.
+console.auto_clear = true
+
+# number of days of history to keep around before cleaning
+# setting to 0 will never clean files
+console.temp.days = 7
+
+# set the maximum number of lines remembered by the console
+# the default is 500, lengthen at your own peril
+console.scrollback.lines = 500
+console.scrollback.chars = 40000
+
+# Any additional Java options when running.
+# If you change this and can't run things, it's your own durn fault.
+run.options =
+
+# settings for the -XmsNNNm and -XmxNNNm command line option
+run.options.memory = false
+run.options.memory.initial = 64
+run.options.memory.maximum = 512
+
+# Index of the display to use for running sketches (starts at 1).
+# Kept this 1-indexed because older vesions of Processing were setting
+# the preference even before it was being used.
+# -1 means the default display, 0 means all displays
+run.display = -1
+
+# set internally because it comes from the system
+#run.window.bgcolor=
+
+# set to false to open a new untitled window when closing the last window
+# (otherwise, the environment will quit)
+# default to the relative norm for the different platforms,
+# but the setting can be changed in the prefs dialog anyway
+#sketchbook.closing_last_window_quits = true
+#sketchbook.closing_last_window_quits.macos = false
+
+editor.untitled.prefix=sketch_
+# The old (pre-1.0, back for 2.0) style for default sketch name.
+# If you change this, be careful that this will work with your language
+# settings. For instance, MMMdd won't work on Korean-language systems
+# because it'll insert non-ASCII characters and break the environment.
+# https://github.com/processing/processing/issues/322
+editor.untitled.suffix=yyMMdd
+
+# replace underscores in .pde file names with spaces
+sketch.name.replace_underscore = true
+
+# what to use for generating sketch names (change in the prefs window)
+#sketch.name.approach =
+
+# number of days of build history and other temp files to keep around
+# these are kept around for debugging purposes, and in case code is lost
+temp.days = 7
+
+
+# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+
+# whether or not to export as full screen (present) mode
+export.application.fullscreen = false
+
+# whether to show the stop button when exporting to application
+export.application.stop = true
+
+# embed Java by default for lower likelihood of problems
+export.application.embed_java = true
+
+# set to false to no longer delete application folders before export
+# (removed from the Preferences windows in 4.0 beta 9)
+export.delete_target_folder = true
+
+# may be useful when attempting to debug the preprocessor
+preproc.save_build_files=false
+
+# allows various preprocessor features to be toggled
+# in case they are causing problems
+
+# preprocessor: pde.g
+preproc.color_datatype = true
+preproc.web_colors = true
+preproc.enhanced_casting = true
+
+# preprocessor: PdeEmitter.java
+preproc.substitute_floats = true
+
+# PdePreproc.java
+# writes out the parse tree as parseTree.xml, which can be usefully
+# viewed in (at least) Mozilla or IE. useful when debugging the preprocessor.
+preproc.output_parse_tree = false
+
+# set to the program to be used for opening HTML files, folders, etc.
+#launcher.linux = xdg-open
+
+# FULL SCREEN (PRESENT MODE)
+run.present.bgcolor = #666666
+run.present.stop.color = #cccccc
+
+# PROXIES
+# Set a proxy server for folks that require it. This will allow the update
+# checker and the contrib manager to run properly in those environments.
+# This changed from proxy.host and proxy.port to proxy.http.host and
+# proxy.http.port in 3.0a8. In addition, https and socks were added.
+proxy.http.host=
+proxy.http.port=
+proxy.https.host=
+proxy.https.port=
+proxy.socks.host=
+proxy.socks.port=
+# Example of usage (replace 'http' with 'https' or 'socks' as needed)
+#proxy.http.host=proxy.example.com
+#proxy.http.port=8080
+# Whether to use the system proxy by default
+proxy.system=true
+
+# PDE X
+pdex.errorCheckEnabled = true
+pdex.warningsEnabled = true
+pdex.writeErrorLogs = false
+
+pdex.autoSave.autoSaveEnabled = false
+pdex.autoSaveInterval = 5
+pdex.autoSave.promptDisplay = true
+pdex.autoSave.autoSaveByDefault = true
+
+# Enable auto-completion when hitting ctrl-space
+pdex.completion = false
+# Setting this true will show completions whenever available, not just after ctrl-space
+pdex.completion.trigger = false
+# Suggest libraries to import when a class is undefined/unavailable
+pdex.suggest.imports = true
+# Set to false to disable ctrl/cmd-click jump to definition
+pdex.inspectMode.hotkey = true
diff --git a/app/src/main/resources/logo.svg b/app/src/main/resources/logo.svg
new file mode 100644
index 000000000..aa04fcb29
--- /dev/null
+++ b/app/src/main/resources/logo.svg
@@ -0,0 +1,5 @@
+
\ No newline at end of file
diff --git a/app/src/main/resources/processing/app/laf/FlatLaf.properties b/app/src/main/resources/processing/app/laf/FlatLaf.properties
new file mode 100644
index 000000000..70e082912
--- /dev/null
+++ b/app/src/main/resources/processing/app/laf/FlatLaf.properties
@@ -0,0 +1,23 @@
+# The default is 8, which creates tiny nubby scroll bars
+ScrollBar.width = 16
+
+TitlePane.inactiveForeground = #000000
+
+
+# Better matched for macOS dark mode (but using everywhere)
+# https://github.com/JFormDesigner/FlatLaf/issues/497
+
+[dark]@background = #1e1e1e
+[dark]@foreground = #e0e0e0
+[dark]@accentColor = #107aff
+[dark]@accentFocusColor = #176896
+
+[dark]Component.arrowType = chevron
+
+[dark]CheckBox.icon.style = filled
+[dark]CheckBox.icon[filled].selectedBorderColor = @accentColor
+[dark]CheckBox.icon[filled].selectedBackground = @accentColor
+[dark]CheckBox.icon[filled].checkmarkColor = @foreground
+
+[dark]RadioButton.icon.style = filled
+[dark]RadioButton.icon[filled].centerDiameter = 6
diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java
index 27b194a0a..b5aa599b9 100644
--- a/app/src/processing/app/Base.java
+++ b/app/src/processing/app/Base.java
@@ -124,6 +124,7 @@ public class Base {
static public void main(final String[] args) {
+ Messages.log("Starting Processing version" + VERSION_NAME + " revision "+ REVISION);
EventQueue.invokeLater(() -> {
try {
createAndShowGUI(args);
@@ -165,6 +166,20 @@ public class Base {
static private void createAndShowGUI(String[] args) {
// these times are fairly negligible relative to Base.
// long t1 = System.currentTimeMillis();
+ var preferences = java.util.prefs.Preferences.userRoot().node("org/processing/app");
+ var installLocations = new ArrayList<>(List.of(preferences.get("installLocations", "").split(",")));
+ var installLocation = System.getProperty("user.dir") + "^" + Base.getVersionName();
+
+ // Check if the installLocation is already in the list
+ if (!installLocations.contains(installLocation)) {
+ // Add the installLocation to the list
+ installLocations.add(installLocation);
+
+ // Save the updated list back to preferences
+ preferences.put("installLocations", String.join(",", installLocations));
+ }
+ // TODO: Cleanup old locations if no longer installed
+ // TODO: Cleanup old locations if current version is installed in the same location
File versionFile = Platform.getContentFile("lib/version.txt");
if (versionFile != null && versionFile.exists()) {
@@ -563,14 +578,12 @@ public class Base {
cl.downloadAvailableList(this, new ContribProgress(null));
long t9 = System.currentTimeMillis();
- if (DEBUG) {
- System.out.println("core modes: " + (t2b-t2) +
- ", contrib modes: " + (t2c-t2b) +
- ", contrib ex: " + (t2c-t2b));
- System.out.println("base took " + (t2-t1) + " " + (t3-t2) + " " + (t4-t3) +
+ Messages.log("core modes: " + (t2b-t2) +
+ ", contrib modes: " + (t2c-t2b) +
+ ", contrib ex: " + (t2c-t2b));
+ Messages.log("base took " + (t2-t1) + " " + (t3-t2) + " " + (t4-t3) +
" " + (t5-t4) + " t6-t5=" + (t6-t5) + " " + (t7-t6) +
" handleNew=" + (t8-t7) + " " + (t9-t8) + " ms");
- }
}
@@ -1366,10 +1379,10 @@ public class Base {
* @param schemeUri the full URI, including pde://
*/
public Editor handleScheme(String schemeUri) {
-// var result = Schema.handleSchema(schemeUri, this);
-// if (result != null) {
-// return result;
-// }
+ var result = Schema.handleSchema(schemeUri, this);
+ if (result != null) {
+ return result;
+ }
String location = schemeUri.substring(6);
if (location.length() > 0) {
@@ -1943,18 +1956,20 @@ public class Base {
public void populateSketchbookMenu(JMenu menu) {
- boolean found = false;
- try {
- found = addSketches(menu, sketchbookFolder);
- } catch (Exception e) {
- Messages.showWarning("Sketchbook Menu Error",
- "An error occurred while trying to list the sketchbook.", e);
- }
- if (!found) {
- JMenuItem empty = new JMenuItem(Language.text("menu.file.sketchbook.empty"));
- empty.setEnabled(false);
- menu.add(empty);
- }
+ new Thread(() -> {
+ boolean found = false;
+ try {
+ found = addSketches(menu, sketchbookFolder);
+ } catch (Exception e) {
+ Messages.showWarning("Sketchbook Menu Error",
+ "An error occurred while trying to list the sketchbook.", e);
+ }
+ if (!found) {
+ JMenuItem empty = new JMenuItem(Language.text("menu.file.sketchbook.empty"));
+ empty.setEnabled(false);
+ menu.add(empty);
+ }
+ }).start();
}
@@ -1965,11 +1980,17 @@ public class Base {
* sketch should open in a new window.
*/
protected boolean addSketches(JMenu menu, File folder) {
+ Messages.log("scanning " + folder.getAbsolutePath());
// skip .DS_Store files, etc. (this shouldn't actually be necessary)
if (!folder.isDirectory()) {
return false;
}
+ // Don't look inside the 'android' folders in the sketchbook
+ if (folder.getName().equals("android")) {
+ return false;
+ }
+
if (folder.getName().equals("libraries")) {
return false; // let's not go there
}
@@ -2055,6 +2076,7 @@ public class Base {
*/
public boolean addSketches(DefaultMutableTreeNode node, File folder,
boolean examples) throws IOException {
+ Messages.log("scanning " + folder.getAbsolutePath());
// skip .DS_Store files, etc. (this shouldn't actually be necessary)
if (!folder.isDirectory()) {
return false;
@@ -2062,6 +2084,11 @@ public class Base {
final String folderName = folder.getName();
+ // Don't look inside the 'android' folders in the sketchbook
+ if (folderName.equals("android")) {
+ return false;
+ }
+
// Don't look inside the 'libraries' folders in the sketchbook
if (folderName.equals("libraries")) {
return false;
diff --git a/app/src/processing/app/Library.java b/app/src/processing/app/Library.java
index dc8269eeb..f23354284 100644
--- a/app/src/processing/app/Library.java
+++ b/app/src/processing/app/Library.java
@@ -1,6 +1,5 @@
package processing.app;
-import java.awt.EventQueue;
import java.io.*;
import java.util.*;
import java.util.zip.ZipFile;
@@ -330,6 +329,7 @@ public class Library extends LocalContribution {
* imports to specific libraries.
* @param importToLibraryTable mapping from package names to Library objects
*/
+ static boolean instructed = false;
// public void addPackageList(HashMap importToLibraryTable) {
public void addPackageList(Map> importToLibraryTable) {
// PApplet.println(packages);
@@ -342,18 +342,20 @@ public class Library extends LocalContribution {
libraries = new ArrayList<>();
importToLibraryTable.put(pkg, libraries);
} else {
- if (Base.DEBUG) {
- System.err.println("The library found in");
- System.err.println(getPath());
- System.err.println("conflicts with");
+ if(!instructed) {
+ instructed = true;
+ Messages.err("The library found in");
+ Messages.err(getPath());
+ Messages.err("conflicts with");
for (Library library : libraries) {
- System.err.println(library.getPath());
+ Messages.err(library.getPath());
}
- System.err.println("which already define(s) the package " + pkg);
- System.err.println("If you have a line in your sketch that reads");
- System.err.println("import " + pkg + ".*;");
- System.err.println("Then you'll need to first remove one of those libraries.");
- System.err.println();
+ Messages.err("which already define(s) the package " + pkg);
+ Messages.err("If you have a line in your sketch that reads");
+ Messages.err("import " + pkg + ".*;");
+ Messages.err("Then you'll need to first remove one of those libraries.");
+ }else{
+ Messages.err("\tPackage ("+pkg+")\t conflict found in [" + name + "] with libraries: " + libraries.stream().map(Library::getName).reduce((a, b) -> a + ", " + b).orElse(""));
}
}
libraries.add(this);
diff --git a/app/src/processing/app/Messages.kt b/app/src/processing/app/Messages.kt
new file mode 100644
index 000000000..cae54e6e9
--- /dev/null
+++ b/app/src/processing/app/Messages.kt
@@ -0,0 +1,282 @@
+/* -*- mode: java; c-basic-offset: 2; indent-tabs-mode: nil -*- */ /*
+ Part of the Processing project - http://processing.org
+
+ Copyright (c) 2015 The Processing Foundation
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ version 2, as published by the Free Software Foundation.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+package processing.app
+
+import processing.app.ui.Toolkit
+import java.awt.EventQueue
+import java.awt.Frame
+import java.io.PrintWriter
+import java.io.StringWriter
+import javax.swing.JFrame
+import javax.swing.JOptionPane
+
+class Messages {
+ companion object {
+ /**
+ * "No cookie for you" type messages. Nothing fatal or all that
+ * much of a bummer, but something to notify the user about.
+ */
+ @JvmStatic
+ fun showMessage(title: String = "Message", message: String) {
+ if (Base.isCommandLine()) {
+ println("$title: $message")
+ } else {
+ JOptionPane.showMessageDialog(
+ Frame(), message, title,
+ JOptionPane.INFORMATION_MESSAGE
+ )
+ }
+ }
+
+
+ /**
+ * Non-fatal error message with optional stack trace side dish.
+ */
+ /**
+ * Non-fatal error message.
+ */
+ @JvmStatic
+ @JvmOverloads
+ fun showWarning(title: String = "Warning", message: String, e: Throwable? = null) {
+ if (Base.isCommandLine()) {
+ println("$title: $message")
+ } else {
+ JOptionPane.showMessageDialog(
+ Frame(), message, title,
+ JOptionPane.WARNING_MESSAGE
+ )
+ }
+ e?.printStackTrace()
+ }
+
+ /**
+ * Non-fatal error message with two levels of formatting.
+ * Unlike the others, this is non-blocking and will run later on the EDT.
+ */
+ @JvmStatic
+ fun showWarningTiered(
+ title: String,
+ primary: String, secondary: String,
+ e: Throwable?
+ ) {
+ if (Base.isCommandLine()) {
+ // TODO All these messages need to be handled differently for
+ // proper parsing on the command line. Many have \n in them.
+ println("$title: $primary\n$secondary")
+ } else {
+ EventQueue.invokeLater {
+ JOptionPane.showMessageDialog(
+ JFrame(),
+ Toolkit.formatMessage(primary, secondary),
+ title, JOptionPane.WARNING_MESSAGE
+ )
+ }
+ }
+ e?.printStackTrace()
+ }
+
+
+ /**
+ * Show an error message that's actually fatal to the program.
+ * This is an error that can't be recovered. Use showWarning()
+ * for errors that allow P5 to continue running.
+ */
+ @JvmStatic
+ fun showError(title: String = "Error", message: String, e: Throwable?) {
+ if (Base.isCommandLine()) {
+ System.err.println("$title: $message")
+ } else {
+ JOptionPane.showMessageDialog(
+ Frame(), message, title,
+ JOptionPane.ERROR_MESSAGE
+ )
+ }
+ e?.printStackTrace()
+ System.exit(1)
+ }
+
+
+ /**
+ * Warning window that includes the stack trace.
+ */
+ @JvmStatic
+ fun showTrace(
+ title: String?,
+ message: String,
+ t: Throwable?,
+ fatal: Boolean
+ ) {
+ val title = title ?: if (fatal) "Error" else "Warning"
+
+ if (Base.isCommandLine()) {
+ System.err.println("$title: $message")
+ t?.printStackTrace()
+ } else {
+ val sw = StringWriter()
+ t!!.printStackTrace(PrintWriter(sw))
+
+ JOptionPane.showMessageDialog(
+ Frame(), // first clears to the next line
+ // second is a shorter height blank space before the trace
+ Toolkit.formatMessage("$message $sw"),
+ title,
+ if (fatal) JOptionPane.ERROR_MESSAGE else JOptionPane.WARNING_MESSAGE
+ )
+
+ if (fatal) {
+ System.exit(1)
+ }
+ }
+ }
+
+ @JvmStatic
+ fun showYesNoQuestion(
+ editor: Frame?, title: String?,
+ primary: String?, secondary: String?
+ ): Int {
+ if (!Platform.isMacOS()) {
+ return JOptionPane.showConfirmDialog(
+ editor,
+ Toolkit.formatMessage(primary, secondary), //"" +
+ //"" + primary + "" +
+ //" " + secondary,
+ title,
+ JOptionPane.YES_NO_OPTION,
+ JOptionPane.QUESTION_MESSAGE
+ )
+ } else {
+ val result = showCustomQuestion(
+ editor, title, primary, secondary,
+ 0, "Yes", "No"
+ )
+ return if (result == 0) {
+ JOptionPane.YES_OPTION
+ } else if (result == 1) {
+ JOptionPane.NO_OPTION
+ } else {
+ JOptionPane.CLOSED_OPTION
+ }
+ }
+ }
+
+
+ /**
+ * @param highlight A valid array index for options[] that specifies the
+ * default (i.e. safe) choice.
+ * @return The (zero-based) index of the selected value, -1 otherwise.
+ */
+ @JvmStatic
+ fun showCustomQuestion(
+ editor: Frame?, title: String?,
+ primary: String?, secondary: String?,
+ highlight: Int, vararg options: String
+ ): Int {
+ val result: Any
+ if (!Platform.isMacOS()) {
+ return JOptionPane.showOptionDialog(
+ editor,
+ Toolkit.formatMessage(primary, secondary), title,
+ JOptionPane.DEFAULT_OPTION, JOptionPane.QUESTION_MESSAGE, null,
+ options, options[highlight]
+ )
+ } else {
+ val pane =
+ JOptionPane(
+ Toolkit.formatMessage(primary, secondary),
+ JOptionPane.QUESTION_MESSAGE
+ )
+
+ pane.options = options
+
+ // highlight the safest option ala apple hig
+ pane.initialValue = options[highlight]
+
+ val dialog = pane.createDialog(editor, null)
+ dialog.isVisible = true
+
+ result = pane.value
+ }
+ for (i in options.indices) {
+ if (result != null && result == options[i]) return i
+ }
+ return -1
+ }
+
+
+ // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
+ @JvmStatic
+ @Deprecated("Use log() instead")
+ fun log(from: Any, message: String) {
+ if (Base.DEBUG) {
+ val callingClass = Throwable()
+ .stackTrace[2]
+ .className
+ .formatClassName()
+ println("$callingClass: $message")
+ }
+ }
+
+ @JvmStatic
+ fun log(message: String?) {
+ if (Base.DEBUG) {
+ val callingClass = Throwable()
+ .stackTrace[2]
+ .className
+ .formatClassName()
+ println("$callingClass$message")
+ }
+ }
+
+ @JvmStatic
+ fun logf(message: String?, vararg args: Any?) {
+ if (Base.DEBUG) {
+ val callingClass = Throwable()
+ .stackTrace[2]
+ .className
+ .formatClassName()
+ System.out.printf("$callingClass$message", *args)
+ }
+ }
+
+ @JvmStatic
+ @JvmOverloads
+ fun err(message: String?, e: Throwable? = null) {
+ if (Base.DEBUG) {
+ if (message != null) {
+ val callingClass = Throwable()
+ .stackTrace[4]
+ .className
+ .formatClassName()
+ System.err.println("$callingClass$message")
+ }
+ e?.printStackTrace()
+ }
+ }
+ }
+}
+
+// Helper functions to give the base classes a color
+fun String.formatClassName() = this
+ .replace("processing.", "")
+ .replace(".", "/")
+ .padEnd(40)
+ .colorizePathParts()
+fun String.colorizePathParts() = split("/").joinToString("/") { part ->
+ "\u001B[${31 + (part.hashCode() and 0x7).rem(6)}m$part\u001B[0m"
+}
\ No newline at end of file
diff --git a/app/src/processing/app/Platform.java b/app/src/processing/app/Platform.java
index 8d4d28ddc..b911d7e0a 100644
--- a/app/src/processing/app/Platform.java
+++ b/app/src/processing/app/Platform.java
@@ -391,17 +391,14 @@ public class Platform {
static public File getJavaHome() {
var resourcesDir = System.getProperty("compose.application.resources.dir");
if(resourcesDir != null) {
- var jdkFolder = Arrays.stream(new File(resourcesDir).listFiles((dir, name) -> dir.isDirectory() && name.startsWith("jdk-")))
- .findFirst()
- .orElse(null);
- if(Platform.isMacOS()){
- return new File(jdkFolder, "Contents/Home");
- }
+ var jdkFolder = new File(resourcesDir,"jdk");
+ if(jdkFolder.exists()){
return jdkFolder;
+ }
}
var home = System.getProperty("java.home");
- if(home != null && new File(home, "bin/java").exists()){
+ if(home != null){
return new File(home);
}
if (Platform.isMacOS()) {
@@ -577,18 +574,25 @@ public class Platform {
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
+ /**
+ * These methods were refactored to use the Preferences system instead of
+ * actual environment variables, since modifying environment variables at runtime
+ * proved problematic. This approach provides similar functionality
+ * while being compatible with various platforms and execution environments.
+ *
+ * This abstraction maintains a consistent API for environment-like variable storage
+ * while implementing it differently under the hood to work around runtime limitations.
+ */
static public void setenv(String variable, String value) {
- inst.setenv(variable, value);
+ Preferences.set(variable, value);
}
-
static public String getenv(String variable) {
- return inst.getenv(variable);
+ return Preferences.get(variable);
}
-
static public int unsetenv(String variable) {
- return inst.unsetenv(variable);
+ throw new RuntimeException("unsetenv() not yet implemented");
}
}
diff --git a/app/src/processing/app/contrib/ui/Preferences.kt b/app/src/processing/app/Preferences.kt
similarity index 69%
rename from app/src/processing/app/contrib/ui/Preferences.kt
rename to app/src/processing/app/Preferences.kt
index b344e1cb7..c5645c9bb 100644
--- a/app/src/processing/app/contrib/ui/Preferences.kt
+++ b/app/src/processing/app/Preferences.kt
@@ -1,11 +1,10 @@
-package processing.app.contrib.ui
+package processing.app
import androidx.compose.runtime.*
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
-import processing.app.Base
-import processing.app.Platform
import java.io.File
+import java.io.InputStream
import java.nio.file.*
import java.util.Properties
@@ -13,10 +12,13 @@ import java.util.Properties
const val PREFERENCES_FILE_NAME = "preferences.txt"
const val DEFAULTS_FILE_NAME = "defaults.txt"
+fun PlatformStart(){
+ Platform.inst ?: Platform.init()
+}
@Composable
fun loadPreferences(): Properties{
- Platform.init()
+ PlatformStart()
val settingsFolder = Platform.getSettingsFolder()
val preferencesFile = settingsFolder.resolve(PREFERENCES_FILE_NAME)
@@ -24,20 +26,12 @@ fun loadPreferences(): Properties{
if(!preferencesFile.exists()){
preferencesFile.createNewFile()
}
- val watched = watchFile(preferencesFile)
+ watchFile(preferencesFile)
- val preferences by remember {
- mutableStateOf(Properties())
+ return Properties().apply {
+ load(ClassLoader.getSystemResourceAsStream(DEFAULTS_FILE_NAME) ?: InputStream.nullInputStream())
+ load(preferencesFile.inputStream())
}
-
- LaunchedEffect(watched){
- val defaults = Base::class.java.getResourceAsStream("/lib/${DEFAULTS_FILE_NAME}") ?: return@LaunchedEffect
-
- preferences.load(defaults)
- preferences.load(preferencesFile.inputStream())
- }
-
- return preferences
}
@Composable
@@ -68,4 +62,12 @@ fun watchFile(file: File): Any? {
}
}
return event
+}
+val LocalPreferences = compositionLocalOf { error("No preferences provided") }
+@Composable
+fun PreferencesProvider(content: @Composable () -> Unit){
+ val preferences = loadPreferences()
+ CompositionLocalProvider(LocalPreferences provides preferences){
+ content()
+ }
}
\ No newline at end of file
diff --git a/app/src/processing/app/Processing.kt b/app/src/processing/app/Processing.kt
new file mode 100644
index 000000000..11555edf5
--- /dev/null
+++ b/app/src/processing/app/Processing.kt
@@ -0,0 +1,90 @@
+package processing.app
+
+import com.github.ajalt.clikt.command.SuspendingCliktCommand
+import com.github.ajalt.clikt.command.main
+import com.github.ajalt.clikt.core.Context
+import com.github.ajalt.clikt.core.subcommands
+import com.github.ajalt.clikt.parameters.arguments.argument
+import com.github.ajalt.clikt.parameters.arguments.help
+import com.github.ajalt.clikt.parameters.arguments.multiple
+import com.github.ajalt.clikt.parameters.options.flag
+import com.github.ajalt.clikt.parameters.options.help
+import com.github.ajalt.clikt.parameters.options.option
+import processing.app.ui.Start
+
+class Processing: SuspendingCliktCommand("processing"){
+ val version by option("-v","--version")
+ .flag()
+ .help("Print version information")
+
+ val sketches by argument()
+ .multiple(default = emptyList())
+ .help("Sketches to open")
+
+ override fun help(context: Context) = "Start the Processing IDE"
+ override val invokeWithoutSubcommand = true
+ override suspend fun run() {
+ if(version){
+ println("processing-${Base.getVersionName()}-${Base.getRevision()}")
+ return
+ }
+
+ val subcommand = currentContext.invokedSubcommand
+ if (subcommand == null) {
+ Start.main(sketches.toTypedArray())
+ }
+ }
+}
+
+suspend fun main(args: Array){
+ Processing()
+ .subcommands(
+ LSP(),
+ LegacyCLI(args)
+ )
+ .main(args)
+}
+
+class LSP: SuspendingCliktCommand("lsp"){
+ override fun help(context: Context) = "Start the Processing Language Server"
+ override suspend fun run(){
+ try {
+ // Indirect invocation since app does not depend on java mode
+ Class.forName("processing.mode.java.lsp.PdeLanguageServer")
+ .getMethod("main", Array::class.java)
+ .invoke(null, *arrayOf(emptyList()))
+ } catch (e: Exception) {
+ throw InternalError("Failed to invoke main method", e)
+ }
+ }
+}
+
+class LegacyCLI(val args: Array): SuspendingCliktCommand( "cli"){
+ override fun help(context: Context) = "Legacy processing-java command line interface"
+
+ val help by option("--help").flag()
+ val build by option("--build").flag()
+ val run by option("--run").flag()
+ val present by option("--present").flag()
+ val sketch: String? by option("--sketch")
+ val force by option("--force").flag()
+ val output: String? by option("--output")
+ val export by option("--export").flag()
+ val noJava by option("--no-java").flag()
+ val variant: String? by option("--variant")
+
+ override suspend fun run(){
+ val cliArgs = args.filter { it != "cli" }
+ try {
+ if(build){
+ System.setProperty("java.awt.headless", "true")
+ }
+ // Indirect invocation since app does not depend on java mode
+ Class.forName("processing.mode.java.Commander")
+ .getMethod("main", Array::class.java)
+ .invoke(null, *arrayOf(cliArgs.toTypedArray()))
+ } catch (e: Exception) {
+ throw InternalError("Failed to invoke main method", e)
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/src/processing/app/Schema.kt b/app/src/processing/app/Schema.kt
index 8ea12e7f6..a02bf1da7 100644
--- a/app/src/processing/app/Schema.kt
+++ b/app/src/processing/app/Schema.kt
@@ -1,5 +1,9 @@
package processing.app
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.Dispatchers
+import kotlinx.coroutines.Job
+import kotlinx.coroutines.launch
import processing.app.ui.Editor
import java.io.File
import java.io.FileOutputStream
@@ -13,6 +17,8 @@ import java.util.*
class Schema {
companion object{
private var base: Base? = null
+ val jobs = mutableListOf()
+
@JvmStatic
fun handleSchema(input: String, base: Base): Editor?{
this.base = base
@@ -53,7 +59,11 @@ class Schema {
private fun handleSketchUrl(uri: URI): Editor?{
val url = File(uri.path.replace("/url/", ""))
- val tempSketchFolder = File(Base.untitledFolder, url.nameWithoutExtension)
+ val rand = (1..6)
+ .map { (('a'..'z') + ('A'..'Z')).random() }
+ .joinToString("")
+
+ val tempSketchFolder = File(File(Base.untitledFolder, rand), url.nameWithoutExtension)
tempSketchFolder.mkdirs()
val tempSketchFile = File(tempSketchFolder, "${tempSketchFolder.name}.pde")
@@ -68,10 +78,9 @@ class Schema {
}
private fun handleSketchOptions(uri: URI, sketchFolder: File){
val options = uri.query?.split("&")
- ?.map { it.split("=") }
+ ?.map { it.split("=", limit = 2) }
?.associate {
- URLDecoder.decode(it[0], StandardCharsets.UTF_8) to
- URLDecoder.decode(it[1], StandardCharsets.UTF_8)
+ it[0] to it[1]
}
?: emptyMap()
options["data"]?.let{ data ->
@@ -81,7 +90,7 @@ class Schema {
downloadFiles(uri, code, File(sketchFolder, "code"))
}
options["pde"]?.let{ pde ->
- downloadFiles(uri, pde, sketchFolder)
+ downloadFiles(uri, pde, sketchFolder, "pde")
}
options["mode"]?.let{ mode ->
val modeFile = File(sketchFolder, "sketch.properties")
@@ -89,8 +98,9 @@ class Schema {
}
}
- private fun downloadFiles(uri: URI, urlList: String, targetFolder: File){
- Thread{
+
+ private val scope = CoroutineScope(Dispatchers.Default)
+ private fun downloadFiles(uri: URI, urlList: String, targetFolder: File, extension: String = ""){
targetFolder.mkdirs()
val base = uri.path.split("/")
@@ -101,45 +111,44 @@ class Schema {
val files = urlList.split(",")
files.filter { it.isNotBlank() }
- .map{ it.split(":", limit = 2) }
- .map{ segments ->
- if(segments.size == 2){
- if(segments[0].isBlank()){
- return@map listOf(null, segments[1])
- }
- return@map segments
- }
- return@map listOf(null, segments[0])
+ .map {
+ if (it.contains(":")) it
+ else "$it:$it"
}
+ .map{ it.split(":", limit = 2) }
.forEach { (name, content) ->
+ var target = File(targetFolder, name)
+ if(extension.isNotBlank() && target.extension != extension){
+ target = File(targetFolder, "$name.$extension")
+ }
try{
- // Try to decode the content as base64
val file = Base64.getDecoder().decode(content)
- if(name == null){
+ if(name.isBlank()){
Messages.err("Base64 files needs to start with a file name followed by a colon")
return@forEach
}
- File(targetFolder, name).writeBytes(file)
+ target.writeBytes(file)
}catch(_: IllegalArgumentException){
- // Assume it's a URL and download it
- var url = URI.create(content)
- if(url.host == null){
- url = URI.create("https://$base/$content")
- }
- if(url.scheme == null){
- url = URI.create("https://$content")
- }
-
- val target = File(targetFolder, name ?: url.path.split("/").last())
- url.toURL().openStream().use { input ->
- target.outputStream().use { output ->
- input.copyTo(output)
+ val url = URL(when{
+ content.startsWith("https://") -> content
+ content.startsWith("http://") -> content.replace("http://", "https://")
+ URL("https://$content").path.isNotBlank() -> "https://$content"
+ else -> "https://$base/$content"
+ })
+ val download = scope.launch{
+ url.openStream().use { input ->
+ target.outputStream().use { output ->
+ input.copyTo(output)
+ }
}
}
+ jobs.add(download)
+ download.invokeOnCompletion {
+ jobs.remove(download)
+ }
}
}
- }.start()
}
@@ -148,7 +157,7 @@ class Schema {
?.map { it.split("=") }
?.associate {
URLDecoder.decode(it[0], StandardCharsets.UTF_8) to
- URLDecoder.decode(it[1], StandardCharsets.UTF_8)
+ URLDecoder.decode(it[1], StandardCharsets.UTF_8)
}
?: emptyMap()
for ((key, value) in options){
diff --git a/app/src/processing/app/UpdateCheck.java b/app/src/processing/app/UpdateCheck.java
index 40ffe24c0..1bfa29688 100644
--- a/app/src/processing/app/UpdateCheck.java
+++ b/app/src/processing/app/UpdateCheck.java
@@ -31,6 +31,7 @@ import java.util.Random;
import javax.swing.JOptionPane;
+import processing.app.ui.WelcomeToBeta;
import processing.core.PApplet;
@@ -116,7 +117,7 @@ public class UpdateCheck {
long now = System.currentTimeMillis();
if (lastString != null) {
long when = Long.parseLong(lastString);
- if (now - when < ONE_DAY) {
+ if (now - when < ONE_DAY && !Base.DEBUG) {
// don't annoy the shit outta people
return;
}
@@ -134,6 +135,9 @@ public class UpdateCheck {
// offerToUpdateContributions = !promptToVisitDownloadPage();
promptToVisitDownloadPage();
}
+ if(latest < Base.getRevision()){
+ WelcomeToBeta.showWelcomeToBeta();
+ }
/*
if (offerToUpdateContributions) {
diff --git a/app/src/processing/app/contrib/ContributionListing.java b/app/src/processing/app/contrib/ContributionListing.java
index 0c9945526..08b8d307c 100644
--- a/app/src/processing/app/contrib/ContributionListing.java
+++ b/app/src/processing/app/contrib/ContributionListing.java
@@ -30,6 +30,7 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.locks.ReentrantLock;
import processing.app.Base;
+import processing.app.Messages;
import processing.app.UpdateCheck;
import processing.app.Util;
import processing.core.PApplet;
@@ -228,6 +229,7 @@ public class ContributionListing {
public void downloadAvailableList(final Base base,
final ContribProgress progress) {
// TODO: replace with SwingWorker [jv]
+ Messages.log("Downloading contributions list from " + LISTING_URL);
new Thread(() -> {
downloadingLock.lock();
diff --git a/app/src/processing/app/contrib/ui/ContributionManager.kt b/app/src/processing/app/contrib/ui/ContributionManager.kt
index a057e76df..2ad472159 100644
--- a/app/src/processing/app/contrib/ui/ContributionManager.kt
+++ b/app/src/processing/app/contrib/ui/ContributionManager.kt
@@ -12,8 +12,6 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.awt.ComposePanel
import androidx.compose.ui.graphics.Color
-import androidx.compose.ui.input.key.Key
-import androidx.compose.ui.input.key.key
import androidx.compose.ui.input.pointer.PointerIcon
import androidx.compose.ui.input.pointer.pointerHoverIcon
import androidx.compose.ui.text.font.FontWeight
@@ -25,6 +23,7 @@ import com.charleskorn.kaml.Yaml
import com.charleskorn.kaml.YamlConfiguration
import kotlinx.serialization.Serializable
import processing.app.Platform
+import processing.app.loadPreferences
import java.net.URL
import java.util.*
import javax.swing.JFrame
@@ -33,16 +32,7 @@ import kotlin.io.path.*
fun main() = application {
- val active = remember { mutableStateOf(true) }
- if(!active.value){
- Window(onCloseRequest = ::exitApplication) {
-
- }
- return@application
- }
- Window(
- onCloseRequest = { active.value = false },
- ) {
+ Window(onCloseRequest = ::exitApplication) {
contributionsManager()
}
}
diff --git a/app/src/processing/app/exec/StreamPump.java b/app/src/processing/app/exec/StreamPump.java
index 130a74afd..29786102c 100644
--- a/app/src/processing/app/exec/StreamPump.java
+++ b/app/src/processing/app/exec/StreamPump.java
@@ -13,6 +13,7 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;
import processing.app.Base;
+import processing.app.Messages;
/**
@@ -79,8 +80,7 @@ public class StreamPump implements Runnable {
}
} catch (final IOException e) {
if (Base.DEBUG) {
- System.err.println("StreamPump: " + name);
- e.printStackTrace(System.err);
+ Messages.err("StreamPump: " + name, e);
// removing for 0190, but need a better way to handle these
throw new RuntimeException("Inside " + this + " for " + name, e);
}
diff --git a/app/src/processing/app/platform/DefaultPlatform.java b/app/src/processing/app/platform/DefaultPlatform.java
index c2b858093..18997755b 100644
--- a/app/src/processing/app/platform/DefaultPlatform.java
+++ b/app/src/processing/app/platform/DefaultPlatform.java
@@ -257,31 +257,31 @@ public class DefaultPlatform {
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- public interface CLibrary extends Library {
- CLibrary INSTANCE = Native.load("c", CLibrary.class);
- int setenv(String name, String value, int overwrite);
- String getenv(String name);
- int unsetenv(String name);
- int putenv(String string);
- }
-
-
- public void setenv(String variable, String value) {
- CLibrary clib = CLibrary.INSTANCE;
- clib.setenv(variable, value, 1);
- }
-
-
- public String getenv(String variable) {
- CLibrary clib = CLibrary.INSTANCE;
- return clib.getenv(variable);
- }
-
-
- public int unsetenv(String variable) {
- CLibrary clib = CLibrary.INSTANCE;
- return clib.unsetenv(variable);
- }
+// public interface CLibrary extends Library {
+// CLibrary INSTANCE = Native.load("c", CLibrary.class);
+// int setenv(String name, String value, int overwrite);
+// String getenv(String name);
+// int unsetenv(String name);
+// int putenv(String string);
+// }
+//
+//
+// public void setenv(String variable, String value) {
+// CLibrary clib = CLibrary.INSTANCE;
+// clib.setenv(variable, value, 1);
+// }
+//
+//
+// public String getenv(String variable) {
+// CLibrary clib = CLibrary.INSTANCE;
+// return clib.getenv(variable);
+// }
+//
+//
+// public int unsetenv(String variable) {
+// CLibrary clib = CLibrary.INSTANCE;
+// return clib.unsetenv(variable);
+// }
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
diff --git a/app/src/processing/app/platform/LinuxPlatform.java b/app/src/processing/app/platform/LinuxPlatform.java
index 15a8e3d5a..3426144ca 100644
--- a/app/src/processing/app/platform/LinuxPlatform.java
+++ b/app/src/processing/app/platform/LinuxPlatform.java
@@ -31,6 +31,8 @@ import processing.app.Messages;
import processing.app.Preferences;
import processing.core.PApplet;
+import javax.swing.*;
+
public class LinuxPlatform extends DefaultPlatform {
String homeDir;
@@ -39,6 +41,9 @@ public class LinuxPlatform extends DefaultPlatform {
public void initBase(Base base) {
super.initBase(base);
+ JFrame.setDefaultLookAndFeelDecorated(true);
+ System.setProperty("flatlaf.menuBarEmbedded", "true");
+
// Set X11 WM_CLASS property which is used as the application
// name by Gnome 3 and other window managers.
// https://github.com/processing/processing/issues/2534
@@ -98,7 +103,7 @@ public class LinuxPlatform extends DefaultPlatform {
File configHome = null;
// Check to see if the user has set a different location for their config
- String configHomeEnv = getenv("XDG_CONFIG_HOME");
+ String configHomeEnv = System.getenv("XDG_CONFIG_HOME");
if (configHomeEnv != null && !configHomeEnv.isBlank()) {
configHome = new File(configHomeEnv);
if (!configHome.exists()) {
@@ -106,6 +111,10 @@ public class LinuxPlatform extends DefaultPlatform {
configHome = null; // don't use non-existent folder
}
}
+ String snapUserCommon = System.getenv("SNAP_USER_COMMON");
+ if (snapUserCommon != null && !snapUserCommon.isBlank()) {
+ configHome = new File(snapUserCommon);
+ }
// If not set properly, use the default
if (configHome == null) {
configHome = new File(getHomeDir(), ".config");
diff --git a/app/src/processing/app/syntax/JEditTextArea.java b/app/src/processing/app/syntax/JEditTextArea.java
index 566119e3d..b3c4d18a8 100644
--- a/app/src/processing/app/syntax/JEditTextArea.java
+++ b/app/src/processing/app/syntax/JEditTextArea.java
@@ -399,6 +399,7 @@ public class JEditTextArea extends JComponent
public void updateScrollBars() {
if (vertical != null && visibleLines != 0) {
vertical.setValues(firstLine,visibleLines,0,getLineCount());
+ vertical.setVisible(visibleLines < getLineCount());
vertical.setUnitIncrement(2);
vertical.setBlockIncrement(visibleLines);
}
@@ -424,6 +425,7 @@ public class JEditTextArea extends JComponent
// https://github.com/processing/processing/issues/319
// https://github.com/processing/processing/issues/355
//setValues(int newValue, int newExtent, int newMin, int newMax)
+ horizontal.setVisible(painterWidth < width);
if (horizontalOffset < 0) {
horizontal.setValues(-horizontalOffset, painterWidth, -leftHandGutter, width);
} else {
diff --git a/app/src/processing/app/syntax/im/InputMethodSupport.java b/app/src/processing/app/syntax/im/InputMethodSupport.java
index 391b96b97..e3323fa11 100644
--- a/app/src/processing/app/syntax/im/InputMethodSupport.java
+++ b/app/src/processing/app/syntax/im/InputMethodSupport.java
@@ -79,9 +79,7 @@ public class InputMethodSupport implements InputMethodRequests, InputMethodListe
@Override
public Rectangle getTextLocation(TextHitInfo offset) {
- if (Base.DEBUG) {
- Messages.log("#Called getTextLocation:" + offset);
- }
+ Messages.log("#Called getTextLocation:" + offset);
int line = textArea.getCaretLine();
int offsetX = textArea.getCaretPosition() - textArea.getLineStartOffset(line);
// '+1' mean textArea.lineToY(line) + textArea.getPainter().getFontMetrics().getHeight().
@@ -238,9 +236,7 @@ public class InputMethodSupport implements InputMethodRequests, InputMethodListe
RenderingHints.VALUE_TEXT_ANTIALIAS_ON :
RenderingHints.VALUE_TEXT_ANTIALIAS_OFF);
FontRenderContext frc = g2d.getFontRenderContext();
- if (Base.DEBUG) {
- Messages.log("debug: FontRenderContext is Antialiased = " + frc.getAntiAliasingHint());
- }
+ Messages.log("debug: FontRenderContext is Antialiased = " + frc.getAntiAliasingHint());
return new TextLayout(composedTextString.getIterator(), frc);
}
diff --git a/app/src/processing/app/tools/InstallCommander.java b/app/src/processing/app/tools/InstallCommander.java
index cd136c362..33eabc6f6 100644
--- a/app/src/processing/app/tools/InstallCommander.java
+++ b/app/src/processing/app/tools/InstallCommander.java
@@ -86,30 +86,41 @@ public class InstallCommander implements Tool {
PrintWriter writer = PApplet.createWriter(file);
writer.print("#!/bin/sh\n\n");
- writer.print("# Prevents processing-java from stealing focus, see:\n" +
- "# https://github.com/processing/processing/issues/3996.\n" +
- "OPTION_FOR_HEADLESS_RUN=\"\"\n" +
- "for ARG in \"$@\"\n" +
- "do\n" +
- " if [ \"$ARG\" = \"--build\" ]; then\n" +
- " OPTION_FOR_HEADLESS_RUN=\"-Djava.awt.headless=true\"\n" +
- " fi\n" +
- "done\n\n");
+ var resourcesDir = System.getProperty("compose.application.resources.dir");
+ if(resourcesDir != null) {
+ // Gradle based distributable
+ var appBinary = (resourcesDir
+ .split("\\.app")[0] + ".app/Contents/MacOS/Processing")
+ .replaceAll(" ", "\\\\ ");
+ writer.print(appBinary + " cli $@");
- String javaRoot = Platform.getContentFile(".").getCanonicalPath();
+ } else {
+ // Ant based distributable
+ writer.print("# Prevents processing-java from stealing focus, see:\n" +
+ "# https://github.com/processing/processing/issues/3996.\n" +
+ "OPTION_FOR_HEADLESS_RUN=\"\"\n" +
+ "for ARG in \"$@\"\n" +
+ "do\n" +
+ " if [ \"$ARG\" = \"--build\" ]; then\n" +
+ " OPTION_FOR_HEADLESS_RUN=\"-Djava.awt.headless=true\"\n" +
+ " fi\n" +
+ "done\n\n");
- StringList jarList = new StringList();
- addJarList(jarList, new File(javaRoot));
- addJarList(jarList, new File(javaRoot, "core/library"));
- addJarList(jarList, new File(javaRoot, "modes/java/mode"));
- String classPath = jarList.join(":").replaceAll(javaRoot + "\\/?", "");
+ String javaRoot = Platform.getContentFile(".").getCanonicalPath();
- writer.println("cd \"" + javaRoot + "\" && " +
- Platform.getJavaPath().replaceAll(" ", "\\\\ ") +
- " -Djna.nosys=true" +
- " $OPTION_FOR_HEADLESS_RUN" +
- " -cp \"" + classPath + "\"" +
- " processing.mode.java.Commander \"$@\"");
+ StringList jarList = new StringList();
+ addJarList(jarList, new File(javaRoot));
+ addJarList(jarList, new File(javaRoot, "core/library"));
+ addJarList(jarList, new File(javaRoot, "modes/java/mode"));
+ String classPath = jarList.join(":").replaceAll(javaRoot + "\\/?", "");
+
+ writer.println("cd \"" + javaRoot + "\" && " +
+ Platform.getJavaPath().replaceAll(" ", "\\\\ ") +
+ " -Djna.nosys=true" +
+ " $OPTION_FOR_HEADLESS_RUN" +
+ " -cp \"" + classPath + "\"" +
+ " processing.mode.java.Commander \"$@\"");
+ }
writer.flush();
writer.close();
file.setExecutable(true);
diff --git a/app/src/processing/app/ui/Editor.java b/app/src/processing/app/ui/Editor.java
index f87ba4ee1..a06cbe238 100644
--- a/app/src/processing/app/ui/Editor.java
+++ b/app/src/processing/app/ui/Editor.java
@@ -208,7 +208,7 @@ public abstract class Editor extends JFrame implements RunnerListener {
Box box = Box.createVerticalBox();
Box upper = Box.createVerticalBox();
- if(SystemInfo.isMacFullWindowContentSupported) {
+ if(Platform.isMacOS() && SystemInfo.isMacFullWindowContentSupported) {
getRootPane().putClientProperty( "apple.awt.fullWindowContent", true );
getRootPane().putClientProperty( "apple.awt.transparentTitleBar", true );
@@ -349,6 +349,30 @@ public abstract class Editor extends JFrame implements RunnerListener {
// Enable window resizing (which allows for full screen button)
setResizable(true);
+
+ {
+ // Move Lines Keyboard Shortcut (Alt + Arrow Up/Down)
+ KeyStroke moveUpKeyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_UP, InputEvent.ALT_DOWN_MASK);
+ final String MOVE_UP_ACTION_KEY = "moveLinesUp";
+ textarea.getInputMap(JComponent.WHEN_FOCUSED).put(moveUpKeyStroke, MOVE_UP_ACTION_KEY);
+ textarea.getActionMap().put(MOVE_UP_ACTION_KEY, new AbstractAction() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ handleMoveLines(true);
+ }
+ });
+
+ KeyStroke moveDownKeyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, InputEvent.ALT_DOWN_MASK);
+ final String MOVE_DOWN_ACTION_KEY = "moveLinesDown";
+ textarea.getInputMap(JComponent.WHEN_FOCUSED).put(moveDownKeyStroke, MOVE_DOWN_ACTION_KEY);
+ textarea.getActionMap().put(MOVE_DOWN_ACTION_KEY, new AbstractAction() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ handleMoveLines(false);
+ }
+ });
+ }
+
}
@@ -595,12 +619,10 @@ public abstract class Editor extends JFrame implements RunnerListener {
toolTipWarningColor = Theme.get("errors.selection.warning.bgcolor");
toolTipErrorColor = Theme.get("errors.selection.error.bgcolor");
- if(Platform.isWindows()) {
- UIManager.put("RootPane.background", color);
- UIManager.put("TitlePane.embeddedForeground", Theme.getColor("editor.fgcolor"));
- getRootPane().updateUI();
- UIManager.put("RootPane.background", null);
- }
+ UIManager.put("RootPane.background", color);
+ UIManager.put("TitlePane.embeddedForeground", Theme.getColor("editor.fgcolor"));
+ getRootPane().updateUI();
+ UIManager.put("RootPane.background", null);
JPopupMenu popup = modePopup.getPopupMenu();
// Cannot use instanceof because com.formdev.flatlaf.ui.FlatPopupMenuBorder
@@ -791,6 +813,18 @@ public abstract class Editor extends JFrame implements RunnerListener {
item.addActionListener(e -> handleIndentOutdent(false));
menu.add(item);
+ item = Toolkit.newJMenuItemExt("menu.edit.increase_font");
+ item.addActionListener(e -> {
+ modifyFontSize(true);
+ });
+ menu.add(item);
+
+ item = Toolkit.newJMenuItemExt("menu.edit.decrease_font");
+ item.addActionListener(e -> {
+ modifyFontSize(false);
+ });
+ menu.add(item);
+
menu.addSeparator();
item = Toolkit.newJMenuItem(Language.text("menu.edit.find"), 'F');
@@ -848,6 +882,16 @@ public abstract class Editor extends JFrame implements RunnerListener {
return menu;
}
+ protected void modifyFontSize(boolean increase){
+ var fontSize = Preferences.getInteger("editor.font.size");
+ fontSize += increase ? 1 : -1;
+ fontSize = Math.max(5, Math.min(72, fontSize));
+ Preferences.setInteger("editor.font.size", fontSize);
+ for (Editor editor : base.getEditors()) {
+ editor.applyPreferences();
+ }
+ Preferences.save();
+ }
abstract public JMenu buildSketchMenu();
@@ -1919,6 +1963,110 @@ public abstract class Editor extends JFrame implements RunnerListener {
sketch.setModified(true);
}
+
+ /**
+ * Moves the selected lines up or down in the text editor.
+ *
+ *
If {@code moveUp} is true, the selected lines are moved up. If false, they move down.
+ *
This method ensures proper selection updates and handles edge cases like moving
+ * the first or last line.
+ *
This operation is undo/redoable, allowing the user to revert the action using
+ * {@code Ctrl/Cmd + Z} (Undo). Redo functionality is available through the
+ * keybinding {@code Ctrl/Cmd + Z} on Windows/Linux and {@code Shift + Cmd + Z} on macOS.
+ *
+ * @param moveUp {@code true} to move the selection up, {@code false} to move it down.
+ */
+ public void handleMoveLines(boolean moveUp) {
+ startCompoundEdit();
+ boolean isSelected = false;
+
+ if (textarea.isSelectionActive())
+ isSelected = true;
+
+ int caretPos = textarea.getCaretPosition();
+ int currentLine = textarea.getCaretLine();
+ int lineStart = textarea.getLineStartOffset(currentLine);
+ int column = caretPos - lineStart;
+
+ int startLine = textarea.getSelectionStartLine();
+ int stopLine = textarea.getSelectionStopLine();
+
+ // Adjust selection if the last line isn't fully selected
+ if (startLine != stopLine &&
+ textarea.getSelectionStop() == textarea.getLineStartOffset(stopLine)) {
+ stopLine--;
+ }
+
+ int replacedLine = moveUp ? startLine - 1 : stopLine + 1;
+ if (replacedLine < 0 || replacedLine >= textarea.getLineCount()) {
+ stopCompoundEdit();
+ return;
+ }
+
+ final String source = textarea.getText(); // Get full text from textarea
+
+ int replaceStart = textarea.getLineStartOffset(replacedLine);
+ int replaceEnd = textarea.getLineStopOffset(replacedLine);
+ if (replaceEnd > source.length()) {
+ replaceEnd = source.length();
+ }
+
+ int selectionStart = textarea.getLineStartOffset(startLine);
+ int selectionEnd = textarea.getLineStopOffset(stopLine);
+ if (selectionEnd > source.length()) {
+ selectionEnd = source.length();
+ }
+
+ String replacedText = source.substring(replaceStart, replaceEnd);
+ String selectedText = source.substring(selectionStart, selectionEnd);
+
+ if (replacedLine == textarea.getLineCount() - 1) {
+ replacedText += "\n";
+ selectedText = selectedText.substring(0, Math.max(0, selectedText.length() - 1));
+ } else if (stopLine == textarea.getLineCount() - 1) {
+ selectedText += "\n";
+ replacedText = replacedText.substring(0, Math.max(0, replacedText.length() - 1));
+ }
+
+ int newSelectionStart, newSelectionEnd;
+ if (moveUp) {
+ textarea.select(selectionStart, selectionEnd);
+ textarea.setSelectedText(replacedText); // Use setSelectedText()
+
+ textarea.select(replaceStart, replaceEnd);
+ textarea.setSelectedText(selectedText);
+
+ newSelectionStart = textarea.getLineStartOffset(startLine - 1);
+ newSelectionEnd = textarea.getLineStopOffset(stopLine - 1);
+ } else {
+ textarea.select(replaceStart, replaceEnd);
+ textarea.setSelectedText(selectedText);
+
+ textarea.select(selectionStart, selectionEnd);
+ textarea.setSelectedText(replacedText);
+
+ newSelectionStart = textarea.getLineStartOffset(startLine + 1);
+ newSelectionEnd = stopLine + 1 < textarea.getLineCount()
+ ? Math.min(textarea.getLineStopOffset(stopLine + 1), source.length())
+ : textarea.getLineStopOffset(stopLine); // Prevent out-of-bounds
+ }
+ stopCompoundEdit();
+
+ if (isSelected)
+ SwingUtilities.invokeLater(() -> {
+ textarea.select(newSelectionStart, newSelectionEnd-1);
+ });
+ else if (replacedLine >= 0 && replacedLine < textarea.getLineCount()) {
+ int replacedLineStart = textarea.getLineStartOffset(replacedLine);
+ int replacedLineEnd = textarea.getLineStopOffset(replacedLine);
+
+ // Ensure caret stays within bounds of the new line
+ int newCaretPos = Math.min(replacedLineStart + column, replacedLineEnd - 1);
+
+ SwingUtilities.invokeLater(() -> textarea.setCaretPosition(newCaretPos));
+ }
+}
+
static public boolean checkParen(char[] array, int index, int stop) {
while (index < stop) {
@@ -2128,7 +2276,7 @@ public abstract class Editor extends JFrame implements RunnerListener {
* something like "sketch_070752a - Processing 0126"
*/
public void updateTitle() {
- setTitle(sketch.getName() + " | Processing " + Base.getVersionName());
+ setTitle(sketch.getName());
if (!sketch.isUntitled()) {
// Set current file for macOS so that cmd-click in title bar works.
diff --git a/app/src/processing/app/ui/EditorConsole.java b/app/src/processing/app/ui/EditorConsole.java
index 14be32d68..c8c40ee48 100644
--- a/app/src/processing/app/ui/EditorConsole.java
+++ b/app/src/processing/app/ui/EditorConsole.java
@@ -276,7 +276,9 @@ public class EditorConsole extends JScrollPane {
// components, causing deadlock. Updates are buffered to the console and
// displayed at regular intervals on Swing's event-dispatching thread.
// (patch by David Mellis)
- consoleDoc.appendString(what, err ? errStyle : stdStyle);
+ // Remove ANSI escape codes from the text before adding it to the console
+ String clean = what.replaceAll("\u001B\\[[0-9;]*m", "");
+ consoleDoc.appendString(clean, err ? errStyle : stdStyle);
}
}
diff --git a/app/src/processing/app/ui/EditorFooter.java b/app/src/processing/app/ui/EditorFooter.java
index 855e97d38..276b78364 100644
--- a/app/src/processing/app/ui/EditorFooter.java
+++ b/app/src/processing/app/ui/EditorFooter.java
@@ -30,6 +30,8 @@ import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
+import java.awt.datatransfer.Clipboard;
+import java.awt.datatransfer.StringSelection;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.font.FontRenderContext;
@@ -39,6 +41,7 @@ import java.util.List;
import javax.swing.*;
+import processing.app.Base;
import processing.app.Mode;
import processing.app.Sketch;
import processing.app.contrib.ContributionManager;
@@ -83,10 +86,14 @@ public class EditorFooter extends Box {
Image gradient;
Color bgColor;
+ Box tabBar;
+
JPanel cardPanel;
CardLayout cardLayout;
Controller controller;
+ JLabel version;
+
int updateCount;
@@ -98,8 +105,33 @@ public class EditorFooter extends Box {
cardPanel = new JPanel(cardLayout);
add(cardPanel);
+ tabBar = new Box(BoxLayout.X_AXIS);
+
controller = new Controller();
- add(controller);
+ tabBar.add(controller);
+
+ version = new JLabel(Base.getVersionName());
+ version.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, Editor.RIGHT_GUTTER));
+ version.addMouseListener(new MouseAdapter() {
+ public void mousePressed(MouseEvent e) {
+ if(e.getClickCount() == 5){
+ Base.DEBUG = !Base.DEBUG;
+ }
+ var debugInformation = String.join("\n",
+ "Version: " + Base.getVersionName(),
+ "Revision: " + Base.getRevision(),
+ "OS: " + System.getProperty("os.name") + " " + System.getProperty("os.version") + " " + System.getProperty("os.arch"),
+ "Java: " + System.getProperty("java.version") + " " + System.getProperty("java.vendor")
+ );
+ var stringSelection = new StringSelection(debugInformation);
+ var clipboard = java.awt.Toolkit.getDefaultToolkit().getSystemClipboard();
+ clipboard.setContents(stringSelection, null);
+ }
+ });
+
+ tabBar.add(version);
+
+ add(tabBar);
updateTheme();
}
@@ -175,6 +207,15 @@ public class EditorFooter extends Box {
// replace colors for the "updates" indicator
controller.updateTheme();
+
+ tabBar.setOpaque(true);
+ tabBar.setBackground(bgColor);
+
+ var updatesTextColor = Theme.getColor("footer.updates.text.color");
+ var withAlpha = new Color(updatesTextColor.getRed(), updatesTextColor.getGreen(), updatesTextColor.getBlue(), 128);
+
+ version.setForeground(withAlpha);
+ version.setFont(font);
}
diff --git a/app/src/processing/app/ui/ExamplesFrame.java b/app/src/processing/app/ui/ExamplesFrame.java
index a30473aec..0d8e89be9 100644
--- a/app/src/processing/app/ui/ExamplesFrame.java
+++ b/app/src/processing/app/ui/ExamplesFrame.java
@@ -33,6 +33,8 @@ import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.io.File;
import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Comparator;
import java.util.Enumeration;
import javax.swing.Box;
@@ -57,6 +59,7 @@ import processing.app.Mode;
import processing.app.Platform;
import processing.app.Preferences;
import processing.app.SketchReference;
+import processing.app.contrib.Contribution;
import processing.app.contrib.ContributionManager;
import processing.app.contrib.ContributionType;
import processing.app.contrib.ExamplesContribution;
@@ -313,9 +316,11 @@ public class ExamplesFrame extends JFrame {
}
// Get examples for third party libraries
- DefaultMutableTreeNode contributedLibExamples = new
- DefaultMutableTreeNode(Language.text("examples.libraries"));
- for (Library lib : mode.contribLibraries) {
+ DefaultMutableTreeNode contributedLibExamples = new DefaultMutableTreeNode(Language.text("examples.libraries"));
+ var sortedContribLibs = new ArrayList<>(mode.contribLibraries);
+ // Sort the libraries by actual name (not the name of the folder)
+ sortedContribLibs.sort(Comparator.comparing(Contribution::getName));
+ for (Library lib : sortedContribLibs) {
if (lib.hasExamples()) {
DefaultMutableTreeNode libNode =
new DefaultMutableTreeNode(lib.getName());
diff --git a/app/src/processing/app/ui/Start.kt b/app/src/processing/app/ui/Start.kt
index 4fd9fb4c9..7de371eec 100644
--- a/app/src/processing/app/ui/Start.kt
+++ b/app/src/processing/app/ui/Start.kt
@@ -12,15 +12,12 @@ import androidx.compose.runtime.*
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
-import androidx.compose.ui.graphics.toComposeImageBitmap
-import androidx.compose.ui.unit.DpSize
+import androidx.compose.ui.res.painterResource
import androidx.compose.ui.unit.dp
import androidx.compose.ui.window.*
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import processing.app.Base
-import processing.app.Platform
-import javax.imageio.ImageIO
/**
* Show a splash screen window. A rewrite of Splash.java
@@ -29,8 +26,6 @@ class Start {
companion object {
@JvmStatic
fun main(args: Array) {
- val splash = Platform.getContentFile("lib/about-processing.png")
- val image = ImageIO.read(splash).toComposeImageBitmap()
val duration = 200
val timeMargin = 50
@@ -44,7 +39,8 @@ class Start {
resizable = false,
state = rememberWindowState(
position = WindowPosition(Alignment.Center),
- size = DpSize(image.width.dp / 2 , image.height.dp / 2)
+ width = 578.dp,
+ height = 665.dp
)
) {
var visible by remember { mutableStateOf(false) }
@@ -81,7 +77,7 @@ class Start {
)
) {
Image(
- bitmap = image,
+ painter = painterResource("about-processing.svg"),
contentDescription = "About",
modifier = Modifier
.fillMaxSize()
diff --git a/app/src/processing/app/ui/WelcomeToBeta.kt b/app/src/processing/app/ui/WelcomeToBeta.kt
new file mode 100644
index 000000000..d7492fa6a
--- /dev/null
+++ b/app/src/processing/app/ui/WelcomeToBeta.kt
@@ -0,0 +1,211 @@
+package processing.app.ui
+
+import androidx.compose.animation.animateColorAsState
+import androidx.compose.animation.core.animateFloatAsState
+import androidx.compose.foundation.Image
+import androidx.compose.foundation.background
+import androidx.compose.foundation.layout.*
+import androidx.compose.material.MaterialTheme
+import androidx.compose.material.MaterialTheme.colors
+import androidx.compose.material.MaterialTheme.typography
+import androidx.compose.material.Surface
+import androidx.compose.material.Text
+import androidx.compose.runtime.*
+import androidx.compose.ui.Alignment
+import androidx.compose.ui.ExperimentalComposeUiApi
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.awt.ComposePanel
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.input.pointer.PointerEventType
+import androidx.compose.ui.input.pointer.PointerIcon
+import androidx.compose.ui.input.pointer.onPointerEvent
+import androidx.compose.ui.input.pointer.pointerHoverIcon
+import androidx.compose.ui.res.painterResource
+import androidx.compose.ui.text.font.FontWeight
+import androidx.compose.ui.unit.DpSize
+import androidx.compose.ui.unit.dp
+import androidx.compose.ui.unit.sp
+import androidx.compose.ui.window.Window
+import androidx.compose.ui.window.WindowPosition
+import androidx.compose.ui.window.application
+import androidx.compose.ui.window.rememberWindowState
+import com.formdev.flatlaf.util.SystemInfo
+import com.mikepenz.markdown.compose.Markdown
+import com.mikepenz.markdown.m2.markdownColor
+import com.mikepenz.markdown.m2.markdownTypography
+import com.mikepenz.markdown.model.MarkdownColors
+import com.mikepenz.markdown.model.MarkdownTypography
+import processing.app.Base.getRevision
+import processing.app.Base.getVersionName
+import processing.app.ui.theme.LocalLocale
+import processing.app.ui.theme.LocalTheme
+import processing.app.ui.theme.Locale
+import processing.app.ui.theme.ProcessingTheme
+import java.awt.Cursor
+import java.awt.Dimension
+import java.awt.event.KeyAdapter
+import java.awt.event.KeyEvent
+import java.io.InputStream
+import java.util.Properties
+import javax.swing.JFrame
+import javax.swing.SwingUtilities
+
+
+class WelcomeToBeta {
+ companion object{
+ val windowSize = Dimension(400, 200)
+ val windowTitle = Locale()["beta.window.title"]
+
+ @JvmStatic
+ fun showWelcomeToBeta() {
+ val mac = SystemInfo.isMacFullWindowContentSupported
+ SwingUtilities.invokeLater {
+ JFrame(windowTitle).apply {
+ val close = { dispose() }
+ rootPane.putClientProperty("apple.awt.transparentTitleBar", mac)
+ rootPane.putClientProperty("apple.awt.fullWindowContent", mac)
+ defaultCloseOperation = JFrame.DISPOSE_ON_CLOSE
+ contentPane.add(ComposePanel().apply {
+ size = windowSize
+ setContent {
+ ProcessingTheme {
+ Box(modifier = Modifier.padding(top = if (mac) 22.dp else 0.dp)) {
+ welcomeToBeta(close)
+ }
+ }
+ }
+ })
+ pack()
+ background = java.awt.Color.white
+ setLocationRelativeTo(null)
+ addKeyListener(object : KeyAdapter() {
+ override fun keyPressed(e: KeyEvent) {
+ if (e.keyCode == KeyEvent.VK_ESCAPE) close()
+ }
+ })
+ isResizable = false
+ isVisible = true
+ requestFocus()
+ }
+ }
+ }
+
+ @Composable
+ fun welcomeToBeta(close: () -> Unit = {}) {
+ Row(
+ modifier = Modifier
+ .padding(20.dp, 10.dp)
+ .size(windowSize.width.dp, windowSize.height.dp),
+ horizontalArrangement = Arrangement
+ .spacedBy(20.dp)
+ ){
+ val locale = LocalLocale.current
+ Image(
+ painter = painterResource("bird.svg"),
+ contentDescription = locale["beta.logo"],
+ modifier = Modifier
+ .align(Alignment.CenterVertically)
+ .size(100.dp, 100.dp)
+ .offset(0.dp, (-25).dp)
+ )
+ Column(
+ modifier = Modifier
+ .fillMaxHeight(),
+ verticalArrangement = Arrangement
+ .spacedBy(
+ 10.dp,
+ alignment = Alignment.CenterVertically
+ )
+ ) {
+ Text(
+ text = locale["beta.title"],
+ style = typography.subtitle1,
+ )
+ val text = locale["beta.message"]
+ .replace('$' + "version", getVersionName())
+ .replace('$' + "revision", getRevision().toString())
+ Markdown(
+ text,
+ colors = markdownColor(),
+ typography = markdownTypography(text = typography.body1, link = typography.body1.copy(color = colors.primary)),
+ modifier = Modifier.background(Color.Transparent).padding(bottom = 10.dp)
+ )
+ Row {
+ Spacer(modifier = Modifier.weight(1f))
+ PDEButton(onClick = {
+ close()
+ }) {
+ Text(
+ text = locale["beta.button"],
+ color = colors.onPrimary
+ )
+ }
+ }
+ }
+ }
+ }
+ @OptIn(ExperimentalComposeUiApi::class)
+ @Composable
+ fun PDEButton(onClick: () -> Unit, content: @Composable BoxScope.() -> Unit) {
+ val theme = LocalTheme.current
+
+ var hover by remember { mutableStateOf(false) }
+ var clicked by remember { mutableStateOf(false) }
+ val offset by animateFloatAsState(if (hover) -5f else 5f)
+ val color by animateColorAsState(if(clicked) colors.primaryVariant else colors.primary)
+
+ Box(modifier = Modifier.padding(end = 5.dp, top = 5.dp)) {
+ Box(
+ modifier = Modifier
+ .offset((-offset).dp, (offset).dp)
+ .background(theme.getColor("toolbar.button.pressed.field"))
+ .matchParentSize()
+ )
+ Box(
+ modifier = Modifier
+ .onPointerEvent(PointerEventType.Press) {
+ clicked = true
+ }
+ .onPointerEvent(PointerEventType.Release) {
+ clicked = false
+ onClick()
+ }
+ .onPointerEvent(PointerEventType.Enter) {
+ hover = true
+ }
+ .onPointerEvent(PointerEventType.Exit) {
+ hover = false
+ }
+ .pointerHoverIcon(PointerIcon(Cursor(Cursor.HAND_CURSOR)))
+ .background(color)
+ .padding(10.dp)
+ .sizeIn(minWidth = 100.dp),
+ contentAlignment = Alignment.Center,
+ content = content
+ )
+ }
+ }
+
+
+ @JvmStatic
+ fun main(args: Array) {
+ application {
+ val windowState = rememberWindowState(
+ size = DpSize.Unspecified,
+ position = WindowPosition(Alignment.Center)
+ )
+
+ Window(onCloseRequest = ::exitApplication, state = windowState, title = windowTitle) {
+ ProcessingTheme {
+ Surface(color = colors.background) {
+ welcomeToBeta {
+ exitApplication()
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
diff --git a/app/src/processing/app/ui/theme/Locale.kt b/app/src/processing/app/ui/theme/Locale.kt
new file mode 100644
index 000000000..254c0946c
--- /dev/null
+++ b/app/src/processing/app/ui/theme/Locale.kt
@@ -0,0 +1,45 @@
+package processing.app.ui.theme
+
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.CompositionLocalProvider
+import androidx.compose.runtime.compositionLocalOf
+import processing.app.LocalPreferences
+import processing.app.Messages
+import processing.app.Platform
+import processing.app.PlatformStart
+import processing.app.watchFile
+import java.io.File
+import java.io.InputStream
+import java.util.*
+
+class Locale(language: String = "") : Properties() {
+ init {
+ val locale = java.util.Locale.getDefault()
+ load(ClassLoader.getSystemResourceAsStream("PDE.properties"))
+ load(ClassLoader.getSystemResourceAsStream("PDE_${locale.language}.properties") ?: InputStream.nullInputStream())
+ load(ClassLoader.getSystemResourceAsStream("PDE_${locale.toLanguageTag()}.properties") ?: InputStream.nullInputStream())
+ load(ClassLoader.getSystemResourceAsStream("PDE_${language}.properties") ?: InputStream.nullInputStream())
+ }
+
+ @Deprecated("Use get instead", ReplaceWith("get(key)"))
+ override fun getProperty(key: String?, default: String): String {
+ val value = super.getProperty(key, default)
+ if(value == default) Messages.log("Missing translation for $key")
+ return value
+ }
+ operator fun get(key: String): String = getProperty(key, key)
+}
+val LocalLocale = compositionLocalOf { Locale() }
+@Composable
+fun LocaleProvider(content: @Composable () -> Unit) {
+ PlatformStart()
+
+ val settingsFolder = Platform.getSettingsFolder()
+ val languageFile = File(settingsFolder, "language.txt")
+ watchFile(languageFile)
+
+ val locale = Locale(languageFile.readText().substring(0, 2))
+ CompositionLocalProvider(LocalLocale provides locale) {
+ content()
+ }
+}
\ No newline at end of file
diff --git a/app/src/processing/app/ui/theme/Theme.kt b/app/src/processing/app/ui/theme/Theme.kt
new file mode 100644
index 000000000..735d8e5b2
--- /dev/null
+++ b/app/src/processing/app/ui/theme/Theme.kt
@@ -0,0 +1,75 @@
+package processing.app.ui.theme
+
+import androidx.compose.foundation.isSystemInDarkTheme
+import androidx.compose.material.Colors
+import androidx.compose.material.MaterialTheme
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.CompositionLocalProvider
+import androidx.compose.runtime.compositionLocalOf
+import androidx.compose.ui.graphics.Color
+import processing.app.LocalPreferences
+import processing.app.PreferencesProvider
+import java.io.InputStream
+import java.util.Properties
+
+
+class Theme(themeFile: String? = "") : Properties() {
+ init {
+ load(ClassLoader.getSystemResourceAsStream("theme.txt"))
+ load(ClassLoader.getSystemResourceAsStream(themeFile) ?: InputStream.nullInputStream())
+ }
+ fun getColor(key: String): Color {
+ return Color(getProperty(key).toColorInt())
+ }
+}
+
+val LocalTheme = compositionLocalOf { error("No theme provided") }
+
+@Composable
+fun ProcessingTheme(
+ darkTheme: Boolean = isSystemInDarkTheme(),
+ content: @Composable() () -> Unit
+) {
+ PreferencesProvider {
+ val preferences = LocalPreferences.current
+ val theme = Theme(preferences.getProperty("theme"))
+ val colors = Colors(
+ primary = theme.getColor("editor.gradient.top"),
+ primaryVariant = theme.getColor("toolbar.button.pressed.field"),
+ secondary = theme.getColor("editor.gradient.bottom"),
+ secondaryVariant = theme.getColor("editor.scrollbar.thumb.pressed.color"),
+ background = theme.getColor("editor.bgcolor"),
+ surface = theme.getColor("editor.bgcolor"),
+ error = theme.getColor("status.error.bgcolor"),
+ onPrimary = theme.getColor("toolbar.button.enabled.field"),
+ onSecondary = theme.getColor("toolbar.button.enabled.field"),
+ onBackground = theme.getColor("editor.fgcolor"),
+ onSurface = theme.getColor("editor.fgcolor"),
+ onError = theme.getColor("status.error.fgcolor"),
+ isLight = theme.getProperty("laf.mode").equals("light")
+ )
+
+ CompositionLocalProvider(LocalTheme provides theme) {
+ LocaleProvider {
+ MaterialTheme(
+ colors = colors,
+ typography = Typography,
+ content = content
+ )
+ }
+ }
+ }
+}
+
+fun String.toColorInt(): Int {
+ if (this[0] == '#') {
+ var color = substring(1).toLong(16)
+ if (length == 7) {
+ color = color or 0x00000000ff000000L
+ } else if (length != 9) {
+ throw IllegalArgumentException("Unknown color")
+ }
+ return color.toInt()
+ }
+ throw IllegalArgumentException("Unknown color")
+}
\ No newline at end of file
diff --git a/app/src/processing/app/ui/theme/Typography.kt b/app/src/processing/app/ui/theme/Typography.kt
new file mode 100644
index 000000000..5d87c490e
--- /dev/null
+++ b/app/src/processing/app/ui/theme/Typography.kt
@@ -0,0 +1,38 @@
+package processing.app.ui.theme
+
+import androidx.compose.material.MaterialTheme.typography
+import androidx.compose.material.Typography
+import androidx.compose.ui.text.TextStyle
+import androidx.compose.ui.text.font.FontFamily
+import androidx.compose.ui.text.font.FontStyle
+import androidx.compose.ui.text.font.FontWeight
+import androidx.compose.ui.text.platform.Font
+import androidx.compose.ui.unit.sp
+
+val processingFont = FontFamily(
+ Font(
+ resource = "ProcessingSans-Regular.ttf",
+ weight = FontWeight.Normal,
+ style = FontStyle.Normal
+ ),
+ Font(
+ resource = "ProcessingSans-Bold.ttf",
+ weight = FontWeight.Bold,
+ style = FontStyle.Normal
+ )
+)
+
+val Typography = Typography(
+ body1 = TextStyle(
+ fontFamily = processingFont,
+ fontWeight = FontWeight.Normal,
+ fontSize = 13.sp,
+ lineHeight = 16.sp
+ ),
+ subtitle1 = TextStyle(
+ fontFamily = processingFont,
+ fontWeight = FontWeight.Bold,
+ fontSize = 16.sp,
+ lineHeight = 20.sp
+ )
+)
\ No newline at end of file
diff --git a/app/test/processing/app/SchemaTest.kt b/app/test/processing/app/SchemaTest.kt
new file mode 100644
index 000000000..73f7f9c9c
--- /dev/null
+++ b/app/test/processing/app/SchemaTest.kt
@@ -0,0 +1,139 @@
+package processing.app
+
+import kotlinx.coroutines.joinAll
+import kotlinx.coroutines.runBlocking
+import org.junit.jupiter.params.ParameterizedTest
+import org.junit.jupiter.params.provider.ValueSource
+import org.mockito.ArgumentCaptor
+import org.mockito.MockedStatic
+import org.mockito.Mockito.mockStatic
+import org.mockito.kotlin.mock
+import org.mockito.kotlin.verify
+import java.io.File
+import kotlin.io.encoding.Base64
+import kotlin.io.encoding.ExperimentalEncodingApi
+import kotlin.test.Test
+
+
+class SchemaTest {
+ private val base: Base = mock{
+
+ }
+ companion object {
+ val preferences: MockedStatic = mockStatic(Preferences::class.java)
+ }
+
+
+ @Test
+ fun testLocalFiles() {
+ val file = "/this/is/a/local/file"
+ Schema.handleSchema("pde://$file", base)
+ verify(base).handleOpen(file)
+ }
+
+ @Test
+ fun testNewSketch() {
+ Schema.handleSchema("pde://sketch/new", base)
+ verify(base).handleNew()
+ }
+
+
+ @Test
+ fun testCustomBase64Sketch(){
+ Schema.handleSchema("pde://sketch/base64/LyoqCiAqIEFycmF5IE9iamVjdHMuIAogKiAKICogRGVtb25zdHJhdGVzIHRoZSBzeW50YXggZm9yIGNyZWF0aW5nIGFuIGFycmF5IG9mIGN1c3RvbSBvYmplY3RzLiAKICovCgppbnQgdW5pdCA9IDQwOwppbnQgY291bnQ7Ck1vZHVsZVtdIG1vZHM7Cgp2b2lkIHNldHVwKCkgewogIHNpemUoNjQwLCAzNjApOwogIG5vU3Ryb2tlKCk7CiAgaW50IHdpZGVDb3VudCA9IHdpZHRoIC8gdW5pdDsKICBpbnQgaGlnaENvdW50ID0gaGVpZ2h0IC8gdW5pdDsKICBjb3VudCA9IHdpZGVDb3VudCAqIGhpZ2hDb3VudDsKICBtb2RzID0gbmV3IE1vZHVsZVtjb3VudF07CgogIGludCBpbmRleCA9IDA7CiAgZm9yIChpbnQgeSA9IDA7IHkgPCBoaWdoQ291bnQ7IHkrKykgewogICAgZm9yIChpbnQgeCA9IDA7IHggPCB3aWRlQ291bnQ7IHgrKykgewogICAgICBtb2RzW2luZGV4KytdID0gbmV3IE1vZHVsZSh4KnVuaXQsIHkqdW5pdCwgdW5pdC8yLCB1bml0LzIsIHJhbmRvbSgwLjA1LCAwLjgpLCB1bml0KTsKICAgIH0KICB9Cn0KCnZvaWQgZHJhdygpIHsKICBiYWNrZ3JvdW5kKDApOwogIGZvciAoTW9kdWxlIG1vZCA6IG1vZHMpIHsKICAgIG1vZC51cGRhdGUoKTsKICAgIG1vZC5kaXNwbGF5KCk7CiAgfQp9?pde=Module:Y2xhc3MgTW9kdWxlIHsKICBpbnQgeE9mZnNldDsKICBpbnQgeU9mZnNldDsKICBmbG9hdCB4LCB5OwogIGludCB1bml0OwogIGludCB4RGlyZWN0aW9uID0gMTsKICBpbnQgeURpcmVjdGlvbiA9IDE7CiAgZmxvYXQgc3BlZWQ7IAogIAogIC8vIENvbnRydWN0b3IKICBNb2R1bGUoaW50IHhPZmZzZXRUZW1wLCBpbnQgeU9mZnNldFRlbXAsIGludCB4VGVtcCwgaW50IHlUZW1wLCBmbG9hdCBzcGVlZFRlbXAsIGludCB0ZW1wVW5pdCkgewogICAgeE9mZnNldCA9IHhPZmZzZXRUZW1wOwogICAgeU9mZnNldCA9IHlPZmZzZXRUZW1wOwogICAgeCA9IHhUZW1wOwogICAgeSA9IHlUZW1wOwogICAgc3BlZWQgPSBzcGVlZFRlbXA7CiAgICB1bml0ID0gdGVtcFVuaXQ7CiAgfQogIAogIC8vIEN1c3RvbSBtZXRob2QgZm9yIHVwZGF0aW5nIHRoZSB2YXJpYWJsZXMKICB2b2lkIHVwZGF0ZSgpIHsKICAgIHggPSB4ICsgKHNwZWVkICogeERpcmVjdGlvbik7CiAgICBpZiAoeCA+PSB1bml0IHx8IHggPD0gMCkgewogICAgICB4RGlyZWN0aW9uICo9IC0xOwogICAgICB4ID0geCArICgxICogeERpcmVjdGlvbik7CiAgICAgIHkgPSB5ICsgKDEgKiB5RGlyZWN0aW9uKTsKICAgIH0KICAgIGlmICh5ID49IHVuaXQgfHwgeSA8PSAwKSB7CiAgICAgIHlEaXJlY3Rpb24gKj0gLTE7CiAgICAgIHkgPSB5ICsgKDEgKiB5RGlyZWN0aW9uKTsKICAgIH0KICB9CiAgCiAgLy8gQ3VzdG9tIG1ldGhvZCBmb3IgZHJhd2luZyB0aGUgb2JqZWN0CiAgdm9pZCBkaXNwbGF5KCkgewogICAgZmlsbCgyNTUpOwogICAgZWxsaXBzZSh4T2Zmc2V0ICsgeCwgeU9mZnNldCArIHksIDYsIDYpOwogIH0KfQAA", base)
+ val captor = ArgumentCaptor.forClass(String::class.java)
+
+ verify(base).handleOpenUntitled(captor.capture())
+
+ val file = File(captor.value)
+ assert(file.exists())
+
+ val extra = file.parentFile.resolve("Module.pde")
+ assert(extra.exists())
+ file.parentFile.deleteRecursively()
+ }
+
+ @OptIn(ExperimentalEncodingApi::class)
+ @Test
+ fun testBase64SketchAndExtraFiles() {
+ val sketch = """
+ void setup(){
+
+ }
+ void draw(){
+
+ }
+ """.trimIndent()
+
+ val base64 = Base64.encode(sketch.toByteArray())
+ Schema.handleSchema("pde://sketch/base64/$base64?pde=AnotherFile:$base64", base)
+
+ val captor = ArgumentCaptor.forClass(String::class.java)
+ verify(base).handleOpenUntitled(captor.capture())
+
+ val file = File(captor.value)
+ assert(file.exists())
+ assert(file.readText() == sketch)
+
+ val extra = file.parentFile.resolve("AnotherFile.pde")
+ assert(extra.exists())
+ assert(extra.readText() == sketch)
+ file.parentFile.deleteRecursively()
+ }
+
+ @Test
+ fun testURLSketch() {
+ Schema.handleSchema("pde://sketch/url/github.com/processing/processing-examples/raw/refs/heads/main/Basics/Arrays/Array/Array.pde", base)
+ waitForSchemeJobsToComplete()
+
+ val captor = ArgumentCaptor.forClass(String::class.java)
+ verify(base).handleOpenUntitled(captor.capture())
+ val output = File(captor.value)
+ assert(output.exists())
+ assert(output.name == "Array.pde")
+ assert(output.extension == "pde")
+ assert(output.parentFile.name == "Array")
+
+ output.parentFile.parentFile.deleteRecursively()
+ }
+
+ @ParameterizedTest
+ @ValueSource(strings = [
+ "Module.pde:https://github.com/processing/processing-examples/raw/refs/heads/main/Basics/Arrays/ArrayObjects/Module.pde",
+ "Module.pde",
+ "Module:Module.pde",
+ "Module:https://github.com/processing/processing-examples/raw/refs/heads/main/Basics/Arrays/ArrayObjects/Module.pde",
+ "Module.pde:github.com/processing/processing-examples/raw/refs/heads/main/Basics/Arrays/ArrayObjects/Module.pde"
+ ])
+ fun testURLSketchWithFile(file: String){
+ Schema.handleSchema("pde://sketch/url/github.com/processing/processing-examples/raw/refs/heads/main/Basics/Arrays/ArrayObjects/ArrayObjects.pde?pde=$file", base)
+ waitForSchemeJobsToComplete()
+
+ val captor = ArgumentCaptor.forClass(String::class.java)
+ verify(base).handleOpenUntitled(captor.capture())
+
+ // wait for threads to resolve
+ Thread.sleep(1000)
+
+ val output = File(captor.value)
+ assert(output.parentFile.name == "ArrayObjects")
+ assert(output.exists())
+ assert(output.parentFile.resolve("Module.pde").exists())
+ output.parentFile.parentFile.deleteRecursively()
+ }
+
+ @Test
+ fun testPreferences() {
+ Schema.handleSchema("pde://preferences?test=value", base)
+ preferences.verify {
+ Preferences.set("test", "value")
+ Preferences.save()
+ }
+ }
+
+ fun waitForSchemeJobsToComplete(){
+ runBlocking {
+ joinAll(*Schema.jobs.toTypedArray())
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/windows/LICENSE.rtf b/app/windows/LICENSE.rtf
new file mode 100644
index 000000000..5f882b67e
--- /dev/null
+++ b/app/windows/LICENSE.rtf
@@ -0,0 +1,1055 @@
+{\rtf1\ansi\deff0{\fonttbl{\f0 \fswiss Helvetica;}{\f1 \fmodern Courier;}}
+{\colortbl;\red255\green0\blue0;\red0\green0\blue255;}
+\widowctrl\hyphauto
+
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel0 \b \fs36 Introduction\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 We use GPL v2 for the parts of the project that we\u8217've developed ourselves. For the \u8216'core\u8217' library, it\u8217's LGPL, for everything else, it\u8217's GPL.\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 Over the course of many years of development, files being moved around, and other code being added and removed, the license information has become quite a mess. Please help us clean this up so that others are properly credited and licenses are consistently/correctly noted: https://github.com/processing/processing/issues/224\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 GNU GPL License\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 License for processing outside of core:\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \f1 \line
+ GNU GENERAL PUBLIC LICENSE\line
+ Version 2, June 1991\line
+\line
+Copyright (C) 1989, 1991 Free Software Foundation, Inc.\line
+59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\line
+Everyone is permitted to copy and distribute verbatim copies\line
+of this license document, but changing it is not allowed.\line
+\line
+ Preamble\line
+\line
+ The licenses for most software are designed to take away your\line
+freedom to share and change it. By contrast, the GNU General Public\line
+License is intended to guarantee your freedom to share and change free\line
+software--to make sure the software is free for all its users. This\line
+General Public License applies to most of the Free Software\line
+Foundation's software and to any other program whose authors commit to\line
+using it. (Some other Free Software Foundation software is covered by\line
+the GNU Library General Public License instead.) You can apply it to\line
+your programs, too.\line
+\line
+ When we speak of free software, we are referring to freedom, not\line
+price. Our General Public Licenses are designed to make sure that you\line
+have the freedom to distribute copies of free software (and charge for\line
+this service if you wish), that you receive source code or can get it\line
+if you want it, that you can change the software or use pieces of it\line
+in new free programs; and that you know you can do these things.\line
+\line
+ To protect your rights, we need to make restrictions that forbid\line
+anyone to deny you these rights or to ask you to surrender the rights.\line
+These restrictions translate to certain responsibilities for you if you\line
+distribute copies of the software, or if you modify it.\line
+\line
+ For example, if you distribute copies of such a program, whether\line
+gratis or for a fee, you must give the recipients all the rights that\line
+you have. You must make sure that they, too, receive or can get the\line
+source code. And you must show them these terms so they know their\line
+rights.\line
+\line
+ We protect your rights with two steps: (1) copyright the software, and\line
+(2) offer you this license which gives you legal permission to copy,\line
+distribute and/or modify the software.\line
+\line
+ Also, for each author's protection and ours, we want to make certain\line
+that everyone understands that there is no warranty for this free\line
+software. If the software is modified by someone else and passed on, we\line
+want its recipients to know that what they have is not the original, so\line
+that any problems introduced by others will not reflect on the original\line
+authors' reputations.\line
+\line
+ Finally, any free program is threatened constantly by software\line
+patents. We wish to avoid the danger that redistributors of a free\line
+program will individually obtain patent licenses, in effect making the\line
+program proprietary. To prevent this, we have made it clear that any\line
+patent must be licensed for everyone's free use or not licensed at all.\line
+\line
+ The precise terms and conditions for copying, distribution and\line
+modification follow.\line
+\line
+ GNU GENERAL PUBLIC LICENSE\line
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\line
+\line
+ 0. This License applies to any program or other work which contains\line
+a notice placed by the copyright holder saying it may be distributed\line
+under the terms of this General Public License. The "Program", below,\line
+refers to any such program or work, and a "work based on the Program"\line
+means either the Program or any derivative work under copyright law:\line
+that is to say, a work containing the Program or a portion of it,\line
+either verbatim or with modifications and/or translated into another\line
+language. (Hereinafter, translation is included without limitation in\line
+the term "modification".) Each licensee is addressed as "you".\line
+\line
+Activities other than copying, distribution and modification are not\line
+covered by this License; they are outside its scope. The act of\line
+running the Program is not restricted, and the output from the Program\line
+is covered only if its contents constitute a work based on the\line
+Program (independent of having been made by running the Program).\line
+Whether that is true depends on what the Program does.\line
+\line
+ 1. You may copy and distribute verbatim copies of the Program's\line
+source code as you receive it, in any medium, provided that you\line
+conspicuously and appropriately publish on each copy an appropriate\line
+copyright notice and disclaimer of warranty; keep intact all the\line
+notices that refer to this License and to the absence of any warranty;\line
+and give any other recipients of the Program a copy of this License\line
+along with the Program.\line
+\line
+You may charge a fee for the physical act of transferring a copy, and\line
+you may at your option offer warranty protection in exchange for a fee.\line
+\line
+ 2. You may modify your copy or copies of the Program or any portion\line
+of it, thus forming a work based on the Program, and copy and\line
+distribute such modifications or work under the terms of Section 1\line
+above, provided that you also meet all of these conditions:\line
+\line
+ a) You must cause the modified files to carry prominent notices\line
+ stating that you changed the files and the date of any change.\line
+\line
+ b) You must cause any work that you distribute or publish, that in\line
+ whole or in part contains or is derived from the Program or any\line
+ part thereof, to be licensed as a whole at no charge to all third\line
+ parties under the terms of this License.\line
+\line
+ c) If the modified program normally reads commands interactively\line
+ when run, you must cause it, when started running for such\line
+ interactive use in the most ordinary way, to print or display an\line
+ announcement including an appropriate copyright notice and a\line
+ notice that there is no warranty (or else, saying that you provide\line
+ a warranty) and that users may redistribute the program under\line
+ these conditions, and telling the user how to view a copy of this\line
+ License. (Exception: if the Program itself is interactive but\line
+ does not normally print such an announcement, your work based on\line
+ the Program is not required to print an announcement.)\line
+\line
+These requirements apply to the modified work as a whole. If\line
+identifiable sections of that work are not derived from the Program,\line
+and can be reasonably considered independent and separate works in\line
+themselves, then this License, and its terms, do not apply to those\line
+sections when you distribute them as separate works. But when you\line
+distribute the same sections as part of a whole which is a work based\line
+on the Program, the distribution of the whole must be on the terms of\line
+this License, whose permissions for other licensees extend to the\line
+entire whole, and thus to each and every part regardless of who wrote it.\line
+\line
+Thus, it is not the intent of this section to claim rights or contest\line
+your rights to work written entirely by you; rather, the intent is to\line
+exercise the right to control the distribution of derivative or\line
+collective works based on the Program.\line
+\line
+In addition, mere aggregation of another work not based on the Program\line
+with the Program (or with a work based on the Program) on a volume of\line
+a storage or distribution medium does not bring the other work under\line
+the scope of this License.\line
+\line
+ 3. You may copy and distribute the Program (or a work based on it,\line
+under Section 2) in object code or executable form under the terms of\line
+Sections 1 and 2 above provided that you also do one of the following:\line
+\line
+ a) Accompany it with the complete corresponding machine-readable\line
+ source code, which must be distributed under the terms of Sections\line
+ 1 and 2 above on a medium customarily used for software interchange; or,\line
+\line
+ b) Accompany it with a written offer, valid for at least three\line
+ years, to give any third party, for a charge no more than your\line
+ cost of physically performing source distribution, a complete\line
+ machine-readable copy of the corresponding source code, to be\line
+ distributed under the terms of Sections 1 and 2 above on a medium\line
+ customarily used for software interchange; or,\line
+\line
+ c) Accompany it with the information you received as to the offer\line
+ to distribute corresponding source code. (This alternative is\line
+ allowed only for noncommercial distribution and only if you\line
+ received the program in object code or executable form with such\line
+ an offer, in accord with Subsection b above.)\line
+\line
+The source code for a work means the preferred form of the work for\line
+making modifications to it. For an executable work, complete source\line
+code means all the source code for all modules it contains, plus any\line
+associated interface definition files, plus the scripts used to\line
+control compilation and installation of the executable. However, as a\line
+special exception, the source code distributed need not include\line
+anything that is normally distributed (in either source or binary\line
+form) with the major components (compiler, kernel, and so on) of the\line
+operating system on which the executable runs, unless that component\line
+itself accompanies the executable.\line
+\line
+If distribution of executable or object code is made by offering\line
+access to copy from a designated place, then offering equivalent\line
+access to copy the source code from the same place counts as\line
+distribution of the source code, even though third parties are not\line
+compelled to copy the source along with the object code.\line
+\line
+ 4. You may not copy, modify, sublicense, or distribute the Program\line
+except as expressly provided under this License. Any attempt\line
+otherwise to copy, modify, sublicense or distribute the Program is\line
+void, and will automatically terminate your rights under this License.\line
+However, parties who have received copies, or rights, from you under\line
+this License will not have their licenses terminated so long as such\line
+parties remain in full compliance.\line
+\line
+ 5. You are not required to accept this License, since you have not\line
+signed it. However, nothing else grants you permission to modify or\line
+distribute the Program or its derivative works. These actions are\line
+prohibited by law if you do not accept this License. Therefore, by\line
+modifying or distributing the Program (or any work based on the\line
+Program), you indicate your acceptance of this License to do so, and\line
+all its terms and conditions for copying, distributing or modifying\line
+the Program or works based on it.\line
+\line
+ 6. Each time you redistribute the Program (or any work based on the\line
+Program), the recipient automatically receives a license from the\line
+original licensor to copy, distribute or modify the Program subject to\line
+these terms and conditions. You may not impose any further\line
+restrictions on the recipients' exercise of the rights granted herein.\line
+You are not responsible for enforcing compliance by third parties to\line
+this License.\line
+\line
+ 7. If, as a consequence of a court judgment or allegation of patent\line
+infringement or for any other reason (not limited to patent issues),\line
+conditions are imposed on you (whether by court order, agreement or\line
+otherwise) that contradict the conditions of this License, they do not\line
+excuse you from the conditions of this License. If you cannot\line
+distribute so as to satisfy simultaneously your obligations under this\line
+License and any other pertinent obligations, then as a consequence you\line
+may not distribute the Program at all. For example, if a patent\line
+license would not permit royalty-free redistribution of the Program by\line
+all those who receive copies directly or indirectly through you, then\line
+the only way you could satisfy both it and this License would be to\line
+refrain entirely from distribution of the Program.\line
+\line
+If any portion of this section is held invalid or unenforceable under\line
+any particular circumstance, the balance of the section is intended to\line
+apply and the section as a whole is intended to apply in other\line
+circumstances.\line
+\line
+It is not the purpose of this section to induce you to infringe any\line
+patents or other property right claims or to contest validity of any\line
+such claims; this section has the sole purpose of protecting the\line
+integrity of the free software distribution system, which is\line
+implemented by public license practices. Many people have made\line
+generous contributions to the wide range of software distributed\line
+through that system in reliance on consistent application of that\line
+system; it is up to the author/donor to decide if he or she is willing\line
+to distribute software through any other system and a licensee cannot\line
+impose that choice.\line
+\line
+This section is intended to make thoroughly clear what is believed to\line
+be a consequence of the rest of this License.\line
+\line
+ 8. If the distribution and/or use of the Program is restricted in\line
+certain countries either by patents or by copyrighted interfaces, the\line
+original copyright holder who places the Program under this License\line
+may add an explicit geographical distribution limitation excluding\line
+those countries, so that distribution is permitted only in or among\line
+countries not thus excluded. In such case, this License incorporates\line
+the limitation as if written in the body of this License.\line
+\line
+ 9. The Free Software Foundation may publish revised and/or new versions\line
+of the General Public License from time to time. Such new versions will\line
+be similar in spirit to the present version, but may differ in detail to\line
+address new problems or concerns.\line
+\line
+Each version is given a distinguishing version number. If the Program\line
+specifies a version number of this License which applies to it and "any\line
+later version", you have the option of following the terms and conditions\line
+either of that version or of any later version published by the Free\line
+Software Foundation. If the Program does not specify a version number of\line
+this License, you may choose any version ever published by the Free Software\line
+Foundation.\line
+\line
+ 10. If you wish to incorporate parts of the Program into other free\line
+programs whose distribution conditions are different, write to the author\line
+to ask for permission. For software which is copyrighted by the Free\line
+Software Foundation, write to the Free Software Foundation; we sometimes\line
+make exceptions for this. Our decision will be guided by the two goals\line
+of preserving the free status of all derivatives of our free software and\line
+of promoting the sharing and reuse of software generally.\line
+\line
+ NO WARRANTY\line
+\line
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY\line
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN\line
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES\line
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED\line
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\line
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS\line
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE\line
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,\line
+REPAIR OR CORRECTION.\line
+\line
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\line
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR\line
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,\line
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING\line
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED\line
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY\line
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER\line
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\line
+POSSIBILITY OF SUCH DAMAGES.\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 GNU LGPL License\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 License for core:\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \f1 GNU LESSER GENERAL PUBLIC LICENSE\line
+ Version 2.1, February 1999\line
+\line
+Copyright (C) 1991, 1999 Free Software Foundation, Inc.\line
+59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\line
+Everyone is permitted to copy and distribute verbatim copies\line
+of this license document, but changing it is not allowed.\line
+\line
+[ This is the first released version of the Lesser GPL. \line
+It also counts as the successor of the GNU Library Public\line
+License, version 2, hence the version number 2.1. ]\line
+\line
+ Preamble\line
+\line
+The licenses for most software are designed to take away your\line
+freedom to share and change it. By contrast, the GNU General Public\line
+Licenses are intended to guarantee your freedom to share and change\line
+free software--to make sure the software is free for all its users.\line
+\line
+This license, the Lesser General Public License, applies to some\line
+specially designated software packages--typically libraries--of the\line
+Free Software Foundation and other authors who decide to use it. You\line
+can use it too, but we suggest you first think carefully about whether\line
+this license or the ordinary General Public License is the better\line
+strategy to use in any particular case, based on the explanations below.\line
+\line
+When we speak of free software, we are referring to freedom of use,\line
+not price. Our General Public Licenses are designed to make sure that\line
+you have the freedom to distribute copies of free software (and charge\line
+for this service if you wish); that you receive source code or can get\line
+it if you want it; that you can change the software and use pieces of\line
+it in new free programs; and that you are informed that you can do\line
+these things.\line
+\line
+To protect your rights, we need to make restrictions that forbid\line
+distributors to deny you these rights or to ask you to surrender these\line
+rights. These restrictions translate to certain responsibilities for\line
+you if you distribute copies of the library or if you modify it.\line
+\line
+For example, if you distribute copies of the library, whether gratis\line
+or for a fee, you must give the recipients all the rights that we gave\line
+you. You must make sure that they, too, receive or can get the source\line
+code. If you link other code with the library, you must provide\line
+complete object files to the recipients, so that they can relink them\line
+with the library after making changes to the library and recompiling\line
+it. And you must show them these terms so they know their rights.\line
+\line
+We protect your rights with a two-step method: (1) we copyright the\line
+library, and (2) we offer you this license, which gives you legal\line
+permission to copy, distribute and/or modify the library.\line
+\line
+To protect each distributor, we want to make it very clear that\line
+there is no warranty for the free library. Also, if the library is\line
+modified by someone else and passed on, the recipients should know\line
+that what they have is not the original version, so that the original\line
+author's reputation will not be affected by problems that might be\line
+introduced by others.\line
+\line
+Finally, software patents pose a constant threat to the existence of\line
+any free program. We wish to make sure that a company cannot\line
+effectively restrict the users of a free program by obtaining a\line
+restrictive license from a patent holder. Therefore, we insist that\line
+any patent license obtained for a version of the library must be\line
+consistent with the full freedom of use specified in this license.\line
+\line
+Most GNU software, including some libraries, is covered by the\line
+ordinary GNU General Public License. This license, the GNU Lesser\line
+General Public License, applies to certain designated libraries, and\line
+is quite different from the ordinary General Public License. We use\line
+this license for certain libraries in order to permit linking those\line
+libraries into non-free programs.\line
+\line
+When a program is linked with a library, whether statically or using\line
+a shared library, the combination of the two is legally speaking a\line
+combined work, a derivative of the original library. The ordinary\line
+General Public License therefore permits such linking only if the\line
+entire combination fits its criteria of freedom. The Lesser General\line
+Public License permits more lax criteria for linking other code with\line
+the library.\line
+\line
+We call this license the "Lesser" General Public License because it\line
+does Less to protect the user's freedom than the ordinary General\line
+Public License. It also provides other free software developers Less\line
+of an advantage over competing non-free programs. These disadvantages\line
+are the reason we use the ordinary General Public License for many\line
+libraries. However, the Lesser license provides advantages in certain\line
+special circumstances.\line
+\line
+For example, on rare occasions, there may be a special need to\line
+encourage the widest possible use of a certain library, so that it becomes\line
+a de-facto standard. To achieve this, non-free programs must be\line
+allowed to use the library. A more frequent case is that a free\line
+library does the same job as widely used non-free libraries. In this\line
+case, there is little to gain by limiting the free library to free\line
+software only, so we use the Lesser General Public License.\line
+\line
+In other cases, permission to use a particular library in non-free\line
+programs enables a greater number of people to use a large body of\line
+free software. For example, permission to use the GNU C Library in\line
+non-free programs enables many more people to use the whole GNU\line
+operating system, as well as its variant, the GNU/Linux operating\line
+system.\line
+\line
+Although the Lesser General Public License is Less protective of the\line
+users' freedom, it does ensure that the user of a program that is\line
+linked with the Library has the freedom and the wherewithal to run\line
+that program using a modified version of the Library.\line
+\line
+The precise terms and conditions for copying, distribution and\line
+modification follow. Pay close attention to the difference between a\line
+"work based on the library" and a "work that uses the library". The\line
+former contains code derived from the library, whereas the latter must\line
+be combined with the library in order to run.\line
+\line
+ GNU LESSER GENERAL PUBLIC LICENSE\line
+TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\line
+\line
+0. This License Agreement applies to any software library or other\line
+program which contains a notice placed by the copyright holder or\line
+other authorized party saying it may be distributed under the terms of\line
+this Lesser General Public License (also called "this License").\line
+Each licensee is addressed as "you".\line
+\line
+A "library" means a collection of software functions and/or data\line
+prepared so as to be conveniently linked with application programs\line
+(which use some of those functions and data) to form executables.\line
+\line
+The "Library", below, refers to any such software library or work\line
+which has been distributed under these terms. A "work based on the\line
+Library" means either the Library or any derivative work under\line
+copyright law: that is to say, a work containing the Library or a\line
+portion of it, either verbatim or with modifications and/or translated\line
+straightforwardly into another language. (Hereinafter, translation is\line
+included without limitation in the term "modification".)\line
+\line
+"Source code" for a work means the preferred form of the work for\line
+making modifications to it. For a library, complete source code means\line
+all the source code for all modules it contains, plus any associated\line
+interface definition files, plus the scripts used to control compilation\line
+and installation of the library.\line
+\line
+Activities other than copying, distribution and modification are not\line
+covered by this License; they are outside its scope. The act of\line
+running a program using the Library is not restricted, and output from\line
+such a program is covered only if its contents constitute a work based\line
+on the Library (independent of the use of the Library in a tool for\line
+writing it). Whether that is true depends on what the Library does\line
+and what the program that uses the Library does.\line
+\line
+1. You may copy and distribute verbatim copies of the Library's\line
+complete source code as you receive it, in any medium, provided that\line
+you conspicuously and appropriately publish on each copy an\line
+appropriate copyright notice and disclaimer of warranty; keep intact\line
+all the notices that refer to this License and to the absence of any\line
+warranty; and distribute a copy of this License along with the\line
+Library.\line
+\line
+You may charge a fee for the physical act of transferring a copy,\line
+and you may at your option offer warranty protection in exchange for a\line
+fee.\line
+\line
+2. You may modify your copy or copies of the Library or any portion\line
+of it, thus forming a work based on the Library, and copy and\line
+distribute such modifications or work under the terms of Section 1\line
+above, provided that you also meet all of these conditions:\line
+\line
+a) The modified work must itself be a software library.\line
+\line
+b) You must cause the files modified to carry prominent notices\line
+stating that you changed the files and the date of any change.\line
+\line
+c) You must cause the whole of the work to be licensed at no\line
+charge to all third parties under the terms of this License.\line
+\line
+d) If a facility in the modified Library refers to a function or a\line
+table of data to be supplied by an application program that uses\line
+the facility, other than as an argument passed when the facility\line
+is invoked, then you must make a good faith effort to ensure that,\line
+in the event an application does not supply such function or\line
+table, the facility still operates, and performs whatever part of\line
+its purpose remains meaningful.\line
+\line
+(For example, a function in a library to compute square roots has\line
+a purpose that is entirely well-defined independent of the\line
+application. Therefore, Subsection 2d requires that any\line
+application-supplied function or table used by this function must\line
+be optional: if the application does not supply it, the square\line
+root function must still compute square roots.)\line
+\line
+These requirements apply to the modified work as a whole. If\line
+identifiable sections of that work are not derived from the Library,\line
+and can be reasonably considered independent and separate works in\line
+themselves, then this License, and its terms, do not apply to those\line
+sections when you distribute them as separate works. But when you\line
+distribute the same sections as part of a whole which is a work based\line
+on the Library, the distribution of the whole must be on the terms of\line
+this License, whose permissions for other licensees extend to the\line
+entire whole, and thus to each and every part regardless of who wrote\line
+it.\line
+\line
+Thus, it is not the intent of this section to claim rights or contest\line
+your rights to work written entirely by you; rather, the intent is to\line
+exercise the right to control the distribution of derivative or\line
+collective works based on the Library.\line
+\line
+In addition, mere aggregation of another work not based on the Library\line
+with the Library (or with a work based on the Library) on a volume of\line
+a storage or distribution medium does not bring the other work under\line
+the scope of this License.\line
+\line
+3. You may opt to apply the terms of the ordinary GNU General Public\line
+License instead of this License to a given copy of the Library. To do\line
+this, you must alter all the notices that refer to this License, so\line
+that they refer to the ordinary GNU General Public License, version 2,\line
+instead of to this License. (If a newer version than version 2 of the\line
+ordinary GNU General Public License has appeared, then you can specify\line
+that version instead if you wish.) Do not make any other change in\line
+these notices.\line
+\line
+Once this change is made in a given copy, it is irreversible for\line
+that copy, so the ordinary GNU General Public License applies to all\line
+subsequent copies and derivative works made from that copy.\line
+\line
+This option is useful when you wish to copy part of the code of\line
+the Library into a program that is not a library.\line
+\line
+4. You may copy and distribute the Library (or a portion or\line
+derivative of it, under Section 2) in object code or executable form\line
+under the terms of Sections 1 and 2 above provided that you accompany\line
+it with the complete corresponding machine-readable source code, which\line
+must be distributed under the terms of Sections 1 and 2 above on a\line
+medium customarily used for software interchange.\line
+\line
+If distribution of object code is made by offering access to copy\line
+from a designated place, then offering equivalent access to copy the\line
+source code from the same place satisfies the requirement to\line
+distribute the source code, even though third parties are not\line
+compelled to copy the source along with the object code.\line
+\line
+5. A program that contains no derivative of any portion of the\line
+Library, but is designed to work with the Library by being compiled or\line
+linked with it, is called a "work that uses the Library". Such a\line
+work, in isolation, is not a derivative work of the Library, and\line
+therefore falls outside the scope of this License.\line
+\line
+However, linking a "work that uses the Library" with the Library\line
+creates an executable that is a derivative of the Library (because it\line
+contains portions of the Library), rather than a "work that uses the\line
+library". The executable is therefore covered by this License.\line
+Section 6 states terms for distribution of such executables.\line
+\line
+When a "work that uses the Library" uses material from a header file\line
+that is part of the Library, the object code for the work may be a\line
+derivative work of the Library even though the source code is not.\line
+Whether this is true is especially significant if the work can be\line
+linked without the Library, or if the work is itself a library. The\line
+threshold for this to be true is not precisely defined by law.\line
+\line
+If such an object file uses only numerical parameters, data\line
+structure layouts and accessors, and small macros and small inline\line
+functions (ten lines or less in length), then the use of the object\line
+file is unrestricted, regardless of whether it is legally a derivative\line
+work. (Executables containing this object code plus portions of the\line
+Library will still fall under Section 6.)\line
+\line
+Otherwise, if the work is a derivative of the Library, you may\line
+distribute the object code for the work under the terms of Section 6.\line
+Any executables containing that work also fall under Section 6,\line
+whether or not they are linked directly with the Library itself.\line
+\line
+6. As an exception to the Sections above, you may also combine or\line
+link a "work that uses the Library" with the Library to produce a\line
+work containing portions of the Library, and distribute that work\line
+under terms of your choice, provided that the terms permit\line
+modification of the work for the customer's own use and reverse\line
+engineering for debugging such modifications.\line
+\line
+You must give prominent notice with each copy of the work that the\line
+Library is used in it and that the Library and its use are covered by\line
+this License. You must supply a copy of this License. If the work\line
+during execution displays copyright notices, you must include the\line
+copyright notice for the Library among them, as well as a reference\line
+directing the user to the copy of this License. Also, you must do one\line
+of these things:\line
+\line
+a) Accompany the work with the complete corresponding\line
+machine-readable source code for the Library including whatever\line
+changes were used in the work (which must be distributed under\line
+Sections 1 and 2 above); and, if the work is an executable linked\line
+with the Library, with the complete machine-readable "work that\line
+uses the Library", as object code and/or source code, so that the\line
+user can modify the Library and then relink to produce a modified\line
+executable containing the modified Library. (It is understood\line
+that the user who changes the contents of definitions files in the\line
+Library will not necessarily be able to recompile the application\line
+to use the modified definitions.)\line
+\line
+b) Use a suitable shared library mechanism for linking with the\line
+Library. A suitable mechanism is one that (1) uses at run time a\line
+copy of the library already present on the user's computer system,\line
+rather than copying library functions into the executable, and (2)\line
+will operate properly with a modified version of the library, if\line
+the user installs one, as long as the modified version is\line
+interface-compatible with the version that the work was made with.\line
+\line
+c) Accompany the work with a written offer, valid for at\line
+least three years, to give the same user the materials\line
+specified in Subsection 6a, above, for a charge no more\line
+than the cost of performing this distribution.\line
+\line
+d) If distribution of the work is made by offering access to copy\line
+from a designated place, offer equivalent access to copy the above\line
+specified materials from the same place.\line
+\line
+e) Verify that the user has already received a copy of these\line
+materials or that you have already sent this user a copy.\line
+\line
+For an executable, the required form of the "work that uses the\line
+Library" must include any data and utility programs needed for\line
+reproducing the executable from it. However, as a special exception,\line
+the materials to be distributed need not include anything that is\line
+normally distributed (in either source or binary form) with the major\line
+components (compiler, kernel, and so on) of the operating system on\line
+which the executable runs, unless that component itself accompanies\line
+the executable.\line
+\line
+It may happen that this requirement contradicts the license\line
+restrictions of other proprietary libraries that do not normally\line
+accompany the operating system. Such a contradiction means you cannot\line
+use both them and the Library together in an executable that you\line
+distribute.\line
+\line
+7. You may place library facilities that are a work based on the\line
+Library side-by-side in a single library together with other library\line
+facilities not covered by this License, and distribute such a combined\line
+library, provided that the separate distribution of the work based on\line
+the Library and of the other library facilities is otherwise\line
+permitted, and provided that you do these two things:\line
+\line
+a) Accompany the combined library with a copy of the same work\line
+based on the Library, uncombined with any other library\line
+facilities. This must be distributed under the terms of the\line
+Sections above.\line
+\line
+b) Give prominent notice with the combined library of the fact\line
+that part of it is a work based on the Library, and explaining\line
+where to find the accompanying uncombined form of the same work.\line
+\line
+8. You may not copy, modify, sublicense, link with, or distribute\line
+the Library except as expressly provided under this License. Any\line
+attempt otherwise to copy, modify, sublicense, link with, or\line
+distribute the Library is void, and will automatically terminate your\line
+rights under this License. However, parties who have received copies,\line
+or rights, from you under this License will not have their licenses\line
+terminated so long as such parties remain in full compliance.\line
+\line
+9. You are not required to accept this License, since you have not\line
+signed it. However, nothing else grants you permission to modify or\line
+distribute the Library or its derivative works. These actions are\line
+prohibited by law if you do not accept this License. Therefore, by\line
+modifying or distributing the Library (or any work based on the\line
+Library), you indicate your acceptance of this License to do so, and\line
+all its terms and conditions for copying, distributing or modifying\line
+the Library or works based on it.\line
+\line
+10. Each time you redistribute the Library (or any work based on the\line
+Library), the recipient automatically receives a license from the\line
+original licensor to copy, distribute, link with or modify the Library\line
+subject to these terms and conditions. You may not impose any further\line
+restrictions on the recipients' exercise of the rights granted herein.\line
+You are not responsible for enforcing compliance by third parties with\line
+this License.\line
+\line
+11. If, as a consequence of a court judgment or allegation of patent\line
+infringement or for any other reason (not limited to patent issues),\line
+conditions are imposed on you (whether by court order, agreement or\line
+otherwise) that contradict the conditions of this License, they do not\line
+excuse you from the conditions of this License. If you cannot\line
+distribute so as to satisfy simultaneously your obligations under this\line
+License and any other pertinent obligations, then as a consequence you\line
+may not distribute the Library at all. For example, if a patent\line
+license would not permit royalty-free redistribution of the Library by\line
+all those who receive copies directly or indirectly through you, then\line
+the only way you could satisfy both it and this License would be to\line
+refrain entirely from distribution of the Library.\line
+\line
+If any portion of this section is held invalid or unenforceable under any\line
+particular circumstance, the balance of the section is intended to apply,\line
+and the section as a whole is intended to apply in other circumstances.\line
+\line
+It is not the purpose of this section to induce you to infringe any\line
+patents or other property right claims or to contest validity of any\line
+such claims; this section has the sole purpose of protecting the\line
+integrity of the free software distribution system which is\line
+implemented by public license practices. Many people have made\line
+generous contributions to the wide range of software distributed\line
+through that system in reliance on consistent application of that\line
+system; it is up to the author/donor to decide if he or she is willing\line
+to distribute software through any other system and a licensee cannot\line
+impose that choice.\line
+\line
+This section is intended to make thoroughly clear what is believed to\line
+be a consequence of the rest of this License.\line
+\line
+12. If the distribution and/or use of the Library is restricted in\line
+certain countries either by patents or by copyrighted interfaces, the\line
+original copyright holder who places the Library under this License may add\line
+an explicit geographical distribution limitation excluding those countries,\line
+so that distribution is permitted only in or among countries not thus\line
+excluded. In such case, this License incorporates the limitation as if\line
+written in the body of this License.\line
+\line
+13. The Free Software Foundation may publish revised and/or new\line
+versions of the Lesser General Public License from time to time.\line
+Such new versions will be similar in spirit to the present version,\line
+but may differ in detail to address new problems or concerns.\line
+\line
+Each version is given a distinguishing version number. If the Library\line
+specifies a version number of this License which applies to it and\line
+"any later version", you have the option of following the terms and\line
+conditions either of that version or of any later version published by\line
+the Free Software Foundation. If the Library does not specify a\line
+license version number, you may choose any version ever published by\line
+the Free Software Foundation.\line
+\line
+14. If you wish to incorporate parts of the Library into other free\line
+programs whose distribution conditions are incompatible with these,\line
+write to the author to ask for permission. For software which is\line
+copyrighted by the Free Software Foundation, write to the Free\line
+Software Foundation; we sometimes make exceptions for this. Our\line
+decision will be guided by the two goals of preserving the free status\line
+of all derivatives of our free software and of promoting the sharing\line
+and reuse of software generally.\line
+\line
+ NO WARRANTY\line
+\line
+15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO\line
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.\line
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR\line
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY\line
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE\line
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\line
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE\line
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME\line
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\line
+\line
+16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN\line
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY\line
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU\line
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR\line
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE\line
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING\line
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A\line
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF\line
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH\line
+DAMAGES.\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 Third Party Open Source Software Used\par}
+{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab {\field{\*\fldinst{HYPERLINK "https://ant.apache.org"}}{\fldrslt{\ul
+Ant
+}}}
+ by {\field{\*\fldinst{HYPERLINK "https://www.apache.org"}}{\fldrslt{\ul
+The Apache Software Foundation
+}}}
+ under the {\field{\*\fldinst{HYPERLINK "https://www.apache.org/licenses/LICENSE-2.0"}}{\fldrslt{\ul
+Apache v2 License
+}}}
+.\par}
+{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab {\field{\*\fldinst{HYPERLINK "http://ant-contrib.sourceforge.net"}}{\fldrslt{\ul
+Ant-contrib
+}}}
+ by the Ant-Contrib Project under the {\field{\*\fldinst{HYPERLINK "https://sourceforge.net/p/ant-contrib/code/HEAD/tree/ant-contrib/trunk/docs/LICENSE.txt"}}{\fldrslt{\ul
+Apache 1.1 License
+}}}
+.\par}
+{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab {\field{\*\fldinst{HYPERLINK "https://www.antlr2.org"}}{\fldrslt{\ul
+Antlr 2
+}}}
+ under {\field{\*\fldinst{HYPERLINK "https://www.antlr2.org/license.html"}}{\fldrslt{\ul
+Public Domain
+}}}
+.\par}
+{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab Processing has a modified copy of appbundler under. It is is a fork of {\field{\*\fldinst{HYPERLINK "https://web.archive.org/web/20161220062720/https://java.net/projects/appbundler"}}{\fldrslt{\ul
+Oracle\u8217's now-defunct appbundler project
+}}}
+ with contributions from {\field{\*\fldinst{HYPERLINK "https://bitbucket.org/infinitekind/appbundler"}}{\fldrslt{\ul
+InfiniteKind
+}}}
+, both under the {\field{\*\fldinst{HYPERLINK "https://openjdk.java.net/legal/gplv2+ce.html"}}{\fldrslt{\ul
+GPL v2 license with classpath exception
+}}}
+.\par}
+{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab {\field{\*\fldinst{HYPERLINK "http://site.icu-project.org"}}{\fldrslt{\ul
+ICU4J
+}}}
+ from IBM under the {\field{\*\fldinst{HYPERLINK "http://source.icu-project.org/repos/icu/icu/tags/release-57-1/LICENSE"}}{\fldrslt{\ul
+ICU License
+}}}
+.\par}
+{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab {\field{\*\fldinst{HYPERLINK "https://www.eclipse.org/jdt/"}}{\fldrslt{\ul
+Java Development Tools
+}}}
+ by the {\field{\*\fldinst{HYPERLINK "https://www.eclipse.org"}}{\fldrslt{\ul
+Eclipse Foundation
+}}}
+ under the {\field{\*\fldinst{HYPERLINK "https://www.eclipse.org/legal/epl-2.0/"}}{\fldrslt{\ul
+Eclipse Public License v2
+}}}
+.\par}
+{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab {\field{\*\fldinst{HYPERLINK "https://github.com/java-native-access/jna"}}{\fldrslt{\ul
+Java Native Access
+}}}
+ dual licensed under the {\field{\*\fldinst{HYPERLINK "https://github.com/java-native-access/jna/blob/master/LICENSE"}}{\fldrslt{\ul
+Apache v2 License and LGPL
+}}}
+.\par}
+{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab {\field{\*\fldinst{HYPERLINK "http://jogamp.org/jogl/www/"}}{\fldrslt{\ul
+JOGL
+}}}
+ by {\field{\*\fldinst{HYPERLINK "http://jogamp.org"}}{\fldrslt{\ul
+Jogamp
+}}}
+ under the {\field{\*\fldinst{HYPERLINK "https://creativecommons.org/licenses/by/3.0/us/"}}{\fldrslt{\ul
+CC BY 3.0 US license
+}}}
+.\par}
+{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab {\field{\*\fldinst{HYPERLINK "https://openjfx.io"}}{\fldrslt{\ul
+OpenJFX 11
+}}}
+ by Oracle under the {\field{\*\fldinst{HYPERLINK "https://openjdk.java.net/legal/gplv2+ce.html"}}{\fldrslt{\ul
+GPL v2 with classpath exception
+}}}
+.\par}
+{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab {\field{\*\fldinst{HYPERLINK "https://openjdk.java.net/projects/jdk/11/"}}{\fldrslt{\ul
+OpenJDK 11
+}}}
+ by Oracle under the {\field{\*\fldinst{HYPERLINK "https://openjdk.java.net/legal/gplv2+ce.html"}}{\fldrslt{\ul
+GPL v2 with classpath exception
+}}}
+\par}
+{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab {\f1 org.netbeans.swing.outline} from {\field{\*\fldinst{HYPERLINK "http://netbeans.apache.org"}}{\fldrslt{\ul
+Netbeans
+}}}
+ dual licensed under the {\field{\*\fldinst{HYPERLINK "http://wiki.netbeans.org/FaqWhyCDDLAndGPL"}}{\fldrslt{\ul
+GNU GPL v2 and CDDL licenses
+}}}
+\par}
+{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab Some text used from {\field{\*\fldinst{HYPERLINK "https://en.wikipedia.org/wiki/Wikipedia:Copyrights"}}{\fldrslt{\ul
+Wikipedia
+}}}
+ under the {\field{\*\fldinst{HYPERLINK "https://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License"}}{\fldrslt{\ul
+CC BY-SA
+}}}
+ license.\sa180\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 Other License Bodies\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 Text of other relevant licenses\u8230 ?\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 {\b IBM Public License Version 1.0}\line the original document can be found at: http://oss.software.ibm.com/developerworks/opensource/license10.html\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \f1 IBM Public License Version 1.0\line
+\line
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS IBM\line
+PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF\line
+THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.\line
+\line
+\line
+1. DEFINITIONS\line
+\line
+"Contribution" means:\line
+\line
+a) in the case of International Business Machines Corporation ("IBM"),\line
+the Original Program, and\line
+\line
+b) in the case of each Contributor,\line
+\line
+i) changes to the Program, and\line
+\line
+ii) additions to the Program;\line
+where such changes and/or additions to the Program originate from and\line
+are distributed by that particular Contributor. A Contribution\line
+'originates' from a Contributor if it was added to the Program by such\line
+Contributor itself or anyone acting on such Contributor's\line
+behalf. Contributions do not include additions to the Program which:\line
+(i) are separate modules of software distributed in conjunction with\line
+the Program under their own license agreement, and (ii) are not\line
+derivative works of the Program.\line
+\line
+"Contributor" means IBM and any other entity that distributes the\line
+Program.\line
+\line
+"Licensed Patents " mean patent claims licensable by a Contributor\line
+which are necessarily infringed by the use or sale of its Contribution\line
+alone or when combined with the Program.\line
+\line
+\line
+"Original Program" means the original version of the software\line
+accompanying this Agreement as released by IBM, including source code,\line
+object code and documentation, if any.\line
+\line
+"Program" means the Original Program and Contributions.\line
+\line
+"Recipient" means anyone who receives the Program under this\line
+Agreement, including all Contributors.\line
+\line
+\line
+2. GRANT OF RIGHTS\line
+\line
+a) Subject to the terms of this Agreement, each Contributor hereby\line
+grants Recipient a non-exclusive, worldwide, royalty-free copyright\line
+license to reproduce, prepare derivative works of, publicly display,\line
+publicly perform, distribute and sublicense the Contribution of such\line
+Contributor, if any, and such derivative works, in source code and\line
+object code form.\line
+\line
+b) Subject to the terms of this Agreement, each Contributor hereby\line
+grants Recipient a non-exclusive, worldwide, royalty-free patent\line
+license under Licensed Patents to make, use, sell, offer to sell,\line
+import and otherwise transfer the Contribution of such Contributor, if\line
+any, in source code and object code form. This patent license shall\line
+apply to the combination of the Contribution and the Program if, at\line
+the time the Contribution is added by the Contributor, such addition\line
+of the Contribution causes such combination to be covered by the\line
+Licensed Patents. The patent license shall not apply to any other\line
+combinations which include the Contribution. No hardware per se is\line
+licensed hereunder.\line
+\line
+c) Recipient understands that although each Contributor grants the\line
+licenses to its Contributions set forth herein, no assurances are\line
+provided by any Contributor that the Program does not infringe the\line
+patent or other intellectual property rights of any other entity. Each\line
+Contributor disclaims any liability to Recipient for claims brought by\line
+any other entity based on infringement of intellectual property rights\line
+or otherwise. As a condition to exercising the rights and licenses\line
+granted hereunder, each Recipient hereby assumes sole responsibility\line
+to secure any other intellectual property rights needed, if any. For\line
+example, if a third party patent license is required to allow\line
+Recipient to distribute the Program, it is Recipient's responsibility\line
+to acquire that license before distributing the Program.\line
+\line
+d) Each Contributor represents that to its knowledge it has sufficient\line
+copyright rights in its Contribution, if any, to grant the copyright\line
+license set forth in this Agreement.\line
+\line
+\line
+3. REQUIREMENTS\line
+\line
+A Contributor may choose to distribute the Program in object code form\line
+under its own license agreement, provided that:\line
+\line
+a) it complies with the terms and conditions of this Agreement; and\line
+\line
+b) its license agreement:\line
+\line
+i) effectively disclaims on behalf of all Contributors all warranties\line
+and conditions, express and implied, including warranties or\line
+conditions of title and non-infringement, and implied warranties or\line
+conditions of merchantability and fitness for a particular purpose;\line
+\line
+ii) effectively excludes on behalf of all Contributors all liability\line
+for damages, including direct, indirect, special, incidental and\line
+consequential damages, such as lost profits;\line
+\line
+iii) states that any provisions which differ from this Agreement are\line
+offered by that Contributor alone and not by any other party; and\line
+\line
+iv) states that source code for the Program is available from such\line
+Contributor, and informs licensees how to obtain it in a reasonable\line
+manner on or through a medium customarily used for software exchange.\line
+\line
+When the Program is made available in source code form:\line
+a) it must be made available under this Agreement; and\line
+b) a copy of this Agreement must be included with each copy of the\line
+Program.\line
+\line
+Each Contributor must include the following in a conspicuous location\line
+in the Program:\line
+\line
+Copyright 2003, International Business Machines Corporation and\line
+others. All Rights Reserved.\line
+\line
+In addition, each Contributor must identify itself as the originator\line
+of its Contribution, if any, in a manner that reasonably allows\line
+subsequent Recipients to identify the originator of the Contribution.\line
+\line
+\line
+4. COMMERCIAL DISTRIBUTION\line
+\line
+Commercial distributors of software may accept certain\line
+responsibilities with respect to end users, business partners and the\line
+like. While this license is intended to facilitate the commercial use\line
+of the Program, the Contributor who includes the Program in a\line
+commercial product offering should do so in a manner which does not\line
+create potential liability for other Contributors. Therefore, if a\line
+Contributor includes the Program in a commercial product offering,\line
+such Contributor ("Commercial Contributor") hereby agrees to defend\line
+and indemnify every other Contributor ("Indemnified Contributor")\line
+against any losses, damages and costs (collectively "Losses") arising\line
+from claims, lawsuits and other legal actions brought by a third party\line
+against the Indemnified Contributor to the extent caused by the acts\line
+or omissions of such Commercial Contributor in connection with its\line
+distribution of the Program in a commercial product offering. The\line
+obligations in this section do not apply to any claims or Losses\line
+relating to any actual or alleged intellectual property\line
+infringement. In order to qualify, an Indemnified Contributor must: a)\line
+promptly notify the Commercial Contributor in writing of such claim,\line
+and b) allow the Commercial Contributor to control, and cooperate with\line
+the Commercial Contributor in, the defense and any related settlement\line
+negotiations. The Indemnified Contributor may participate in any such\line
+claim at its own expense.\line
+\line
+For example, a Contributor might include the Program in a commercial\line
+product offering, Product X. That Contributor is then a Commercial\line
+Contributor. If that Commercial Contributor then makes performance\line
+claims, or offers warranties related to Product X, those performance\line
+claims and warranties are such Commercial Contributor's responsibility\line
+alone. Under this section, the Commercial Contributor would have to\line
+defend claims against the other Contributors related to those\line
+performance claims and warranties, and if a court requires any other\line
+Contributor to pay any damages as a result, the Commercial Contributor\line
+must pay those damages.\line
+\line
+\line
+5. NO WARRANTY\line
+\line
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS\line
+PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\line
+KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY\line
+WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY\line
+OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely\line
+responsible for determining the appropriateness of using and\line
+distributing the Program and assumes all risks associated with its\line
+exercise of rights under this Agreement, including but not limited to\line
+the risks and costs of program errors, compliance with applicable\line
+laws, damage to or loss of data, programs or equipment, and\line
+unavailability or interruption of operations.\line
+\line
+\line
+6. DISCLAIMER OF LIABILITY\line
+\line
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR\line
+ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,\line
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING\line
+WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF\line
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\line
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR\line
+DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED\line
+HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\line
+\line
+\line
+7. GENERAL\line
+\line
+If any provision of this Agreement is invalid or unenforceable under\line
+applicable law, it shall not affect the validity or enforceability of\line
+the remainder of the terms of this Agreement, and without further\line
+action by the parties hereto, such provision shall be reformed to the\line
+minimum extent necessary to make such provision valid and\line
+enforceable.\line
+\line
+If Recipient institutes patent litigation against a Contributor with\line
+respect to a patent applicable to software (including a cross-claim or\line
+counterclaim in a lawsuit), then any patent licenses granted by that\line
+Contributor to such Recipient under this Agreement shall terminate as\line
+of the date such litigation is filed. In addition, If Recipient\line
+institutes patent litigation against any entity (including a\line
+cross-claim or counterclaim in a lawsuit) alleging that the Program\line
+itself (excluding combinations of the Program with other software or\line
+hardware\par}
+}
diff --git a/app/windows/Processing.wixproj b/app/windows/Processing.wixproj
new file mode 100644
index 000000000..3dcd4695f
--- /dev/null
+++ b/app/windows/Processing.wixproj
@@ -0,0 +1,9 @@
+
+
+ ..\build\compose\binaries\main\msi
+ Processing-$(Version)
+
+
+
+
+
\ No newline at end of file
diff --git a/app/windows/Processing.wxs b/app/windows/Processing.wxs
new file mode 100644
index 000000000..2170bdb6c
--- /dev/null
+++ b/app/windows/Processing.wxs
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/windows/background.png b/app/windows/background.png
new file mode 100644
index 000000000..0d2e2e2f0
Binary files /dev/null and b/app/windows/background.png differ
diff --git a/app/windows/banner.png b/app/windows/banner.png
new file mode 100644
index 000000000..69bb2be24
Binary files /dev/null and b/app/windows/banner.png differ
diff --git a/build.gradle.kts b/build.gradle.kts
index 44805d0b1..0675c2db3 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -1,6 +1,3 @@
-group = "org.processing"
-version = "4.4.0"
-
plugins {
kotlin("jvm") version libs.versions.kotlin apply false
alias(libs.plugins.kotlinMultiplatform) apply false
diff --git a/build/linux/processing.png b/build/linux/processing.png
index ef31c9391..8eb3f0294 100644
Binary files a/build/linux/processing.png and b/build/linux/processing.png differ
diff --git a/build/linux/processing.svg b/build/linux/processing.svg
new file mode 100644
index 000000000..9b5ccd52b
--- /dev/null
+++ b/build/linux/processing.svg
@@ -0,0 +1,19 @@
+
diff --git a/build/macos/processing.icns b/build/macos/processing.icns
index cb42dad17..e05dbaa5a 100644
Binary files a/build/macos/processing.icns and b/build/macos/processing.icns differ
diff --git a/build/shared/lib/about-processing.png b/build/shared/lib/about-processing.png
deleted file mode 100644
index 056354154..000000000
Binary files a/build/shared/lib/about-processing.png and /dev/null differ
diff --git a/build/shared/lib/languages/PDE.properties b/build/shared/lib/languages/PDE.properties
index 02f98473e..9d03f33c0 100644
--- a/build/shared/lib/languages/PDE.properties
+++ b/build/shared/lib/languages/PDE.properties
@@ -59,6 +59,14 @@ menu.edit.decrease_indent = ← Decrease Indent
menu.edit.decrease_indent.keystroke.macos = meta pressed OPEN_BRACKET
menu.edit.decrease_indent.keystroke.windows = ctrl pressed OPEN_BRACKET
menu.edit.decrease_indent.keystroke.linux = ctrl pressed OPEN_BRACKET
+menu.edit.increase_font = Increase Font Size
+menu.edit.increase_font.keystroke.macos = meta pressed EQUALS
+menu.edit.increase_font.keystroke.windows = ctrl pressed EQUALS
+menu.edit.increase_font.keystroke.linux = ctrl pressed EQUALS
+menu.edit.decrease_font = Decrease Font Size
+menu.edit.decrease_font.keystroke.macos = meta pressed MINUS
+menu.edit.decrease_font.keystroke.windows = ctrl pressed MINUS
+menu.edit.decrease_font.keystroke.linux = ctrl pressed MINUS
menu.edit.find = Find...
menu.edit.find_next = Find Next
menu.edit.find_previous = Find Previous
@@ -613,6 +621,12 @@ update_check = Update
update_check.updates_available.core = A new version of Processing is available,\nwould you like to visit the Processing download page?
update_check.updates_available.contributions = There are updates available for some of the installed contributions,\nwould you like to open the the Contribution Manager now?
+# ---------------------------------------
+# Beta
+beta.window.title = Welcome to Beta
+beta.title = Thanks for testing this Processing Beta!
+beta.message = This preview release lets us gather feedback and fix issues before the final version. **Some features may not work as expected.** If you encounter problems, [please post on the forum](https://discourse.processing.org) or [open a GitHub issue](https://github.com/processing/processing4/issues).
+beta.button = Ok
# ---------------------------------------
# Color Chooser
diff --git a/build/shared/lib/languages/PDE_nl.properties b/build/shared/lib/languages/PDE_nl.properties
index 9b9527517..e7f11b0a1 100644
--- a/build/shared/lib/languages/PDE_nl.properties
+++ b/build/shared/lib/languages/PDE_nl.properties
@@ -315,6 +315,12 @@ update_check = Update
update_check.updates_available.core = Een nieuwe versie van Processing is beschikbaar,\nwilt u de Processing download pagina bezoeken?
update_check.updates_available.contributions = Er zijn updates beschikbaar voor sommige van de door u geïnstalleerde bijdragen,\nwilt u nu de Bijdragen Manager openen?
+# ---------------------------------------
+# Beta
+beta.window.title = Welkom bij Beta
+beta.title = Dankuwel voor het testen van deze Processing Beta!
+beta.message = Deze preview release laat ons feedback verzamelen en problemen oplossen. **Sommige functies werken mogelijk niet zoals verwacht.** Als u problemen ondervindt, [post dan op het forum](https://discourse.processing.org) of [open een GitHub issue](https://github.com/processing/processing4/issues).
+beta.button = Ok
# ---------------------------------------
# Color Chooser
diff --git a/build/shared/lib/theme/Alloys/agpalilik.txt b/build/shared/lib/theme/Alloys/agpalilik.txt
index fdea1e465..bdbb11297 100644
--- a/build/shared/lib/theme/Alloys/agpalilik.txt
+++ b/build/shared/lib/theme/Alloys/agpalilik.txt
@@ -161,13 +161,13 @@ editor.scrollbar.color = #0066C5
## PdeTextAreaPainter - extras added to the editor ##
-editor.gutter.text.font = processing.mono,plain,12
+editor.gutter.text.font = processing.mono,bold,12
editor.gutter.text.color = #C0FFFF
# transparency (0..100) for line numbers in gutter
-editor.gutter.text.active.alpha = 70
+editor.gutter.text.active.alpha = 80
# transparency for lines not currently in use
-editor.gutter.text.inactive.alpha = 30
+editor.gutter.text.inactive.alpha = 40
# bgcolor for the current (highlighted) line
editor.gutter.highlight.color = #374E81
diff --git a/build/shared/lib/theme/Alloys/armanty.txt b/build/shared/lib/theme/Alloys/armanty.txt
index 7b6269bd3..1ab7631b7 100644
--- a/build/shared/lib/theme/Alloys/armanty.txt
+++ b/build/shared/lib/theme/Alloys/armanty.txt
@@ -161,13 +161,13 @@ editor.scrollbar.color = #834548
## PdeTextAreaPainter - extras added to the editor ##
-editor.gutter.text.font = processing.mono,plain,12
+editor.gutter.text.font = processing.mono,bold,12
editor.gutter.text.color = #FFEBEC
# transparency (0..100) for line numbers in gutter
-editor.gutter.text.active.alpha = 70
+editor.gutter.text.active.alpha = 80
# transparency for lines not currently in use
-editor.gutter.text.inactive.alpha = 30
+editor.gutter.text.inactive.alpha = 40
# bgcolor for the current (highlighted) line
editor.gutter.highlight.color = #0087A9
diff --git a/build/shared/lib/theme/Alloys/bacubirito.txt b/build/shared/lib/theme/Alloys/bacubirito.txt
index c344ea624..8ff01f798 100644
--- a/build/shared/lib/theme/Alloys/bacubirito.txt
+++ b/build/shared/lib/theme/Alloys/bacubirito.txt
@@ -161,13 +161,13 @@ editor.scrollbar.color = #49D0A7
## PdeTextAreaPainter - extras added to the editor ##
-editor.gutter.text.font = processing.mono,plain,12
+editor.gutter.text.font = processing.mono,bold,12
editor.gutter.text.color = #1A0300
# transparency (0..100) for line numbers in gutter
-editor.gutter.text.active.alpha = 70
+editor.gutter.text.active.alpha = 80
# transparency for lines not currently in use
-editor.gutter.text.inactive.alpha = 30
+editor.gutter.text.inactive.alpha = 40
# bgcolor for the current (highlighted) line
editor.gutter.highlight.color = #9C9824
diff --git a/build/shared/lib/theme/Alloys/bondoc.txt b/build/shared/lib/theme/Alloys/bondoc.txt
index 93d78a7d9..c351bbc94 100644
--- a/build/shared/lib/theme/Alloys/bondoc.txt
+++ b/build/shared/lib/theme/Alloys/bondoc.txt
@@ -161,13 +161,13 @@ editor.scrollbar.color = #431D29
## PdeTextAreaPainter - extras added to the editor ##
-editor.gutter.text.font = processing.mono,plain,12
+editor.gutter.text.font = processing.mono,bold,12
editor.gutter.text.color = #FFF2FF
# transparency (0..100) for line numbers in gutter
-editor.gutter.text.active.alpha = 70
+editor.gutter.text.active.alpha = 80
# transparency for lines not currently in use
-editor.gutter.text.inactive.alpha = 30
+editor.gutter.text.inactive.alpha = 40
# bgcolor for the current (highlighted) line
editor.gutter.highlight.color = #544587
diff --git a/build/shared/lib/theme/Alloys/brahin.txt b/build/shared/lib/theme/Alloys/brahin.txt
index 278fa6ed3..e95468b4e 100644
--- a/build/shared/lib/theme/Alloys/brahin.txt
+++ b/build/shared/lib/theme/Alloys/brahin.txt
@@ -161,13 +161,13 @@ editor.scrollbar.color = #47502C
## PdeTextAreaPainter - extras added to the editor ##
-editor.gutter.text.font = processing.mono,plain,12
+editor.gutter.text.font = processing.mono,bold,12
editor.gutter.text.color = #FBFFD7
# transparency (0..100) for line numbers in gutter
-editor.gutter.text.active.alpha = 70
+editor.gutter.text.active.alpha = 80
# transparency for lines not currently in use
-editor.gutter.text.inactive.alpha = 30
+editor.gutter.text.inactive.alpha = 40
# bgcolor for the current (highlighted) line
editor.gutter.highlight.color = #3D4B37
diff --git a/build/shared/lib/theme/Alloys/esquel.txt b/build/shared/lib/theme/Alloys/esquel.txt
index 31641367c..219c1aef4 100644
--- a/build/shared/lib/theme/Alloys/esquel.txt
+++ b/build/shared/lib/theme/Alloys/esquel.txt
@@ -161,16 +161,16 @@ editor.scrollbar.color = #978FAC
## PdeTextAreaPainter - extras added to the editor ##
-editor.gutter.text.font = processing.mono,plain,12
+editor.gutter.text.font = processing.mono,bold,12
editor.gutter.text.color = #540000
# transparency (0..100) for line numbers in gutter
-editor.gutter.text.active.alpha = 70
+editor.gutter.text.active.alpha = 90
# transparency for lines not currently in use
-editor.gutter.text.inactive.alpha = 30
+editor.gutter.text.inactive.alpha = 60
# bgcolor for the current (highlighted) line
-editor.gutter.highlight.color = #CA0022
+editor.gutter.highlight.color = #F7637B
# squiggly line underneath errors in the editor
editor.error.underline.color = #000000
diff --git a/build/shared/lib/theme/Alloys/gancedo.txt b/build/shared/lib/theme/Alloys/gancedo.txt
index cb640b15d..5ca9496ba 100644
--- a/build/shared/lib/theme/Alloys/gancedo.txt
+++ b/build/shared/lib/theme/Alloys/gancedo.txt
@@ -161,13 +161,13 @@ editor.scrollbar.color = #9D0038
## PdeTextAreaPainter - extras added to the editor ##
-editor.gutter.text.font = processing.mono,plain,12
+editor.gutter.text.font = processing.mono,bold,12
editor.gutter.text.color = #FFE8FF
# transparency (0..100) for line numbers in gutter
-editor.gutter.text.active.alpha = 70
+editor.gutter.text.active.alpha = 80
# transparency for lines not currently in use
-editor.gutter.text.inactive.alpha = 30
+editor.gutter.text.inactive.alpha = 40
# bgcolor for the current (highlighted) line
editor.gutter.highlight.color = #8F4965
diff --git a/build/shared/lib/theme/Alloys/hoba.txt b/build/shared/lib/theme/Alloys/hoba.txt
index 795a01427..120e4ead7 100644
--- a/build/shared/lib/theme/Alloys/hoba.txt
+++ b/build/shared/lib/theme/Alloys/hoba.txt
@@ -161,13 +161,13 @@ editor.scrollbar.color = #F07D44
## PdeTextAreaPainter - extras added to the editor ##
-editor.gutter.text.font = processing.mono,plain,12
+editor.gutter.text.font = processing.mono,bold,12
editor.gutter.text.color = #3E0000
# transparency (0..100) for line numbers in gutter
-editor.gutter.text.active.alpha = 70
+editor.gutter.text.active.alpha = 80
# transparency for lines not currently in use
-editor.gutter.text.inactive.alpha = 30
+editor.gutter.text.inactive.alpha = 40
# bgcolor for the current (highlighted) line
editor.gutter.highlight.color = #D9964A
diff --git a/build/shared/lib/theme/Alloys/imilac.txt b/build/shared/lib/theme/Alloys/imilac.txt
index 9cc03ae24..73a1c6abb 100644
--- a/build/shared/lib/theme/Alloys/imilac.txt
+++ b/build/shared/lib/theme/Alloys/imilac.txt
@@ -161,13 +161,13 @@ editor.scrollbar.color = #E9E9E9
## PdeTextAreaPainter - extras added to the editor ##
-editor.gutter.text.font = processing.mono,plain,12
+editor.gutter.text.font = processing.mono,bold,12
editor.gutter.text.color = #00003B
# transparency (0..100) for line numbers in gutter
-editor.gutter.text.active.alpha = 70
+editor.gutter.text.active.alpha = 80
# transparency for lines not currently in use
-editor.gutter.text.inactive.alpha = 30
+editor.gutter.text.inactive.alpha = 40
# bgcolor for the current (highlighted) line
editor.gutter.highlight.color = #809AE3
diff --git a/build/shared/lib/theme/Alloys/jepara.txt b/build/shared/lib/theme/Alloys/jepara.txt
index 988738056..9d2cdaf8b 100644
--- a/build/shared/lib/theme/Alloys/jepara.txt
+++ b/build/shared/lib/theme/Alloys/jepara.txt
@@ -161,16 +161,16 @@ editor.scrollbar.color = #FF6E38
## PdeTextAreaPainter - extras added to the editor ##
-editor.gutter.text.font = processing.mono,plain,12
+editor.gutter.text.font = processing.mono,bold,12
editor.gutter.text.color = #000049
# transparency (0..100) for line numbers in gutter
-editor.gutter.text.active.alpha = 70
+editor.gutter.text.active.alpha = 80
# transparency for lines not currently in use
-editor.gutter.text.inactive.alpha = 30
+editor.gutter.text.inactive.alpha = 40
# bgcolor for the current (highlighted) line
-editor.gutter.highlight.color = #4F4CA9
+editor.gutter.highlight.color = #9090ED
# squiggly line underneath errors in the editor
editor.error.underline.color = #000000
diff --git a/build/shared/lib/theme/Alloys/mbozi.txt b/build/shared/lib/theme/Alloys/mbozi.txt
index 2c7bd137d..4c6167659 100644
--- a/build/shared/lib/theme/Alloys/mbozi.txt
+++ b/build/shared/lib/theme/Alloys/mbozi.txt
@@ -161,13 +161,13 @@ editor.scrollbar.color = #FF8F2F
## PdeTextAreaPainter - extras added to the editor ##
-editor.gutter.text.font = processing.mono,plain,12
+editor.gutter.text.font = processing.mono,bold,12
editor.gutter.text.color = #470000
# transparency (0..100) for line numbers in gutter
-editor.gutter.text.active.alpha = 70
+editor.gutter.text.active.alpha = 90
# transparency for lines not currently in use
-editor.gutter.text.inactive.alpha = 30
+editor.gutter.text.inactive.alpha = 50
# bgcolor for the current (highlighted) line
editor.gutter.highlight.color = #CF226A
diff --git a/build/shared/lib/theme/Alloys/morito.txt b/build/shared/lib/theme/Alloys/morito.txt
index cfd7428af..3143971e7 100644
--- a/build/shared/lib/theme/Alloys/morito.txt
+++ b/build/shared/lib/theme/Alloys/morito.txt
@@ -161,13 +161,13 @@ editor.scrollbar.color = #697982
## PdeTextAreaPainter - extras added to the editor ##
-editor.gutter.text.font = processing.mono,plain,12
+editor.gutter.text.font = processing.mono,bold,12
editor.gutter.text.color = #EFFFFF
# transparency (0..100) for line numbers in gutter
-editor.gutter.text.active.alpha = 70
+editor.gutter.text.active.alpha = 80
# transparency for lines not currently in use
-editor.gutter.text.inactive.alpha = 30
+editor.gutter.text.inactive.alpha = 40
# bgcolor for the current (highlighted) line
editor.gutter.highlight.color = #7C5295
diff --git a/build/shared/lib/theme/Alloys/omolon.txt b/build/shared/lib/theme/Alloys/omolon.txt
index 391f2f6e2..3780594ca 100644
--- a/build/shared/lib/theme/Alloys/omolon.txt
+++ b/build/shared/lib/theme/Alloys/omolon.txt
@@ -161,13 +161,13 @@ editor.scrollbar.color = #4E535A
## PdeTextAreaPainter - extras added to the editor ##
-editor.gutter.text.font = processing.mono,plain,12
+editor.gutter.text.font = processing.mono,bold,12
editor.gutter.text.color = #FAFFFF
# transparency (0..100) for line numbers in gutter
-editor.gutter.text.active.alpha = 70
+editor.gutter.text.active.alpha = 80
# transparency for lines not currently in use
-editor.gutter.text.inactive.alpha = 30
+editor.gutter.text.inactive.alpha = 40
# bgcolor for the current (highlighted) line
editor.gutter.highlight.color = #535558
diff --git a/build/shared/lib/theme/Alloys/seymchan.txt b/build/shared/lib/theme/Alloys/seymchan.txt
index 8624cb5ac..3cf21236f 100644
--- a/build/shared/lib/theme/Alloys/seymchan.txt
+++ b/build/shared/lib/theme/Alloys/seymchan.txt
@@ -161,13 +161,13 @@ editor.scrollbar.color = #00593B
## PdeTextAreaPainter - extras added to the editor ##
-editor.gutter.text.font = processing.mono,plain,12
+editor.gutter.text.font = processing.mono,bold,12
editor.gutter.text.color = #B7FFEA
# transparency (0..100) for line numbers in gutter
-editor.gutter.text.active.alpha = 70
+editor.gutter.text.active.alpha = 80
# transparency for lines not currently in use
-editor.gutter.text.inactive.alpha = 30
+editor.gutter.text.inactive.alpha = 40
# bgcolor for the current (highlighted) line
editor.gutter.highlight.color = #347A00
diff --git a/build/shared/lib/theme/Alloys/tagish.txt b/build/shared/lib/theme/Alloys/tagish.txt
index 780c39f08..c85b4f502 100644
--- a/build/shared/lib/theme/Alloys/tagish.txt
+++ b/build/shared/lib/theme/Alloys/tagish.txt
@@ -161,13 +161,13 @@ editor.scrollbar.color = #A55134
## PdeTextAreaPainter - extras added to the editor ##
-editor.gutter.text.font = processing.mono,plain,12
+editor.gutter.text.font = processing.mono,bold,12
editor.gutter.text.color = #FFFDFB
# transparency (0..100) for line numbers in gutter
-editor.gutter.text.active.alpha = 70
+editor.gutter.text.active.alpha = 80
# transparency for lines not currently in use
-editor.gutter.text.inactive.alpha = 30
+editor.gutter.text.inactive.alpha = 40
# bgcolor for the current (highlighted) line
editor.gutter.highlight.color = #888280
diff --git a/build/shared/lib/theme/Alloys/youxi.txt b/build/shared/lib/theme/Alloys/youxi.txt
index b20264d2f..aaf5d5fca 100644
--- a/build/shared/lib/theme/Alloys/youxi.txt
+++ b/build/shared/lib/theme/Alloys/youxi.txt
@@ -161,13 +161,13 @@ editor.scrollbar.color = #008A50
## PdeTextAreaPainter - extras added to the editor ##
-editor.gutter.text.font = processing.mono,plain,12
-editor.gutter.text.color = #71FFD5
+editor.gutter.text.font = processing.mono,bold,12
+editor.gutter.text.color = #CBFFEF
# transparency (0..100) for line numbers in gutter
-editor.gutter.text.active.alpha = 70
+editor.gutter.text.active.alpha = 90
# transparency for lines not currently in use
-editor.gutter.text.inactive.alpha = 30
+editor.gutter.text.inactive.alpha = 60
# bgcolor for the current (highlighted) line
editor.gutter.highlight.color = #8F9090
diff --git a/build/shared/lib/theme/Minerals/antimony.txt b/build/shared/lib/theme/Minerals/antimony.txt
index fdd2f70e8..64910d7ac 100644
--- a/build/shared/lib/theme/Minerals/antimony.txt
+++ b/build/shared/lib/theme/Minerals/antimony.txt
@@ -161,13 +161,13 @@ editor.scrollbar.color = #092D38
## PdeTextAreaPainter - extras added to the editor ##
-editor.gutter.text.font = processing.mono,plain,12
+editor.gutter.text.font = processing.mono,bold,12
editor.gutter.text.color = #E1FFFF
# transparency (0..100) for line numbers in gutter
-editor.gutter.text.active.alpha = 70
+editor.gutter.text.active.alpha = 80
# transparency for lines not currently in use
-editor.gutter.text.inactive.alpha = 30
+editor.gutter.text.inactive.alpha = 40
# bgcolor for the current (highlighted) line
editor.gutter.highlight.color = #30505D
diff --git a/build/shared/lib/theme/Minerals/bauxite.txt b/build/shared/lib/theme/Minerals/bauxite.txt
index ed0e41ab3..cb80fb78a 100644
--- a/build/shared/lib/theme/Minerals/bauxite.txt
+++ b/build/shared/lib/theme/Minerals/bauxite.txt
@@ -161,13 +161,13 @@ editor.scrollbar.color = #4A4E59
## PdeTextAreaPainter - extras added to the editor ##
-editor.gutter.text.font = processing.mono,plain,12
+editor.gutter.text.font = processing.mono,bold,12
editor.gutter.text.color = #FAFEFF
# transparency (0..100) for line numbers in gutter
-editor.gutter.text.active.alpha = 70
+editor.gutter.text.active.alpha = 80
# transparency for lines not currently in use
-editor.gutter.text.inactive.alpha = 30
+editor.gutter.text.inactive.alpha = 40
# bgcolor for the current (highlighted) line
editor.gutter.highlight.color = #686C78
diff --git a/build/shared/lib/theme/Minerals/beryl.txt b/build/shared/lib/theme/Minerals/beryl.txt
index 8e00681a4..a044b6fb3 100644
--- a/build/shared/lib/theme/Minerals/beryl.txt
+++ b/build/shared/lib/theme/Minerals/beryl.txt
@@ -161,13 +161,13 @@ editor.scrollbar.color = #00926F
## PdeTextAreaPainter - extras added to the editor ##
-editor.gutter.text.font = processing.mono,plain,12
+editor.gutter.text.font = processing.mono,bold,12
editor.gutter.text.color = #001E00
# transparency (0..100) for line numbers in gutter
-editor.gutter.text.active.alpha = 70
+editor.gutter.text.active.alpha = 80
# transparency for lines not currently in use
-editor.gutter.text.inactive.alpha = 30
+editor.gutter.text.inactive.alpha = 40
# bgcolor for the current (highlighted) line
editor.gutter.highlight.color = #007757
diff --git a/build/shared/lib/theme/Minerals/calcite.txt b/build/shared/lib/theme/Minerals/calcite.txt
index 3a7cd90c1..c83b11052 100644
--- a/build/shared/lib/theme/Minerals/calcite.txt
+++ b/build/shared/lib/theme/Minerals/calcite.txt
@@ -161,13 +161,13 @@ editor.scrollbar.color = #B9BDC4
## PdeTextAreaPainter - extras added to the editor ##
-editor.gutter.text.font = processing.mono,plain,12
+editor.gutter.text.font = processing.mono,bold,12
editor.gutter.text.color = #000009
# transparency (0..100) for line numbers in gutter
-editor.gutter.text.active.alpha = 70
+editor.gutter.text.active.alpha = 80
# transparency for lines not currently in use
-editor.gutter.text.inactive.alpha = 30
+editor.gutter.text.inactive.alpha = 40
# bgcolor for the current (highlighted) line
editor.gutter.highlight.color = #92969D
diff --git a/build/shared/lib/theme/Minerals/feldspar.txt b/build/shared/lib/theme/Minerals/feldspar.txt
index 3ea2392e2..1ef3f1740 100644
--- a/build/shared/lib/theme/Minerals/feldspar.txt
+++ b/build/shared/lib/theme/Minerals/feldspar.txt
@@ -161,13 +161,13 @@ editor.scrollbar.color = #BD8A68
## PdeTextAreaPainter - extras added to the editor ##
-editor.gutter.text.font = processing.mono,plain,12
+editor.gutter.text.font = processing.mono,bold,12
editor.gutter.text.color = #270000
# transparency (0..100) for line numbers in gutter
-editor.gutter.text.active.alpha = 70
+editor.gutter.text.active.alpha = 80
# transparency for lines not currently in use
-editor.gutter.text.inactive.alpha = 30
+editor.gutter.text.inactive.alpha = 40
# bgcolor for the current (highlighted) line
editor.gutter.highlight.color = #9C6D4C
diff --git a/build/shared/lib/theme/Minerals/fluorite.txt b/build/shared/lib/theme/Minerals/fluorite.txt
index d169c92c1..4912d0dc2 100644
--- a/build/shared/lib/theme/Minerals/fluorite.txt
+++ b/build/shared/lib/theme/Minerals/fluorite.txt
@@ -161,13 +161,13 @@ editor.scrollbar.color = #402563
## PdeTextAreaPainter - extras added to the editor ##
-editor.gutter.text.font = processing.mono,plain,12
+editor.gutter.text.font = processing.mono,bold,12
editor.gutter.text.color = #FFEFFF
# transparency (0..100) for line numbers in gutter
-editor.gutter.text.active.alpha = 70
+editor.gutter.text.active.alpha = 80
# transparency for lines not currently in use
-editor.gutter.text.inactive.alpha = 30
+editor.gutter.text.inactive.alpha = 40
# bgcolor for the current (highlighted) line
editor.gutter.highlight.color = #654788
diff --git a/build/shared/lib/theme/Minerals/gabbro.txt b/build/shared/lib/theme/Minerals/gabbro.txt
index 2961de644..e28182875 100644
--- a/build/shared/lib/theme/Minerals/gabbro.txt
+++ b/build/shared/lib/theme/Minerals/gabbro.txt
@@ -161,13 +161,13 @@ editor.scrollbar.color = #7A896D
## PdeTextAreaPainter - extras added to the editor ##
-editor.gutter.text.font = processing.mono,plain,12
+editor.gutter.text.font = processing.mono,bold,12
editor.gutter.text.color = #000700
# transparency (0..100) for line numbers in gutter
-editor.gutter.text.active.alpha = 70
+editor.gutter.text.active.alpha = 80
# transparency for lines not currently in use
-editor.gutter.text.inactive.alpha = 30
+editor.gutter.text.inactive.alpha = 40
# bgcolor for the current (highlighted) line
editor.gutter.highlight.color = #606F54
diff --git a/build/shared/lib/theme/Minerals/galena.txt b/build/shared/lib/theme/Minerals/galena.txt
index 5bf35c161..d4d38c0db 100644
--- a/build/shared/lib/theme/Minerals/galena.txt
+++ b/build/shared/lib/theme/Minerals/galena.txt
@@ -161,13 +161,13 @@ editor.scrollbar.color = #6C7076
## PdeTextAreaPainter - extras added to the editor ##
-editor.gutter.text.font = processing.mono,plain,12
+editor.gutter.text.font = processing.mono,bold,12
editor.gutter.text.color = #000009
# transparency (0..100) for line numbers in gutter
-editor.gutter.text.active.alpha = 70
+editor.gutter.text.active.alpha = 80
# transparency for lines not currently in use
-editor.gutter.text.inactive.alpha = 30
+editor.gutter.text.inactive.alpha = 40
# bgcolor for the current (highlighted) line
editor.gutter.highlight.color = #565A60
diff --git a/build/shared/lib/theme/Minerals/garnet.txt b/build/shared/lib/theme/Minerals/garnet.txt
index 3fcf0d7d1..415e9850a 100644
--- a/build/shared/lib/theme/Minerals/garnet.txt
+++ b/build/shared/lib/theme/Minerals/garnet.txt
@@ -161,13 +161,13 @@ editor.scrollbar.color = #973542
## PdeTextAreaPainter - extras added to the editor ##
-editor.gutter.text.font = processing.mono,plain,12
-editor.gutter.text.color = #FFDFE5
+editor.gutter.text.font = processing.mono,bold,12
+editor.gutter.text.color = #FFEFF2
# transparency (0..100) for line numbers in gutter
-editor.gutter.text.active.alpha = 70
+editor.gutter.text.active.alpha = 90
# transparency for lines not currently in use
-editor.gutter.text.inactive.alpha = 30
+editor.gutter.text.inactive.alpha = 40
# bgcolor for the current (highlighted) line
editor.gutter.highlight.color = #B9545E
diff --git a/build/shared/lib/theme/Minerals/jasper.txt b/build/shared/lib/theme/Minerals/jasper.txt
index f682815e8..b757f7478 100644
--- a/build/shared/lib/theme/Minerals/jasper.txt
+++ b/build/shared/lib/theme/Minerals/jasper.txt
@@ -161,13 +161,13 @@ editor.scrollbar.color = #CC383C
## PdeTextAreaPainter - extras added to the editor ##
-editor.gutter.text.font = processing.mono,plain,12
-editor.gutter.text.color = #460000
+editor.gutter.text.font = processing.mono,bold,12
+editor.gutter.text.color = #fbb5b5
# transparency (0..100) for line numbers in gutter
-editor.gutter.text.active.alpha = 70
+editor.gutter.text.active.alpha = 100
# transparency for lines not currently in use
-editor.gutter.text.inactive.alpha = 30
+editor.gutter.text.inactive.alpha = 70
# bgcolor for the current (highlighted) line
editor.gutter.highlight.color = #B11928
diff --git a/build/shared/lib/theme/Minerals/kyanite.txt b/build/shared/lib/theme/Minerals/kyanite.txt
index 43c778272..18b7e11f0 100644
--- a/build/shared/lib/theme/Minerals/kyanite.txt
+++ b/build/shared/lib/theme/Minerals/kyanite.txt
@@ -161,13 +161,13 @@ editor.scrollbar.color = #5E93BF
## PdeTextAreaPainter - extras added to the editor ##
-editor.gutter.text.font = processing.mono,plain,12
-editor.gutter.text.color = #00072B
+editor.gutter.text.font = processing.mono,bold,12
+editor.gutter.text.color = #000833
# transparency (0..100) for line numbers in gutter
-editor.gutter.text.active.alpha = 70
+editor.gutter.text.active.alpha = 80
# transparency for lines not currently in use
-editor.gutter.text.inactive.alpha = 30
+editor.gutter.text.inactive.alpha = 40
# bgcolor for the current (highlighted) line
editor.gutter.highlight.color = #3E76A0
diff --git a/build/shared/lib/theme/Minerals/malachite.txt b/build/shared/lib/theme/Minerals/malachite.txt
index 41f0e1413..194b86754 100644
--- a/build/shared/lib/theme/Minerals/malachite.txt
+++ b/build/shared/lib/theme/Minerals/malachite.txt
@@ -161,13 +161,13 @@ editor.scrollbar.color = #313E38
## PdeTextAreaPainter - extras added to the editor ##
-editor.gutter.text.font = processing.mono,plain,12
+editor.gutter.text.font = processing.mono,bold,12
editor.gutter.text.color = #F2FFFA
# transparency (0..100) for line numbers in gutter
-editor.gutter.text.active.alpha = 70
+editor.gutter.text.active.alpha = 80
# transparency for lines not currently in use
-editor.gutter.text.inactive.alpha = 30
+editor.gutter.text.inactive.alpha = 40
# bgcolor for the current (highlighted) line
editor.gutter.highlight.color = #515F58
diff --git a/build/shared/lib/theme/Minerals/olivine.txt b/build/shared/lib/theme/Minerals/olivine.txt
index afd08c8e2..d20eda860 100644
--- a/build/shared/lib/theme/Minerals/olivine.txt
+++ b/build/shared/lib/theme/Minerals/olivine.txt
@@ -161,13 +161,13 @@ editor.scrollbar.color = #869F36
## PdeTextAreaPainter - extras added to the editor ##
-editor.gutter.text.font = processing.mono,plain,12
+editor.gutter.text.font = processing.mono,bold,12
editor.gutter.text.color = #000D00
# transparency (0..100) for line numbers in gutter
-editor.gutter.text.active.alpha = 70
+editor.gutter.text.active.alpha = 80
# transparency for lines not currently in use
-editor.gutter.text.inactive.alpha = 30
+editor.gutter.text.inactive.alpha = 40
# bgcolor for the current (highlighted) line
editor.gutter.highlight.color = #678015
diff --git a/build/shared/lib/theme/Minerals/orpiment.txt b/build/shared/lib/theme/Minerals/orpiment.txt
index d93f8d428..5ac0abb74 100644
--- a/build/shared/lib/theme/Minerals/orpiment.txt
+++ b/build/shared/lib/theme/Minerals/orpiment.txt
@@ -161,13 +161,13 @@ editor.scrollbar.color = #EFBA4E
## PdeTextAreaPainter - extras added to the editor ##
-editor.gutter.text.font = processing.mono,plain,12
+editor.gutter.text.font = processing.mono,bold,12
editor.gutter.text.color = #2D0000
# transparency (0..100) for line numbers in gutter
-editor.gutter.text.active.alpha = 70
+editor.gutter.text.active.alpha = 80
# transparency for lines not currently in use
-editor.gutter.text.inactive.alpha = 30
+editor.gutter.text.inactive.alpha = 40
# bgcolor for the current (highlighted) line
editor.gutter.highlight.color = #C29225
diff --git a/build/shared/lib/theme/Minerals/pyrite.txt b/build/shared/lib/theme/Minerals/pyrite.txt
index efc9d3fc8..1f00c8e0b 100644
--- a/build/shared/lib/theme/Minerals/pyrite.txt
+++ b/build/shared/lib/theme/Minerals/pyrite.txt
@@ -161,13 +161,13 @@ editor.scrollbar.color = #06545D
## PdeTextAreaPainter - extras added to the editor ##
-editor.gutter.text.font = processing.mono,plain,12
+editor.gutter.text.font = processing.mono,bold,12
editor.gutter.text.color = #C9FFFF
# transparency (0..100) for line numbers in gutter
-editor.gutter.text.active.alpha = 70
+editor.gutter.text.active.alpha = 80
# transparency for lines not currently in use
-editor.gutter.text.inactive.alpha = 30
+editor.gutter.text.inactive.alpha = 40
# bgcolor for the current (highlighted) line
editor.gutter.highlight.color = #32747C
diff --git a/build/shared/lib/theme/Minerals/serandite.txt b/build/shared/lib/theme/Minerals/serandite.txt
index 9abccd32c..b7339d032 100644
--- a/build/shared/lib/theme/Minerals/serandite.txt
+++ b/build/shared/lib/theme/Minerals/serandite.txt
@@ -161,13 +161,13 @@ editor.scrollbar.color = #DE5C25
## PdeTextAreaPainter - extras added to the editor ##
-editor.gutter.text.font = processing.mono,plain,12
+editor.gutter.text.font = processing.mono,bold,12
editor.gutter.text.color = #440000
# transparency (0..100) for line numbers in gutter
-editor.gutter.text.active.alpha = 70
+editor.gutter.text.active.alpha = 80
# transparency for lines not currently in use
-editor.gutter.text.inactive.alpha = 30
+editor.gutter.text.inactive.alpha = 50
# bgcolor for the current (highlighted) line
editor.gutter.highlight.color = #BC4007
diff --git a/build/windows/processing.ico b/build/windows/processing.ico
index 2db3db4aa..53896b103 100644
Binary files a/build/windows/processing.ico and b/build/windows/processing.ico differ
diff --git a/build/windows/windows.png b/build/windows/windows.png
new file mode 100644
index 000000000..1491d1430
Binary files /dev/null and b/build/windows/windows.png differ
diff --git a/build/windows/windows.svg b/build/windows/windows.svg
new file mode 100644
index 000000000..796997b91
--- /dev/null
+++ b/build/windows/windows.svg
@@ -0,0 +1,40 @@
+
diff --git a/core/README.md b/core/README.md
index bf300f897..2f4617cea 100644
--- a/core/README.md
+++ b/core/README.md
@@ -63,7 +63,7 @@ dependencies {
```
## Developing for Core
-The easiest way to develop for core, without the need to build the whole project, is to use the `examples/src` sketches. In
+The easiest way to develop for core, without the need to build the whole project, is to use the `examples/src` sketches.
## PGraphics Modes
Documentation on how to develop graphics modes as a library should go here.
diff --git a/core/build.gradle.kts b/core/build.gradle.kts
index d4a1dcacb..8f7211b13 100644
--- a/core/build.gradle.kts
+++ b/core/build.gradle.kts
@@ -6,8 +6,6 @@ plugins {
alias(libs.plugins.mavenPublish)
}
-group = "org.processing"
-
repositories {
mavenCentral()
maven { url = uri("https://jogamp.org/deployment/maven") }
@@ -23,6 +21,11 @@ sourceSets{
exclude("**/*.java")
}
}
+ test{
+ java{
+ srcDirs("test")
+ }
+ }
}
dependencies {
@@ -70,4 +73,7 @@ tasks.test {
}
tasks.withType {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
-}
\ No newline at end of file
+}
+tasks.compileJava{
+ options.encoding = "UTF-8"
+}
diff --git a/core/examples/src/main/java/Basic.java b/core/examples/src/main/java/Basic.java
index 379bb4b30..7c5a72cba 100644
--- a/core/examples/src/main/java/Basic.java
+++ b/core/examples/src/main/java/Basic.java
@@ -1,12 +1,25 @@
import processing.core.PApplet;
+import java.io.IOException;
+
public class Basic extends PApplet {
public void settings(){
size(500, 500);
+
+ try {
+ Runtime.getRuntime().exec("echo Hello World");
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
}
public void draw(){
- ellipse(width / 2f, height / 2f, 125f, 125f);
+ background(255);
+ fill(0);
+ ellipse(mouseX, mouseY, 125f, 125f);
+ println(frameRate);
+
+
}
diff --git a/core/src/processing/core/PApplet.java b/core/src/processing/core/PApplet.java
index 24c0d5d39..d1297ec6f 100644
--- a/core/src/processing/core/PApplet.java
+++ b/core/src/processing/core/PApplet.java
@@ -913,7 +913,7 @@ public class PApplet implements PConstants {
* Processing Development Environment (PDE). For example, when
* using the Eclipse code editor, it's necessary to use
* settings() to define the size() and
- * smooth() values for a sketch..
+ * smooth() values for a sketch.
*
* The settings() method runs before the sketch has been
* set up, so other Processing functions cannot be used at that
@@ -2635,8 +2635,11 @@ public class PApplet implements PConstants {
keyPressed = true;
keyPressed(keyEvent);
}
- case KeyEvent.RELEASE -> {
- pressedKeys.remove(((long) keyCode << Character.SIZE) | key);
+ case KeyEvent.RELEASE -> {
+ pressedKeys.removeIf(hash -> {
+ int pressedKeyCode = (int)(hash >> Character.SIZE);
+ return pressedKeyCode == keyCode;
+ });
keyPressed = !pressedKeys.isEmpty();
keyReleased(keyEvent);
}
@@ -2842,6 +2845,7 @@ public class PApplet implements PConstants {
public void focusLost() {
// TODO: if user overrides this without calling super it's not gonna work
pressedKeys.clear();
+ keyPressed = false;
}
@@ -10101,6 +10105,8 @@ public class PApplet implements PConstants {
sketch.present = present;
sketch.fullScreen = fullScreen;
+ sketch.pixelDensity = sketch.displayDensity();
+
// For 3.0.1, moved this above handleSettings() so that loadImage() can be
// used inside settings(). Sets a terrible precedent, but the alternative
// of not being able to size a sketch to an image is driving people loopy.
diff --git a/core/src/processing/core/PGraphics.java b/core/src/processing/core/PGraphics.java
index 9e3205c69..0b9f0d2ed 100644
--- a/core/src/processing/core/PGraphics.java
+++ b/core/src/processing/core/PGraphics.java
@@ -2496,7 +2496,7 @@ public class PGraphics extends PImage implements PConstants {
*
* Using point() with strokeWeight(1) or smaller may draw nothing to the screen,
* depending on the graphics settings of the computer. Workarounds include
- * setting the pixel using set() or drawing the point using either
+ * setting the pixel using set() or drawing the point using either
* circle() or square().
*
* @webref shape:2d primitives
@@ -3559,8 +3559,8 @@ public class PGraphics extends PImage implements PConstants {
/**
* Calculates the tangent of a point on a curve. There's a good definition
- * of tangent on Wikipedia.
+ * of tangent on Wikipedia.
*
*
Advanced
* Code thanks to Dave Bollinger (Bug #715)
@@ -6252,7 +6252,7 @@ public class PGraphics extends PImage implements PConstants {
*
* The style information controlled by the following functions are included
* in the style:
- * fill(), stroke(), tint(), strokeWeight(), strokeCap(),strokeJoin(),
+ * fill(), stroke(), tint(), strokeWeight(), strokeCap(),strokeJoin(),
* imageMode(), rectMode(), ellipseMode(), shapeMode(), colorMode(),
* textAlign(), textFont(), textMode(), textSize(), textLeading(),
* emissive(), specular(), shininess(), ambient()
@@ -6439,7 +6439,7 @@ public class PGraphics extends PImage implements PConstants {
*
* Using point() with strokeWeight(1) or smaller may draw nothing to the screen,
* depending on the graphics settings of the computer. Workarounds include
- * setting the pixel using set() or drawing the point using either
+ * setting the pixel using set() or drawing the point using either
* circle() or square().
*
* @webref shape:attributes
diff --git a/core/src/processing/core/PImage.java b/core/src/processing/core/PImage.java
index d2ac4e3b9..666061ee9 100644
--- a/core/src/processing/core/PImage.java
+++ b/core/src/processing/core/PImage.java
@@ -1057,6 +1057,9 @@ public class PImage implements PConstants, Cloneable {
* [toxi 050728]
*/
protected void buildBlurKernel(float r) {
+ float maxRadius = Math.min(width, height) / 2.0f;
+ float maxR = maxRadius / 3.5f;
+ r = Math.min(r, maxR);
int radius = (int) (r * 3.5f);
if (radius < 1) radius = 1;
if (radius > 248) radius = 248;
@@ -1083,6 +1086,9 @@ public class PImage implements PConstants, Cloneable {
}
}
+ private int safeDivide(int numerator, int denominator) {
+ return denominator == 0 ? numerator : numerator / denominator;
+ }
protected void blurAlpha(float r) {
int sum, cb;
@@ -1115,7 +1121,7 @@ public class PImage implements PConstants, Cloneable {
read++;
}
ri = yi + x;
- b2[ri] = cb / sum;
+ b2[ri] = safeDivide(cb, sum);
}
yi += pixelWidth;
}
@@ -1146,7 +1152,7 @@ public class PImage implements PConstants, Cloneable {
ri++;
read += pixelWidth;
}
- pixels[x+yi] = (cb/sum);
+ pixels[x+yi] = safeDivide(cb, sum);
}
yi += pixelWidth;
ymi += pixelWidth;
@@ -1191,9 +1197,9 @@ public class PImage implements PConstants, Cloneable {
read++;
}
ri = yi + x;
- r2[ri] = cr / sum;
- g2[ri] = cg / sum;
- b2[ri] = cb / sum;
+ r2[ri] = safeDivide(cr, sum);
+ g2[ri] = safeDivide(cg, sum);
+ b2[ri] = safeDivide(cb, sum);
}
yi += pixelWidth;
}
@@ -1228,7 +1234,7 @@ public class PImage implements PConstants, Cloneable {
ri++;
read += pixelWidth;
}
- pixels[x+yi] = 0xff000000 | (cr/sum)<<16 | (cg/sum)<<8 | (cb/sum);
+ pixels[x+yi] = 0xff000000 | (safeDivide(cr, sum))<<16 | (safeDivide(cg, sum))<<8 | (safeDivide(cb, sum));
}
yi += pixelWidth;
ymi += pixelWidth;
@@ -1276,10 +1282,10 @@ public class PImage implements PConstants, Cloneable {
read++;
}
ri = yi + x;
- a2[ri] = ca / sum;
- r2[ri] = cr / sum;
- g2[ri] = cg / sum;
- b2[ri] = cb / sum;
+ a2[ri] = safeDivide(ca, sum);
+ r2[ri] = safeDivide(cr, sum);
+ g2[ri] = safeDivide(cg, sum);
+ b2[ri] = safeDivide(cb, sum);
}
yi += pixelWidth;
}
@@ -1315,7 +1321,7 @@ public class PImage implements PConstants, Cloneable {
ri++;
read += pixelWidth;
}
- pixels[x+yi] = (ca/sum)<<24 | (cr/sum)<<16 | (cg/sum)<<8 | (cb/sum);
+ pixels[x+yi] = (safeDivide(ca, sum))<<24 | (safeDivide(cr, sum))<<16 | (safeDivide(cg, sum))<<8 | (safeDivide(cb, sum));
}
yi += pixelWidth;
ymi += pixelWidth;
diff --git a/core/test/processing/core/PAppletKeyEventTest.java b/core/test/processing/core/PAppletKeyEventTest.java
new file mode 100644
index 000000000..19770ebc3
--- /dev/null
+++ b/core/test/processing/core/PAppletKeyEventTest.java
@@ -0,0 +1,140 @@
+package processing.core;
+
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import processing.event.KeyEvent;
+
+public class PAppletKeyEventTest {
+
+ private static final int SHIFT_MASK = 1;
+ private static final int CTRL_MASK = 2;
+ private static final int ALT_MASK = 4;
+
+ private PApplet applet;
+
+ @Before
+ public void setup() {
+ applet = new PApplet();
+ }
+
+ @Test
+ public void testSingleKeyPressAndRelease() {
+ KeyEvent pressEvent = new KeyEvent(null, 0L, KeyEvent.PRESS, 0, 'a', 65, false);
+ applet.handleKeyEvent(pressEvent);
+ Assert.assertEquals(1, applet.pressedKeys.size());
+
+ KeyEvent releaseEvent = new KeyEvent(null, 0L, KeyEvent.RELEASE, 0, 'a', 65, false);
+ applet.handleKeyEvent(releaseEvent);
+ Assert.assertEquals(0, applet.pressedKeys.size());
+ Assert.assertFalse(applet.keyPressed);
+ }
+
+ @Test
+ public void testShiftAndLetterSequence() {
+ KeyEvent pressA = new KeyEvent(null, 0L, KeyEvent.PRESS, 0, 'a', 65, false);
+ applet.handleKeyEvent(pressA);
+
+ KeyEvent pressShift = new KeyEvent(null, 0L, KeyEvent.PRESS, SHIFT_MASK, 'A', 16, false);
+ applet.handleKeyEvent(pressShift);
+
+ KeyEvent releaseA = new KeyEvent(null, 0L, KeyEvent.RELEASE, SHIFT_MASK, 'A', 65, false);
+ applet.handleKeyEvent(releaseA);
+
+ KeyEvent releaseShift = new KeyEvent(null, 0L, KeyEvent.RELEASE, 0, 'A', 16, false);
+ applet.handleKeyEvent(releaseShift);
+
+ Assert.assertFalse("keyPressed should be false after all keys released", applet.keyPressed);
+ Assert.assertTrue("pressedKeys should be empty", applet.pressedKeys.isEmpty());
+ }
+
+ @Test
+ public void testControlAndLetterSequence() {
+ KeyEvent pressCtrl = new KeyEvent(null, 0L, KeyEvent.PRESS, CTRL_MASK, '\0', 17, false);
+ applet.handleKeyEvent(pressCtrl);
+
+ KeyEvent pressC = new KeyEvent(null, 0L, KeyEvent.PRESS, CTRL_MASK, (char)3, 67, false);
+ applet.handleKeyEvent(pressC);
+
+ KeyEvent releaseC = new KeyEvent(null, 0L, KeyEvent.RELEASE, CTRL_MASK, 'c', 67, false);
+ applet.handleKeyEvent(releaseC);
+
+ KeyEvent releaseCtrl = new KeyEvent(null, 0L, KeyEvent.RELEASE, 0, '\0', 17, false);
+ applet.handleKeyEvent(releaseCtrl);
+
+ Assert.assertFalse("keyPressed should be false after all keys released", applet.keyPressed);
+ Assert.assertTrue("pressedKeys should be empty", applet.pressedKeys.isEmpty());
+ }
+
+ @Test
+ public void testAltAndLetterSequence() {
+ KeyEvent pressV = new KeyEvent(null, 0L, KeyEvent.PRESS, 0, 'v', 86, false);
+ applet.handleKeyEvent(pressV);
+
+ KeyEvent pressAlt = new KeyEvent(null, 0L, KeyEvent.PRESS, ALT_MASK, 'v', 18, false);
+ applet.handleKeyEvent(pressAlt);
+
+ KeyEvent releaseV = new KeyEvent(null, 0L, KeyEvent.RELEASE, ALT_MASK, 'v', 86, false);
+ applet.handleKeyEvent(releaseV);
+
+ KeyEvent releaseAlt = new KeyEvent(null, 0L, KeyEvent.RELEASE, 0, 'v', 18, false);
+ applet.handleKeyEvent(releaseAlt);
+
+ Assert.assertFalse("keyPressed should be false after all keys released", applet.keyPressed);
+ Assert.assertTrue("pressedKeys should be empty", applet.pressedKeys.isEmpty());
+ }
+
+ @Test
+ public void testKeyRepeat() {
+ applet.keyRepeatEnabled = false;
+
+ KeyEvent pressR = new KeyEvent(null, 0L, KeyEvent.PRESS, 0, 'r', 82, false);
+ applet.handleKeyEvent(pressR);
+
+ KeyEvent repeatR = new KeyEvent(null, 0L, KeyEvent.PRESS, 0, 'r', 82, true);
+ applet.handleKeyEvent(repeatR);
+
+ Assert.assertTrue("keyPressed should be true after key press", applet.keyPressed);
+ Assert.assertEquals("pressedKeys should have 1 entry", 1, applet.pressedKeys.size());
+
+ KeyEvent releaseR = new KeyEvent(null, 0L, KeyEvent.RELEASE, 0, 'r', 82, false);
+ applet.handleKeyEvent(releaseR);
+
+ Assert.assertFalse("keyPressed should be false after key release", applet.keyPressed);
+ Assert.assertEquals("pressedKeys should be empty", true, applet.pressedKeys.isEmpty());
+ }
+
+ @Test
+ public void testKeyRepeatEnabled() {
+ applet.keyRepeatEnabled = true;
+
+ KeyEvent pressT = new KeyEvent(null, 0L, KeyEvent.PRESS, 0, 't', 84, false);
+ applet.handleKeyEvent(pressT);
+
+ KeyEvent repeatT = new KeyEvent(null, 0L, KeyEvent.PRESS, 0, 't', 84, true);
+ applet.handleKeyEvent(repeatT);
+
+ Assert.assertTrue("keyPressed should be true with key repeat enabled", applet.keyPressed);
+ Assert.assertEquals("pressedKeys should have 1 entry", 1, applet.pressedKeys.size());
+
+ KeyEvent releaseT = new KeyEvent(null, 0L, KeyEvent.RELEASE, 0, 't', 84, false);
+ applet.handleKeyEvent(releaseT);
+
+ Assert.assertFalse("keyPressed should be false after key release", applet.keyPressed);
+ Assert.assertEquals("pressedKeys should be empty", true, applet.pressedKeys.isEmpty());
+ }
+
+ @Test
+ public void testKeyFocusLost() {
+ KeyEvent pressF = new KeyEvent(null, 0L, KeyEvent.PRESS, 0, 'f', 70, false);
+ applet.handleKeyEvent(pressF);
+
+ Assert.assertTrue("keyPressed should be true after key press", applet.keyPressed);
+ Assert.assertEquals("pressedKeys should have 1 entry", 1, applet.pressedKeys.size());
+
+ applet.focusLost();
+
+ Assert.assertFalse("keyPressed should be false after focus lost", applet.keyPressed);
+ Assert.assertEquals("pressedKeys should be empty after focus lost", true, applet.pressedKeys.isEmpty());
+ }
+}
diff --git a/core/test/processing/core/PMatrix2DTest.java b/core/test/processing/core/PMatrix2DTest.java
new file mode 100644
index 000000000..3f1f82f24
--- /dev/null
+++ b/core/test/processing/core/PMatrix2DTest.java
@@ -0,0 +1,186 @@
+package processing.core;
+
+import static org.junit.Assert.*;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class PMatrix2DTest {
+
+ private PMatrix2D m;
+
+ @Before
+ public void setUp() {
+ m = new PMatrix2D();
+ }
+
+ @Test
+ public void testIdentity() {
+ assertTrue("New matrix should be identity", m.isIdentity());
+ float[] arr = m.get(null);
+ assertEquals(1, arr[0], 0.0001f); // m00
+ assertEquals(0, arr[1], 0.0001f); // m01
+ assertEquals(0, arr[2], 0.0001f); // m02
+ assertEquals(0, arr[3], 0.0001f); // m10
+ assertEquals(1, arr[4], 0.0001f); // m11
+ assertEquals(0, arr[5], 0.0001f); // m12
+ }
+
+ @Test
+ public void testTranslate() {
+ m.translate(10, 20);
+ assertEquals(10, m.m02, 0.0001f);
+ assertEquals(20, m.m12, 0.0001f);
+ }
+
+ @Test
+ public void testRotate() {
+ m.rotate(PConstants.HALF_PI);
+ assertEquals(0, m.m00, 0.0001f);
+ assertEquals(-1, m.m01, 0.0001f);
+ assertEquals(1, m.m10, 0.0001f);
+ assertEquals(0, m.m11, 0.0001f);
+ }
+
+
+ @Test
+ public void testScale() {
+ m.scale(2, 3);
+ assertEquals(2, m.m00, 0.0001f);
+ assertEquals(3, m.m11, 0.0001f);
+ assertEquals(0, m.m02, 0.0001f);
+ assertEquals(0, m.m12, 0.0001f);
+ }
+
+ @Test
+ public void testShear() {
+ float shearAngle = 0.2f;
+ m.shearX(shearAngle);
+ assertEquals(0, m.m01, 0.0001f);
+ assertEquals((float)Math.tan(shearAngle), m.m10, 0.0001f);
+ assertEquals(1, m.m02, 0.0001f);
+
+ m.reset();
+
+ m.shearY(shearAngle);
+ assertEquals(0, m.m01, 0.0001f);
+ assertEquals(0, m.m10, 0.0001f);
+ assertEquals((float)Math.tan(shearAngle), m.m11, 0.0001f);
+ assertEquals(1, m.m02, 0.0001f);
+ }
+
+ @Test
+ public void testApply() {
+ PMatrix2D m2 = new PMatrix2D(1, 2, 3, 4, 5, 6);
+ m.apply(m2);
+ assertEquals(m2.m00, m.m00, 0.0001f);
+ assertEquals(m2.m01, m.m01, 0.0001f);
+ assertEquals(m2.m02, m.m02, 0.0001f);
+ assertEquals(m2.m10, m.m10, 0.0001f);
+ assertEquals(m2.m11, m.m11, 0.0001f);
+ assertEquals(m2.m12, m.m12, 0.0001f);
+ }
+
+ @Test
+ public void testPreApply() {
+ PMatrix2D m1 = new PMatrix2D(1, 2, 3, 4, 5, 6);
+ m.reset(); // identity matrix
+ m.preApply(m1);
+ assertEquals(m1.m00, m.m00, 0.0001f);
+ assertEquals(m1.m01, m.m01, 0.0001f);
+ assertEquals(m1.m02, m.m02, 0.0001f);
+ assertEquals(m1.m10, m.m10, 0.0001f);
+ assertEquals(m1.m11, m.m11, 0.0001f);
+ assertEquals(m1.m12, m.m12, 0.0001f);
+ }
+
+ @Test
+ public void testMultPVector() {
+ PVector src = new PVector(1, 2, 0);
+ PVector result = m.mult(src, null);
+ assertEquals(src.x, result.x, 0.0001f);
+ assertEquals(src.y, result.y, 0.0001f);
+ }
+
+ @Test
+ public void testMultArray() {
+ float[] vec = { 1, 2 };
+ float[] out = m.mult(vec, null);
+ assertEquals(1, out[0], 0.0001f);
+ assertEquals(2, out[1], 0.0001f);
+ }
+
+ @Test
+ public void testMultXandY() {
+ float x = 10, y = 20;
+ float xOut = m.multX(x, y);
+ float yOut = m.multY(x, y);
+ assertEquals(x, xOut, 0.0001f);
+ assertEquals(y, yOut, 0.0001f);
+ }
+
+ @Test
+ public void testInvertAndDeterminant() {
+ m.set(2, 0, 5, 1, 3, 7);
+ float det = m.determinant();
+ assertEquals(6, det, 0.0001f);
+
+ boolean invertible = m.invert();
+ assertTrue("Matrix should be invertible", invertible);
+
+ PMatrix2D identity = new PMatrix2D(2, 0, 5, 1, 3, 7);
+ identity.apply(m);
+
+ assertEquals(1, identity.m00, 0.001f);
+ assertEquals(0, identity.m01, 0.001f);
+ assertEquals(0, identity.m10, 0.001f);
+ assertEquals(1, identity.m11, 0.001f);
+ }
+
+ @Test
+ public void testIdentityWarped() {
+ assertTrue(m.isIdentity());
+ assertFalse(m.isWarped());
+
+ m.translate(10, 20);
+ assertFalse(m.isIdentity());
+ }
+
+ @Test(expected = IllegalArgumentException.class)
+ public void testTranslate3DThrows() {
+ m.translate(1, 2, 3);
+ }
+
+ @Test(expected = IllegalArgumentException.class)
+ public void testRotateXThrows() {
+ m.rotateX(1);
+ }
+
+ @Test(expected = IllegalArgumentException.class)
+ public void testRotateYThrows() {
+ m.rotateY(1);
+ }
+
+ @Test(expected = IllegalArgumentException.class)
+ public void testScale3DThrows() {
+ m.scale(1, 2, 3);
+ }
+
+ @Test(expected = IllegalArgumentException.class)
+ public void testApplyPMatrix3DThrows() {
+ PMatrix3D m3d = new PMatrix3D(1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1);
+ m.apply(m3d);
+ }
+
+ @Test
+ public void testGetArray() {
+ m.set(new float[]{1, 2, 0, 0, 1, 0});
+ float[] arr = m.get(null);
+ assertEquals(1, arr[0], 0.0001f);
+ assertEquals(2, arr[1], 0.0001f);
+ assertEquals(0, arr[2], 0.0001f);
+ }
+}
diff --git a/core/test/processing/core/PVectorTest.java b/core/test/processing/core/PVectorTest.java
new file mode 100644
index 000000000..9d97dc470
--- /dev/null
+++ b/core/test/processing/core/PVectorTest.java
@@ -0,0 +1,294 @@
+package processing.core;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class PVectorTest {
+
+ @Test
+ public void testConstructors() {
+ PVector v0 = new PVector();
+ Assert.assertEquals(0, v0.x, 0.0001f);
+ Assert.assertEquals(0, v0.y, 0.0001f);
+ Assert.assertEquals(0, v0.z, 0.0001f);
+
+ PVector v2 = new PVector(3, 4);
+ Assert.assertEquals(3, v2.x, 0.0001f);
+ Assert.assertEquals(4, v2.y, 0.0001f);
+ Assert.assertEquals(0, v2.z, 0.0001f);
+
+ PVector v3 = new PVector(1, 2, 3);
+ Assert.assertEquals(1, v3.x, 0.0001f);
+ Assert.assertEquals(2, v3.y, 0.0001f);
+ Assert.assertEquals(3, v3.z, 0.0001f);
+ }
+
+ @Test
+ public void testSetAndCopy() {
+ PVector v = new PVector(1, 2, 3);
+ PVector copy = v.copy();
+ Assert.assertEquals(v.x, copy.x, 0.0001f);
+ Assert.assertEquals(v.y, copy.y, 0.0001f);
+ Assert.assertEquals(v.z, copy.z, 0.0001f);
+
+ v.set(4, 5, 6);
+ Assert.assertEquals(4, v.x, 0.0001f);
+ Assert.assertEquals(5, v.y, 0.0001f);
+ Assert.assertEquals(6, v.z, 0.0001f);
+ }
+
+ @Test
+ public void testAdd() {
+ PVector v1 = new PVector(1, 1, 1);
+ PVector v2 = new PVector(2, 3, 4);
+ v1.add(v2);
+ Assert.assertEquals(3, v1.x, 0.0001f);
+ Assert.assertEquals(4, v1.y, 0.0001f);
+ Assert.assertEquals(5, v1.z, 0.0001f);
+
+ PVector v3 = new PVector(1, 2, 3);
+ PVector result = PVector.add(v3, new PVector(4, 5, 6));
+ Assert.assertEquals(5, result.x, 0.0001f);
+ Assert.assertEquals(7, result.y, 0.0001f);
+ Assert.assertEquals(9, result.z, 0.0001f);
+ }
+
+ @Test
+ public void testSub() {
+ PVector v1 = new PVector(5, 7, 9);
+ PVector v2 = new PVector(1, 2, 3);
+ v1.sub(v2);
+ Assert.assertEquals(4, v1.x, 0.0001f);
+ Assert.assertEquals(5, v1.y, 0.0001f);
+ Assert.assertEquals(6, v1.z, 0.0001f);
+
+ PVector v3 = new PVector(10, 10, 10);
+ PVector result = PVector.sub(v3, new PVector(3, 3, 3));
+ Assert.assertEquals(7, result.x, 0.0001f);
+ Assert.assertEquals(7, result.y, 0.0001f);
+ Assert.assertEquals(7, result.z, 0.0001f);
+ }
+
+ @Test
+ public void testMult() {
+ PVector v = new PVector(1, 2, 3);
+ v.mult(2);
+ Assert.assertEquals(2, v.x, 0.0001f);
+ Assert.assertEquals(4, v.y, 0.0001f);
+ Assert.assertEquals(6, v.z, 0.0001f);
+
+ PVector result = PVector.mult(new PVector(1, 1, 1), 5);
+ Assert.assertEquals(5, result.x, 0.0001f);
+ Assert.assertEquals(5, result.y, 0.0001f);
+ Assert.assertEquals(5, result.z, 0.0001f);
+ }
+
+ @Test
+ public void testDiv() {
+ PVector v1 = new PVector(10, 20, 30);
+ v1.div(2);
+ Assert.assertEquals(5, v1.x, 0.0001f);
+ Assert.assertEquals(10, v1.y, 0.0001f);
+ Assert.assertEquals(15, v1.z, 0.0001f);
+
+ PVector result = PVector.div(new PVector(10, 20, 30), 2);
+ Assert.assertEquals(5, result.x, 0.0001f);
+ Assert.assertEquals(10, result.y, 0.0001f);
+ Assert.assertEquals(15, result.z, 0.0001f);
+
+ // Division by zero
+ PVector v2 = new PVector(1, 2, 3);
+ v2.div(0);
+ Assert.assertTrue(Float.isInfinite(v2.x));
+ Assert.assertTrue(Float.isInfinite(v2.y));
+ Assert.assertTrue(Float.isInfinite(v2.z));
+ }
+
+ @Test
+ public void testMagnitude() {
+ PVector v = new PVector(3, 4, 0);
+ Assert.assertEquals(5, v.mag(), 0.0001f);
+ Assert.assertEquals(25, v.magSq(), 0.0001f);
+ }
+
+ @Test
+ public void testDot() {
+ PVector v1 = new PVector(1, 2, 3);
+ PVector v2 = new PVector(4, -5, 6);
+ float dot = v1.dot(v2);
+ Assert.assertEquals(12, dot, 0.0001f);
+
+ float dotStatic = PVector.dot(v1, v2);
+ Assert.assertEquals(12, dotStatic, 0.0001f);
+ }
+
+ @Test
+ public void testCross() {
+ PVector v1 = new PVector(1, 0, 0);
+ PVector v2 = new PVector(0, 1, 0);
+ PVector cross = v1.cross(v2);
+ Assert.assertEquals(0, cross.x, 0.0001f);
+ Assert.assertEquals(0, cross.y, 0.0001f);
+ Assert.assertEquals(1, cross.z, 0.0001f);
+ }
+
+ @Test
+ public void testNormalize() {
+ PVector v1 = new PVector(3, 4, 0);
+ v1.normalize();
+ Assert.assertEquals(1, v1.mag(), 0.0001f);
+
+ //with target
+ PVector v2 = new PVector(3, 4, 0);
+ PVector target = new PVector();
+ PVector result = v2.normalize(target);
+ Assert.assertSame(target, result);
+ Assert.assertEquals(0.6f, result.x, 0.0001f);
+ Assert.assertEquals(0.8f, result.y, 0.0001f);
+ Assert.assertEquals(0, result.z, 0.0001f);
+
+ // Normalize zero vector
+ PVector zero = new PVector(0, 0, 0);
+ zero.normalize();
+ Assert.assertEquals(0, zero.x, 0.0001f);
+ Assert.assertEquals(0, zero.y, 0.0001f);
+ Assert.assertEquals(0, zero.z, 0.0001f);
+
+ }
+
+ @Test
+ public void testLimit() {
+ PVector v = new PVector(10, 0, 0);
+ v.limit(5);
+ Assert.assertEquals(5, v.mag(), 0.0001f);
+ }
+
+ @Test
+ public void testSetMag() {
+ PVector v = new PVector(3, 4, 0);
+ v.setMag(10);
+ Assert.assertEquals(10, v.mag(), 0.0001f);
+ }
+
+ @Test
+ public void testHeading() {
+ PVector v = new PVector(0, 1);
+ float heading = v.heading();
+ Assert.assertEquals(PConstants.HALF_PI, heading, 0.0001f);
+ }
+
+ @Test
+ public void testRotate() {
+ PVector v = new PVector(1, 0);
+ v.rotate(PConstants.HALF_PI);
+ Assert.assertEquals(0, v.x, 0.0001f);
+ Assert.assertEquals(1, v.y, 0.0001f);
+ }
+
+ @Test
+ public void testLerp() {
+ PVector v1 = new PVector(0, 0, 0);
+ PVector v2 = new PVector(10, 10, 10);
+ v1.lerp(v2, 0.5f);
+ Assert.assertEquals(5, v1.x, 0.0001f);
+ Assert.assertEquals(5, v1.y, 0.0001f);
+ Assert.assertEquals(5, v1.z, 0.0001f);
+
+ PVector result = PVector.lerp(new PVector(0, 0, 0), new PVector(10, 10, 10), 0.5f);
+ Assert.assertEquals(5, result.x, 0.0001f);
+ Assert.assertEquals(5, result.y, 0.0001f);
+ Assert.assertEquals(5, result.z, 0.0001f);
+ }
+
+ @Test
+ public void testAngleBetween() {
+ PVector v1 = new PVector(1, 0, 0);
+ PVector v2 = new PVector(0, 1, 0);
+ float a1 = PVector.angleBetween(v1, v2);
+ Assert.assertEquals(PConstants.HALF_PI, a1, 0.0001f);
+
+ // angleBetween with zero vectors
+ float a2 = PVector.angleBetween(new PVector(0, 0, 0), new PVector(1, 0, 0));
+ Assert.assertEquals(0, a2, 0.0001f);
+
+ // angleBetween with parallel vectors
+ float a3 = PVector.angleBetween(new PVector(1, 0, 0), new PVector(2, 0, 0));
+ Assert.assertEquals(0, a3, 0.0001f);
+
+ // angleBetween with opposite vectors
+ float a4 = PVector.angleBetween(new PVector(1, 0, 0), new PVector(-1, 0, 0));
+ Assert.assertEquals(PConstants.PI, a4, 0.0001f);
+ }
+
+ @Test
+ public void testFromAngle() {
+ PVector v = PVector.fromAngle(0);
+ Assert.assertEquals(1, v.x, 0.0001f);
+ Assert.assertEquals(0, v.y, 0.0001f);
+ Assert.assertEquals(0, v.z, 0.0001f);
+
+ v = PVector.fromAngle(PConstants.HALF_PI);
+ Assert.assertEquals(0, v.x, 0.0001f);
+ Assert.assertEquals(1, v.y, 0.0001f);
+ Assert.assertEquals(0, v.z, 0.0001f);
+
+ PVector target = new PVector();
+ PVector result = PVector.fromAngle(PConstants.PI, target);
+ Assert.assertSame(target, result);
+ Assert.assertEquals(-1, result.x, 0.0001f);
+ Assert.assertEquals(0, result.y, 0.0001f);
+ }
+
+
+ @Test
+ public void testArray() {
+ PVector v = new PVector(3, 4, 5);
+ float[] arr = v.array();
+ Assert.assertEquals(3, arr[0], 0.0001f);
+ Assert.assertEquals(4, arr[1], 0.0001f);
+ Assert.assertEquals(5, arr[2], 0.0001f);
+ }
+
+ @Test
+ public void testRandom2D() {
+ PVector v = PVector.random2D();
+ Assert.assertEquals(1, v.mag(), 0.0001f);
+ Assert.assertEquals(0, v.z, 0.0001f);
+
+ PVector target = new PVector();
+ PVector result = PVector.random2D(target);
+ Assert.assertSame(target, result);
+ Assert.assertEquals(1, result.mag(), 0.0001f);
+ }
+
+ @Test
+ public void testRandom3D() {
+ PVector v = PVector.random3D();
+ Assert.assertEquals(1, v.mag(), 0.0001f);
+
+ PVector target = new PVector();
+ PVector result = PVector.random3D(target);
+ Assert.assertSame(target, result);
+ Assert.assertEquals(1, result.mag(), 0.0001f);
+ }
+
+
+ @Test
+ public void testEqualsAndHashCode() {
+ PVector v1 = new PVector(1, 2, 3);
+ PVector v2 = new PVector(1, 2, 3);
+ PVector v3 = new PVector(3, 2, 1);
+
+ Assert.assertTrue(v1.equals(v2));
+ Assert.assertFalse(v1.equals(v3));
+ Assert.assertEquals(v1.hashCode(), v2.hashCode());
+ }
+
+ @Test
+ public void testToString() {
+ PVector v = new PVector(1, 2, 3);
+ String expected = "[ 1.0, 2.0, 3.0 ]";
+ Assert.assertEquals(expected, v.toString());
+ }
+
+}
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 61703c19a..70f93aaff 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -2,17 +2,21 @@
kotlin = "2.0.20"
compose-plugin = "1.7.1"
jogl = "2.5.0"
+jupiter = "5.12.0"
[libraries]
jogl = { module = "org.jogamp.jogl:jogl-all-main", version.ref = "jogl" }
gluegen = { module = "org.jogamp.gluegen:gluegen-rt-main", version.ref = "jogl" }
-flatlaf = { module = "com.formdev:flatlaf", version = "3.4.1" }
+flatlaf = { module = "com.formdev:flatlaf", version = "2.4" }
jna = { module = "net.java.dev.jna:jna", version = "5.12.1" }
jnaplatform = { module = "net.java.dev.jna:jna-platform", version = "5.12.1" }
compottie = { module = "io.github.alexzhirkevich:compottie", version = "2.0.0-rc02" }
kaml = { module = "com.charleskorn.kaml:kaml", version = "0.65.0" }
junit = { module = "junit:junit", version = "4.13.2" }
+junitJupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "jupiter" }
+junitJupiterParams = { module = "org.junit.jupiter:junit-jupiter-params", version.ref = "jupiter" }
mockito = { module = "org.mockito:mockito-core", version = "4.11.0" }
+mockitoKotlin = { module = "org.mockito.kotlin:mockito-kotlin", version = "5.4.0" }
antlr = { module = "org.antlr:antlr4", version = "4.7.2" }
eclipseJDT = { module = "org.eclipse.jdt:org.eclipse.jdt.core", version = "3.16.0" }
eclipseJDTCompiler = { module = "org.eclipse.jdt:org.eclipse.jdt.compiler.apt", version = "1.3.400" }
@@ -21,6 +25,9 @@ netbeansSwing = { module = "org.netbeans.api:org-netbeans-swing-outline", versio
ant = { module = "org.apache.ant:ant", version = "1.10.14" }
lsp4j = { module = "org.eclipse.lsp4j:org.eclipse.lsp4j", version = "0.22.0" }
jsoup = { module = "org.jsoup:jsoup", version = "1.17.2" }
+markdown = { module = "com.mikepenz:multiplatform-markdown-renderer-m2", version = "0.31.0" }
+markdownJVM = { module = "com.mikepenz:multiplatform-markdown-renderer-jvm", version = "0.31.0" }
+clikt = { module = "com.github.ajalt.clikt:clikt", version = "5.0.2" }
[plugins]
jetbrainsCompose = { id = "org.jetbrains.compose", version.ref = "compose-plugin" }
diff --git a/java/lsp/build.gradle.kts b/java/lsp/build.gradle.kts
index 6818093a2..63ac7ab72 100644
--- a/java/lsp/build.gradle.kts
+++ b/java/lsp/build.gradle.kts
@@ -5,8 +5,6 @@ plugins{
id("com.vanniktech.maven.publish") version "0.30.0"
}
-group = "org.processing"
-
repositories{
mavenCentral()
google()
diff --git a/java/preprocessor/build.gradle.kts b/java/preprocessor/build.gradle.kts
index e859a2b12..c6855df06 100644
--- a/java/preprocessor/build.gradle.kts
+++ b/java/preprocessor/build.gradle.kts
@@ -5,8 +5,6 @@ plugins{
alias(libs.plugins.mavenPublish)
}
-group = "org.processing"
-
repositories{
mavenCentral()
google()
diff --git a/java/src/processing/mode/java/CompletionPanel.java b/java/src/processing/mode/java/CompletionPanel.java
index bda85d75e..2ba1eb29e 100644
--- a/java/src/processing/mode/java/CompletionPanel.java
+++ b/java/src/processing/mode/java/CompletionPanel.java
@@ -287,7 +287,7 @@ public class CompletionPanel {
int x = ta.getCaretPosition() - ta.getLineStartOffset(line) - 1, x1 = x - 1;
if (x >= s.length() || x < 0)
return null; //TODO: Does this check cause problems? Verify.
- if (Base.DEBUG) System.out.print(" x char: " + s.charAt(x));
+ Messages.log(" x char: " + s.charAt(x));
String word = String.valueOf(s.charAt(x));
if (s.trim().length() == 1) {
diff --git a/java/src/processing/mode/java/PreprocService.java b/java/src/processing/mode/java/PreprocService.java
index f70536294..4f9150561 100644
--- a/java/src/processing/mode/java/PreprocService.java
+++ b/java/src/processing/mode/java/PreprocService.java
@@ -117,7 +117,7 @@ public class PreprocService {
running = true;
PreprocSketch prevResult = null;
CompletableFuture> runningCallbacks = null;
- Messages.log("PPS: Hi!");
+ Messages.log("Hi!");
while (running) {
try {
try {
@@ -127,7 +127,7 @@ public class PreprocService {
break;
}
- Messages.log("PPS: Starting");
+ Messages.log("Starting");
prevResult = preprocessSketch(prevResult);
@@ -143,7 +143,7 @@ public class PreprocService {
synchronized (requestLock) {
if (requestQueue.isEmpty()) {
runningCallbacks = lastCallback;
- Messages.log("PPS: Done");
+ Messages.log("Done");
preprocessingTask.complete(prevResult);
}
}
@@ -151,7 +151,7 @@ public class PreprocService {
Messages.err("problem in preprocessor service loop", e);
}
}
- Messages.log("PPS: Bye!");
+ Messages.log("Bye!");
}
/**
@@ -188,7 +188,7 @@ public class PreprocService {
* Indicate to this service that the sketch libraries have changed.
*/
public void notifyLibrariesChanged() {
- Messages.log("PPS: notified libraries changed");
+ Messages.log("notified libraries changed");
librariesChanged.set(true);
notifySketchChanged();
}
@@ -197,7 +197,7 @@ public class PreprocService {
* Indicate to this service that the folder housing sketch code has changed.
*/
public void notifyCodeFolderChanged() {
- Messages.log("PPS: notified code folder changed");
+ Messages.log("notified code folder changed");
codeFolderChanged.set(true);
notifySketchChanged();
}
@@ -216,7 +216,7 @@ public class PreprocService {
.thenAcceptBothAsync(lastCallback, (ps, a) -> callback.accept(ps))
// Make sure exception in callback won't cancel whole callback chain
.handleAsync((res, e) -> {
- if (e != null) Messages.err("PPS: exception in callback", e);
+ if (e != null) Messages.err("exception in callback", e);
return res;
});
return lastCallback;
diff --git a/java/src/processing/mode/java/lsp/PdeLanguageServer.java b/java/src/processing/mode/java/lsp/PdeLanguageServer.java
index 3d865fcc7..0673b4823 100644
--- a/java/src/processing/mode/java/lsp/PdeLanguageServer.java
+++ b/java/src/processing/mode/java/lsp/PdeLanguageServer.java
@@ -21,7 +21,7 @@ import org.eclipse.lsp4j.services.LanguageClientAware;
import org.eclipse.lsp4j.services.LanguageClient;
-class PdeLanguageServer implements LanguageServer, LanguageClientAware {
+public class PdeLanguageServer implements LanguageServer, LanguageClientAware {
Map adapters = new HashMap<>();
LanguageClient client = null;
PdeTextDocumentService textDocumentService = new PdeTextDocumentService(this);
diff --git a/java/src/processing/mode/java/runner/Runner.java b/java/src/processing/mode/java/runner/Runner.java
index 0e29e18a1..b4dc51770 100644
--- a/java/src/processing/mode/java/runner/Runner.java
+++ b/java/src/processing/mode/java/runner/Runner.java
@@ -253,19 +253,19 @@ public class Runner implements MessageConsumer {
// while (!available) {
while (true) {
try {
- Messages.log(getClass().getName() + " attempting to attach to VM");
+ Messages.log("attempting to attach to VM");
synchronized (cancelLock) {
vm = connector.attach(arguments);
if (cancelled && vm != null) {
// cancelled and connected to the VM, handle closing now
- Messages.log(getClass().getName() + " aborting, launch cancelled");
+ Messages.log("aborting, launch cancelled");
close();
return false;
}
}
// vm = connector.attach(arguments);
if (vm != null) {
- Messages.log(getClass().getName() + " attached to the VM");
+ Messages.log("attached to the VM");
// generateTrace();
// available = true;
return true;
@@ -273,17 +273,17 @@ public class Runner implements MessageConsumer {
} catch (ConnectException ce) {
// This will fire ConnectException (socket not available) until
// the VM finishes starting up and opens its socket for us.
- Messages.log(getClass().getName() + " socket for VM not ready");
+ Messages.log("socket for VM not ready");
// System.out.println("waiting");
// e.printStackTrace();
try {
Thread.sleep(100);
} catch (InterruptedException ie) {
- Messages.err(getClass().getName() + " interrupted", ie);
+ Messages.err("interrupted", ie);
// ie.printStackTrace(sketchErr);
}
} catch (IOException e) {
- Messages.err(getClass().getName() + " while attaching to VM", e);
+ Messages.err("while attaching to VM", e);
}
}
// } catch (IOException exc) {