mirror of
https://github.com/badvision/lawless-legends.git
synced 2025-04-17 22:38:12 +00:00
Upgraded outlaw editor to Java 17, had to remove OSGi plugin support (we never used it)
This commit is contained in:
parent
c2bf0cd744
commit
37a9d805fd
@ -1 +1 @@
|
||||
1.8
|
||||
graalvm64-17.0.6
|
||||
|
@ -1,71 +0,0 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>org.badvision</groupId>
|
||||
<artifactId>OutlawPluginExample</artifactId>
|
||||
<version>0.1</version>
|
||||
<packaging>bundle</packaging>
|
||||
|
||||
<name>Outlaw Plugin Example</name>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-bundle-plugin</artifactId>
|
||||
<version>3.0.1</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<instructions>
|
||||
<Export-Package>org.badvision.outlaw.plugin.example</Export-Package>
|
||||
<Bundle-Activator>org.badvision.outlaw.plugin.example.Activator</Bundle-Activator>
|
||||
<Export-Service>*</Export-Service>
|
||||
</instructions>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-scr-plugin</artifactId>
|
||||
<version>1.22.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>generate-scr-scrdescriptor</id>
|
||||
<goals>
|
||||
<goal>scr</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<properties>
|
||||
<service.vendor>8-Bit Bunch</service.vendor>
|
||||
</properties>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.badvision</groupId>
|
||||
<artifactId>OutlawEditor</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>org.apache.felix.scr.annotations</artifactId>
|
||||
<version>1.10.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>org.apache.felix.main</artifactId>
|
||||
<version>5.4.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
@ -1,47 +0,0 @@
|
||||
package org.badvision.outlaw.plugin.example;
|
||||
|
||||
import org.badvision.outlaweditor.api.ApplicationState;
|
||||
import org.osgi.framework.BundleActivator;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
/**
|
||||
* This is an example activator class, provided to demonstrate basic bundle lifecycle events.
|
||||
* Since we're using declarative servies (Felix SCR), all the messy bits of service registration
|
||||
* and reference passing are managed for us. Otherwise we'd be doing that here. Fortunately,
|
||||
* we don't have to do all that.
|
||||
*
|
||||
* Still, this is a useful mechanism if you have some one-time setup or shutdown concerns that apply
|
||||
* to your whole bundle, such as reading configuration data from a file or whatever.
|
||||
*
|
||||
* @author blurry
|
||||
*/
|
||||
public class Activator implements BundleActivator {
|
||||
@Override
|
||||
public void start(BundleContext bc) throws Exception {
|
||||
System.out.println("Hello, plugin!");
|
||||
checkReferences();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop(BundleContext bc) throws Exception {
|
||||
System.out.println("Goodbye, plugin!");
|
||||
}
|
||||
|
||||
private void checkReferences() {
|
||||
// Note that our activator is not a component, so we can't use the @Reference
|
||||
// annotation to inject app automatically. ApplicationState has a convenience
|
||||
// method to get around this in just such events, but it's a hack.
|
||||
// Ultimately it's not a good idea to rely on this too much as it follows
|
||||
// some bad practices behind the scene that leave unclosed references, etc.
|
||||
// I'll have to come up with a safer way to inject dependencies without
|
||||
// causing housekeeping issues for OSGi.
|
||||
ApplicationState app = ApplicationState.getInstance();
|
||||
if (app == null) {
|
||||
System.out.println("App is null?!?!");
|
||||
} else if (app.getCurrentPlatform() == null) {
|
||||
System.out.println("Current platform is null?");
|
||||
} else {
|
||||
System.out.println("Current platform is " + app.getCurrentPlatform());
|
||||
}
|
||||
}
|
||||
}
|
@ -1,72 +0,0 @@
|
||||
package org.badvision.outlaw.plugin.example;
|
||||
|
||||
import javafx.event.ActionEvent;
|
||||
import javax.xml.bind.JAXB;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
import org.apache.felix.scr.annotations.Reference;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.badvision.outlaweditor.api.ApplicationState;
|
||||
import org.badvision.outlaweditor.api.MenuAction;
|
||||
import org.badvision.outlaweditor.ui.UIAction;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
/**
|
||||
* This registers a simple plugin that does nothing more than print a message to
|
||||
* the console when executed. However, this plugin also demonstrates how to
|
||||
* inject dependencies to more useful features, specifically the
|
||||
* ApplicationState which in turn provides all game data, etc.
|
||||
*
|
||||
* @author blurry
|
||||
*/
|
||||
@Component(immediate = true)
|
||||
@Service(MenuAction.class)
|
||||
public class ExamplePlugin implements MenuAction {
|
||||
|
||||
// Note: Because ApplicationState is already a defined service, this will automatically be bound.
|
||||
// Hence, it is not necessary to worry about passing it it.
|
||||
@Reference
|
||||
ApplicationState app;
|
||||
|
||||
// This is called when our plugin is starting
|
||||
@Activate
|
||||
public void activate() throws Exception {
|
||||
System.out.println("Hello, menu!");
|
||||
checkReferences();
|
||||
}
|
||||
|
||||
// This is called when our plugin is stopping
|
||||
@Deactivate
|
||||
public void stop(BundleContext bc) throws Exception {
|
||||
System.out.println("Goodbye, menu!");
|
||||
}
|
||||
|
||||
// This identifies the menu item label
|
||||
@Override
|
||||
public String getName() {
|
||||
return "Example action";
|
||||
}
|
||||
|
||||
// This method is called when the user selects the menu item
|
||||
@Override
|
||||
public void handle(ActionEvent event) {
|
||||
System.out.println("Clicked!");
|
||||
JAXB.marshal(ApplicationState.getInstance().getGameData(), System.out);
|
||||
checkReferences();
|
||||
UIAction.confirm("Did you mean to click that?",
|
||||
() -> UIAction.alert("Well isn't that special?"),
|
||||
() -> UIAction.alert("You should be more careful next time then."));
|
||||
}
|
||||
|
||||
private void checkReferences() {
|
||||
// app = ApplicationState.getInstance();
|
||||
if (app == null) {
|
||||
System.out.println("App is null?!?!");
|
||||
} else if (app.getCurrentPlatform() == null) {
|
||||
System.out.println("Current platform is null?");
|
||||
} else {
|
||||
System.out.println("Current platform is " + app.getCurrentPlatform());
|
||||
}
|
||||
}
|
||||
}
|
@ -5,11 +5,13 @@
|
||||
<artifactId>OutlawEditor</artifactId>
|
||||
<name>OutlawEditor</name>
|
||||
<packaging>jar</packaging>
|
||||
<version>2.0-SNAPSHOT</version>
|
||||
<version>3.0-SNAPSHOT</version>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<mainClass>org.badvision.outlaweditor.Application</mainClass>
|
||||
<netbeans.hint.license>apache20</netbeans.hint.license>
|
||||
<javafx.version>21-ea+31</javafx.version>
|
||||
<poi.version>5.2.3</poi.version>
|
||||
</properties>
|
||||
|
||||
<organization>
|
||||
@ -20,110 +22,61 @@
|
||||
<finalName>OutlawEditor</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-scr-plugin</artifactId>
|
||||
<version>1.26.4</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>generate-scr-scrdescriptor</id>
|
||||
<goals>
|
||||
<goal>scr</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<properties>
|
||||
<service.vendor>8-Bit Bunch</service.vendor>
|
||||
</properties>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-bundle-plugin</artifactId>
|
||||
<version>5.1.2</version>
|
||||
<extensions>true</extensions>
|
||||
<groupId>com.gluonhq</groupId>
|
||||
<artifactId>gluonfx-maven-plugin</artifactId>
|
||||
<version>1.0.19</version>
|
||||
<configuration>
|
||||
<instructions>
|
||||
<Private-Package>org.badvision.outlaweditor,org.badvision.outlaweditor.ui.impl,org.badvision.outlaweditor.ui.apple</Private-Package>
|
||||
<Export-Package>org.badvision.outlaweditor.api,org.badvision.outlaweditor.data.xml,org.badvision.outlaweditor.data,org.badvision.outlaweditor.ui</Export-Package>
|
||||
</instructions>
|
||||
<mainClass>${mainClass}</mainClass>
|
||||
<options>
|
||||
<option>--add-exports</option>
|
||||
<option>javafx.base/com.sun.javafx.event=org.controlsfx.controls</option>
|
||||
<option>--add-exports</option>
|
||||
<option>javafx.controls/com.sun.javafx.scene.control.behavior=org.controlsfx.controls</option>
|
||||
</options>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>3.1.2</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>unpack-dependencies</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>unpack-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<excludes>META-INF/*.SF,META-INF/*.DSA,META-INF/*.RSA</excludes>
|
||||
<excludeScope>system</excludeScope>
|
||||
<excludeGroupIds>junit,org.mockito,org.hamcrest</excludeGroupIds>
|
||||
<outputDirectory>${project.build.directory}/classes</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<groupId>org.openjfx</groupId>
|
||||
<artifactId>javafx-maven-plugin</artifactId>
|
||||
<version>0.0.8</version>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<mainClass>${mainClass}</mainClass>
|
||||
</manifest>
|
||||
</archive>
|
||||
<mainClass>${mainClass}</mainClass>
|
||||
<options>
|
||||
<option>--add-exports</option>
|
||||
<option>javafx.base/com.sun.javafx.event=org.controlsfx.controls</option>
|
||||
<option>--add-exports</option>
|
||||
<option>javafx.controls/com.sun.javafx.scene.control.behavior=org.controlsfx.controls</option>
|
||||
</options>
|
||||
</configuration>
|
||||
<version>3.2.0</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<source>17</source>
|
||||
<target>17</target>
|
||||
</configuration>
|
||||
<version>3.8.1</version>
|
||||
<version>3.11.0</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.jvnet.jaxb2.maven2</groupId>
|
||||
<artifactId>maven-jaxb2-plugin</artifactId>
|
||||
<version>0.14.0</version>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>jaxb2-maven-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>xjc</id>
|
||||
<goals>
|
||||
<goal>generate</goal>
|
||||
<goal>xjc</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<schemaIncludes>
|
||||
<include>jaxb/OutlawSchema/*.xsd</include>
|
||||
</schemaIncludes>
|
||||
<episodeFile>${project.build.directory}/generated-sources/xjc/META-INF/jaxb-OutlawSchema.episode</episodeFile>
|
||||
<generatePackage>org.badvision.outlaweditor.data.xml</generatePackage>
|
||||
<args>
|
||||
<arg>-Xcopyable</arg>
|
||||
<arg>-Xmergeable</arg>
|
||||
</args>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.jvnet.jaxb2_commons</groupId>
|
||||
<artifactId>jaxb2-basics</artifactId>
|
||||
<version>0.12.0</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</configuration>
|
||||
<id>jaxb-generate-OutlawSchema</id>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<sources>src/main/resources/jaxb</sources>
|
||||
<packageName>org.badvision.outlaweditor.data.xml</packageName>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
@ -133,44 +86,45 @@
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jvnet.jaxb2_commons</groupId>
|
||||
<artifactId>jaxb2-basics</artifactId>
|
||||
<version>0.12.0</version>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
<version>4.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>org.apache.felix.framework</artifactId>
|
||||
<version>5.6.10</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>org.apache.felix.main</artifactId>
|
||||
<version>5.6.10</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>org.apache.felix.scr.annotations</artifactId>
|
||||
<version>1.12.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>org.apache.felix.scr</artifactId>
|
||||
<version>2.1.26</version>
|
||||
</dependency>
|
||||
<groupId>com.sun.xml.bind</groupId>
|
||||
<artifactId>jaxb-impl</artifactId>
|
||||
<version>4.0.3</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi</artifactId>
|
||||
<version>5.0.0</version>
|
||||
<version>${poi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml</artifactId>
|
||||
<version>5.0.0</version>
|
||||
<version>${poi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.controlsfx</groupId>
|
||||
<artifactId>controlsfx</artifactId>
|
||||
<version>8.40.18</version>
|
||||
<version>11.1.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openjfx</groupId>
|
||||
<artifactId>javafx-controls</artifactId>
|
||||
<version>${javafx.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openjfx</groupId>
|
||||
<artifactId>javafx-web</artifactId>
|
||||
<version>${javafx.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openjfx</groupId>
|
||||
<artifactId>javafx-fxml</artifactId>
|
||||
<version>${javafx.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
21
OutlawEditor/src/main/java/module-info.java
Normal file
21
OutlawEditor/src/main/java/module-info.java
Normal file
@ -0,0 +1,21 @@
|
||||
module outlaweditor {
|
||||
requires org.controlsfx.controls;
|
||||
requires javafx.controls;
|
||||
requires javafx.graphics;
|
||||
requires jdk.jsobject;
|
||||
requires javafx.web;
|
||||
requires javafx.media;
|
||||
requires javafx.fxml;
|
||||
requires java.logging;
|
||||
requires java.desktop;
|
||||
requires java.scripting;
|
||||
requires java.xml;
|
||||
requires jakarta.xml.bind;
|
||||
requires org.apache.poi.ooxml;
|
||||
|
||||
opens org.badvision.outlaweditor to javafx.graphics, javafx.fxml, javafx.web, org.apache.poi.ooxml;
|
||||
opens org.badvision.outlaweditor.ui to javafx.fxml;
|
||||
opens org.badvision.outlaweditor.ui.impl to javafx.fxml;
|
||||
opens org.badvision.outlaweditor.data to jakarta.xml.bind;
|
||||
opens org.badvision.outlaweditor.data.xml to javafx.base, jakarta.xml.bind, javafx.web;
|
||||
}
|
@ -10,54 +10,59 @@
|
||||
package org.badvision.outlaweditor;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.badvision.outlaweditor.api.ApplicationState;
|
||||
import org.badvision.outlaweditor.api.Platform;
|
||||
import org.badvision.outlaweditor.data.xml.GameData;
|
||||
import org.badvision.outlaweditor.ui.ApplicationUIController;
|
||||
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.layout.AnchorPane;
|
||||
import javafx.stage.Stage;
|
||||
import javafx.stage.WindowEvent;
|
||||
import org.apache.felix.framework.Felix;
|
||||
import org.apache.felix.framework.util.FelixConstants;
|
||||
import org.apache.felix.main.AutoProcessor;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Service;
|
||||
import org.apache.felix.scr.impl.Activator;
|
||||
import org.badvision.outlaweditor.api.ApplicationState;
|
||||
import org.badvision.outlaweditor.api.MenuAction;
|
||||
import org.badvision.outlaweditor.api.Platform;
|
||||
import org.badvision.outlaweditor.data.xml.GameData;
|
||||
import org.badvision.outlaweditor.ui.ApplicationUIController;
|
||||
import org.osgi.framework.BundleActivator;
|
||||
import org.osgi.framework.BundleContext;
|
||||
import org.osgi.framework.BundleException;
|
||||
import org.osgi.framework.launch.Framework;
|
||||
import org.osgi.util.tracker.ServiceTracker;
|
||||
// import org.apache.felix.scr.annotations.Component;
|
||||
// import org.apache.felix.scr.annotations.Service;
|
||||
// import org.apache.felix.scr.impl.Activator;
|
||||
// import org.badvision.outlaweditor.api.ApplicationState;
|
||||
// import org.badvision.outlaweditor.api.MenuAction;
|
||||
// import org.badvision.outlaweditor.api.Platform;
|
||||
// import org.badvision.outlaweditor.data.xml.GameData;
|
||||
// import org.badvision.outlaweditor.ui.ApplicationUIController;
|
||||
// import org.apache.felix.framework.Felix;
|
||||
// import org.apache.felix.framework.util.FelixConstants;
|
||||
// import org.apache.felix.main.AutoProcessor;
|
||||
// import org.osgi.framework.BundleActivator;
|
||||
// import org.osgi.framework.BundleContext;
|
||||
// import org.osgi.framework.BundleException;
|
||||
// import org.osgi.framework.launch.Framework;
|
||||
// import org.osgi.util.tracker.ServiceTracker;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author brobert
|
||||
*/
|
||||
@Component
|
||||
@Service(org.badvision.outlaweditor.api.ApplicationState.class)
|
||||
public class Application extends javafx.application.Application implements ApplicationState, BundleActivator {
|
||||
// @Component
|
||||
// @Service(org.badvision.outlaweditor.api.ApplicationState.class)
|
||||
public class Application extends javafx.application.Application implements ApplicationState/*, BundleActivator*/ {
|
||||
|
||||
public static Framework felix;
|
||||
// public static Framework felix;
|
||||
private GameData gameData = new GameData();
|
||||
private Platform currentPlatform = Platform.AppleII;
|
||||
private ApplicationUIController controller;
|
||||
private Stage primaryStage;
|
||||
|
||||
public static void shutdown() {
|
||||
/*
|
||||
try {
|
||||
felix.stop();
|
||||
felix.waitForStop(0L);
|
||||
} catch (BundleException | InterruptedException ex) {
|
||||
Logger.getLogger(Application.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
*/
|
||||
}
|
||||
public static ApplicationState applicationStateSingleton;
|
||||
|
||||
@Override
|
||||
public GameData getGameData() {
|
||||
@ -96,16 +101,17 @@ public class Application extends javafx.application.Application implements Appli
|
||||
|
||||
@Override
|
||||
public void start(Stage primaryStage) {
|
||||
applicationStateSingleton = this;
|
||||
this.primaryStage = primaryStage;
|
||||
javafx.application.Platform.setImplicitExit(true);
|
||||
|
||||
/*
|
||||
try {
|
||||
startPluginContainer();
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(Application.class.getName()).log(Level.SEVERE, null, ex);
|
||||
throw new RuntimeException(ex);
|
||||
}
|
||||
|
||||
*/
|
||||
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/ApplicationUI.fxml"));
|
||||
fxmlLoader.setResources(null);
|
||||
try {
|
||||
@ -135,6 +141,7 @@ public class Application extends javafx.application.Application implements Appli
|
||||
launch(args);
|
||||
}
|
||||
|
||||
/*
|
||||
ServiceTracker tracker;
|
||||
private void startPluginContainer() throws BundleException, Exception {
|
||||
Map<String, String> config = new HashMap<>();
|
||||
@ -175,4 +182,5 @@ public class Application extends javafx.application.Application implements Appli
|
||||
@Override
|
||||
public void stop(BundleContext bc) throws Exception {
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
@ -13,12 +13,13 @@ package org.badvision.outlaweditor;
|
||||
import java.util.LinkedList;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import javafx.scene.layout.Pane;
|
||||
import javax.xml.bind.JAXBException;
|
||||
|
||||
import org.badvision.outlaweditor.data.DataObserver;
|
||||
import org.badvision.outlaweditor.data.DataProducer;
|
||||
import org.badvision.outlaweditor.data.xml.Script;
|
||||
import org.jvnet.jaxb2_commons.lang.CopyTo2;
|
||||
|
||||
import jakarta.xml.bind.JAXBException;
|
||||
import javafx.scene.layout.Pane;
|
||||
|
||||
/**
|
||||
* Extremely generic editor abstraction -- useful for uniform edit features
|
||||
@ -107,8 +108,8 @@ public abstract class Editor<T, D> implements DataObserver<T> {
|
||||
|
||||
public void undo() {
|
||||
if (!undoStates.isEmpty()) {
|
||||
CopyTo2 undoState = (CopyTo2) undoStates.removeFirst();
|
||||
undoState.copyTo(getEntity());
|
||||
T undoState = undoStates.removeFirst();
|
||||
setEntity(undoState);
|
||||
onEntityUpdated();
|
||||
redraw();
|
||||
}
|
||||
|
@ -17,6 +17,18 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.badvision.outlaweditor.api.ApplicationState;
|
||||
import org.badvision.outlaweditor.data.TileMap;
|
||||
import org.badvision.outlaweditor.data.TileUtils;
|
||||
import org.badvision.outlaweditor.data.xml.Map;
|
||||
import org.badvision.outlaweditor.data.xml.Script;
|
||||
import org.badvision.outlaweditor.data.xml.Scripts;
|
||||
import org.badvision.outlaweditor.data.xml.Tile;
|
||||
import org.badvision.outlaweditor.ui.TileSelectModal;
|
||||
import org.badvision.outlaweditor.ui.ToolType;
|
||||
|
||||
import jakarta.xml.bind.JAXBException;
|
||||
import javafx.application.Platform;
|
||||
import javafx.beans.property.SimpleStringProperty;
|
||||
import javafx.beans.property.StringProperty;
|
||||
@ -42,16 +54,6 @@ import javafx.scene.paint.Color;
|
||||
import javafx.scene.paint.Paint;
|
||||
import javafx.scene.shape.Rectangle;
|
||||
import javafx.stage.Stage;
|
||||
import javax.xml.bind.JAXBException;
|
||||
import org.badvision.outlaweditor.api.ApplicationState;
|
||||
import org.badvision.outlaweditor.data.TileMap;
|
||||
import org.badvision.outlaweditor.data.TileUtils;
|
||||
import org.badvision.outlaweditor.data.xml.Map;
|
||||
import org.badvision.outlaweditor.data.xml.Script;
|
||||
import org.badvision.outlaweditor.data.xml.Scripts;
|
||||
import org.badvision.outlaweditor.data.xml.Tile;
|
||||
import org.badvision.outlaweditor.ui.TileSelectModal;
|
||||
import org.badvision.outlaweditor.ui.ToolType;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -101,7 +103,7 @@ public class MapEditor extends Editor<Map, MapEditor.DrawMode> implements EventH
|
||||
this.drawMode = drawMode;
|
||||
switch (drawMode) {
|
||||
case TileEraser:
|
||||
ImageCursor cursor = new ImageCursor(new Image("images/eraser.png"));
|
||||
ImageCursor cursor = new ImageCursor(new Image(MapEditor.class.getResourceAsStream("/images/eraser.png")));
|
||||
drawCanvas.setCursor(cursor);
|
||||
break;
|
||||
case Select:
|
||||
|
@ -13,9 +13,7 @@ import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.StringWriter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.logging.Level;
|
||||
@ -23,19 +21,12 @@ import java.util.logging.Logger;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.layout.AnchorPane;
|
||||
import javafx.stage.Stage;
|
||||
import javafx.stage.WindowEvent;
|
||||
import javax.xml.bind.JAXBContext;
|
||||
import javax.xml.bind.JAXBElement;
|
||||
import javax.xml.bind.JAXBException;
|
||||
import javax.xml.bind.Unmarshaller;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
|
||||
import org.badvision.outlaweditor.api.ApplicationState;
|
||||
import static org.badvision.outlaweditor.data.DataUtilities.extract;
|
||||
import static org.badvision.outlaweditor.data.DataUtilities.extractFirst;
|
||||
@ -56,6 +47,16 @@ import org.badvision.outlaweditor.ui.MythosScriptEditorController;
|
||||
import org.w3c.dom.Document;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
import jakarta.xml.bind.JAXBContext;
|
||||
import jakarta.xml.bind.JAXBElement;
|
||||
import jakarta.xml.bind.JAXBException;
|
||||
import jakarta.xml.bind.Unmarshaller;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.layout.AnchorPane;
|
||||
import javafx.stage.Stage;
|
||||
import javafx.stage.WindowEvent;
|
||||
|
||||
/**
|
||||
* Mythos Scripting Editor
|
||||
*
|
||||
@ -80,9 +81,6 @@ public class MythosEditor {
|
||||
public void show() {
|
||||
primaryStage = new Stage();
|
||||
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/MythosScriptEditor.fxml"));
|
||||
Map<String, String> properties = new HashMap<>();
|
||||
properties.put(MythosScriptEditorController.ONLOAD_SCRIPT, generateLoadScript());
|
||||
fxmlLoader.setResources(MythosScriptEditorController.createResourceBundle(properties));
|
||||
try {
|
||||
AnchorPane node = (AnchorPane) fxmlLoader.load();
|
||||
controller = fxmlLoader.getController();
|
||||
|
@ -12,7 +12,16 @@ package org.badvision.outlaweditor;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
import javafx.scene.ImageCursor;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
import org.badvision.outlaweditor.ui.ToolType;
|
||||
|
||||
import jakarta.xml.bind.JAXBContext;
|
||||
import jakarta.xml.bind.JAXBElement;
|
||||
import jakarta.xml.bind.JAXBException;
|
||||
import jakarta.xml.bind.Marshaller;
|
||||
import jakarta.xml.bind.util.JAXBSource;
|
||||
import javafx.scene.Node;
|
||||
import javafx.scene.input.ClipboardContent;
|
||||
import javafx.scene.input.DataFormat;
|
||||
@ -20,14 +29,6 @@ import javafx.scene.input.DragEvent;
|
||||
import javafx.scene.input.Dragboard;
|
||||
import javafx.scene.input.MouseEvent;
|
||||
import javafx.scene.input.TransferMode;
|
||||
import javax.xml.bind.JAXBContext;
|
||||
import javax.xml.bind.JAXBElement;
|
||||
import javax.xml.bind.JAXBException;
|
||||
import javax.xml.bind.Marshaller;
|
||||
import javax.xml.bind.util.JAXBSource;
|
||||
import javax.xml.namespace.QName;
|
||||
import org.badvision.outlaweditor.data.xml.Script;
|
||||
import org.badvision.outlaweditor.ui.ToolType;
|
||||
|
||||
/**
|
||||
* Simplify management of drag/drop operations
|
||||
|
@ -15,12 +15,12 @@
|
||||
*/
|
||||
package org.badvision.outlaweditor.api;
|
||||
|
||||
import javafx.stage.Stage;
|
||||
import org.badvision.outlaweditor.Application;
|
||||
import org.badvision.outlaweditor.data.xml.GameData;
|
||||
import org.badvision.outlaweditor.ui.ApplicationUIController;
|
||||
import org.osgi.framework.BundleContext;
|
||||
import org.osgi.framework.FrameworkUtil;
|
||||
|
||||
import javafx.stage.Stage;
|
||||
// import org.osgi.framework.BundleContext;
|
||||
// import org.osgi.framework.FrameworkUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -40,7 +40,7 @@ public interface ApplicationState {
|
||||
public ApplicationUIController getController();
|
||||
|
||||
public Stage getPrimaryStage();
|
||||
|
||||
/*
|
||||
static public BundleContext getBundleContext() {
|
||||
if (Application.felix != null) {
|
||||
return Application.felix.getBundleContext();
|
||||
@ -53,5 +53,9 @@ public interface ApplicationState {
|
||||
BundleContext bc = getBundleContext();
|
||||
return bc.getService(bc.getServiceReference(ApplicationState.class));
|
||||
}
|
||||
*/
|
||||
public static ApplicationState getInstance() {
|
||||
return org.badvision.outlaweditor.Application.applicationStateSingleton;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -27,15 +27,15 @@ import javafx.beans.property.adapter.JavaBeanStringPropertyBuilder;
|
||||
public class PropertyHelper {
|
||||
|
||||
public static JavaBeanIntegerProperty intProp(Object t, String fieldName) throws NoSuchMethodException {
|
||||
return new JavaBeanIntegerPropertyBuilder().bean(t).name(fieldName).build();
|
||||
return JavaBeanIntegerPropertyBuilder.create().bean(t).name(fieldName).build();
|
||||
}
|
||||
|
||||
public static JavaBeanBooleanProperty boolProp(Object t, String fieldName) throws NoSuchMethodException {
|
||||
return new JavaBeanBooleanPropertyBuilder().bean(t).name(fieldName).build();
|
||||
return JavaBeanBooleanPropertyBuilder.create().bean(t).name(fieldName).build();
|
||||
}
|
||||
|
||||
public static JavaBeanStringProperty stringProp(Object t, String fieldName) throws NoSuchMethodException {
|
||||
return new JavaBeanStringPropertyBuilder().bean(t).name(fieldName).build();
|
||||
return JavaBeanStringPropertyBuilder.create().bean(t).name(fieldName).build();
|
||||
}
|
||||
|
||||
private static final Map<Property, Property> boundProperties = new HashMap<>();
|
||||
|
@ -17,11 +17,7 @@ import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import javafx.scene.control.Alert;
|
||||
import javafx.scene.image.WritableImage;
|
||||
import javafx.scene.paint.Color;
|
||||
import javax.xml.bind.JAXBElement;
|
||||
import org.badvision.outlaweditor.Application;
|
||||
|
||||
import org.badvision.outlaweditor.api.ApplicationState;
|
||||
import org.badvision.outlaweditor.api.Platform;
|
||||
import org.badvision.outlaweditor.data.xml.Map;
|
||||
@ -33,6 +29,11 @@ import org.badvision.outlaweditor.data.xml.Scripts;
|
||||
import org.badvision.outlaweditor.data.xml.Tile;
|
||||
import org.badvision.outlaweditor.ui.UIAction;
|
||||
|
||||
import jakarta.xml.bind.JAXBElement;
|
||||
import javafx.scene.control.Alert;
|
||||
import javafx.scene.image.WritableImage;
|
||||
import javafx.scene.paint.Color;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author brobert
|
||||
|
@ -10,17 +10,14 @@
|
||||
package org.badvision.outlaweditor.spelling;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.URL;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.badvision.outlaweditor.data.DataUtilities;
|
||||
|
||||
/**
|
||||
@ -54,22 +51,18 @@ public class SpellChecker {
|
||||
|
||||
private static void loadDictionary() {
|
||||
if (dictionary == null) {
|
||||
URL dictionaryPath = SpellChecker.class.getResource("/mythos/dictionary.txt");
|
||||
try {
|
||||
BufferedReader content = new BufferedReader(new InputStreamReader((InputStream) dictionaryPath.getContent()));
|
||||
dictionary = new HashMap<>();
|
||||
content.lines().forEach((String word)-> {
|
||||
String lower = word.toLowerCase();
|
||||
Set<String> words = dictionary.get(lower.charAt(0));
|
||||
if (words == null) {
|
||||
words = new LinkedHashSet<>();
|
||||
dictionary.put(lower.charAt(0), words);
|
||||
}
|
||||
words.add(word);
|
||||
});
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(SpellChecker.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
InputStream dictionaryStream = SpellChecker.class.getResourceAsStream("/mythos/dictionary.txt");
|
||||
BufferedReader content = new BufferedReader(new InputStreamReader(dictionaryStream));
|
||||
dictionary = new HashMap<>();
|
||||
content.lines().forEach((String word)-> {
|
||||
String lower = word.toLowerCase();
|
||||
Set<String> words = dictionary.get(lower.charAt(0));
|
||||
if (words == null) {
|
||||
words = new LinkedHashSet<>();
|
||||
dictionary.put(lower.charAt(0), words);
|
||||
}
|
||||
words.add(word);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,6 @@
|
||||
|
||||
package org.badvision.outlaweditor.ui;
|
||||
|
||||
import com.sun.glass.ui.Application;
|
||||
import java.beans.BeanInfo;
|
||||
import java.beans.IntrospectionException;
|
||||
import java.beans.Introspector;
|
||||
@ -23,6 +22,9 @@ import java.util.Optional;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import static org.badvision.outlaweditor.data.DataUtilities.uppercaseFirst;
|
||||
|
||||
import javafx.application.Platform;
|
||||
import javafx.beans.property.adapter.JavaBeanStringPropertyBuilder;
|
||||
import javafx.beans.value.ObservableValue;
|
||||
@ -43,7 +45,6 @@ import javafx.scene.layout.GridPane;
|
||||
import javafx.scene.layout.HBox;
|
||||
import javafx.scene.layout.VBox;
|
||||
import javafx.util.Callback;
|
||||
import static org.badvision.outlaweditor.data.DataUtilities.uppercaseFirst;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -98,7 +99,7 @@ public class ModalEditor {
|
||||
TableColumn<T, S> col = new TableColumn<>(uppercaseFirst(colName));
|
||||
col.setCellValueFactory((TableColumn.CellDataFeatures<T, S> param) -> {
|
||||
try {
|
||||
return (ObservableValue<S>) new JavaBeanStringPropertyBuilder().bean(param.getValue()).name(colName).build();
|
||||
return (ObservableValue<S>) JavaBeanStringPropertyBuilder.create().bean(param.getValue()).name(colName).build();
|
||||
} catch (NoSuchMethodException ex) {
|
||||
Logger.getLogger(ModalEditor.class.getName()).log(Level.SEVERE, null, ex);
|
||||
throw new RuntimeException(ex);
|
||||
@ -116,7 +117,7 @@ public class ModalEditor {
|
||||
addButton.setOnAction((event) -> {
|
||||
try {
|
||||
rows.add(rowType.newInstance());
|
||||
Application.invokeLater(() -> {
|
||||
Platform.runLater(() -> {
|
||||
try {
|
||||
Thread.sleep(100);
|
||||
} catch (InterruptedException ex) {
|
||||
@ -210,8 +211,7 @@ public class ModalEditor {
|
||||
descriptor.getWriteMethod().invoke(sourceObject, control.getValue());
|
||||
} else {
|
||||
Object val = descriptor.getReadMethod().invoke(sourceObject);
|
||||
if (val instanceof List) {
|
||||
List sourceList = (List) val;
|
||||
if (val instanceof List sourceList) {
|
||||
sourceList.clear();
|
||||
sourceList.addAll((Collection) control.getValue());
|
||||
}
|
||||
|
@ -10,10 +10,10 @@
|
||||
package org.badvision.outlaweditor.ui;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.ListResourceBundle;
|
||||
import java.util.Map;
|
||||
import java.util.ResourceBundle;
|
||||
import java.util.Set;
|
||||
|
||||
import org.badvision.outlaweditor.MythosEditor;
|
||||
|
||||
import javafx.application.Platform;
|
||||
import javafx.beans.value.ObservableValue;
|
||||
import javafx.concurrent.Worker.State;
|
||||
@ -25,13 +25,11 @@ import javafx.scene.web.PromptData;
|
||||
import javafx.scene.web.WebView;
|
||||
import javafx.stage.Stage;
|
||||
import netscape.javascript.JSObject;
|
||||
import org.badvision.outlaweditor.MythosEditor;
|
||||
|
||||
public class MythosScriptEditorController
|
||||
implements Initializable {
|
||||
|
||||
public static final String MYTHOS_EDITOR = "/mythos/mythos-editor/html/editor.html";
|
||||
public static final String ONLOAD_SCRIPT = "onloadScript";
|
||||
// This is tied to the Mythos object defined in mythos_uncompressed
|
||||
JSObject mythos;
|
||||
|
||||
@ -60,6 +58,26 @@ public class MythosScriptEditorController
|
||||
|
||||
public void setEditor(MythosEditor editor) {
|
||||
this.editor = editor;
|
||||
final String loadScript = editor.generateLoadScript();
|
||||
if (loadScript != null) {
|
||||
editorView.getEngine().getLoadWorker().stateProperty().addListener(
|
||||
(value, old, newState) -> {
|
||||
if (newState == State.SUCCEEDED) {
|
||||
mythos = (JSObject) editorView.getEngine().executeScript("Mythos");
|
||||
mythos.setMember("editor", editor);
|
||||
editorView.getEngine().executeScript(loadScript);
|
||||
editorView.getEngine().executeScript("window.dispatchEvent(new Event('resize'));");
|
||||
}
|
||||
});
|
||||
|
||||
editorView.getEngine().setPromptHandler((PromptData prompt) -> {
|
||||
return UIAction.getText(prompt.getMessage(), prompt.getDefaultValue());
|
||||
});
|
||||
}
|
||||
|
||||
//TODO: Verify the path conversion works in Win7 with a jar file
|
||||
// Affected by https://bugs.openjdk.java.net/browse/JDK-8136466
|
||||
editorView.getEngine().load(getClass().getResource(MYTHOS_EDITOR).toExternalForm());
|
||||
}
|
||||
|
||||
// Handler for MenuItem[fx:id="menuItemAbortChanges"] onAction
|
||||
@ -92,6 +110,11 @@ public class MythosScriptEditorController
|
||||
public void onUndoSelected(ActionEvent event) {
|
||||
// handle the event here
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param fxmlFileLocation
|
||||
* @param resources
|
||||
*/
|
||||
|
||||
@Override // This method is called by the FXMLLoader when initialization is complete
|
||||
public void initialize(URL fxmlFileLocation, ResourceBundle resources) {
|
||||
@ -103,23 +126,6 @@ public class MythosScriptEditorController
|
||||
assert menuItemRedo != null : "fx:id=\"menuItemRedo\" was not injected: check your FXML file 'MythosScriptEditor.fxml'.";
|
||||
assert menuItemUndo != null : "fx:id=\"menuItemUndo\" was not injected: check your FXML file 'MythosScriptEditor.fxml'.";
|
||||
|
||||
final String loadScript = resources.getString(ONLOAD_SCRIPT);
|
||||
if (loadScript != null) {
|
||||
editorView.getEngine().getLoadWorker().stateProperty().addListener(
|
||||
(value, old, newState) -> {
|
||||
if (newState == State.SUCCEEDED) {
|
||||
mythos = (JSObject) editorView.getEngine().executeScript("Mythos");
|
||||
mythos.setMember("editor", editor);
|
||||
editorView.getEngine().executeScript(loadScript);
|
||||
editorView.getEngine().executeScript("window.dispatchEvent(new Event('resize'));");
|
||||
}
|
||||
});
|
||||
|
||||
editorView.getEngine().setPromptHandler((PromptData prompt) -> {
|
||||
return UIAction.getText(prompt.getMessage(), prompt.getDefaultValue());
|
||||
});
|
||||
}
|
||||
|
||||
// JavaFX8 has a bug where stage maximize events do not trigger resize events to webview components
|
||||
Platform.runLater(() -> {
|
||||
Stage stage = (Stage) editorView.getScene().getWindow();
|
||||
@ -129,26 +135,6 @@ public class MythosScriptEditorController
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
//TODO: Verify the path conversion works in Win7 with a jar file
|
||||
// Affected by https://bugs.openjdk.java.net/browse/JDK-8136466
|
||||
editorView.getEngine().load(getClass().getResource(MYTHOS_EDITOR).toExternalForm());
|
||||
}
|
||||
|
||||
public static ResourceBundle createResourceBundle(final Map<String, String> input) {
|
||||
return new ListResourceBundle() {
|
||||
@Override
|
||||
protected Object[][] getContents() {
|
||||
Object[][] output = new Object[input.size()][2];
|
||||
Set<String> keys = input.keySet();
|
||||
int i = 0;
|
||||
for (String key : keys) {
|
||||
output[i] = new Object[]{key, input.get(key)};
|
||||
i++;
|
||||
}
|
||||
return output;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public String getScriptXml() {
|
||||
|
@ -11,14 +11,15 @@
|
||||
package org.badvision.outlaweditor.ui;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import javafx.scene.image.Image;
|
||||
|
||||
public enum ToolType {
|
||||
ERASER("images/eraser.png"), FILL(null), SELECT(null), MOVE(null), DRAW(null);
|
||||
ERASER("/images/eraser.png"), FILL(null), SELECT(null), MOVE(null), DRAW(null);
|
||||
|
||||
ToolType(String iconPath) {
|
||||
if (iconPath != null) {
|
||||
icon = Optional.of(new Image(iconPath));
|
||||
icon = Optional.of(new Image(ToolType.class.getResourceAsStream(iconPath)));
|
||||
} else {
|
||||
icon = Optional.empty();
|
||||
}
|
||||
|
@ -19,6 +19,26 @@ import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.badvision.outlaweditor.Application;
|
||||
import org.badvision.outlaweditor.FileUtils;
|
||||
import org.badvision.outlaweditor.MythosEditor;
|
||||
import org.badvision.outlaweditor.SheetEditor;
|
||||
import org.badvision.outlaweditor.api.ApplicationState;
|
||||
import org.badvision.outlaweditor.apple.ImageDitherEngine;
|
||||
import org.badvision.outlaweditor.data.DataUtilities;
|
||||
import org.badvision.outlaweditor.data.TilesetUtils;
|
||||
import org.badvision.outlaweditor.data.xml.GameData;
|
||||
import org.badvision.outlaweditor.data.xml.Global;
|
||||
import org.badvision.outlaweditor.data.xml.Scope;
|
||||
import org.badvision.outlaweditor.data.xml.Script;
|
||||
import org.badvision.outlaweditor.data.xml.Sheet;
|
||||
import org.badvision.outlaweditor.data.xml.UserType;
|
||||
import org.badvision.outlaweditor.data.xml.Variable;
|
||||
import org.badvision.outlaweditor.data.xml.Variables;
|
||||
import org.badvision.outlaweditor.ui.impl.ImageConversionWizardController;
|
||||
|
||||
import jakarta.xml.bind.JAXB;
|
||||
import javafx.animation.FadeTransition;
|
||||
import javafx.application.Platform;
|
||||
import javafx.event.ActionEvent;
|
||||
@ -41,32 +61,14 @@ import javafx.scene.image.Image;
|
||||
import javafx.scene.image.ImageView;
|
||||
import javafx.scene.image.WritableImage;
|
||||
import javafx.scene.layout.AnchorPane;
|
||||
import javafx.scene.layout.HBoxBuilder;
|
||||
import javafx.scene.layout.VBoxBuilder;
|
||||
import javafx.scene.layout.HBox;
|
||||
import javafx.scene.layout.VBox;
|
||||
import javafx.scene.text.Text;
|
||||
import javafx.stage.Modality;
|
||||
import javafx.stage.Stage;
|
||||
import javafx.util.Callback;
|
||||
import javafx.util.Duration;
|
||||
import javafx.util.converter.DefaultStringConverter;
|
||||
import javax.xml.bind.JAXB;
|
||||
import org.badvision.outlaweditor.Application;
|
||||
import org.badvision.outlaweditor.FileUtils;
|
||||
import org.badvision.outlaweditor.MythosEditor;
|
||||
import org.badvision.outlaweditor.SheetEditor;
|
||||
import org.badvision.outlaweditor.api.ApplicationState;
|
||||
import org.badvision.outlaweditor.apple.ImageDitherEngine;
|
||||
import org.badvision.outlaweditor.data.DataUtilities;
|
||||
import org.badvision.outlaweditor.data.TilesetUtils;
|
||||
import org.badvision.outlaweditor.data.xml.GameData;
|
||||
import org.badvision.outlaweditor.data.xml.Global;
|
||||
import org.badvision.outlaweditor.data.xml.Scope;
|
||||
import org.badvision.outlaweditor.data.xml.Script;
|
||||
import org.badvision.outlaweditor.data.xml.Sheet;
|
||||
import org.badvision.outlaweditor.data.xml.UserType;
|
||||
import org.badvision.outlaweditor.data.xml.Variable;
|
||||
import org.badvision.outlaweditor.data.xml.Variables;
|
||||
import org.badvision.outlaweditor.ui.impl.ImageConversionWizardController;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -184,7 +186,7 @@ public class UIAction {
|
||||
|
||||
public static WritableImage getBadImage(int width, int height) {
|
||||
if (badImage == null) {
|
||||
badImage = new Image("images/icon_brokenLink.png");
|
||||
badImage = new Image(UIAction.class.getResourceAsStream("/images/icon_brokenLink.png"));
|
||||
}
|
||||
WritableImage img = new WritableImage(width, height);
|
||||
img.getPixelWriter().setPixels(0, 0, (int) badImage.getWidth(), (int) badImage.getHeight(), badImage.getPixelReader(), 0, 0);
|
||||
@ -214,7 +216,10 @@ public class UIAction {
|
||||
public static void choose(String message, Choice... choices) {
|
||||
final Stage dialogStage = new Stage();
|
||||
|
||||
HBoxBuilder options = HBoxBuilder.create().alignment(Pos.CENTER).spacing(10.0).padding(new Insets(5));
|
||||
HBox hbox = new HBox();
|
||||
hbox.setAlignment(Pos.CENTER);
|
||||
hbox.setSpacing(10.0);
|
||||
hbox.setPadding(new Insets(5));
|
||||
List<Button> buttons = new ArrayList<>();
|
||||
for (final Choice c : choices) {
|
||||
Button b = new Button(c.text);
|
||||
@ -226,11 +231,13 @@ public class UIAction {
|
||||
});
|
||||
buttons.add(b);
|
||||
}
|
||||
options.children(buttons);
|
||||
hbox.getChildren().addAll(buttons);
|
||||
dialogStage.initModality(Modality.WINDOW_MODAL);
|
||||
dialogStage.setScene(new Scene(VBoxBuilder.create().
|
||||
children(new Text(message), options.build()).
|
||||
alignment(Pos.CENTER).padding(new Insets(5)).build()));
|
||||
VBox vbox = new VBox();
|
||||
vbox.getChildren().addAll(new Text(message), hbox);
|
||||
vbox.setAlignment(Pos.CENTER);
|
||||
vbox.setPadding(new Insets(5));
|
||||
dialogStage.setScene(new Scene(vbox));
|
||||
dialogStage.show();
|
||||
}
|
||||
|
||||
@ -238,7 +245,7 @@ public class UIAction {
|
||||
TextInputDialog dialog = new TextInputDialog(defaultValue);
|
||||
dialog.setTitle("MythosScript Editor");
|
||||
dialog.setHeaderText("Respond and press OK, or Cancel to abort");
|
||||
ImageView graphic = new ImageView(new Image("images/revolver_icon.png"));
|
||||
ImageView graphic = new ImageView(new Image(UIAction.class.getResourceAsStream("/images/revolver_icon.png")));
|
||||
graphic.setFitHeight(50.0);
|
||||
graphic.setFitWidth(50.0);
|
||||
graphic.setSmooth(true);
|
||||
|
@ -13,19 +13,18 @@ package org.badvision.outlaweditor.ui.impl;
|
||||
import java.io.IOException;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.scene.control.MenuItem;
|
||||
import org.badvision.outlaweditor.Application;
|
||||
|
||||
import org.badvision.outlaweditor.Editor;
|
||||
import org.badvision.outlaweditor.api.ApplicationState;
|
||||
import org.badvision.outlaweditor.api.MenuAction;
|
||||
import org.badvision.outlaweditor.api.Platform;
|
||||
import org.badvision.outlaweditor.apple.AppleTileRenderer;
|
||||
import org.badvision.outlaweditor.ui.ApplicationMenuController;
|
||||
import org.badvision.outlaweditor.ui.ApplicationUIController;
|
||||
import org.badvision.outlaweditor.ui.UIAction;
|
||||
import org.osgi.framework.BundleContext;
|
||||
import org.osgi.framework.InvalidSyntaxException;
|
||||
|
||||
import javafx.event.ActionEvent;
|
||||
// import org.osgi.framework.BundleContext;
|
||||
// import org.osgi.framework.InvalidSyntaxException;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -34,7 +33,6 @@ import org.osgi.framework.InvalidSyntaxException;
|
||||
public class ApplicationMenuControllerImpl extends ApplicationMenuController {
|
||||
@Override
|
||||
public void initalize() {
|
||||
setupPluginMenu();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -152,20 +150,4 @@ public class ApplicationMenuControllerImpl extends ApplicationMenuController {
|
||||
editor.undo();
|
||||
}
|
||||
}
|
||||
|
||||
private void setupPluginMenu() {
|
||||
System.out.println("Setting up extras menu");
|
||||
|
||||
BundleContext bc = ApplicationState.getBundleContext();
|
||||
try {
|
||||
bc.getServiceReferences(MenuAction.class, null).stream().map(bc::getService).forEach((MenuAction a) -> {
|
||||
System.out.println("Adding menu item " + a.getName());
|
||||
MenuItem item = new MenuItem(a.getName());
|
||||
item.setOnAction(a);
|
||||
extraMenu.getItems().add(item);
|
||||
});
|
||||
} catch (InvalidSyntaxException ex) {
|
||||
Logger.getLogger(ApplicationUIControllerImpl.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -13,13 +13,14 @@ import java.beans.IntrospectionException;
|
||||
import java.util.Optional;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javafx.application.Platform;
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.scene.control.ListCell;
|
||||
import javafx.scene.control.Tooltip;
|
||||
import javafx.scene.text.Font;
|
||||
import javafx.scene.text.FontWeight;
|
||||
import javax.xml.bind.JAXBException;
|
||||
|
||||
import org.badvision.outlaweditor.TransferHelper;
|
||||
import org.badvision.outlaweditor.api.ApplicationState;
|
||||
import org.badvision.outlaweditor.data.DataUtilities;
|
||||
@ -31,6 +32,8 @@ import org.badvision.outlaweditor.ui.GlobalEditorTabController;
|
||||
import org.badvision.outlaweditor.ui.UIAction;
|
||||
import static org.badvision.outlaweditor.ui.UIAction.editScript;
|
||||
|
||||
import jakarta.xml.bind.JAXBException;
|
||||
|
||||
public class GlobalEditorTabControllerImpl extends GlobalEditorTabController {
|
||||
|
||||
@Override
|
||||
|
@ -14,13 +14,7 @@ import java.util.EnumMap;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import javafx.beans.value.ChangeListener;
|
||||
import javafx.beans.value.ObservableValue;
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.scene.control.ListView;
|
||||
import javafx.util.StringConverter;
|
||||
import javax.xml.bind.JAXBException;
|
||||
import org.badvision.outlaweditor.Application;
|
||||
|
||||
import org.badvision.outlaweditor.Editor;
|
||||
import org.badvision.outlaweditor.ImageEditor;
|
||||
import org.badvision.outlaweditor.TransferHelper;
|
||||
@ -32,6 +26,13 @@ import org.badvision.outlaweditor.ui.EntitySelectorCell;
|
||||
import org.badvision.outlaweditor.ui.ImageEditorTabController;
|
||||
import static org.badvision.outlaweditor.ui.UIAction.confirm;
|
||||
|
||||
import jakarta.xml.bind.JAXBException;
|
||||
import javafx.beans.value.ChangeListener;
|
||||
import javafx.beans.value.ObservableValue;
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.scene.control.ListView;
|
||||
import javafx.util.StringConverter;
|
||||
|
||||
/**
|
||||
* FXML Controller class
|
||||
*
|
||||
@ -56,6 +57,9 @@ public class ImageEditorTabControllerImpl extends ImageEditorTabController {
|
||||
imageSelector.setConverter(new StringConverter<Image>() {
|
||||
@Override
|
||||
public String toString(Image object) {
|
||||
if (object == null) {
|
||||
return "";
|
||||
}
|
||||
return String.valueOf(object.getCategory()) + "/" + String.valueOf(object.getName());
|
||||
}
|
||||
|
||||
|
@ -13,6 +13,7 @@ import java.util.HashMap;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.scene.control.*;
|
||||
import javafx.scene.control.cell.ComboBoxListCell;
|
||||
@ -23,7 +24,7 @@ import javafx.scene.input.MouseEvent;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import javafx.scene.text.Font;
|
||||
import javafx.scene.text.FontWeight;
|
||||
import javax.xml.bind.JAXBException;
|
||||
|
||||
import org.badvision.outlaweditor.MapEditor;
|
||||
import org.badvision.outlaweditor.TransferHelper;
|
||||
import org.badvision.outlaweditor.api.ApplicationState;
|
||||
@ -43,6 +44,8 @@ import static org.badvision.outlaweditor.ui.UIAction.confirm;
|
||||
import static org.badvision.outlaweditor.ui.UIAction.createAndEditScript;
|
||||
import static org.badvision.outlaweditor.ui.UIAction.editScript;
|
||||
|
||||
import jakarta.xml.bind.JAXBException;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author blurry
|
||||
@ -124,7 +127,16 @@ public class MapEditorTabControllerImpl extends MapEditorTabController {
|
||||
|
||||
@Override
|
||||
public void onMapClonePressed(ActionEvent event) {
|
||||
Map clonedMap = (Map) getCurrentMap().clone();
|
||||
// Map clonedMap = (Map) getCurrentMap().clone();
|
||||
// Clone map using jaxb to marshal and unmarshal
|
||||
Map clonedMap;
|
||||
try {
|
||||
clonedMap = TransferHelper.cloneObject(getCurrentMap(), Map.class, "map");
|
||||
} catch (JAXBException ex) {
|
||||
Logger.getLogger(MapEditorTabControllerImpl.class.getName()).log(Level.SEVERE, null, ex);
|
||||
UIAction.alert("Error occured when attempting clone operation:\n" + ex.getMessage());
|
||||
return;
|
||||
}
|
||||
clonedMap.setName(clonedMap.getName() + " (clone)");
|
||||
ApplicationState.getInstance().getGameData().getMap().add(clonedMap);
|
||||
rebuildMapSelectors();
|
||||
@ -197,7 +209,7 @@ public class MapEditorTabControllerImpl extends MapEditorTabController {
|
||||
message = "I really can't help you";
|
||||
break;
|
||||
case 6:
|
||||
message = "Bored? Lonely? Have you trolled any YouTube comments lately?";
|
||||
message = "I'm sorry, but this is not going to work out.";
|
||||
break;
|
||||
default:
|
||||
}
|
||||
@ -536,9 +548,8 @@ public class MapEditorTabControllerImpl extends MapEditorTabController {
|
||||
null);
|
||||
}
|
||||
}
|
||||
|
||||
public static final Image VISIBLE_IMAGE = new Image("images/visible.png");
|
||||
public static final Image INVISIBLE_IMAGE = new Image("images/not_visible.png");
|
||||
public static final Image VISIBLE_IMAGE = new Image(MapEditorTabControllerImpl.class.getResourceAsStream("/images/visible.png"));
|
||||
public static final Image INVISIBLE_IMAGE = new Image(MapEditorTabControllerImpl.class.getResourceAsStream("/images/not_visible.png"));
|
||||
|
||||
private ImageView getVisibleIcon(Script script) {
|
||||
if (getCurrentEditor().isScriptVisible(script)) {
|
||||
|
@ -23,16 +23,12 @@ import java.util.ResourceBundle;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.stream.Collectors;
|
||||
import javafx.beans.value.ObservableValue;
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.collections.ObservableList;
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.scene.control.MenuItem;
|
||||
import javafx.stage.FileChooser;
|
||||
import javax.xml.bind.JAXBException;
|
||||
|
||||
import org.badvision.outlaweditor.SheetEditor;
|
||||
import org.badvision.outlaweditor.TransferHelper;
|
||||
import org.badvision.outlaweditor.data.DataUtilities;
|
||||
import static org.badvision.outlaweditor.data.DataUtilities.getValue;
|
||||
import static org.badvision.outlaweditor.data.DataUtilities.setValue;
|
||||
import org.badvision.outlaweditor.data.xml.Columns;
|
||||
import org.badvision.outlaweditor.data.xml.Rows;
|
||||
import org.badvision.outlaweditor.data.xml.Rows.Row;
|
||||
@ -44,8 +40,13 @@ import org.controlsfx.control.spreadsheet.GridBase;
|
||||
import org.controlsfx.control.spreadsheet.SpreadsheetCell;
|
||||
import org.controlsfx.control.spreadsheet.SpreadsheetCellBase;
|
||||
|
||||
import static org.badvision.outlaweditor.data.DataUtilities.getValue;
|
||||
import static org.badvision.outlaweditor.data.DataUtilities.setValue;
|
||||
import jakarta.xml.bind.JAXBException;
|
||||
import javafx.beans.value.ObservableValue;
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.collections.ObservableList;
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.scene.control.MenuItem;
|
||||
import javafx.stage.FileChooser;
|
||||
|
||||
public class SheetEditorControllerImpl extends SheetEditorController {
|
||||
|
||||
|
@ -15,13 +15,7 @@ import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import javafx.beans.value.ChangeListener;
|
||||
import javafx.beans.value.ObservableValue;
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.scene.control.ListView;
|
||||
import javafx.scene.image.ImageView;
|
||||
import javafx.scene.layout.FlowPane;
|
||||
import javafx.util.StringConverter;
|
||||
|
||||
import org.badvision.outlaweditor.TileEditor;
|
||||
import org.badvision.outlaweditor.api.ApplicationState;
|
||||
import static org.badvision.outlaweditor.data.PropertyHelper.bind;
|
||||
@ -37,6 +31,14 @@ import org.badvision.outlaweditor.ui.TileEditorTabController;
|
||||
import org.badvision.outlaweditor.ui.UIAction;
|
||||
import static org.badvision.outlaweditor.ui.UIAction.confirm;
|
||||
|
||||
import javafx.beans.value.ChangeListener;
|
||||
import javafx.beans.value.ObservableValue;
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.scene.control.ListView;
|
||||
import javafx.scene.image.ImageView;
|
||||
import javafx.scene.layout.FlowPane;
|
||||
import javafx.util.StringConverter;
|
||||
|
||||
/**
|
||||
* FXML Controller class for tile editor tab
|
||||
*
|
||||
@ -161,6 +163,9 @@ public class TileEditorTabControllerImpl extends TileEditorTabController {
|
||||
tileSelector.setConverter(new StringConverter<Tile>() {
|
||||
@Override
|
||||
public String toString(Tile object) {
|
||||
if (object == null) {
|
||||
return "";
|
||||
}
|
||||
return String.valueOf(object.getCategory() + "/" + object.getName());
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,11 @@
|
||||
{ "rules": [
|
||||
{"excludeClasses" : "com.sun.glass.ui.mac.*"},
|
||||
{"excludeClasses" : "com.sun.glass.ui.gtk.*"},
|
||||
{"excludeClasses" : "com.sun.glass.ui.win.*"},
|
||||
{"excludeClasses" : "com.sun.prism.es2.*"},
|
||||
{"excludeClasses" : "com.sun.prism.d3d.*"},
|
||||
{"excludeClasses" : "com.sun.scenario.effect.impl.es2.*"},
|
||||
{"excludeClasses" : "com.sun.scenario.effect.impl.hw.d3d.*"},
|
||||
{"excludeClasses" : "com.gluonhq.attach.**"}
|
||||
]
|
||||
}
|
@ -0,0 +1,484 @@
|
||||
[
|
||||
{
|
||||
"name":"[Lcom.sun.glass.ui.Screen;"
|
||||
},
|
||||
{
|
||||
"name":"[Ljava.lang.Object;"
|
||||
},
|
||||
{
|
||||
"name":"[Ljava.lang.String;"
|
||||
},
|
||||
{
|
||||
"name":"[[Ljava.lang.String;"
|
||||
},
|
||||
{
|
||||
"name":"com.sun.glass.ui.Application",
|
||||
"methods":[
|
||||
{"name":"notifyDidBecomeActive","parameterTypes":[] },
|
||||
{"name":"notifyDidFinishLaunching","parameterTypes":[] },
|
||||
{"name":"notifyDidHide","parameterTypes":[] },
|
||||
{"name":"notifyDidResignActive","parameterTypes":[] },
|
||||
{"name":"notifyDidUnhide","parameterTypes":[] },
|
||||
{"name":"notifyOpenFiles","parameterTypes":["java.lang.String[]"] },
|
||||
{"name":"notifyWillBecomeActive","parameterTypes":[] },
|
||||
{"name":"notifyWillFinishLaunching","parameterTypes":[] },
|
||||
{"name":"notifyWillHide","parameterTypes":[] },
|
||||
{"name":"notifyWillResignActive","parameterTypes":[] },
|
||||
{"name":"notifyWillUnhide","parameterTypes":[] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.glass.ui.CommonDialogs$ExtensionFilter",
|
||||
"methods":[
|
||||
{"name":"extensionsToArray","parameterTypes":[] },
|
||||
{"name":"getDescription","parameterTypes":[] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.glass.ui.CommonDialogs$FileChooserResult",
|
||||
"methods":[{"name":"<init>","parameterTypes":["java.util.List","com.sun.glass.ui.CommonDialogs$ExtensionFilter"] }]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.glass.ui.EventLoop",
|
||||
"methods":[
|
||||
{"name":"<init>","parameterTypes":[] },
|
||||
{"name":"enter","parameterTypes":[] },
|
||||
{"name":"leave","parameterTypes":["java.lang.Object"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.glass.ui.Menu",
|
||||
"methods":[
|
||||
{"name":"notifyMenuClosed","parameterTypes":[] },
|
||||
{"name":"notifyMenuOpening","parameterTypes":[] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.glass.ui.MenuItem$Callback",
|
||||
"methods":[
|
||||
{"name":"action","parameterTypes":[] },
|
||||
{"name":"validate","parameterTypes":[] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.glass.ui.Screen",
|
||||
"methods":[{"name":"<init>","parameterTypes":["long","int","int","int","int","int","int","int","int","int","int","int","int","int","int","int","float","float","float","float"] }]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.glass.ui.Size",
|
||||
"methods":[{"name":"<init>","parameterTypes":["int","int"] }]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.glass.ui.View",
|
||||
"fields":[{"name":"ptr"}],
|
||||
"methods":[
|
||||
{"name":"getAccessible","parameterTypes":[] },
|
||||
{"name":"notifyDragDrop","parameterTypes":["int","int","int","int","int"] },
|
||||
{"name":"notifyDragEnd","parameterTypes":["int"] },
|
||||
{"name":"notifyDragEnter","parameterTypes":["int","int","int","int","int"] },
|
||||
{"name":"notifyDragLeave","parameterTypes":[] },
|
||||
{"name":"notifyDragOver","parameterTypes":["int","int","int","int","int"] },
|
||||
{"name":"notifyInputMethod","parameterTypes":["java.lang.String","int[]","int[]","byte[]","int","int","int"] },
|
||||
{"name":"notifyInputMethodCandidatePosRequest","parameterTypes":["int"] },
|
||||
{"name":"notifyKey","parameterTypes":["int","int","char[]","int"] },
|
||||
{"name":"notifyMenu","parameterTypes":["int","int","int","int","boolean"] },
|
||||
{"name":"notifyMouse","parameterTypes":["int","int","int","int","int","int","int","boolean","boolean"] },
|
||||
{"name":"notifyRepaint","parameterTypes":["int","int","int","int"] },
|
||||
{"name":"notifyResize","parameterTypes":["int","int"] },
|
||||
{"name":"notifyView","parameterTypes":["int"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.javafx.font.coretext.CGAffineTransform",
|
||||
"fields":[
|
||||
{"name":"a"},
|
||||
{"name":"b"},
|
||||
{"name":"c"},
|
||||
{"name":"d"},
|
||||
{"name":"tx"},
|
||||
{"name":"ty"}
|
||||
],
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.javafx.font.coretext.CGPoint",
|
||||
"fields":[
|
||||
{"name":"x"},
|
||||
{"name":"y"}
|
||||
],
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.javafx.font.coretext.CGRect",
|
||||
"fields":[
|
||||
{"name":"origin"},
|
||||
{"name":"size"}
|
||||
],
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.javafx.font.coretext.CGSize",
|
||||
"fields":[
|
||||
{"name":"height"},
|
||||
{"name":"width"}
|
||||
],
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.BackForwardList",
|
||||
"methods":[{"name":"notifyChanged","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.BackForwardList$Entry",
|
||||
"methods":[
|
||||
{"name":"<init>","parameterTypes":["long","long"] },
|
||||
{"name":"notifyItemChanged","parameterTypes":[] },
|
||||
{"name":"notifyItemDestroyed","parameterTypes":[] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.CursorManager",
|
||||
"methods":[
|
||||
{"name":"getCursorManager","parameterTypes":[] },
|
||||
{"name":"getPredefinedCursorID","parameterTypes":["int"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.FileSystem",
|
||||
"methods":[
|
||||
{"name":"fwkFileExists","parameterTypes":["java.lang.String"] },
|
||||
{"name":"fwkMakeAllDirectories","parameterTypes":["java.lang.String"] },
|
||||
{"name":"fwkPathByAppendingComponent","parameterTypes":["java.lang.String","java.lang.String"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.MainThread",
|
||||
"methods":[{"name":"fwkScheduleDispatchFunctions","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.Timer",
|
||||
"methods":[
|
||||
{"name":"fwkSetFireTime","parameterTypes":["double"] },
|
||||
{"name":"fwkStopTimer","parameterTypes":[] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.Utilities",
|
||||
"methods":[{"name":"fwkInvokeWithContext","parameterTypes":["java.lang.reflect.Method","java.lang.Object","java.lang.Object[]","java.security.AccessControlContext"] }]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.WCWidget",
|
||||
"methods":[
|
||||
{"name":"fwkDestroy","parameterTypes":[] },
|
||||
{"name":"fwkRequestFocus","parameterTypes":[] },
|
||||
{"name":"fwkSetBounds","parameterTypes":["int","int","int","int"] },
|
||||
{"name":"fwkSetCursor","parameterTypes":["long"] },
|
||||
{"name":"fwkSetVisible","parameterTypes":["boolean"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.WebPage",
|
||||
"methods":[
|
||||
{"name":"fwkAddMessageToConsole","parameterTypes":["java.lang.String","int","java.lang.String"] },
|
||||
{"name":"fwkAlert","parameterTypes":["java.lang.String"] },
|
||||
{"name":"fwkCanRunBeforeUnloadConfirmPanel","parameterTypes":[] },
|
||||
{"name":"fwkChooseFile","parameterTypes":["java.lang.String","boolean","java.lang.String"] },
|
||||
{"name":"fwkCloseWindow","parameterTypes":[] },
|
||||
{"name":"fwkConfirm","parameterTypes":["java.lang.String"] },
|
||||
{"name":"fwkCreateWindow","parameterTypes":["boolean","boolean","boolean","boolean"] },
|
||||
{"name":"fwkDidClearWindowObject","parameterTypes":["long","long"] },
|
||||
{"name":"fwkFireLoadEvent","parameterTypes":["long","int","java.lang.String","java.lang.String","double","int"] },
|
||||
{"name":"fwkFireResourceLoadEvent","parameterTypes":["long","int","int","java.lang.String","double","int"] },
|
||||
{"name":"fwkFrameCreated","parameterTypes":["long"] },
|
||||
{"name":"fwkFrameDestroyed","parameterTypes":["long"] },
|
||||
{"name":"fwkGetPageBounds","parameterTypes":[] },
|
||||
{"name":"fwkGetWindowBounds","parameterTypes":[] },
|
||||
{"name":"fwkPermitAcceptResourceAction","parameterTypes":["long","java.lang.String"] },
|
||||
{"name":"fwkPermitEnableScriptsAction","parameterTypes":["long","java.lang.String"] },
|
||||
{"name":"fwkPermitNavigateAction","parameterTypes":["long","java.lang.String"] },
|
||||
{"name":"fwkPermitNewWindowAction","parameterTypes":["long","java.lang.String"] },
|
||||
{"name":"fwkPermitRedirectAction","parameterTypes":["long","java.lang.String"] },
|
||||
{"name":"fwkPermitSubmitDataAction","parameterTypes":["long","java.lang.String","java.lang.String","boolean"] },
|
||||
{"name":"fwkPrompt","parameterTypes":["java.lang.String","java.lang.String"] },
|
||||
{"name":"fwkRemoveRequestURL","parameterTypes":["long","int"] },
|
||||
{"name":"fwkRepaint","parameterTypes":["int","int","int","int"] },
|
||||
{"name":"fwkRunBeforeUnloadConfirmPanel","parameterTypes":["java.lang.String"] },
|
||||
{"name":"fwkScreenToWindow","parameterTypes":["com.sun.webkit.graphics.WCPoint"] },
|
||||
{"name":"fwkSetCursor","parameterTypes":["long"] },
|
||||
{"name":"fwkSetFocus","parameterTypes":["boolean"] },
|
||||
{"name":"fwkSetRequestURL","parameterTypes":["long","int","java.lang.String"] },
|
||||
{"name":"fwkSetScrollbarsVisible","parameterTypes":["boolean"] },
|
||||
{"name":"fwkSetStatusbarText","parameterTypes":["java.lang.String"] },
|
||||
{"name":"fwkSetTooltip","parameterTypes":["java.lang.String"] },
|
||||
{"name":"fwkSetWindowBounds","parameterTypes":["int","int","int","int"] },
|
||||
{"name":"fwkShowWindow","parameterTypes":[] },
|
||||
{"name":"fwkTransferFocus","parameterTypes":["boolean"] },
|
||||
{"name":"fwkWindowToScreen","parameterTypes":["com.sun.webkit.graphics.WCPoint"] },
|
||||
{"name":"getHostWindow","parameterTypes":[] },
|
||||
{"name":"getPage","parameterTypes":[] },
|
||||
{"name":"getRenderTheme","parameterTypes":[] },
|
||||
{"name":"setInputMethodState","parameterTypes":["boolean"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.dom.JSObject",
|
||||
"fields":[{"name":"UNDEFINED"}],
|
||||
"methods":[{"name":"<init>","parameterTypes":["long","int"] }]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.graphics.Ref",
|
||||
"methods":[
|
||||
{"name":"deref","parameterTypes":[] },
|
||||
{"name":"getID","parameterTypes":[] },
|
||||
{"name":"ref","parameterTypes":[] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.graphics.ScrollBarTheme",
|
||||
"methods":[{"name":"getThickness","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.graphics.WCFont",
|
||||
"methods":[
|
||||
{"name":"equals","parameterTypes":["java.lang.Object"] },
|
||||
{"name":"getAscent","parameterTypes":[] },
|
||||
{"name":"getCapHeight","parameterTypes":[] },
|
||||
{"name":"getDescent","parameterTypes":[] },
|
||||
{"name":"getGlyphCodes","parameterTypes":["char[]"] },
|
||||
{"name":"getGlyphWidth","parameterTypes":["int"] },
|
||||
{"name":"getLineGap","parameterTypes":[] },
|
||||
{"name":"getLineSpacing","parameterTypes":[] },
|
||||
{"name":"getXHeight","parameterTypes":[] },
|
||||
{"name":"hasUniformLineMetrics","parameterTypes":[] },
|
||||
{"name":"hashCode","parameterTypes":[] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.graphics.WCGraphicsManager",
|
||||
"methods":[
|
||||
{"name":"createBufferedContextRQ","parameterTypes":["com.sun.webkit.graphics.WCImage"] },
|
||||
{"name":"createRTImage","parameterTypes":["int","int"] },
|
||||
{"name":"createWCPath","parameterTypes":[] },
|
||||
{"name":"createWCPath","parameterTypes":["com.sun.webkit.graphics.WCPath"] },
|
||||
{"name":"getGraphicsManager","parameterTypes":[] },
|
||||
{"name":"getImageDecoder","parameterTypes":[] },
|
||||
{"name":"getWCFont","parameterTypes":["java.lang.String","boolean","boolean","float"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.graphics.WCImageDecoder",
|
||||
"methods":[
|
||||
{"name":"addImageData","parameterTypes":["byte[]"] },
|
||||
{"name":"destroy","parameterTypes":[] },
|
||||
{"name":"getFrame","parameterTypes":["int"] },
|
||||
{"name":"getFrameCompleteStatus","parameterTypes":["int"] },
|
||||
{"name":"getFrameCount","parameterTypes":[] },
|
||||
{"name":"getFrameDuration","parameterTypes":["int"] },
|
||||
{"name":"getFrameSize","parameterTypes":["int"] },
|
||||
{"name":"getImageSize","parameterTypes":[] },
|
||||
{"name":"loadFromResource","parameterTypes":["java.lang.String"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.graphics.WCImageFrame",
|
||||
"methods":[{"name":"getSize","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.graphics.WCPath",
|
||||
"methods":[
|
||||
{"name":"addBezierCurveTo","parameterTypes":["double","double","double","double","double","double"] },
|
||||
{"name":"addLineTo","parameterTypes":["double","double"] },
|
||||
{"name":"addRect","parameterTypes":["double","double","double","double"] },
|
||||
{"name":"closeSubpath","parameterTypes":[] },
|
||||
{"name":"contains","parameterTypes":["int","double","double"] },
|
||||
{"name":"getBounds","parameterTypes":[] },
|
||||
{"name":"getPathIterator","parameterTypes":[] },
|
||||
{"name":"isEmpty","parameterTypes":[] },
|
||||
{"name":"moveTo","parameterTypes":["double","double"] },
|
||||
{"name":"strokeContains","parameterTypes":["double","double","double","double","int","int","double","double[]"] },
|
||||
{"name":"transform","parameterTypes":["double","double","double","double","double","double"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.graphics.WCPathIterator",
|
||||
"methods":[
|
||||
{"name":"currentSegment","parameterTypes":["double[]"] },
|
||||
{"name":"isDone","parameterTypes":[] },
|
||||
{"name":"next","parameterTypes":[] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.graphics.WCPoint",
|
||||
"methods":[
|
||||
{"name":"<init>","parameterTypes":["float","float"] },
|
||||
{"name":"getX","parameterTypes":[] },
|
||||
{"name":"getY","parameterTypes":[] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.graphics.WCRectangle",
|
||||
"fields":[
|
||||
{"name":"h"},
|
||||
{"name":"w"},
|
||||
{"name":"x"},
|
||||
{"name":"y"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.graphics.WCRenderQueue",
|
||||
"methods":[
|
||||
{"name":"fwkAddBuffer","parameterTypes":["java.nio.ByteBuffer"] },
|
||||
{"name":"fwkDisposeGraphics","parameterTypes":[] },
|
||||
{"name":"refFloatArr","parameterTypes":["float[]"] },
|
||||
{"name":"refIntArr","parameterTypes":["int[]"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.network.FormDataElement",
|
||||
"methods":[
|
||||
{"name":"fwkCreateFromByteArray","parameterTypes":["byte[]"] },
|
||||
{"name":"fwkCreateFromFile","parameterTypes":["java.lang.String"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.network.NetworkContext",
|
||||
"methods":[
|
||||
{"name":"canHandleURL","parameterTypes":["java.lang.String"] },
|
||||
{"name":"fwkGetMaximumHTTPConnectionCountPerHost","parameterTypes":[] },
|
||||
{"name":"fwkLoad","parameterTypes":["com.sun.webkit.WebPage","boolean","java.lang.String","java.lang.String","java.lang.String","com.sun.webkit.network.FormDataElement[]","long"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.network.URLLoaderBase",
|
||||
"methods":[{"name":"fwkCancel","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"java.io.File",
|
||||
"methods":[{"name":"<init>","parameterTypes":["java.lang.String"] }]
|
||||
},
|
||||
{
|
||||
"name":"java.lang.Boolean",
|
||||
"methods":[
|
||||
{"name":"booleanValue","parameterTypes":[] },
|
||||
{"name":"valueOf","parameterTypes":["boolean"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"java.lang.Class",
|
||||
"methods":[
|
||||
{"name":"forName","parameterTypes":["java.lang.String","boolean","java.lang.ClassLoader"] },
|
||||
{"name":"getFields","parameterTypes":[] },
|
||||
{"name":"getMethods","parameterTypes":[] },
|
||||
{"name":"getName","parameterTypes":[] },
|
||||
{"name":"isArray","parameterTypes":[] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"java.lang.ClassLoader",
|
||||
"methods":[
|
||||
{"name":"getPlatformClassLoader","parameterTypes":[] },
|
||||
{"name":"loadClass","parameterTypes":["java.lang.String"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"java.lang.Integer",
|
||||
"methods":[
|
||||
{"name":"<init>","parameterTypes":["int"] },
|
||||
{"name":"intValue","parameterTypes":[] },
|
||||
{"name":"valueOf","parameterTypes":["int"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"java.lang.Long",
|
||||
"methods":[{"name":"longValue","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"java.lang.Number"
|
||||
},
|
||||
{
|
||||
"name":"java.lang.Object",
|
||||
"methods":[{"name":"getClass","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"java.lang.Runnable",
|
||||
"methods":[{"name":"run","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"java.lang.String",
|
||||
"methods":[
|
||||
{"name":"<init>","parameterTypes":["byte[]","java.lang.String"] },
|
||||
{"name":"lastIndexOf","parameterTypes":["int"] },
|
||||
{"name":"substring","parameterTypes":["int"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"java.lang.System",
|
||||
"methods":[
|
||||
{"name":"getProperty","parameterTypes":["java.lang.String"] },
|
||||
{"name":"setProperty","parameterTypes":["java.lang.String","java.lang.String"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"java.lang.reflect.Field",
|
||||
"methods":[
|
||||
{"name":"getName","parameterTypes":[] },
|
||||
{"name":"getType","parameterTypes":[] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"java.lang.reflect.Method",
|
||||
"methods":[
|
||||
{"name":"getModifiers","parameterTypes":[] },
|
||||
{"name":"getName","parameterTypes":[] },
|
||||
{"name":"getParameterTypes","parameterTypes":[] },
|
||||
{"name":"getReturnType","parameterTypes":[] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"java.util.ArrayList",
|
||||
"methods":[
|
||||
{"name":"<init>","parameterTypes":[] },
|
||||
{"name":"get","parameterTypes":["int"] },
|
||||
{"name":"size","parameterTypes":[] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"java.util.List",
|
||||
"methods":[{"name":"add","parameterTypes":["java.lang.Object"] }]
|
||||
},
|
||||
{
|
||||
"name":"java.util.Map",
|
||||
"methods":[{"name":"get","parameterTypes":["java.lang.Object"] }]
|
||||
},
|
||||
{
|
||||
"name":"jdk.internal.loader.ClassLoaders$PlatformClassLoader"
|
||||
},
|
||||
{
|
||||
"name":"org.badvision.outlaweditor.MythosEditor",
|
||||
"methods":[
|
||||
{"name":"checkSpelling","parameterTypes":["java.lang.String"] },
|
||||
{"name":"getGlobalFunctions","parameterTypes":[] },
|
||||
{"name":"getLocalFunctions","parameterTypes":[] },
|
||||
{"name":"getUserTypes","parameterTypes":[] },
|
||||
{"name":"setFunctionName","parameterTypes":["java.lang.String"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"org.badvision.outlaweditor.data.xml.NamedEntity",
|
||||
"methods":[{"name":"getName","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"org.badvision.outlaweditor.data.xml.Script"
|
||||
},
|
||||
{
|
||||
"name":"org.badvision.outlaweditor.data.xml.UserType"
|
||||
},
|
||||
{
|
||||
"name":"org.graalvm.jniutils.JNIExceptionWrapperEntryPoints",
|
||||
"methods":[{"name":"getClassName","parameterTypes":["java.lang.Class"] }]
|
||||
},
|
||||
{
|
||||
"name":"sun.launcher.LauncherHelper$FXHelper",
|
||||
"methods":[{"name":"main","parameterTypes":["java.lang.String[]"] }]
|
||||
}
|
||||
]
|
@ -0,0 +1,8 @@
|
||||
[
|
||||
{
|
||||
"type":"agent-extracted",
|
||||
"classes":[
|
||||
]
|
||||
}
|
||||
]
|
||||
|
@ -0,0 +1,2 @@
|
||||
[
|
||||
]
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,71 @@
|
||||
{
|
||||
"resources":{
|
||||
"includes":[
|
||||
{"pattern": ".*\\.txt$"},
|
||||
{"pattern": ".*\\.html$"},
|
||||
{"pattern": ".*\\.js$"},
|
||||
{"pattern": ".*\\.png$"},
|
||||
{"pattern": ".*\\.wav$"},
|
||||
{"pattern": ".*\\.json$"},
|
||||
{"pattern": ".*\\.mp3$"},
|
||||
{"pattern": ".*\\.ogg$"},
|
||||
{"pattern": ".*\\.cur$"},
|
||||
{"pattern": ".*\\.svg$"},
|
||||
{"pattern":"\\Qimages/.*\\E"},
|
||||
{"pattern":"\\Qmythos/.*\\E"},
|
||||
{"pattern":"\\QMETA-INF/services/jakarta.xml.bind.JAXBContextFactory\\E"},
|
||||
{"pattern":"\\QMETA-INF/services/org.apache.logging.log4j.util.PropertySource\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/calcchainfc37doctype.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/ctborderf935type.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/ctborders0d66type.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/ctcalcchain5a0btype.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/ctcell842btype.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/ctcellformula3583type.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/ctcellstylexfsa81ftype.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/ctcellxfs1322type.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/ctcola95ftype.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/ctcols627ctype.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/ctdxfsb26atype.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/ctfill550ctype.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/ctfills2c6ftype.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/ctfont14d8type.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/ctfonts6623type.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/ctnumfmt3870type.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/ctnumfmtsb58btype.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/ctrowdd39type.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/ctrsta472type.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/ctsheet4dbetype.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/ctsheetdata8408type.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/ctsheets49fdtype.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/ctsst44f3type.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/ctstylesheet4257type.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/cttablestyles872ftype.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/ctworkbook83c3type.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/ctworksheet530dtype.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/ctxf97f7type.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/index.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/sstf81fdoctype.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/stcellformulatypee2cdtype.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/stcellrefe4e0type.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/stcelltypebf95type.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/stnumfmtid76fbtype.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/stref90a2type.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/strelationshipid1e94type.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/stxstringf179type.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/stylesheet5d8bdoctype.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/themefd26doctype.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/workbookec17doctype.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/poi/schemas/ooxml/system/ooxml/worksheetf539doctype.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/xmlbeans/metadata/system/sXMLCONFIG/index.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/xmlbeans/metadata/system/sXMLLANG/index.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/xmlbeans/metadata/system/sXMLSCHEMA/index.xsb\\E"},
|
||||
{"pattern":"\\Qorg/apache/xmlbeans/metadata/system/sXMLTOOLS/index.xsb\\E"}
|
||||
]},
|
||||
"bundles":[
|
||||
{"name":"com.sun.javafx.tk.quantum.QuantumMessagesBundle","locales":[""]},
|
||||
{"name":"com.sun.webkit.graphics.Images","locales":[""]},
|
||||
{"name":"com/sun/javafx/scene/control/skin/resources/controls","locales":[""]},
|
||||
{"name":"controlsfx","locales":[""]},
|
||||
{"name":"org.apache.xmlbeans.impl.regex.message","locales":[""]}
|
||||
]
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"types":[
|
||||
],
|
||||
"lambdaCapturingTypes":[
|
||||
]
|
||||
}
|
@ -37,7 +37,6 @@
|
||||
</Menu>
|
||||
</items>
|
||||
</Menu>
|
||||
<Menu fx:id="extraMenu" mnemonicParsing="false" text="Extras" />
|
||||
<Menu mnemonicParsing="false" text="Help">
|
||||
<items>
|
||||
<MenuItem mnemonicParsing="false" onAction="#onHelpAbout" text="About" />
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
<AnchorPane id="AnchorPane" maxHeight="482.0" maxWidth="600.0" prefHeight="482.0" prefWidth="600.0" styleClass="mainFxmlClass" xmlns="http://javafx.com/javafx/8.0.60" xmlns:fx="http://javafx.com/fxml/1" fx:controller="org.badvision.outlaweditor.ui.impl.ImageConversionWizardController">
|
||||
<stylesheets>
|
||||
<URL value="@/styles/imageconversionwizard.css" />
|
||||
<URL value="@styles/imageconversionwizard.css" />
|
||||
</stylesheets>
|
||||
<children>
|
||||
<HBox layoutX="14.0" layoutY="14.0" styleClass="imageViews" AnchorPane.bottomAnchor="276.0" AnchorPane.leftAnchor="14.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="14.0">
|
||||
|
@ -1,226 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2015 The 8-Bit Bunch. Licensed under the Apache License, Version 1.1
|
||||
* (the "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at <http://www.apache.org/licenses/LICENSE-1.1>.
|
||||
* Unless required by applicable law or agreed to in writing, software distributed under
|
||||
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
|
||||
* ANY KIND, either express or implied. See the License for the specific language
|
||||
* governing permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.badvision.outlaweditor.test;
|
||||
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.scene.image.WritableImage;
|
||||
import javafx.scene.paint.Color;
|
||||
import org.badvision.outlaweditor.apple.AppleTileRenderer;
|
||||
import org.badvision.outlaweditor.apple.ImageDitherEngine;
|
||||
import org.badvision.outlaweditor.apple.Palette;
|
||||
import org.junit.After;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import static org.junit.Assert.*;
|
||||
import org.junit.Rule;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author blurry
|
||||
*/
|
||||
public class ImageDitheringTest {
|
||||
|
||||
public ImageDitheringTest() {
|
||||
}
|
||||
|
||||
ImageDitherEngine hgrDither, dhgrDither;
|
||||
|
||||
@Rule
|
||||
public JavaFXThreadingRule javafxRule = new JavaFXThreadingRule();
|
||||
|
||||
@BeforeClass
|
||||
public static void setUpClass() {
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
public static void tearDownClass() {
|
||||
}
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
AppleTileRenderer.useSolidPalette = false;
|
||||
hgrDither = new ImageDitherEngine(org.badvision.outlaweditor.api.Platform.AppleII);
|
||||
hgrDither.setOutputDimensions(40, 192);
|
||||
dhgrDither = new ImageDitherEngine(org.badvision.outlaweditor.api.Platform.AppleII_DHGR);
|
||||
dhgrDither.setOutputDimensions(80, 192);
|
||||
|
||||
}
|
||||
|
||||
@After
|
||||
public void tearDown() {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void colorDiffTest() {
|
||||
int[] white = {255, 255, 255};
|
||||
int[] black = {0, 0, 0};
|
||||
int[] gray = {128, 128, 128};
|
||||
assertEquals(0, Palette.distance(white, white), 0);
|
||||
assertEquals(0, Palette.distance(black, black), 0);
|
||||
assertEquals(0, Palette.distance(gray, gray), 0);
|
||||
double midDist1 = Palette.distance(white, gray);
|
||||
double midDist2 = Palette.distance(black, gray);
|
||||
assertEquals(midDist1, midDist2, 3.0);
|
||||
double maxDist = Palette.distance(white, black);
|
||||
assertEquals(maxDist, midDist1 + midDist2, 0.01);
|
||||
assertEquals(255.0 * Math.sqrt(3.0), maxDist, 0.01);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void blackTestHGR() {
|
||||
testSolidColor(Color.BLACK, hgrDither, 0.0);
|
||||
}
|
||||
@Test
|
||||
public void blackTestDHGR() {
|
||||
testSolidColor(Color.BLACK, dhgrDither, 0.0);
|
||||
}
|
||||
@Test
|
||||
public void whiteTestHGR() {
|
||||
testSolidColor(Color.WHITE, hgrDither, 3.0);
|
||||
}
|
||||
@Test
|
||||
public void whiteTestDHGR() {
|
||||
testSolidColor(Color.WHITE, dhgrDither, 3.0);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void grayHGRTest() {
|
||||
testSolidColor(new Color(0.5f, 0.5f, 0.5f, 1.0f), hgrDither, 100.0);
|
||||
}
|
||||
@Test
|
||||
public void grayDHGRTest() {
|
||||
testSolidColor(new Color(0.5f, 0.5f, 0.5f, 1.0f), dhgrDither, 100.0);
|
||||
}
|
||||
@Test
|
||||
public void redHGRTest() {
|
||||
testSolidColor(new Color(1f, 0f, 0f, 1.0f), hgrDither, 115.0);
|
||||
}
|
||||
@Test
|
||||
public void redDHGRTest() {
|
||||
testSolidColor(new Color(1f, 0f, 0f, 1.0f), dhgrDither, 100.0);
|
||||
}
|
||||
@Test
|
||||
public void greenHGRTest() {
|
||||
testSolidColor(new Color(0f, 1f, 0f, 1.0f), hgrDither, 100.0);
|
||||
}
|
||||
@Test
|
||||
public void greenDHGRTest() {
|
||||
testSolidColor(new Color(0f, 1f, 0f, 1.0f), dhgrDither, 100.0);
|
||||
}
|
||||
@Test
|
||||
public void blueHGRTest() {
|
||||
testSolidColor(new Color(0f, 0f, 1f, 1.0f), hgrDither, 162.0);
|
||||
}
|
||||
@Test
|
||||
public void blueDHGRTest() {
|
||||
testSolidColor(new Color(0f, 0f, 1f, 1.0f), dhgrDither, 100.0);
|
||||
}
|
||||
|
||||
|
||||
private void testSolidColor(Color color, ImageDitherEngine engine, Double maxDelta) {
|
||||
WritableImage source = new WritableImage(560, 192);
|
||||
fillColor(source, color);
|
||||
WritableImage converted = getTestConversion(engine, source);
|
||||
assertLowError(source, converted, 16, maxDelta);
|
||||
}
|
||||
|
||||
public void assertExactImage(Image img1, Image img2) throws AssertionError {
|
||||
for (int x = 0; x < img1.getWidth(); x++) {
|
||||
for (int y = 0; y < img1.getHeight(); y++) {
|
||||
int col1 = img1.getPixelReader().getArgb(x, y) & 0x0FFFFFF;
|
||||
int col2 = img2.getPixelReader().getArgb(x, y) & 0x0FFFFFF;
|
||||
if (col1 != col2) {
|
||||
throw new AssertionError("Pixels are not the same color at " + x + "," + y + "; (" + Integer.toHexString(col1) + " vs " + Integer.toHexString(col2));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void assertLowError(Image img1, Image img2, int gridSize, double maxError) throws AssertionError {
|
||||
double error = getAverageImageError(img1, img2, gridSize);
|
||||
if (error > maxError) {
|
||||
throw new AssertionError("Average error is greater than threshold: " + error + " (max is " + maxError + ")");
|
||||
}
|
||||
}
|
||||
|
||||
public void assertHighError(Image img1, Image img2, int gridSize, double minError) throws AssertionError {
|
||||
double error = getAverageImageError(img1, img2, gridSize);
|
||||
if (error < minError) {
|
||||
throw new AssertionError("Average error is lower than threshold: " + error + " (min is " + minError + ")");
|
||||
}
|
||||
}
|
||||
|
||||
// Evaluates a pair of images as a grid of square regions
|
||||
// Returns the average error value of all regions
|
||||
public double getAverageImageError(Image img1, Image img2, int gridSize) {
|
||||
double totalError = 0;
|
||||
double regionCount = 0;
|
||||
for (int x = 0; x < img1.getWidth(); x += gridSize) {
|
||||
int x2 = (int) Math.min(img1.getWidth(), x + gridSize);
|
||||
for (int y = 0; y < img1.getHeight(); y += gridSize) {
|
||||
int y2 = (int) Math.min(img1.getHeight(), y + gridSize);
|
||||
totalError += averageErrorForRegion(img1, img2, x, x2, y, y2);
|
||||
regionCount++;
|
||||
}
|
||||
}
|
||||
return totalError / regionCount;
|
||||
}
|
||||
|
||||
public double averageErrorForRegion(Image img1, Image img2, int x1, int x2, int y1, int y2) {
|
||||
int[] col1 = getAverageColor(img1, x1, x2, y1, y2);
|
||||
int[] col2 = getAverageColor(img2, x1, x2, y1, y2);
|
||||
return Palette.distance(col1, col2);
|
||||
}
|
||||
|
||||
public int[] getAverageColor(Image img, int x1, int x2, int y1, int y2) {
|
||||
long[] colors = new long[3];
|
||||
long pixelCount = 0;
|
||||
for (int x = x1; x < x2 && x < img.getWidth(); x++) {
|
||||
for (int y = y1; y < y2 && y < img.getHeight(); y++) {
|
||||
int color = img.getPixelReader().getArgb(x, y) & 0x0ffffff;
|
||||
int[] col = Palette.parseIntColor(color);
|
||||
colors[0] += (long) col[0];
|
||||
colors[1] += (long) col[1];
|
||||
colors[2] += (long) col[2];
|
||||
pixelCount++;
|
||||
}
|
||||
}
|
||||
return new int[]{
|
||||
(int) (colors[0] / pixelCount),
|
||||
(int) (colors[1] / pixelCount),
|
||||
(int) (colors[2] / pixelCount)
|
||||
};
|
||||
}
|
||||
|
||||
private void configureSierraLite(ImageDitherEngine ditherEngine) {
|
||||
int[][] coefficients = new int[][]{
|
||||
{0, 0, 0}, {0, 1, 0}, {0, 1, 0}, {2, 0, 0}, {0, 0, 0}};
|
||||
ditherEngine.setCoefficients(coefficients);
|
||||
ditherEngine.setDivisor(5);
|
||||
}
|
||||
|
||||
private void fillColor(WritableImage img, Color color) {
|
||||
for (int x = 0; x < img.getWidth(); x++) {
|
||||
for (int y = 0; y < img.getHeight(); y++) {
|
||||
img.getPixelWriter().setColor(x, y, color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private WritableImage getTestConversion(ImageDitherEngine dither, WritableImage source) {
|
||||
dither.setSourceImage(source);
|
||||
configureSierraLite(dither);
|
||||
dither.dither(true);
|
||||
return dither.getPreviewImage();
|
||||
}
|
||||
}
|
@ -1,108 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2015 The 8-Bit Bunch. Licensed under the Apache License, Version 1.1
|
||||
* (the "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at <http://www.apache.org/licenses/LICENSE-1.1>.
|
||||
* Unless required by applicable law or agreed to in writing, software distributed under
|
||||
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
|
||||
* ANY KIND, either express or implied. See the License for the specific language
|
||||
* governing permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.badvision.outlaweditor.test;
|
||||
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
|
||||
import javax.swing.SwingUtilities;
|
||||
|
||||
import javafx.application.Platform;
|
||||
import javafx.embed.swing.JFXPanel;
|
||||
|
||||
import org.junit.Rule;
|
||||
import org.junit.rules.TestRule;
|
||||
import org.junit.runner.Description;
|
||||
import org.junit.runners.model.Statement;
|
||||
|
||||
/**
|
||||
* A JUnit {@link Rule} for running tests on the JavaFX thread and performing
|
||||
* JavaFX initialization. To include in your test case, add the following code:
|
||||
*
|
||||
* <pre>
|
||||
* {@literal @}Rule
|
||||
* public JavaFXThreadingRule jfxRule = new JavaFXThreadingRule();
|
||||
* </pre>
|
||||
*
|
||||
* @author Andy Till
|
||||
*
|
||||
*/
|
||||
public class JavaFXThreadingRule implements TestRule {
|
||||
|
||||
/**
|
||||
* Flag for setting up the JavaFX, we only need to do this once for all tests.
|
||||
*/
|
||||
private static boolean jfxIsSetup;
|
||||
|
||||
@Override
|
||||
public Statement apply(Statement statement, Description description) {
|
||||
|
||||
return new OnJFXThreadStatement(statement);
|
||||
}
|
||||
|
||||
private static class OnJFXThreadStatement extends Statement {
|
||||
|
||||
private final Statement statement;
|
||||
|
||||
public OnJFXThreadStatement(Statement aStatement) {
|
||||
statement = aStatement;
|
||||
}
|
||||
|
||||
private Throwable rethrownException = null;
|
||||
|
||||
@Override
|
||||
public void evaluate() throws Throwable {
|
||||
|
||||
if(!jfxIsSetup) {
|
||||
setupJavaFX();
|
||||
|
||||
jfxIsSetup = true;
|
||||
}
|
||||
|
||||
final CountDownLatch countDownLatch = new CountDownLatch(1);
|
||||
|
||||
Platform.runLater(() -> {
|
||||
try {
|
||||
statement.evaluate();
|
||||
} catch (Throwable e) {
|
||||
rethrownException = e;
|
||||
}
|
||||
countDownLatch.countDown();
|
||||
});
|
||||
|
||||
countDownLatch.await();
|
||||
|
||||
// if an exception was thrown by the statement during evaluation,
|
||||
// then re-throw it to fail the test
|
||||
if(rethrownException != null) {
|
||||
throw rethrownException;
|
||||
}
|
||||
}
|
||||
|
||||
protected void setupJavaFX() throws InterruptedException {
|
||||
|
||||
long timeMillis = System.currentTimeMillis();
|
||||
|
||||
final CountDownLatch latch = new CountDownLatch(1);
|
||||
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
// initializes JavaFX environment
|
||||
new JFXPanel();
|
||||
|
||||
latch.countDown();
|
||||
});
|
||||
|
||||
System.out.println("javafx initialising...");
|
||||
latch.await();
|
||||
System.out.println("javafx is initialised in " + (System.currentTimeMillis() - timeMillis) + "ms");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -1,108 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2015 The 8-Bit Bunch. Licensed under the Apache License, Version 1.1
|
||||
* (the "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at <http://www.apache.org/licenses/LICENSE-1.1>.
|
||||
* Unless required by applicable law or agreed to in writing, software distributed under
|
||||
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
|
||||
* ANY KIND, either express or implied. See the License for the specific language
|
||||
* governing permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.badvision.outlaweditor.test;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.StringWriter;
|
||||
import javax.xml.bind.JAXB;
|
||||
import javax.xml.bind.JAXBContext;
|
||||
import javax.xml.bind.Marshaller;
|
||||
import org.badvision.outlaweditor.data.xml.Block;
|
||||
import org.badvision.outlaweditor.data.xml.GameData;
|
||||
import org.badvision.outlaweditor.data.xml.Map;
|
||||
import org.badvision.outlaweditor.data.xml.Scripts;
|
||||
import org.badvision.outlaweditor.data.xml.Script;
|
||||
import org.junit.Test;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Various sanity checks of the Mythos script editing feature
|
||||
*
|
||||
* @author blurry
|
||||
*/
|
||||
public class TestMythosEditor {
|
||||
|
||||
static public final String[] testData = {"testData/blocklytest1.xml", "testData/blocklytest2.xml"};
|
||||
static public final String XML_HEADER = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n";
|
||||
|
||||
@Test
|
||||
public void deserializeTest() throws Exception {
|
||||
for (String path : testData) {
|
||||
System.out.println("testing " + path);
|
||||
Block theBlock = getBlock(path);
|
||||
assertNotNull(theBlock);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void roundtripTest() throws Exception {
|
||||
JAXBContext context = JAXBContext.newInstance("org.badvision.outlaweditor.data.xml");
|
||||
Marshaller m = context.createMarshaller();
|
||||
m.setProperty(Marshaller.JAXB_FRAGMENT, true);
|
||||
for (String path : testData) {
|
||||
System.out.println("testing " + path);
|
||||
Block theBlock = getBlock(path);
|
||||
StringWriter testWriter = new StringWriter();
|
||||
|
||||
GameData d = new GameData();
|
||||
Map map = new Map();
|
||||
d.getMap().add(map);
|
||||
Script script = new Script();
|
||||
script.setName("name");
|
||||
script.setDescription("description");
|
||||
script.setBlock(theBlock);
|
||||
map.setScripts(new Scripts());
|
||||
map.getScripts().getScript().add(script);
|
||||
m.marshal(d, testWriter);
|
||||
String testOutput = testWriter.getBuffer().toString();
|
||||
assertNotNull(testOutput);
|
||||
// assertSimilar(XML_HEADER + testOutput, getFileContents(path));
|
||||
}
|
||||
}
|
||||
|
||||
public String getFileContents(String path) throws IOException {
|
||||
BufferedInputStream data = (BufferedInputStream) getClass().getClassLoader().getResource(path).getContent();
|
||||
byte[] buf = new byte[1024];
|
||||
StringBuilder contents = new StringBuilder();
|
||||
while (data.available() > 0) {
|
||||
int len = data.read(buf);
|
||||
if (len > 0) {
|
||||
String append = new String(buf, 0, len);
|
||||
contents.append(append);
|
||||
}
|
||||
}
|
||||
return contents.toString();
|
||||
}
|
||||
|
||||
public void assertSimilar(String s1, String s2) {
|
||||
s1 = s1.replaceAll("\\s", "");
|
||||
s1 = s1.replaceAll("\\n", "");
|
||||
s2 = s2.replaceAll("\\s", "");
|
||||
s2 = s2.replaceAll("\\n", "");
|
||||
assertEquals(s1, s2);
|
||||
}
|
||||
|
||||
public Block getBlock(String resourcePath) throws IOException {
|
||||
BufferedInputStream data = (BufferedInputStream) getClass().getClassLoader().getResource(resourcePath).getContent();
|
||||
assertNotNull(data);
|
||||
GameData gd = JAXB.unmarshal(data, GameData.class);
|
||||
assertNotNull(gd);
|
||||
assertNotNull(gd.getMap());
|
||||
assertEquals(1, gd.getMap().size());
|
||||
Scripts s = gd.getMap().get(0).getScripts();
|
||||
assertNotNull(s);
|
||||
assertNotNull(s.getScript());
|
||||
assertTrue(s.getScript().size() > 0);
|
||||
Script scr = (Script) s.getScript().get(0);
|
||||
return scr.getBlock();
|
||||
}
|
||||
}
|
@ -43,7 +43,7 @@
|
||||
<plugin>
|
||||
<groupId>com.gluonhq</groupId>
|
||||
<artifactId>gluonfx-maven-plugin</artifactId>
|
||||
<version>1.0.18</version>
|
||||
<version>1.0.19</version>
|
||||
<configuration>
|
||||
<mainClass>jace.LawlessLegends</mainClass>
|
||||
</configuration>
|
||||
@ -178,5 +178,15 @@
|
||||
<version>18</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.lwjgl</groupId>
|
||||
<artifactId>lwjgl-openal</artifactId>
|
||||
<version>3.3.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javazoom</groupId>
|
||||
<artifactId>jlayer</artifactId>
|
||||
<version>1.0.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
@ -27,8 +27,6 @@ import java.util.Timer;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javax.sound.sampled.SourceDataLine;
|
||||
|
||||
import jace.Emulator;
|
||||
import jace.LawlessLegends;
|
||||
import jace.config.ConfigurableField;
|
||||
@ -106,10 +104,6 @@ public class Speaker extends SoundGeneratorDevice {
|
||||
*/
|
||||
@ConfigurableField(name = "Idle cycles before sleep", shortName = "idle")
|
||||
public static int MAX_IDLE_CYCLES = 2000000;
|
||||
/**
|
||||
* Java sound output
|
||||
*/
|
||||
private SourceDataLine sdl;
|
||||
/**
|
||||
* Manifestation of the apple speaker softswitch
|
||||
*/
|
||||
|
@ -1,5 +1,6 @@
|
||||
package jace.config;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.logging.Level;
|
||||
|
||||
// NOTE: This is generated code. Do not edit.
|
||||
@ -68,7 +69,7 @@ public class InvokableActionRegistryImpl extends InvokableActionRegistry {
|
||||
putStaticAction(annotation.name(), jace.EmulatorUILogic.class, annotation, (b) -> {
|
||||
try {
|
||||
jace.EmulatorUILogic.saveScreenshotRaw();
|
||||
} catch (Exception ex) {
|
||||
} catch (IOException ex) {
|
||||
logger.log(Level.SEVERE, "Error invoking jace.EmulatorUILogic.saveScreenshotRaw", ex);
|
||||
}
|
||||
});
|
||||
@ -116,7 +117,7 @@ public class InvokableActionRegistryImpl extends InvokableActionRegistry {
|
||||
putStaticAction(annotation.name(), jace.EmulatorUILogic.class, annotation, (b) -> {
|
||||
try {
|
||||
jace.EmulatorUILogic.saveScreenshot();
|
||||
} catch (Exception ex) {
|
||||
} catch (IOException ex) {
|
||||
logger.log(Level.SEVERE, "Error invoking jace.EmulatorUILogic.saveScreenshot", ex);
|
||||
}
|
||||
});
|
||||
|
@ -18,14 +18,13 @@
|
||||
*/
|
||||
package jace.core;
|
||||
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javax.sound.sampled.AudioFormat;
|
||||
import javax.sound.sampled.AudioSystem;
|
||||
import javax.sound.sampled.DataLine;
|
||||
import javax.sound.sampled.LineUnavailableException;
|
||||
import javax.sound.sampled.SourceDataLine;
|
||||
import org.lwjgl.openal.AL;
|
||||
import org.lwjgl.openal.ALC;
|
||||
import org.lwjgl.openal.ALC10;
|
||||
import org.lwjgl.openal.ALCCapabilities;
|
||||
import org.lwjgl.openal.ALCapabilities;
|
||||
|
||||
import jace.config.ConfigurableField;
|
||||
|
||||
@ -53,37 +52,42 @@ public class SoundMixer extends Device {
|
||||
@ConfigurableField(name = "Mute", shortName = "mute")
|
||||
public static boolean MUTE = false;
|
||||
|
||||
private final String defaultDeviceName;
|
||||
private long audioDevice;
|
||||
private long audioContext;
|
||||
private ALCCapabilities audioCapabilities;
|
||||
private ALCapabilities audioLibCapabilities;
|
||||
public SoundMixer(Computer computer) {
|
||||
super(computer);
|
||||
defaultDeviceName = ALC10.alcGetString(0, ALC10.ALC_DEFAULT_DEVICE_SPECIFIER);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a javafx media sourcedataline for stereo 44.1KHz 16-bit signed PCM data.
|
||||
* Confirm the line is open before using it.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public SourceDataLine getLine() {
|
||||
if (MUTE) {
|
||||
return null;
|
||||
// Lots of inspiration from https://www.youtube.com/watch?v=dLrqBTeipwg
|
||||
@Override
|
||||
public void attach() {
|
||||
super.attach();
|
||||
audioDevice = ALC10.alcOpenDevice(defaultDeviceName);
|
||||
// TODO: Other attributes?
|
||||
audioContext = ALC10.alcCreateContext(audioDevice, new int[]{0});
|
||||
ALC10.alcMakeContextCurrent(audioContext);
|
||||
audioCapabilities = ALC.createCapabilities(audioDevice);
|
||||
audioLibCapabilities = AL.createCapabilities(audioCapabilities);
|
||||
if (!audioLibCapabilities.OpenAL10) {
|
||||
Logger.getLogger(SoundMixer.class.getName()).warning("OpenAL 1.0 not supported");
|
||||
detach();
|
||||
}
|
||||
|
||||
SourceDataLine line = null;
|
||||
try {
|
||||
// WAV is a little endian format, so it makes sense to stick with that.
|
||||
AudioFormat format = new AudioFormat(RATE, BITS, 2, true, false);
|
||||
DataLine.Info info = new DataLine.Info(SourceDataLine.class, format);
|
||||
line = (SourceDataLine) AudioSystem.getLine(info);
|
||||
line.open(format);
|
||||
line.start();
|
||||
// Logger.getLogger(getClass().getName()).log(Level.INFO, "Obtained source data line: %s, buffer size %d".formatted(line.getFormat(), line.getBufferSize()));
|
||||
} catch (IllegalArgumentException | LineUnavailableException e) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, "Error getting sound line: {0}", e.getMessage());
|
||||
}
|
||||
return line;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detach() {
|
||||
ALC10.alcDestroyContext(audioContext);
|
||||
ALC10.alcCloseDevice(audioDevice);
|
||||
MUTE = true;
|
||||
super.detach();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
public String getDeviceName() {
|
||||
return "Sound Output";
|
||||
}
|
||||
@ -93,17 +97,16 @@ public class SoundMixer extends Device {
|
||||
return "mixer";
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public synchronized void reconfigure() {
|
||||
if (MUTE) {
|
||||
detach();
|
||||
} else {
|
||||
attach();
|
||||
}
|
||||
}
|
||||
|
||||
public byte randomByte() {
|
||||
return (byte) (Math.random() * 256);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ public class LawlessComputer extends Apple2e {
|
||||
private void renderWithMask(int... mask) throws InterruptedException {
|
||||
RAM128k ram = (RAM128k) getMemory();
|
||||
byte[] framebuffer = getBootScreen();
|
||||
int maskOffset = 0;
|
||||
int maskOffset;
|
||||
for (int i = 0; i < 0x02000; i += 2) {
|
||||
int y = Video.identifyHiresRow(i + 0x02000);
|
||||
int x = i - Video.calculateHiresOffset(y);
|
||||
|
@ -3,16 +3,14 @@ package jace.lawless;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.URL;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
@ -132,17 +130,18 @@ public class LawlessHacks extends Cheats {
|
||||
private Media getAudioTrack(int number) {
|
||||
String filename = getSongName(number);
|
||||
String pathStr = "/jace/data/sound/" + filename;
|
||||
// System.out.println("looking in "+pathStr);
|
||||
URL path = getClass().getResource(pathStr);
|
||||
if (path == null) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
return new Media(path.toURI().toString());
|
||||
} catch (URISyntaxException e) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.WARNING, "Unable to load audio track " + number + " from " + pathStr, e);
|
||||
return null;
|
||||
String resourcePath = path.toString();
|
||||
System.out.println("Playing " + resourcePath);
|
||||
if (resourcePath.startsWith("resource:")) {
|
||||
resourcePath = Paths.get(resourcePath).toFile().getAbsolutePath();
|
||||
System.out.println("Playing " + resourcePath);
|
||||
}
|
||||
// Log path
|
||||
return new Media(resourcePath);
|
||||
}
|
||||
|
||||
private void playMusic(int track, boolean switchScores) {
|
||||
|
@ -36,6 +36,8 @@ module lawlesslegends {
|
||||
requires javafx.mediaEmpty;
|
||||
requires javafx.media;
|
||||
requires jdk.jsobject;
|
||||
requires org.lwjgl.openal;
|
||||
|
||||
// requires org.reflections;
|
||||
|
||||
opens jace to javafx.graphics, javafx.fxml, javafx.controls;
|
||||
|
@ -381,9 +381,67 @@
|
||||
{"name":"skip","parameterTypes":["long"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.media.sound.DirectAudioDevice",
|
||||
"methods":[
|
||||
{
|
||||
"name":"addFormat",
|
||||
"parameterTypes":[
|
||||
"java.util.Vector",
|
||||
"int",
|
||||
"int",
|
||||
"int",
|
||||
"float",
|
||||
"int",
|
||||
"boolean",
|
||||
"boolean"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.media.sound.DirectAudioDeviceProvider$DirectAudioDeviceInfo",
|
||||
"methods":[
|
||||
{
|
||||
"name":"<init>",
|
||||
"parameterTypes":[
|
||||
"int",
|
||||
"int",
|
||||
"int",
|
||||
"java.lang.String",
|
||||
"java.lang.String",
|
||||
"java.lang.String",
|
||||
"java.lang.String"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.media.sound.PortMixerProvider$PortMixerInfo",
|
||||
"methods":[
|
||||
{
|
||||
"name":"<init>",
|
||||
"parameterTypes":[
|
||||
"int",
|
||||
"java.lang.String",
|
||||
"java.lang.String",
|
||||
"java.lang.String",
|
||||
"java.lang.String"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"java.lang.Boolean",
|
||||
"methods":[{"name":"booleanValue","parameterTypes":[] }]
|
||||
"methods":[
|
||||
{
|
||||
"name":"getBoolean",
|
||||
"parameterTypes":[
|
||||
"java.lang.String"
|
||||
]
|
||||
},
|
||||
{"name":"booleanValue","parameterTypes":[] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"java.lang.Class",
|
||||
|
@ -1,36 +1,30 @@
|
||||
{
|
||||
"resources":{
|
||||
"includes":[
|
||||
{
|
||||
"pattern":"\\Qjace\\E"
|
||||
},
|
||||
{
|
||||
"pattern":"^codemirror.*$"
|
||||
},
|
||||
{
|
||||
"pattern":"^jace.*$"
|
||||
},
|
||||
{
|
||||
"pattern":"^jace.data..*$"
|
||||
},
|
||||
{
|
||||
"pattern":"^jace.data.sound..*$"
|
||||
}
|
||||
]},
|
||||
"bundles":[
|
||||
{
|
||||
"name":"com.sun.javafx.tk.quantum.QuantumMessagesBundle",
|
||||
"locales":[
|
||||
"",
|
||||
"und"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com/sun/javafx/scene/control/skin/resources/controls",
|
||||
"locales":[
|
||||
"",
|
||||
"und"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
"includes":[
|
||||
{"pattern": ".*\\.bin$"},
|
||||
{"pattern": ".*\\.rom$"},
|
||||
{"pattern": ".*\\.mp3$"},
|
||||
{"pattern": ".*\\.png$"},
|
||||
{"pattern": ".*\\.jpg$"},
|
||||
{"pattern": ".*\\.jpeg$"},
|
||||
{"pattern": ".*\\.gif$"},
|
||||
{"pattern": ".*\\.bmp$"},
|
||||
{"pattern": ".*\\.ttf$"},
|
||||
{"pattern": ".*\\.raw$"},
|
||||
{"pattern": ".*\\.xml$"},
|
||||
{"pattern": ".*\\.fxml$"},
|
||||
{"pattern": ".*\\.css$"},
|
||||
{"pattern": ".*\\.gls$"},
|
||||
{"pattern": ".*\\.json$"},
|
||||
{"pattern": ".*\\.dat$"},
|
||||
{"pattern": ".*\\.license$"},
|
||||
{"pattern": ".*\\.frag$"},
|
||||
{"pattern": ".*\\.vert$"},
|
||||
{"pattern": ".*\\.obj$"},
|
||||
{"pattern": ".*\\.mtl$"},
|
||||
{"pattern": ".*\\.js$"},
|
||||
{"pattern": ".*\\.html$"},
|
||||
{"pattern": ".*\\.txt$"}
|
||||
]
|
||||
}
|
||||
}
|
@ -0,0 +1,519 @@
|
||||
[
|
||||
{
|
||||
"name":"[Lcom.sun.glass.ui.Screen;"
|
||||
},
|
||||
{
|
||||
"name":"[Ljava.lang.String;"
|
||||
},
|
||||
{
|
||||
"name":"com.sun.glass.ui.Application",
|
||||
"methods":[
|
||||
{"name":"notifyDidBecomeActive","parameterTypes":[] },
|
||||
{"name":"notifyDidFinishLaunching","parameterTypes":[] },
|
||||
{"name":"notifyDidHide","parameterTypes":[] },
|
||||
{"name":"notifyDidResignActive","parameterTypes":[] },
|
||||
{"name":"notifyDidUnhide","parameterTypes":[] },
|
||||
{"name":"notifyOpenFiles","parameterTypes":["java.lang.String[]"] },
|
||||
{"name":"notifyWillBecomeActive","parameterTypes":[] },
|
||||
{"name":"notifyWillFinishLaunching","parameterTypes":[] },
|
||||
{"name":"notifyWillHide","parameterTypes":[] },
|
||||
{"name":"notifyWillResignActive","parameterTypes":[] },
|
||||
{"name":"notifyWillUnhide","parameterTypes":[] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.glass.ui.CommonDialogs$ExtensionFilter",
|
||||
"methods":[
|
||||
{"name":"extensionsToArray","parameterTypes":[] },
|
||||
{"name":"getDescription","parameterTypes":[] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.glass.ui.CommonDialogs$FileChooserResult",
|
||||
"methods":[{"name":"<init>","parameterTypes":["java.util.List","com.sun.glass.ui.CommonDialogs$ExtensionFilter"] }]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.glass.ui.EventLoop",
|
||||
"methods":[
|
||||
{"name":"<init>","parameterTypes":[] },
|
||||
{"name":"enter","parameterTypes":[] },
|
||||
{"name":"leave","parameterTypes":["java.lang.Object"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.glass.ui.Menu",
|
||||
"methods":[
|
||||
{"name":"notifyMenuClosed","parameterTypes":[] },
|
||||
{"name":"notifyMenuOpening","parameterTypes":[] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.glass.ui.MenuItem$Callback",
|
||||
"methods":[
|
||||
{"name":"action","parameterTypes":[] },
|
||||
{"name":"validate","parameterTypes":[] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.glass.ui.Screen",
|
||||
"methods":[
|
||||
{"name":"<init>","parameterTypes":["long","int","int","int","int","int","int","int","int","int","int","int","int","int","int","int","float","float","float","float"] },
|
||||
{"name":"notifySettingsChanged","parameterTypes":[] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.glass.ui.Size",
|
||||
"methods":[{"name":"<init>","parameterTypes":["int","int"] }]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.glass.ui.View",
|
||||
"fields":[{"name":"ptr"}],
|
||||
"methods":[
|
||||
{"name":"getAccessible","parameterTypes":[] },
|
||||
{"name":"notifyDragDrop","parameterTypes":["int","int","int","int","int"] },
|
||||
{"name":"notifyDragEnd","parameterTypes":["int"] },
|
||||
{"name":"notifyDragEnter","parameterTypes":["int","int","int","int","int"] },
|
||||
{"name":"notifyDragLeave","parameterTypes":[] },
|
||||
{"name":"notifyDragOver","parameterTypes":["int","int","int","int","int"] },
|
||||
{"name":"notifyInputMethod","parameterTypes":["java.lang.String","int[]","int[]","byte[]","int","int","int"] },
|
||||
{"name":"notifyInputMethodCandidatePosRequest","parameterTypes":["int"] },
|
||||
{"name":"notifyKey","parameterTypes":["int","int","char[]","int"] },
|
||||
{"name":"notifyMenu","parameterTypes":["int","int","int","int","boolean"] },
|
||||
{"name":"notifyMouse","parameterTypes":["int","int","int","int","int","int","int","boolean","boolean"] },
|
||||
{"name":"notifyRepaint","parameterTypes":["int","int","int","int"] },
|
||||
{"name":"notifyResize","parameterTypes":["int","int"] },
|
||||
{"name":"notifyView","parameterTypes":["int"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.javafx.font.coretext.CGAffineTransform",
|
||||
"fields":[
|
||||
{"name":"a"},
|
||||
{"name":"b"},
|
||||
{"name":"c"},
|
||||
{"name":"d"},
|
||||
{"name":"tx"},
|
||||
{"name":"ty"}
|
||||
],
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.javafx.font.coretext.CGPoint",
|
||||
"fields":[
|
||||
{"name":"x"},
|
||||
{"name":"y"}
|
||||
],
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.javafx.font.coretext.CGRect",
|
||||
"fields":[
|
||||
{"name":"origin"},
|
||||
{"name":"size"}
|
||||
],
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.javafx.font.coretext.CGSize",
|
||||
"fields":[
|
||||
{"name":"height"},
|
||||
{"name":"width"}
|
||||
],
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.javafx.iio.common.ImageLoaderImpl",
|
||||
"methods":[{"name":"emitWarning","parameterTypes":["java.lang.String"] }]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.javafx.iio.jpeg.JPEGImageLoader",
|
||||
"methods":[
|
||||
{"name":"setInputAttributes","parameterTypes":["int","int","int","int","int","byte[]"] },
|
||||
{"name":"setOutputAttributes","parameterTypes":["int","int"] },
|
||||
{"name":"updateImageProgress","parameterTypes":["int"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.media.jfxmedia.locator.Locator",
|
||||
"methods":[{"name":"getStringLocation","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.media.jfxmedia.logging.Logger",
|
||||
"methods":[
|
||||
{"name":"logMsg","parameterTypes":["int","java.lang.String"] },
|
||||
{"name":"logMsg","parameterTypes":["int","java.lang.String","java.lang.String","java.lang.String"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.media.jfxmediaimpl.NativeMediaPlayer",
|
||||
"methods":[
|
||||
{"name":"sendAudioSpectrumEvent","parameterTypes":["double","double","boolean"] },
|
||||
{"name":"sendAudioTrack","parameterTypes":["boolean","long","java.lang.String","int","java.lang.String","int","int","float"] },
|
||||
{"name":"sendBufferProgressEvent","parameterTypes":["double","long","long","long"] },
|
||||
{"name":"sendDurationUpdateEvent","parameterTypes":["double"] },
|
||||
{"name":"sendFrameSizeChangedEvent","parameterTypes":["int","int"] },
|
||||
{"name":"sendMarkerEvent","parameterTypes":["java.lang.String","double"] },
|
||||
{"name":"sendNewFrameEvent","parameterTypes":["long"] },
|
||||
{"name":"sendPlayerHaltEvent","parameterTypes":["java.lang.String","double"] },
|
||||
{"name":"sendPlayerMediaErrorEvent","parameterTypes":["int"] },
|
||||
{"name":"sendPlayerStateEvent","parameterTypes":["int","double"] },
|
||||
{"name":"sendSubtitleTrack","parameterTypes":["boolean","long","java.lang.String","int","java.lang.String"] },
|
||||
{"name":"sendVideoTrack","parameterTypes":["boolean","long","java.lang.String","int","int","int","float","boolean"] },
|
||||
{"name":"sendWarning","parameterTypes":["int","java.lang.String"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.media.jfxmediaimpl.platform.osx.OSXMediaPlayer"
|
||||
},
|
||||
{
|
||||
"name":"com.sun.media.sound.DirectAudioDevice",
|
||||
"methods":[{"name":"addFormat","parameterTypes":["java.util.Vector","int","int","int","float","int","boolean","boolean"] }]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.media.sound.DirectAudioDeviceProvider$DirectAudioDeviceInfo",
|
||||
"methods":[{"name":"<init>","parameterTypes":["int","int","int","java.lang.String","java.lang.String","java.lang.String","java.lang.String"] }]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.media.sound.PortMixerProvider$PortMixerInfo",
|
||||
"methods":[{"name":"<init>","parameterTypes":["int","java.lang.String","java.lang.String","java.lang.String","java.lang.String"] }]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.BackForwardList",
|
||||
"methods":[{"name":"notifyChanged","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.BackForwardList$Entry",
|
||||
"methods":[
|
||||
{"name":"<init>","parameterTypes":["long","long"] },
|
||||
{"name":"notifyItemChanged","parameterTypes":[] },
|
||||
{"name":"notifyItemDestroyed","parameterTypes":[] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.CursorManager",
|
||||
"methods":[
|
||||
{"name":"getCursorManager","parameterTypes":[] },
|
||||
{"name":"getPredefinedCursorID","parameterTypes":["int"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.FileSystem",
|
||||
"methods":[
|
||||
{"name":"fwkFileExists","parameterTypes":["java.lang.String"] },
|
||||
{"name":"fwkMakeAllDirectories","parameterTypes":["java.lang.String"] },
|
||||
{"name":"fwkPathByAppendingComponent","parameterTypes":["java.lang.String","java.lang.String"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.MainThread",
|
||||
"methods":[{"name":"fwkScheduleDispatchFunctions","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.Timer",
|
||||
"methods":[
|
||||
{"name":"fwkSetFireTime","parameterTypes":["double"] },
|
||||
{"name":"fwkStopTimer","parameterTypes":[] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.WCWidget",
|
||||
"methods":[
|
||||
{"name":"fwkDestroy","parameterTypes":[] },
|
||||
{"name":"fwkRequestFocus","parameterTypes":[] },
|
||||
{"name":"fwkSetBounds","parameterTypes":["int","int","int","int"] },
|
||||
{"name":"fwkSetCursor","parameterTypes":["long"] },
|
||||
{"name":"fwkSetVisible","parameterTypes":["boolean"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.WebPage",
|
||||
"methods":[
|
||||
{"name":"fwkAddMessageToConsole","parameterTypes":["java.lang.String","int","java.lang.String"] },
|
||||
{"name":"fwkAlert","parameterTypes":["java.lang.String"] },
|
||||
{"name":"fwkCanRunBeforeUnloadConfirmPanel","parameterTypes":[] },
|
||||
{"name":"fwkChooseFile","parameterTypes":["java.lang.String","boolean","java.lang.String"] },
|
||||
{"name":"fwkCloseWindow","parameterTypes":[] },
|
||||
{"name":"fwkConfirm","parameterTypes":["java.lang.String"] },
|
||||
{"name":"fwkCreateWindow","parameterTypes":["boolean","boolean","boolean","boolean"] },
|
||||
{"name":"fwkDidClearWindowObject","parameterTypes":["long","long"] },
|
||||
{"name":"fwkFireLoadEvent","parameterTypes":["long","int","java.lang.String","java.lang.String","double","int"] },
|
||||
{"name":"fwkFireResourceLoadEvent","parameterTypes":["long","int","int","java.lang.String","double","int"] },
|
||||
{"name":"fwkFrameCreated","parameterTypes":["long"] },
|
||||
{"name":"fwkFrameDestroyed","parameterTypes":["long"] },
|
||||
{"name":"fwkGetPageBounds","parameterTypes":[] },
|
||||
{"name":"fwkGetWindowBounds","parameterTypes":[] },
|
||||
{"name":"fwkPermitAcceptResourceAction","parameterTypes":["long","java.lang.String"] },
|
||||
{"name":"fwkPermitEnableScriptsAction","parameterTypes":["long","java.lang.String"] },
|
||||
{"name":"fwkPermitNavigateAction","parameterTypes":["long","java.lang.String"] },
|
||||
{"name":"fwkPermitNewWindowAction","parameterTypes":["long","java.lang.String"] },
|
||||
{"name":"fwkPermitRedirectAction","parameterTypes":["long","java.lang.String"] },
|
||||
{"name":"fwkPermitSubmitDataAction","parameterTypes":["long","java.lang.String","java.lang.String","boolean"] },
|
||||
{"name":"fwkPrompt","parameterTypes":["java.lang.String","java.lang.String"] },
|
||||
{"name":"fwkRemoveRequestURL","parameterTypes":["long","int"] },
|
||||
{"name":"fwkRepaint","parameterTypes":["int","int","int","int"] },
|
||||
{"name":"fwkRunBeforeUnloadConfirmPanel","parameterTypes":["java.lang.String"] },
|
||||
{"name":"fwkScreenToWindow","parameterTypes":["com.sun.webkit.graphics.WCPoint"] },
|
||||
{"name":"fwkSetCursor","parameterTypes":["long"] },
|
||||
{"name":"fwkSetFocus","parameterTypes":["boolean"] },
|
||||
{"name":"fwkSetRequestURL","parameterTypes":["long","int","java.lang.String"] },
|
||||
{"name":"fwkSetScrollbarsVisible","parameterTypes":["boolean"] },
|
||||
{"name":"fwkSetStatusbarText","parameterTypes":["java.lang.String"] },
|
||||
{"name":"fwkSetTooltip","parameterTypes":["java.lang.String"] },
|
||||
{"name":"fwkSetWindowBounds","parameterTypes":["int","int","int","int"] },
|
||||
{"name":"fwkShowWindow","parameterTypes":[] },
|
||||
{"name":"fwkTransferFocus","parameterTypes":["boolean"] },
|
||||
{"name":"fwkWindowToScreen","parameterTypes":["com.sun.webkit.graphics.WCPoint"] },
|
||||
{"name":"getHostWindow","parameterTypes":[] },
|
||||
{"name":"getPage","parameterTypes":[] },
|
||||
{"name":"getRenderTheme","parameterTypes":[] },
|
||||
{"name":"setInputMethodState","parameterTypes":["boolean"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.dom.JSObject",
|
||||
"fields":[{"name":"UNDEFINED"}],
|
||||
"methods":[{"name":"<init>","parameterTypes":["long","int"] }]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.graphics.Ref",
|
||||
"methods":[
|
||||
{"name":"getID","parameterTypes":[] },
|
||||
{"name":"ref","parameterTypes":[] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.graphics.ScrollBarTheme",
|
||||
"methods":[{"name":"getThickness","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.graphics.WCFont",
|
||||
"methods":[
|
||||
{"name":"getAscent","parameterTypes":[] },
|
||||
{"name":"getCapHeight","parameterTypes":[] },
|
||||
{"name":"getDescent","parameterTypes":[] },
|
||||
{"name":"getGlyphBoundingBox","parameterTypes":["int"] },
|
||||
{"name":"getGlyphCodes","parameterTypes":["char[]"] },
|
||||
{"name":"getGlyphWidth","parameterTypes":["int"] },
|
||||
{"name":"getLineGap","parameterTypes":[] },
|
||||
{"name":"getLineSpacing","parameterTypes":[] },
|
||||
{"name":"getTextRuns","parameterTypes":["java.lang.String"] },
|
||||
{"name":"getXHeight","parameterTypes":[] },
|
||||
{"name":"hasUniformLineMetrics","parameterTypes":[] },
|
||||
{"name":"hashCode","parameterTypes":[] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.graphics.WCGraphicsManager",
|
||||
"methods":[
|
||||
{"name":"createWCPath","parameterTypes":[] },
|
||||
{"name":"getGraphicsManager","parameterTypes":[] },
|
||||
{"name":"getWCFont","parameterTypes":["java.lang.String","boolean","boolean","float"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.graphics.WCPoint",
|
||||
"methods":[
|
||||
{"name":"<init>","parameterTypes":["float","float"] },
|
||||
{"name":"getX","parameterTypes":[] },
|
||||
{"name":"getY","parameterTypes":[] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.graphics.WCRectangle",
|
||||
"fields":[
|
||||
{"name":"h"},
|
||||
{"name":"w"},
|
||||
{"name":"x"},
|
||||
{"name":"y"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.graphics.WCRenderQueue",
|
||||
"methods":[
|
||||
{"name":"fwkAddBuffer","parameterTypes":["java.nio.ByteBuffer"] },
|
||||
{"name":"fwkDisposeGraphics","parameterTypes":[] },
|
||||
{"name":"refFloatArr","parameterTypes":["float[]"] },
|
||||
{"name":"refIntArr","parameterTypes":["int[]"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.graphics.WCTextRun",
|
||||
"methods":[
|
||||
{"name":"getCharOffset","parameterTypes":["int"] },
|
||||
{"name":"getEnd","parameterTypes":[] },
|
||||
{"name":"getGlyph","parameterTypes":["int"] },
|
||||
{"name":"getGlyphCount","parameterTypes":[] },
|
||||
{"name":"getGlyphPosAndAdvance","parameterTypes":["int"] },
|
||||
{"name":"getStart","parameterTypes":[] },
|
||||
{"name":"isLeftToRight","parameterTypes":[] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.network.FormDataElement",
|
||||
"methods":[
|
||||
{"name":"fwkCreateFromByteArray","parameterTypes":["byte[]"] },
|
||||
{"name":"fwkCreateFromFile","parameterTypes":["java.lang.String"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.network.NetworkContext",
|
||||
"methods":[
|
||||
{"name":"canHandleURL","parameterTypes":["java.lang.String"] },
|
||||
{"name":"fwkGetMaximumHTTPConnectionCountPerHost","parameterTypes":[] },
|
||||
{"name":"fwkLoad","parameterTypes":["com.sun.webkit.WebPage","boolean","java.lang.String","java.lang.String","java.lang.String","com.sun.webkit.network.FormDataElement[]","long"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.webkit.network.URLLoaderBase",
|
||||
"methods":[{"name":"fwkCancel","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"jace.ide.Program"
|
||||
},
|
||||
{
|
||||
"name":"java.io.File",
|
||||
"methods":[{"name":"<init>","parameterTypes":["java.lang.String"] }]
|
||||
},
|
||||
{
|
||||
"name":"java.io.InputStream",
|
||||
"methods":[
|
||||
{"name":"read","parameterTypes":["byte[]","int","int"] },
|
||||
{"name":"skip","parameterTypes":["long"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.media.sound.DirectAudioDevice",
|
||||
"methods":[
|
||||
{
|
||||
"name":"addFormat",
|
||||
"parameterTypes":[
|
||||
"java.util.Vector",
|
||||
"int",
|
||||
"int",
|
||||
"int",
|
||||
"float",
|
||||
"int",
|
||||
"boolean",
|
||||
"boolean"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.media.sound.DirectAudioDeviceProvider$DirectAudioDeviceInfo",
|
||||
"methods":[
|
||||
{
|
||||
"name":"<init>",
|
||||
"parameterTypes":[
|
||||
"int",
|
||||
"int",
|
||||
"int",
|
||||
"java.lang.String",
|
||||
"java.lang.String",
|
||||
"java.lang.String",
|
||||
"java.lang.String"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.media.sound.PortMixerProvider$PortMixerInfo",
|
||||
"methods":[
|
||||
{
|
||||
"name":"<init>",
|
||||
"parameterTypes":[
|
||||
"int",
|
||||
"java.lang.String",
|
||||
"java.lang.String",
|
||||
"java.lang.String",
|
||||
"java.lang.String"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"java.lang.Boolean",
|
||||
"methods":[
|
||||
{
|
||||
"name":"getBoolean",
|
||||
"parameterTypes":[
|
||||
"java.lang.String"
|
||||
]
|
||||
},
|
||||
{"name":"booleanValue","parameterTypes":[] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"java.lang.Class",
|
||||
"methods":[
|
||||
{"name":"forName","parameterTypes":["java.lang.String","boolean","java.lang.ClassLoader"] },
|
||||
{"name":"isArray","parameterTypes":[] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"java.lang.ClassLoader",
|
||||
"methods":[
|
||||
{"name":"getPlatformClassLoader","parameterTypes":[] },
|
||||
{"name":"loadClass","parameterTypes":["java.lang.String"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"java.lang.Integer",
|
||||
"methods":[
|
||||
{"name":"<init>","parameterTypes":["int"] },
|
||||
{"name":"intValue","parameterTypes":[] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"java.lang.Long",
|
||||
"methods":[{"name":"longValue","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"java.lang.Number"
|
||||
},
|
||||
{
|
||||
"name":"java.lang.Object",
|
||||
"methods":[{"name":"getClass","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"java.lang.Runnable",
|
||||
"methods":[{"name":"run","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"java.lang.String",
|
||||
"methods":[
|
||||
{"name":"lastIndexOf","parameterTypes":["int"] },
|
||||
{"name":"substring","parameterTypes":["int"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"java.lang.System",
|
||||
"methods":[
|
||||
{"name":"getProperty","parameterTypes":["java.lang.String"] },
|
||||
{"name":"setProperty","parameterTypes":["java.lang.String","java.lang.String"] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"java.util.ArrayList",
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"java.util.List",
|
||||
"methods":[{"name":"add","parameterTypes":["java.lang.Object"] }]
|
||||
},
|
||||
{
|
||||
"name":"java.util.Map",
|
||||
"methods":[{"name":"get","parameterTypes":["java.lang.Object"] }]
|
||||
},
|
||||
{
|
||||
"name":"jdk.internal.loader.ClassLoaders$PlatformClassLoader"
|
||||
},
|
||||
{
|
||||
"name":"org.graalvm.jniutils.JNIExceptionWrapperEntryPoints",
|
||||
"methods":[{"name":"getClassName","parameterTypes":["java.lang.Class"] }]
|
||||
},
|
||||
{
|
||||
"name":"sun.launcher.LauncherHelper$FXHelper",
|
||||
"methods":[{"name":"main","parameterTypes":["java.lang.String[]"] }]
|
||||
}
|
||||
]
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,30 @@
|
||||
{
|
||||
"resources":{
|
||||
"includes":[
|
||||
{"pattern": ".*\\.bin$"},
|
||||
{"pattern": ".*\\.rom$"},
|
||||
{"pattern": ".*\\.mp3$"},
|
||||
{"pattern": ".*\\.png$"},
|
||||
{"pattern": ".*\\.jpg$"},
|
||||
{"pattern": ".*\\.jpeg$"},
|
||||
{"pattern": ".*\\.gif$"},
|
||||
{"pattern": ".*\\.bmp$"},
|
||||
{"pattern": ".*\\.ttf$"},
|
||||
{"pattern": ".*\\.raw$"},
|
||||
{"pattern": ".*\\.xml$"},
|
||||
{"pattern": ".*\\.fxml$"},
|
||||
{"pattern": ".*\\.css$"},
|
||||
{"pattern": ".*\\.gls$"},
|
||||
{"pattern": ".*\\.json$"},
|
||||
{"pattern": ".*\\.dat$"},
|
||||
{"pattern": ".*\\.license$"},
|
||||
{"pattern": ".*\\.frag$"},
|
||||
{"pattern": ".*\\.vert$"},
|
||||
{"pattern": ".*\\.obj$"},
|
||||
{"pattern": ".*\\.mtl$"},
|
||||
{"pattern": ".*\\.js$"},
|
||||
{"pattern": ".*\\.html$"},
|
||||
{"pattern": ".*\\.txt$"}
|
||||
]
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
{
|
||||
"types":[
|
||||
{
|
||||
"name":"jace.config.Configuration$ConfigNode"
|
||||
},
|
||||
{
|
||||
"name":"java.lang.Boolean"
|
||||
},
|
||||
{
|
||||
"name":"java.lang.Integer"
|
||||
},
|
||||
{
|
||||
"name":"java.lang.Number"
|
||||
},
|
||||
{
|
||||
"name":"java.lang.Object[]"
|
||||
},
|
||||
{
|
||||
"name":"java.lang.String"
|
||||
},
|
||||
{
|
||||
"name":"java.util.TreeMap"
|
||||
}
|
||||
],
|
||||
"lambdaCapturingTypes":[
|
||||
]
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user