diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 0caf318448..e9b314064c 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -3,7 +3,7 @@ on:
pull_request:
env:
- JAVA_VERSION: '22'
+ JAVA_VERSION: '23'
jobs:
verify:
diff --git a/.github/workflows/bundles-kit.yml b/.github/workflows/bundles-kit.yml
index ced47d5d21..a0ba1638ef 100644
--- a/.github/workflows/bundles-kit.yml
+++ b/.github/workflows/bundles-kit.yml
@@ -7,7 +7,7 @@ on:
required: true
type: string
java-version:
- default: '22'
+ default: '23'
required: false
type: string
diff --git a/.github/workflows/bundles-linux.yml b/.github/workflows/bundles-linux.yml
index 09bdc6ac54..837b4aa32d 100644
--- a/.github/workflows/bundles-linux.yml
+++ b/.github/workflows/bundles-linux.yml
@@ -10,11 +10,11 @@ on:
required: true
type: string
java-version:
- default: '22'
+ default: '23'
required: false
type: string
javafx-version:
- default: '22'
+ default: '23'
required: false
type: string
test:
@@ -38,8 +38,11 @@ jobs:
release: ${{ inputs.java-version }}
- name: Setup JavaFX
+ id: javafx
run: |
- wget -P /tmp https://download2.gluonhq.com/openjfx/${{ inputs.javafx-version }}/openjfx-${{ inputs.javafx-version }}_linux-x64_bin-jmods.zip
+ JAVAFX_MAJOR_VERSION=$(echo ${{ inputs.javafx-version }} | cut -d- -f1)
+ echo JAVAFX_MAJOR_VERSION=$JAVAFX_MAJOR_VERSION >> $GITHUB_OUTPUT
+ wget -P /tmp https://download2.gluonhq.com/openjfx/$JAVAFX_MAJOR_VERSION/openjfx-${{ inputs.javafx-version }}_linux-x64_bin-jmods.zip
unzip /tmp/openjfx-${{ inputs.javafx-version }}_linux-x64_bin-jmods.zip -d /tmp
- name: Cache Maven packages
@@ -89,7 +92,7 @@ jobs:
ls ${{ env.INSTALL_DIR }}
env:
MAIN_CLASS: com.oracle.javafx.scenebuilder.app.SceneBuilderApp
- JAVAFX_HOME: /tmp/javafx-jmods-${{ inputs.javafx-version }}/
+ JAVAFX_HOME: /tmp/javafx-jmods-${{ steps.javafx.outputs.JAVAFX_MAJOR_VERSION }}/
JPACKAGE_HOME: ${{ env.JAVA_HOME }}
PROJECT_VERSION: ${{ inputs.project-version }}
APP_VERSION: ${{ inputs.app-version }}
diff --git a/.github/workflows/bundles-mac.yml b/.github/workflows/bundles-mac.yml
index 53631d237e..feade70645 100644
--- a/.github/workflows/bundles-mac.yml
+++ b/.github/workflows/bundles-mac.yml
@@ -10,11 +10,11 @@ on:
required: true
type: string
java-version:
- default: '22'
+ default: '23'
required: false
type: string
javafx-version:
- default: '22'
+ default: '23'
required: false
type: string
test:
@@ -52,8 +52,11 @@ jobs:
p12-password: ${{ secrets.CERTIFICATES_PASSWORD }}
- name: Setup JavaFX
+ id: javafx
run: |
- wget -P /tmp https://download2.gluonhq.com/openjfx/${{ inputs.javafx-version }}/openjfx-${{ inputs.javafx-version }}_osx-x64_bin-jmods.zip
+ JAVAFX_MAJOR_VERSION=$(echo ${{ inputs.javafx-version }} | cut -d- -f1)
+ echo JAVAFX_MAJOR_VERSION=$JAVAFX_MAJOR_VERSION >> $GITHUB_OUTPUT
+ wget -P /tmp https://download2.gluonhq.com/openjfx/$JAVAFX_MAJOR_VERSION/openjfx-${{ inputs.javafx-version }}_osx-x64_bin-jmods.zip
unzip /tmp/openjfx-${{ inputs.javafx-version }}_osx-x64_bin-jmods.zip -d /tmp
- name: Cache Maven packages
@@ -89,10 +92,10 @@ jobs:
--mac-sign
mv ${{ env.INSTALL_DIR }}/SceneBuilder-${{ env.APP_VERSION }}.dmg ${{ env.INSTALL_DIR }}/SceneBuilder-${{ env.PROJECT_VERSION }}-amd64.dmg
ls ${{ env.INSTALL_DIR }}
- echo ::set-output name=path::${{ env.INSTALL_DIR }}/SceneBuilder-${{ env.PROJECT_VERSION }}-amd64.dmg
+ echo path=${{ env.INSTALL_DIR }}/SceneBuilder-${{ env.PROJECT_VERSION }}-amd64.dmg >> $GITHUB_OUTPUT
env:
MAIN_CLASS: com.oracle.javafx.scenebuilder.app.SceneBuilderApp
- JAVAFX_HOME: /tmp/javafx-jmods-${{ inputs.javafx-version }}/
+ JAVAFX_HOME: /tmp/javafx-jmods-${{ steps.javafx.outputs.JAVAFX_MAJOR_VERSION }}/
JPACKAGE_HOME: ${{ env.JAVA_HOME }}
MACSIGN_PREFIX: ${{ secrets.MACSIGN_PREFIX }}
MACSIGN_USER: ${{ secrets.MACSIGN_USER }}
diff --git a/.github/workflows/bundles-mac_aarch64.yml b/.github/workflows/bundles-mac_aarch64.yml
index 1918ac8abe..cf319b69bf 100644
--- a/.github/workflows/bundles-mac_aarch64.yml
+++ b/.github/workflows/bundles-mac_aarch64.yml
@@ -10,11 +10,11 @@ on:
required: true
type: string
java-version:
- default: '22'
+ default: '23'
required: false
type: string
javafx-version:
- default: '22'
+ default: '23'
required: false
type: string
test:
@@ -53,8 +53,11 @@ jobs:
p12-password: ${{ secrets.CERTIFICATES_PASSWORD }}
- name: Setup JavaFX
+ id: javafx
run: |
- wget -P /tmp https://download2.gluonhq.com/openjfx/${{ inputs.javafx-version }}/openjfx-${{ inputs.javafx-version }}_osx-aarch64_bin-jmods.zip
+ JAVAFX_MAJOR_VERSION=$(echo ${{ inputs.javafx-version }} | cut -d- -f1)
+ echo JAVAFX_MAJOR_VERSION=$JAVAFX_MAJOR_VERSION >> $GITHUB_OUTPUT
+ wget -P /tmp https://download2.gluonhq.com/openjfx/$JAVAFX_MAJOR_VERSION/openjfx-${{ inputs.javafx-version }}_osx-aarch64_bin-jmods.zip
unzip /tmp/openjfx-${{ inputs.javafx-version }}_osx-aarch64_bin-jmods.zip -d /tmp
- name: Cache Maven packages
@@ -90,10 +93,10 @@ jobs:
--mac-sign
mv ${{ env.INSTALL_DIR }}/SceneBuilder-${{ env.APP_VERSION }}.dmg ${{ env.INSTALL_DIR }}/SceneBuilder-${{ env.PROJECT_VERSION }}-aarch64.dmg
ls ${{ env.INSTALL_DIR }}
- echo ::set-output name=path::${{ env.INSTALL_DIR }}/SceneBuilder-${{ env.PROJECT_VERSION }}-aarch64.dmg
+ echo path=${{ env.INSTALL_DIR }}/SceneBuilder-${{ env.PROJECT_VERSION }}-aarch64.dmg >> $GITHUB_OUTPUT
env:
MAIN_CLASS: com.oracle.javafx.scenebuilder.app.SceneBuilderApp
- JAVAFX_HOME: /tmp/javafx-jmods-${{ inputs.javafx-version }}/
+ JAVAFX_HOME: /tmp/javafx-jmods-${{ steps.javafx.outputs.JAVAFX_MAJOR_VERSION }}/
JPACKAGE_HOME: ${{ env.JAVA_HOME }}
MACSIGN_PREFIX: ${{ secrets.MACSIGN_PREFIX }}
MACSIGN_USER: ${{ secrets.MACSIGN_USER }}
diff --git a/.github/workflows/bundles-windows.yml b/.github/workflows/bundles-windows.yml
index cc1c72bbef..75b5371196 100644
--- a/.github/workflows/bundles-windows.yml
+++ b/.github/workflows/bundles-windows.yml
@@ -10,11 +10,11 @@ on:
required: true
type: string
java-version:
- default: '22'
+ default: '23'
required: false
type: string
javafx-version:
- default: '22'
+ default: '23'
required: false
type: string
test:
@@ -42,9 +42,12 @@ jobs:
release: ${{ inputs.java-version }}
- name: Setup JavaFX
+ id: javafx
shell: pwsh
run: |
- Invoke-WebRequest -Uri https://download2.gluonhq.com/openjfx/${{ inputs.javafx-version }}/openjfx-${{ inputs.javafx-version }}_windows-x64_bin-jmods.zip -OutFile D:\openjfx-${{ inputs.javafx-version }}_windows-x64_bin-jmods.zip
+ $JAVAFX_MAJOR_VERSION = '${{ inputs.javafx-version }}' -split '-' | Select-Object -Index 0
+ echo "JAVAFX_MAJOR_VERSION=$JAVAFX_MAJOR_VERSION" >> $env:GITHUB_OUTPUT
+ Invoke-WebRequest -Uri https://download2.gluonhq.com/openjfx/$JAVAFX_MAJOR_VERSION/openjfx-${{ inputs.javafx-version }}_windows-x64_bin-jmods.zip -OutFile D:\openjfx-${{ inputs.javafx-version }}_windows-x64_bin-jmods.zip
Expand-Archive -Force D:\openjfx-${{ inputs.javafx-version }}_windows-x64_bin-jmods.zip D:\
- name: Cache Maven packages
@@ -75,7 +78,7 @@ jobs:
call dir ${{ env.INSTALL_DIR }}
env:
MAIN_CLASS: com.oracle.javafx.scenebuilder.app.SceneBuilderApp
- JAVAFX_HOME: D:\javafx-jmods-${{ inputs.javafx-version }}
+ JAVAFX_HOME: D:\javafx-jmods-${{ steps.javafx.outputs.JAVAFX_MAJOR_VERSION }}
JPACKAGE_HOME: ${{ env.JAVA_HOME }}
PROJECT_VERSION: ${{ inputs.project-version }}
APP_VERSION: ${{ inputs.app-version }}
diff --git a/.github/workflows/early-access.yml b/.github/workflows/early-access.yml
index eb413e9bf7..3b0c59b3b4 100644
--- a/.github/workflows/early-access.yml
+++ b/.github/workflows/early-access.yml
@@ -5,8 +5,8 @@ on:
branches: [ master ]
env:
- JAVAFX_VERSION: '22'
- JAVA_VERSION: '22'
+ JAVA_VERSION: '23'
+ JAVAFX_VERSION: '23-ea+27'
jobs:
precheck:
@@ -41,12 +41,12 @@ jobs:
PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
APP_VERSION=$PROJECT_VERSION
APP_VERSION=${APP_VERSION%-*}
- echo ::set-output name=APP_VERSION::$APP_VERSION
- echo ::set-output name=PROJECT_VERSION::$PROJECT_VERSION
+ echo APP_VERSION=$APP_VERSION >> $GITHUB_OUTPUT
+ echo PROJECT_VERSION=$PROJECT_VERSION >> $GITHUB_OUTPUT
linux-bundles:
needs: [precheck]
- uses: gluonhq/scenebuilder/.github/workflows/bundles-linux.yml@master
+ uses: ./.github/workflows/bundles-linux.yml
with:
javafx-version: ${{ needs.precheck.outputs.JAVAFX_VERSION }}
java-version: ${{ needs.precheck.outputs.JAVA_VERSION }}
@@ -56,7 +56,7 @@ jobs:
windows-bundles:
needs: [precheck]
- uses: gluonhq/scenebuilder/.github/workflows/bundles-windows.yml@master
+ uses: ./.github/workflows/bundles-windows.yml
secrets:
WINDOWS_CERTIFICATE: ${{ secrets.WINDOWS_CERTIFICATE }}
WINDOWS_PASSWORD: ${{ secrets.WINDOWS_PASSWORD }}
@@ -70,7 +70,7 @@ jobs:
mac-bundles:
needs: [precheck]
- uses: gluonhq/scenebuilder/.github/workflows/bundles-mac.yml@master
+ uses: ./.github/workflows/bundles-mac.yml
secrets:
CERTIFICATES_FILE_BASE64: ${{ secrets.CERTIFICATES_FILE_BASE64 }}
CERTIFICATES_PASSWORD: ${{ secrets.CERTIFICATES_PASSWORD }}
@@ -87,7 +87,7 @@ jobs:
mac_aarch64-bundles:
needs: [precheck]
- uses: gluonhq/scenebuilder/.github/workflows/bundles-mac_aarch64.yml@master
+ uses: ./.github/workflows/bundles-mac_aarch64.yml
secrets:
CERTIFICATES_FILE_BASE64: ${{ secrets.CERTIFICATES_FILE_BASE64 }}
CERTIFICATES_PASSWORD: ${{ secrets.CERTIFICATES_PASSWORD }}
@@ -104,7 +104,7 @@ jobs:
kit-bundles:
needs: [precheck]
- uses: gluonhq/scenebuilder/.github/workflows/bundles-kit.yml@master
+ uses: ./.github/workflows/bundles-kit.yml
with:
java-version: ${{ needs.precheck.outputs.JAVA_VERSION }}
project-version: ${{ needs.precheck.outputs.PROJECT_VERSION }}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index ca95d84fb2..fad68a505f 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -11,8 +11,8 @@ on:
- GA
env:
- JAVAFX_VERSION: '22'
- JAVA_VERSION: '22'
+ JAVAFX_VERSION: '23'
+ JAVA_VERSION: '23'
jobs:
precheck:
@@ -54,13 +54,13 @@ jobs:
S3_PATH=RC/$PROJECT_VERSION
fi
echo "Releasing.. "$PROJECT_VERSION
- echo ::set-output name=APP_VERSION::$APP_VERSION
- echo ::set-output name=PROJECT_VERSION::$PROJECT_VERSION
- echo ::set-output name=S3_PATH::$S3_PATH
+ echo APP_VERSION=$APP_VERSION >> $GITHUB_OUTPUT
+ echo PROJECT_VERSION=$PROJECT_VERSION >> $GITHUB_OUTPUT
+ echo S3_PATH=$S3_PATH >> $GITHUB_OUTPUT
linux-bundles:
needs: [precheck]
- uses: gluonhq/scenebuilder/.github/workflows/bundles-linux.yml@master
+ uses: ./.github/workflows/bundles-linux.yml
with:
javafx-version: ${{ needs.precheck.outputs.JAVAFX_VERSION }}
java-version: ${{ needs.precheck.outputs.JAVA_VERSION }}
@@ -70,7 +70,7 @@ jobs:
windows-bundles:
needs: [precheck]
- uses: gluonhq/scenebuilder/.github/workflows/bundles-windows.yml@master
+ uses: ./.github/workflows/bundles-windows.yml
secrets:
WINDOWS_CERTIFICATE: ${{ secrets.WINDOWS_CERTIFICATE }}
WINDOWS_PASSWORD: ${{ secrets.WINDOWS_PASSWORD }}
@@ -84,7 +84,7 @@ jobs:
mac-bundles:
needs: [precheck]
- uses: gluonhq/scenebuilder/.github/workflows/bundles-mac.yml@master
+ uses: ./.github/workflows/bundles-mac.yml
secrets:
CERTIFICATES_FILE_BASE64: ${{ secrets.CERTIFICATES_FILE_BASE64 }}
CERTIFICATES_PASSWORD: ${{ secrets.CERTIFICATES_PASSWORD }}
@@ -101,7 +101,7 @@ jobs:
mac_aarch64-bundles:
needs: [precheck]
- uses: gluonhq/scenebuilder/.github/workflows/bundles-mac_aarch64.yml@master
+ uses: ./.github/workflows/bundles-mac_aarch64.yml
secrets:
CERTIFICATES_FILE_BASE64: ${{ secrets.CERTIFICATES_FILE_BASE64 }}
CERTIFICATES_PASSWORD: ${{ secrets.CERTIFICATES_PASSWORD }}
@@ -118,7 +118,7 @@ jobs:
kit-bundles:
needs: [precheck]
- uses: gluonhq/scenebuilder/.github/workflows/bundles-kit.yml@master
+ uses: ./.github/workflows/bundles-kit.yml
with:
java-version: ${{ needs.precheck.outputs.JAVA_VERSION }}
project-version: ${{ needs.precheck.outputs.PROJECT_VERSION }}
diff --git a/app/pom.xml b/app/pom.xml
index daec5e6bd3..22288a8722 100644
--- a/app/pom.xml
+++ b/app/pom.xml
@@ -7,7 +7,7 @@
com.gluonhq.scenebuilder
parent
- 22.0.1-SNAPSHOT
+ 23.0.0-SNAPSHOT
diff --git a/app/src/main/java/com/oracle/javafx/scenebuilder/app/SceneBuilderApp.java b/app/src/main/java/com/oracle/javafx/scenebuilder/app/SceneBuilderApp.java
index f9630b1ce6..351a99732c 100644
--- a/app/src/main/java/com/oracle/javafx/scenebuilder/app/SceneBuilderApp.java
+++ b/app/src/main/java/com/oracle/javafx/scenebuilder/app/SceneBuilderApp.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2023, Gluon and/or its affiliates.
+ * Copyright (c) 2016, 2024, Gluon and/or its affiliates.
* Copyright (c) 2012, 2014, Oracle and/or its affiliates.
* All rights reserved. Use is subject to license terms.
*
@@ -82,9 +82,16 @@
import java.nio.file.Path;
import java.nio.file.Paths;
import java.time.LocalDate;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Optional;
import java.util.concurrent.CountDownLatch;
import java.util.function.Consumer;
+import java.util.function.Supplier;
import java.util.logging.Level;
import java.util.logging.LogManager;
import java.util.logging.Logger;
@@ -94,6 +101,8 @@
*/
public class SceneBuilderApp extends Application implements AppPlatform.AppNotificationHandler {
+ private static final Logger LOGGER = Logger.getLogger(SceneBuilderApp.class.getName());
+
public enum ApplicationControlAction {
ABOUT,
CHECK_UPDATES,
@@ -496,8 +505,25 @@ private void createEmptyDocumentWindow() {
newWindow.updateWithDefaultContent();
}
+ /**
+ * By default all necessary actions to open a single file or a group of files take place in this method.
+ * If it is required to perform certain actions after successfully loading all files, please use {@code handleOpenFilesAction(List files, Runnable onSuccess)} instead.
+ *
+ * All error handling takes place here within, there is no way yet to access exceptional results and to work with them.
+ */
@Override
public void handleOpenFilesAction(List files) {
+ handleOpenFilesAction(files, () -> { /* no operation in this case */ });
+ }
+
+ /**
+ * As file loading errors are handled within this method (all exceptions are handled within), it can be helpful to be able to run a certain action after successful file loading (e.g. closing a certain stage).
+ * For this case this method offers the argument {@code Runnable onSuccess} which will be executed after successful file open activity. The {@code Runnable onSuccess} is only ran once, despite how many files have been loaded.
+ *
+ * @param files List of Strings denoting file paths to be opened
+ * @param onSuccess {@link Runnable} to be executed after all files have been opened successfully
+ */
+ public void handleOpenFilesAction(List files, Runnable onSuccess) {
assert files != null;
assert files.isEmpty() == false;
@@ -507,24 +533,60 @@ public void handleOpenFilesAction(List files) {
}
EditorController.updateNextInitialDirectory(fileObjs.get(0));
-
+
+ Consumer