diff --git a/spoon-visualisation/README.md b/spoon-visualisation/README.md index 76c6cab2134..b4bea978f25 100644 --- a/spoon-visualisation/README.md +++ b/spoon-visualisation/README.md @@ -9,11 +9,9 @@ It is an alternative to the Swing-based GUI of Spoon ASTs (`$ java -cp spoon...- ## How to run -The app requires a JDK 11. -We currently do not provide any packaging of the app (`jlink` cannot package apps having non-modular libraries, such as Spoon). - -So, to run the app, run: `mvn clean package`. -Then go into the `target/modules` folder and launch: `java --module-path . --add-modules=ALL-MODULE-PATH -jar visualisation-1.1.jar` +1. Install Java **22** or newer. +2. Run: `mvn javafx:run`. Alternativatively, build a fat jar using `mvn + package` and then run `java -jar target/spoon-visualisation-all.jar`. ## Features Summary diff --git a/spoon-visualisation/pom.xml b/spoon-visualisation/pom.xml index 5422204dae3..4673c25972c 100644 --- a/spoon-visualisation/pom.xml +++ b/spoon-visualisation/pom.xml @@ -9,7 +9,7 @@ The MIT license - http://www.opensource.org/licenses/mit-license.php + https://www.opensource.org/licenses/mit-license.php repo @@ -17,7 +17,7 @@ fr.inria.gforge.spoon spoon-pom - 1.0 + 11.1.0 ../spoon-pom @@ -28,72 +28,50 @@ - - maven-jar-plugin - 3.4.2 - - ${project.build.directory}/modules - - - org.apache.maven.plugins maven-dependency-plugin - 3.8.0 - main deps - package - - copy-dependencies - - - linux,win,mac - - ${project.build.directory}/modules - - runtime - - - - - JFX deps - package - - copy-dependencies - - - - ${project.build.directory}/modules - - runtime - + copy-dependencies + none - - org.codehaus.mojo - exec-maven-plugin - 3.4.1 + org.apache.maven.plugins + maven-shade-plugin + 3.6.0 - main module - package + shade-jar - exec + shade - - ${java.home}/bin/jar - - --update - --file=${project.build.directory}/modules/${project.build.finalName}.jar - --main-class=spoon.visualisation.ShowMe - --module-version=${project.version} - - + package + + spoon-${project.name}-all + + + + spoon.visualisation.Launcher + + + + + + *:* + + META-INF/*.SF + META-INF/*.DSA + META-INF/*.RSA + + + + @@ -102,13 +80,24 @@ false false - -Xmx2000m - -Dglass.platform=Monocle + + -Xmx2000m -Dheadless.geometry=1280x1024-32 -Djava.awt.headless=true -Dtestfx.robot=glass -Dtestfx.headless=true - -Dprism.order=sw + -Dprism.order=sw + + + + + + org.openjfx + javafx-maven-plugin + 0.0.8 + + spoon.visualisation/spoon.visualisation.Launcher + CLASSPATH @@ -130,36 +119,6 @@ fr.inria.gforge.spoon spoon-core 11.1.0 - - - * - com.fasterxml.jackson.core - - - * - org.codehaus.plexus - - - * - org.apache.maven.shared - - - * - org.apache.maven - - - * - org.eclipse.platform - - - * - org.tukaani - - - commons-compress - org.apache.commons - - org.openjfx @@ -212,14 +171,4 @@ - - - - spoon-snapshot - Maven Repository for Spoon Snapshots - https://repository.ow2.org/nexus/content/repositories/snapshots/ - true - false - - diff --git a/spoon-visualisation/src/main/java/spoon/visualisation/Launcher.java b/spoon-visualisation/src/main/java/spoon/visualisation/Launcher.java new file mode 100644 index 00000000000..cf3aca24ad4 --- /dev/null +++ b/spoon-visualisation/src/main/java/spoon/visualisation/Launcher.java @@ -0,0 +1,9 @@ +package spoon.visualisation; + +import javafx.application.Application; + +public class Launcher { + public static void main(String[] args) { + Application.launch(ShowMe.class); + } +} diff --git a/spoon-visualisation/src/main/java/spoon/visualisation/command/SpoonTreeCmdBase.java b/spoon-visualisation/src/main/java/spoon/visualisation/command/SpoonTreeCmdBase.java index c022baab360..6a7863b0679 100644 --- a/spoon-visualisation/src/main/java/spoon/visualisation/command/SpoonTreeCmdBase.java +++ b/spoon-visualisation/src/main/java/spoon/visualisation/command/SpoonTreeCmdBase.java @@ -82,7 +82,7 @@ protected void doCmdBody() { env.setAutoImports(true); env.disableConsistencyChecks(); env.setLevel("OFF"); - env.setComplianceLevel(11); + env.setComplianceLevel(22); launcher.buildModel().getRootPackage().accept(new SpoonTreeScanner(createSpoonVisitor(levelsToIgnore), hideImplicit));