Adds gpg, sonatype, changes groupId
This commit is contained in:
@@ -19,7 +19,7 @@ Add the plugin to your project:
|
|||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>com.github.gtache</groupId>
|
<groupId>ch.gtache.fxml-compiler</groupId>
|
||||||
<artifactId>fxml-compiler-maven-plugin</artifactId>
|
<artifactId>fxml-compiler-maven-plugin</artifactId>
|
||||||
<version>1.0.0</version>
|
<version>1.0.0</version>
|
||||||
<executions>
|
<executions>
|
||||||
@@ -41,7 +41,7 @@ Optionally add dependencies to the plugin (e.g. when using MediaView and control
|
|||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>com.github.gtache</groupId>
|
<groupId>ch.gtache.fxml-compiler</groupId>
|
||||||
<artifactId>fxml-compiler-maven-plugin</artifactId>
|
<artifactId>fxml-compiler-maven-plugin</artifactId>
|
||||||
<version>1.0.0</version>
|
<version>1.0.0</version>
|
||||||
<executions>
|
<executions>
|
||||||
@@ -114,7 +114,7 @@ There are four ways to inject fields into a controller:
|
|||||||
- `SETTERS`: controller setters methods
|
- `SETTERS`: controller setters methods
|
||||||
- `controller.setField(value)`
|
- `controller.setField(value)`
|
||||||
- `FACTORY`: controller factory
|
- `FACTORY`: controller factory
|
||||||
- `controller = factory.create(fieldMap)`
|
- `controller = factory.apply(fieldMap)`
|
||||||
- `factory` is a `Function<Map<String, Object>, Controller>` instance that is created at runtime and passed to the
|
- `factory` is a `Function<Map<String, Object>, Controller>` instance that is created at runtime and passed to the
|
||||||
view.
|
view.
|
||||||
- `fieldMap` is a map of field name (String) to value (Object) that is computed during the view `load` method.
|
- `fieldMap` is a map of field name (String) to value (Object) that is computed during the view `load` method.
|
||||||
|
|||||||
@@ -4,11 +4,13 @@
|
|||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
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>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.github.gtache</groupId>
|
<groupId>ch.gtache.fxml-compiler</groupId>
|
||||||
<artifactId>fxml-compiler</artifactId>
|
<artifactId>fxml-compiler</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>fxml-compiler-api</artifactId>
|
<artifactId>fxml-compiler-api</artifactId>
|
||||||
|
|
||||||
|
<name>fxml-compiler-api</name>
|
||||||
|
<description>API module for the fxml-compiler project</description>
|
||||||
</project>
|
</project>
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler;
|
package ch.gtache.fxml.compiler;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler;
|
package ch.gtache.fxml.compiler;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base field {@link InjectionType}s
|
* Base field {@link InjectionType}s
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler;
|
package ch.gtache.fxml.compiler;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler;
|
package ch.gtache.fxml.compiler;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base controller {@link InjectionType}s
|
* Base controller {@link InjectionType}s
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler;
|
package ch.gtache.fxml.compiler;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base methods {@link InjectionType}s
|
* Base methods {@link InjectionType}s
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler;
|
package ch.gtache.fxml.compiler;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Exception thrown when a generation error occurs
|
* Exception thrown when a generation error occurs
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.github.gtache.fxml.compiler;
|
package ch.gtache.fxml.compiler;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.compatibility.GenerationCompatibility;
|
import ch.gtache.fxml.compiler.compatibility.GenerationCompatibility;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.github.gtache.fxml.compiler;
|
package ch.gtache.fxml.compiler;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedObject;
|
import ch.gtache.fxml.compiler.parsing.ParsedObject;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a request for a code generation
|
* Represents a request for a code generation
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler;
|
package ch.gtache.fxml.compiler;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generates compiled FXML code
|
* Generates compiled FXML code
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler;
|
package ch.gtache.fxml.compiler;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler;
|
package ch.gtache.fxml.compiler;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A type of injection for controllers
|
* A type of injection for controllers
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler;
|
package ch.gtache.fxml.compiler;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base {@link InjectionType}s for resource bundles
|
* Base {@link InjectionType}s for resource bundles
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler;
|
package ch.gtache.fxml.compiler;
|
||||||
|
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler.compatibility;
|
package ch.gtache.fxml.compiler.compatibility;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compatibility information for generated code
|
* Compatibility information for generated code
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler.compatibility;
|
package ch.gtache.fxml.compiler.compatibility;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Type of list collector to use for generated code
|
* Type of list collector to use for generated code
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler.parsing;
|
package ch.gtache.fxml.compiler.parsing;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler.parsing;
|
package ch.gtache.fxml.compiler.parsing;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Exception thrown when a parsing error occurs
|
* Exception thrown when a parsing error occurs
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler.parsing;
|
package ch.gtache.fxml.compiler.parsing;
|
||||||
|
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler.parsing;
|
package ch.gtache.fxml.compiler.parsing;
|
||||||
|
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler.parsing;
|
package ch.gtache.fxml.compiler.parsing;
|
||||||
|
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler.parsing;
|
package ch.gtache.fxml.compiler.parsing;
|
||||||
|
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.SequencedCollection;
|
import java.util.SequencedCollection;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler.parsing;
|
package ch.gtache.fxml.compiler.parsing;
|
||||||
|
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler.parsing;
|
package ch.gtache.fxml.compiler.parsing;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.SequencedCollection;
|
import java.util.SequencedCollection;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler.parsing;
|
package ch.gtache.fxml.compiler.parsing;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parsed property/attribute from FXML
|
* Parsed property/attribute from FXML
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler.parsing;
|
package ch.gtache.fxml.compiler.parsing;
|
||||||
|
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler.parsing;
|
package ch.gtache.fxml.compiler.parsing;
|
||||||
|
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler.parsing;
|
package ch.gtache.fxml.compiler.parsing;
|
||||||
|
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* API module for FXML compiler
|
* API module for FXML compiler
|
||||||
*/
|
*/
|
||||||
module com.github.gtache.fxml.compiler.api {
|
module ch.gtache.fxml.compiler.api {
|
||||||
exports com.github.gtache.fxml.compiler;
|
exports ch.gtache.fxml.compiler;
|
||||||
exports com.github.gtache.fxml.compiler.compatibility;
|
exports ch.gtache.fxml.compiler.compatibility;
|
||||||
exports com.github.gtache.fxml.compiler.parsing;
|
exports ch.gtache.fxml.compiler.parsing;
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler;
|
package ch.gtache.fxml.compiler;
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler;
|
package ch.gtache.fxml.compiler;
|
||||||
|
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler;
|
package ch.gtache.fxml.compiler;
|
||||||
|
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler.compatibility;
|
package ch.gtache.fxml.compiler.compatibility;
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler.parsing;
|
package ch.gtache.fxml.compiler.parsing;
|
||||||
|
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler.parsing;
|
package ch.gtache.fxml.compiler.parsing;
|
||||||
|
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler.parsing;
|
package ch.gtache.fxml.compiler.parsing;
|
||||||
|
|
||||||
|
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler.parsing;
|
package ch.gtache.fxml.compiler.parsing;
|
||||||
|
|
||||||
|
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler.parsing;
|
package ch.gtache.fxml.compiler.parsing;
|
||||||
|
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler.parsing;
|
package ch.gtache.fxml.compiler.parsing;
|
||||||
|
|
||||||
|
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler.parsing;
|
package ch.gtache.fxml.compiler.parsing;
|
||||||
|
|
||||||
|
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler.parsing;
|
package ch.gtache.fxml.compiler.parsing;
|
||||||
|
|
||||||
|
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler.parsing;
|
package ch.gtache.fxml.compiler.parsing;
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler.parsing;
|
package ch.gtache.fxml.compiler.parsing;
|
||||||
|
|
||||||
|
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
@@ -4,16 +4,19 @@
|
|||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
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>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.github.gtache</groupId>
|
<groupId>ch.gtache.fxml-compiler</groupId>
|
||||||
<artifactId>fxml-compiler</artifactId>
|
<artifactId>fxml-compiler</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>fxml-compiler-core</artifactId>
|
<artifactId>fxml-compiler-core</artifactId>
|
||||||
|
|
||||||
|
<name>fxml-compiler-core</name>
|
||||||
|
<description>Core module for the fxml-compiler project</description>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.gtache</groupId>
|
<groupId>ch.gtache.fxml-compiler</groupId>
|
||||||
<artifactId>fxml-compiler-api</artifactId>
|
<artifactId>fxml-compiler-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.github.gtache.fxml.compiler.compatibility.impl;
|
package ch.gtache.fxml.compiler.compatibility.impl;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.compatibility.GenerationCompatibility;
|
import ch.gtache.fxml.compiler.compatibility.GenerationCompatibility;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of {@link GenerationCompatibility}
|
* Implementation of {@link GenerationCompatibility}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl;
|
package ch.gtache.fxml.compiler.impl;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl;
|
package ch.gtache.fxml.compiler.impl;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.ControllerFieldInfo;
|
import ch.gtache.fxml.compiler.ControllerFieldInfo;
|
||||||
import com.github.gtache.fxml.compiler.GenericTypes;
|
import ch.gtache.fxml.compiler.GenericTypes;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl;
|
package ch.gtache.fxml.compiler.impl;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.ControllerFieldInfo;
|
import ch.gtache.fxml.compiler.ControllerFieldInfo;
|
||||||
import com.github.gtache.fxml.compiler.ControllerInfo;
|
import ch.gtache.fxml.compiler.ControllerInfo;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl;
|
package ch.gtache.fxml.compiler.impl;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.ControllerFieldInjectionType;
|
import ch.gtache.fxml.compiler.ControllerFieldInjectionType;
|
||||||
import com.github.gtache.fxml.compiler.ControllerInjectionType;
|
import ch.gtache.fxml.compiler.ControllerInjectionType;
|
||||||
import com.github.gtache.fxml.compiler.ControllerMethodsInjectionType;
|
import ch.gtache.fxml.compiler.ControllerMethodsInjectionType;
|
||||||
import com.github.gtache.fxml.compiler.GenerationParameters;
|
import ch.gtache.fxml.compiler.GenerationParameters;
|
||||||
import com.github.gtache.fxml.compiler.ResourceBundleInjectionType;
|
import ch.gtache.fxml.compiler.ResourceBundleInjectionType;
|
||||||
import com.github.gtache.fxml.compiler.compatibility.GenerationCompatibility;
|
import ch.gtache.fxml.compiler.compatibility.GenerationCompatibility;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl;
|
package ch.gtache.fxml.compiler.impl;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.ControllerInfo;
|
import ch.gtache.fxml.compiler.ControllerInfo;
|
||||||
import com.github.gtache.fxml.compiler.GenerationParameters;
|
import ch.gtache.fxml.compiler.GenerationParameters;
|
||||||
import com.github.gtache.fxml.compiler.GenerationRequest;
|
import ch.gtache.fxml.compiler.GenerationRequest;
|
||||||
import com.github.gtache.fxml.compiler.SourceInfo;
|
import ch.gtache.fxml.compiler.SourceInfo;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedObject;
|
import ch.gtache.fxml.compiler.parsing.ParsedObject;
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl;
|
package ch.gtache.fxml.compiler.impl;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.GenerationException;
|
import ch.gtache.fxml.compiler.GenerationException;
|
||||||
import com.github.gtache.fxml.compiler.GenerationRequest;
|
import ch.gtache.fxml.compiler.GenerationRequest;
|
||||||
import com.github.gtache.fxml.compiler.Generator;
|
import ch.gtache.fxml.compiler.Generator;
|
||||||
import com.github.gtache.fxml.compiler.impl.internal.GenerationProgress;
|
import ch.gtache.fxml.compiler.impl.internal.GenerationProgress;
|
||||||
import com.github.gtache.fxml.compiler.impl.internal.HelperProvider;
|
import ch.gtache.fxml.compiler.impl.internal.HelperProvider;
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl;
|
package ch.gtache.fxml.compiler.impl;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.GenericTypes;
|
import ch.gtache.fxml.compiler.GenericTypes;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl;
|
package ch.gtache.fxml.compiler.impl;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.SourceInfo;
|
import ch.gtache.fxml.compiler.SourceInfo;
|
||||||
|
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -1,22 +1,22 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl.internal;
|
package ch.gtache.fxml.compiler.impl.internal;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.ControllerFieldInjectionType;
|
import ch.gtache.fxml.compiler.ControllerFieldInjectionType;
|
||||||
import com.github.gtache.fxml.compiler.GenerationException;
|
import ch.gtache.fxml.compiler.GenerationException;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedObject;
|
import ch.gtache.fxml.compiler.parsing.ParsedObject;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedProperty;
|
import ch.gtache.fxml.compiler.parsing.ParsedProperty;
|
||||||
import javafx.beans.property.Property;
|
import javafx.beans.property.Property;
|
||||||
import javafx.beans.property.ReadOnlyProperty;
|
import javafx.beans.property.ReadOnlyProperty;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.SequencedCollection;
|
import java.util.SequencedCollection;
|
||||||
|
|
||||||
import static com.github.gtache.fxml.compiler.impl.internal.GenerationHelper.*;
|
import static ch.gtache.fxml.compiler.impl.internal.GenerationHelper.*;
|
||||||
import static java.util.Objects.requireNonNull;
|
import static java.util.Objects.requireNonNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Formatter for property bindings
|
* Formatter for property bindings
|
||||||
*/
|
*/
|
||||||
class BindingFormatter {
|
final class BindingFormatter {
|
||||||
|
|
||||||
private static final String PROPERTY = "Property";
|
private static final String PROPERTY = "Property";
|
||||||
|
|
||||||
@@ -72,10 +72,11 @@ class BindingFormatter {
|
|||||||
if (bidirectional ? hasWriteProperty(className, methodName) : hasReadProperty(className, methodName)) {
|
if (bidirectional ? hasWriteProperty(className, methodName) : hasReadProperty(className, methodName)) {
|
||||||
final var returnType = ReflectionHelper.getReturnType(className, methodName);
|
final var returnType = ReflectionHelper.getReturnType(className, methodName);
|
||||||
final var expression = helperProvider.getExpressionFormatter().format(value, returnType);
|
final var expression = helperProvider.getExpressionFormatter().format(value, returnType);
|
||||||
|
final var binding = INDENT_8 + parentVariable + "." + methodName + "()." + bindMethod + "(" + expression + ");\n";
|
||||||
if (isControllerWithFactory(value)) {
|
if (isControllerWithFactory(value)) {
|
||||||
controllerFactoryPostAction.add(INDENT_8 + parentVariable + "." + methodName + "()." + bindMethod + "(" + expression + ");\n");
|
controllerFactoryPostAction.add(binding);
|
||||||
} else {
|
} else {
|
||||||
sb.append(INDENT_8).append(parentVariable).append(".").append(methodName).append("().").append(bindMethod).append("(").append(expression).append(");\n");
|
sb.append(binding);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new GenerationException("Cannot bind " + name + " on " + className);
|
throw new GenerationException("Cannot bind " + name + " on " + className);
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl.internal;
|
package ch.gtache.fxml.compiler.impl.internal;
|
||||||
|
|
||||||
import java.lang.reflect.Constructor;
|
import java.lang.reflect.Constructor;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl.internal;
|
package ch.gtache.fxml.compiler.impl.internal;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.GenerationException;
|
import ch.gtache.fxml.compiler.GenerationException;
|
||||||
import com.github.gtache.fxml.compiler.impl.GeneratorImpl;
|
import ch.gtache.fxml.compiler.impl.GeneratorImpl;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedObject;
|
import ch.gtache.fxml.compiler.parsing.ParsedObject;
|
||||||
|
|
||||||
import java.lang.reflect.Constructor;
|
import java.lang.reflect.Constructor;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -40,6 +40,7 @@ final class ConstructorHelper {
|
|||||||
final var type = parameter.type();
|
final var type = parameter.type();
|
||||||
final var p = parsedObject.attributes().get(entry.getKey());
|
final var p = parsedObject.attributes().get(entry.getKey());
|
||||||
if (p == null) {
|
if (p == null) {
|
||||||
|
//Check if it is a complex property: If yes, throw an exception
|
||||||
final var c = parsedObject.properties().entrySet().stream().filter(e ->
|
final var c = parsedObject.properties().entrySet().stream().filter(e ->
|
||||||
e.getKey().name().equals(entry.getKey())).findFirst().orElse(null);
|
e.getKey().name().equals(entry.getKey())).findFirst().orElse(null);
|
||||||
if (c == null) {
|
if (c == null) {
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl.internal;
|
package ch.gtache.fxml.compiler.impl.internal;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.ControllerFieldInjectionType;
|
import ch.gtache.fxml.compiler.ControllerFieldInjectionType;
|
||||||
import com.github.gtache.fxml.compiler.ControllerInfo;
|
import ch.gtache.fxml.compiler.ControllerInfo;
|
||||||
import com.github.gtache.fxml.compiler.ControllerMethodsInjectionType;
|
import ch.gtache.fxml.compiler.ControllerMethodsInjectionType;
|
||||||
import com.github.gtache.fxml.compiler.impl.GeneratorImpl;
|
import ch.gtache.fxml.compiler.impl.GeneratorImpl;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedProperty;
|
import ch.gtache.fxml.compiler.parsing.ParsedProperty;
|
||||||
|
|
||||||
import java.util.SequencedCollection;
|
import java.util.SequencedCollection;
|
||||||
|
|
||||||
import static com.github.gtache.fxml.compiler.impl.internal.GenerationHelper.INDENT_8;
|
import static ch.gtache.fxml.compiler.impl.internal.GenerationHelper.INDENT_8;
|
||||||
import static java.util.Objects.requireNonNull;
|
import static java.util.Objects.requireNonNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -98,6 +98,7 @@ final class ControllerInjector {
|
|||||||
final var controllerMethod = property.value().replace("#", "");
|
final var controllerMethod = property.value().replace("#", "");
|
||||||
return switch (methodInjectionType) {
|
return switch (methodInjectionType) {
|
||||||
case REFERENCE -> {
|
case REFERENCE -> {
|
||||||
|
// Checks if the method has the event as argument
|
||||||
final var hasArgument = controllerInfo.handlerHasArgument(controllerMethod);
|
final var hasArgument = controllerInfo.handlerHasArgument(controllerMethod);
|
||||||
if (hasArgument) {
|
if (hasArgument) {
|
||||||
yield INDENT_8 + parentVariable + "." + setMethod + "(controller::" + controllerMethod + ");\n";
|
yield INDENT_8 + parentVariable + "." + setMethod + "(controller::" + controllerMethod + ");\n";
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl.internal;
|
package ch.gtache.fxml.compiler.impl.internal;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.ControllerFieldInjectionType;
|
import ch.gtache.fxml.compiler.ControllerFieldInjectionType;
|
||||||
import com.github.gtache.fxml.compiler.GenerationException;
|
import ch.gtache.fxml.compiler.GenerationException;
|
||||||
import javafx.beans.property.ReadOnlyProperty;
|
import javafx.beans.property.ReadOnlyProperty;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@@ -42,8 +42,10 @@ class ExpressionFormatter {
|
|||||||
String format(final String expression, final Class<?> returnType) throws GenerationException {
|
String format(final String expression, final Class<?> returnType) throws GenerationException {
|
||||||
final var cleaned = expression.substring(2, expression.length() - 1).trim();
|
final var cleaned = expression.substring(2, expression.length() - 1).trim();
|
||||||
if (cleaned.contains(".")) {
|
if (cleaned.contains(".")) {
|
||||||
|
//Reference to the property of an object
|
||||||
return getDotExpression(expression, returnType);
|
return getDotExpression(expression, returnType);
|
||||||
} else {
|
} else {
|
||||||
|
//Simple reference to an id
|
||||||
return getNonDotExpression(expression);
|
return getNonDotExpression(expression);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -54,12 +56,14 @@ class ExpressionFormatter {
|
|||||||
if (split.size() == 2) {
|
if (split.size() == 2) {
|
||||||
final var referenced = split.get(0);
|
final var referenced = split.get(0);
|
||||||
final var value = split.get(1);
|
final var value = split.get(1);
|
||||||
|
//Checks if it is a reference to the controller
|
||||||
if (referenced.equals("controller")) {
|
if (referenced.equals("controller")) {
|
||||||
return getControllerExpression(value, returnType);
|
return getControllerExpression(value, returnType);
|
||||||
} else {
|
} else {
|
||||||
return getNonControllerExpression(referenced, value);
|
return getNonControllerExpression(referenced, value);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
//Only supports one level
|
||||||
throw new GenerationException("Unsupported binding : " + expression);
|
throw new GenerationException("Unsupported binding : " + expression);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl.internal;
|
package ch.gtache.fxml.compiler.impl.internal;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.ControllerFieldInjectionType;
|
import ch.gtache.fxml.compiler.ControllerFieldInjectionType;
|
||||||
import com.github.gtache.fxml.compiler.GenerationException;
|
import ch.gtache.fxml.compiler.GenerationException;
|
||||||
import com.github.gtache.fxml.compiler.impl.GeneratorImpl;
|
import ch.gtache.fxml.compiler.impl.GeneratorImpl;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedProperty;
|
import ch.gtache.fxml.compiler.parsing.ParsedProperty;
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.SequencedCollection;
|
import java.util.SequencedCollection;
|
||||||
|
|
||||||
import static com.github.gtache.fxml.compiler.impl.internal.GenerationHelper.EXPRESSION_PREFIX;
|
import static ch.gtache.fxml.compiler.impl.internal.GenerationHelper.EXPRESSION_PREFIX;
|
||||||
import static com.github.gtache.fxml.compiler.impl.internal.GenerationHelper.INDENT_8;
|
import static ch.gtache.fxml.compiler.impl.internal.GenerationHelper.INDENT_8;
|
||||||
import static java.util.Objects.requireNonNull;
|
import static java.util.Objects.requireNonNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -81,6 +81,7 @@ final class FieldSetter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static String getSetString(final ParsedProperty property, final String parentVariable) throws GenerationException {
|
private static String getSetString(final ParsedProperty property, final String parentVariable) throws GenerationException {
|
||||||
|
//If field injection is setter or factory, assume controller has getters
|
||||||
final var methodName = GenerationHelper.getSetMethod(property);
|
final var methodName = GenerationHelper.getSetMethod(property);
|
||||||
final var value = property.value().replace(EXPRESSION_PREFIX, "");
|
final var value = property.value().replace(EXPRESSION_PREFIX, "");
|
||||||
final var split = value.split("\\.");
|
final var split = value.split("\\.");
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl.internal;
|
package ch.gtache.fxml.compiler.impl.internal;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.GenerationException;
|
import ch.gtache.fxml.compiler.GenerationException;
|
||||||
import com.github.gtache.fxml.compiler.impl.GeneratorImpl;
|
import ch.gtache.fxml.compiler.impl.GeneratorImpl;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedObject;
|
import ch.gtache.fxml.compiler.parsing.ParsedObject;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedProperty;
|
import ch.gtache.fxml.compiler.parsing.ParsedProperty;
|
||||||
import javafx.scene.text.FontPosture;
|
import javafx.scene.text.FontPosture;
|
||||||
import javafx.scene.text.FontWeight;
|
import javafx.scene.text.FontWeight;
|
||||||
|
|
||||||
@@ -13,8 +13,8 @@ import java.net.URISyntaxException;
|
|||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import static com.github.gtache.fxml.compiler.impl.internal.GenerationHelper.FX_ID;
|
import static ch.gtache.fxml.compiler.impl.internal.GenerationHelper.FX_ID;
|
||||||
import static com.github.gtache.fxml.compiler.impl.internal.GenerationHelper.getSortedAttributes;
|
import static ch.gtache.fxml.compiler.impl.internal.GenerationHelper.getSortedAttributes;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper methods for {@link GeneratorImpl} to format fonts
|
* Helper methods for {@link GeneratorImpl} to format fonts
|
||||||
@@ -89,7 +89,7 @@ final class FontFormatter {
|
|||||||
for (final var property : sortedAttributes) {
|
for (final var property : sortedAttributes) {
|
||||||
switch (property.name()) {
|
switch (property.name()) {
|
||||||
case FX_ID -> {
|
case FX_ID -> {
|
||||||
//Do nothing
|
//Do nothing, handled in ObjectFormatter
|
||||||
}
|
}
|
||||||
case "name" -> {
|
case "name" -> {
|
||||||
try {
|
try {
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl.internal;
|
package ch.gtache.fxml.compiler.impl.internal;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.GenerationException;
|
import ch.gtache.fxml.compiler.GenerationException;
|
||||||
import com.github.gtache.fxml.compiler.compatibility.GenerationCompatibility;
|
import ch.gtache.fxml.compiler.compatibility.GenerationCompatibility;
|
||||||
import com.github.gtache.fxml.compiler.impl.GeneratorImpl;
|
import ch.gtache.fxml.compiler.impl.GeneratorImpl;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedObject;
|
import ch.gtache.fxml.compiler.parsing.ParsedObject;
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl.internal;
|
package ch.gtache.fxml.compiler.impl.internal;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.impl.GeneratorImpl;
|
import ch.gtache.fxml.compiler.impl.GeneratorImpl;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedObject;
|
import ch.gtache.fxml.compiler.parsing.ParsedObject;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedProperty;
|
import ch.gtache.fxml.compiler.parsing.ParsedProperty;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl.internal;
|
package ch.gtache.fxml.compiler.impl.internal;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.GenerationRequest;
|
import ch.gtache.fxml.compiler.GenerationRequest;
|
||||||
import com.github.gtache.fxml.compiler.impl.GeneratorImpl;
|
import ch.gtache.fxml.compiler.impl.GeneratorImpl;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl.internal;
|
package ch.gtache.fxml.compiler.impl.internal;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.ControllerFieldInjectionType;
|
import ch.gtache.fxml.compiler.ControllerFieldInjectionType;
|
||||||
import com.github.gtache.fxml.compiler.ControllerMethodsInjectionType;
|
import ch.gtache.fxml.compiler.ControllerMethodsInjectionType;
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl.internal;
|
package ch.gtache.fxml.compiler.impl.internal;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl.internal;
|
package ch.gtache.fxml.compiler.impl.internal;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.GenerationException;
|
import ch.gtache.fxml.compiler.GenerationException;
|
||||||
import com.github.gtache.fxml.compiler.impl.GeneratorImpl;
|
import ch.gtache.fxml.compiler.impl.GeneratorImpl;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedObject;
|
import ch.gtache.fxml.compiler.parsing.ParsedObject;
|
||||||
|
|
||||||
import static com.github.gtache.fxml.compiler.impl.internal.GenerationHelper.FX_ID;
|
import static ch.gtache.fxml.compiler.impl.internal.GenerationHelper.FX_ID;
|
||||||
import static com.github.gtache.fxml.compiler.impl.internal.GenerationHelper.getSortedAttributes;
|
import static ch.gtache.fxml.compiler.impl.internal.GenerationHelper.getSortedAttributes;
|
||||||
import static java.util.Objects.requireNonNull;
|
import static java.util.Objects.requireNonNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -42,7 +42,7 @@ final class ImageFormatter {
|
|||||||
for (final var property : sortedAttributes) {
|
for (final var property : sortedAttributes) {
|
||||||
switch (property.name()) {
|
switch (property.name()) {
|
||||||
case FX_ID -> {
|
case FX_ID -> {
|
||||||
//Do nothing
|
//Do nothing, handled in ObjectFormatter
|
||||||
}
|
}
|
||||||
case "url" -> url = helperProvider.getURLFormatter().formatURL(property.value());
|
case "url" -> url = helperProvider.getURLFormatter().formatURL(property.value());
|
||||||
case "requestedWidth" -> requestedWidth = Double.parseDouble(property.value());
|
case "requestedWidth" -> requestedWidth = Double.parseDouble(property.value());
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl.internal;
|
package ch.gtache.fxml.compiler.impl.internal;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.ControllerFieldInjectionType;
|
import ch.gtache.fxml.compiler.ControllerFieldInjectionType;
|
||||||
import com.github.gtache.fxml.compiler.ControllerInjectionType;
|
import ch.gtache.fxml.compiler.ControllerInjectionType;
|
||||||
import com.github.gtache.fxml.compiler.GenerationException;
|
import ch.gtache.fxml.compiler.GenerationException;
|
||||||
import com.github.gtache.fxml.compiler.GenerationRequest;
|
import ch.gtache.fxml.compiler.GenerationRequest;
|
||||||
import com.github.gtache.fxml.compiler.InjectionType;
|
import ch.gtache.fxml.compiler.InjectionType;
|
||||||
import com.github.gtache.fxml.compiler.SourceInfo;
|
import ch.gtache.fxml.compiler.SourceInfo;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedInclude;
|
import ch.gtache.fxml.compiler.parsing.ParsedInclude;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl.internal;
|
package ch.gtache.fxml.compiler.impl.internal;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.ControllerFieldInjectionType;
|
import ch.gtache.fxml.compiler.ControllerFieldInjectionType;
|
||||||
import com.github.gtache.fxml.compiler.ControllerInjectionType;
|
import ch.gtache.fxml.compiler.ControllerInjectionType;
|
||||||
import com.github.gtache.fxml.compiler.ControllerMethodsInjectionType;
|
import ch.gtache.fxml.compiler.ControllerMethodsInjectionType;
|
||||||
import com.github.gtache.fxml.compiler.GenerationException;
|
import ch.gtache.fxml.compiler.GenerationException;
|
||||||
import com.github.gtache.fxml.compiler.ResourceBundleInjectionType;
|
import ch.gtache.fxml.compiler.ResourceBundleInjectionType;
|
||||||
|
|
||||||
import static java.util.Objects.requireNonNull;
|
import static java.util.Objects.requireNonNull;
|
||||||
|
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl.internal;
|
package ch.gtache.fxml.compiler.impl.internal;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.GenerationException;
|
import ch.gtache.fxml.compiler.GenerationException;
|
||||||
import com.github.gtache.fxml.compiler.GenerationRequest;
|
import ch.gtache.fxml.compiler.GenerationRequest;
|
||||||
import com.github.gtache.fxml.compiler.impl.GeneratorImpl;
|
import ch.gtache.fxml.compiler.impl.GeneratorImpl;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedConstant;
|
import ch.gtache.fxml.compiler.parsing.ParsedConstant;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedCopy;
|
import ch.gtache.fxml.compiler.parsing.ParsedCopy;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedDefine;
|
import ch.gtache.fxml.compiler.parsing.ParsedDefine;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedFactory;
|
import ch.gtache.fxml.compiler.parsing.ParsedFactory;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedInclude;
|
import ch.gtache.fxml.compiler.parsing.ParsedInclude;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedObject;
|
import ch.gtache.fxml.compiler.parsing.ParsedObject;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedReference;
|
import ch.gtache.fxml.compiler.parsing.ParsedReference;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedText;
|
import ch.gtache.fxml.compiler.parsing.ParsedText;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedValue;
|
import ch.gtache.fxml.compiler.parsing.ParsedValue;
|
||||||
import com.github.gtache.fxml.compiler.parsing.impl.ParsedPropertyImpl;
|
import ch.gtache.fxml.compiler.parsing.impl.ParsedPropertyImpl;
|
||||||
import javafx.scene.Node;
|
import javafx.scene.Node;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
@@ -25,7 +25,7 @@ import java.util.List;
|
|||||||
import java.util.SequencedCollection;
|
import java.util.SequencedCollection;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import static com.github.gtache.fxml.compiler.impl.internal.GenerationHelper.*;
|
import static ch.gtache.fxml.compiler.impl.internal.GenerationHelper.*;
|
||||||
import static java.util.Objects.requireNonNull;
|
import static java.util.Objects.requireNonNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl.internal;
|
package ch.gtache.fxml.compiler.impl.internal;
|
||||||
|
|
||||||
import static java.util.Objects.requireNonNull;
|
import static java.util.Objects.requireNonNull;
|
||||||
|
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl.internal;
|
package ch.gtache.fxml.compiler.impl.internal;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.ControllerFieldInjectionType;
|
import ch.gtache.fxml.compiler.ControllerFieldInjectionType;
|
||||||
import com.github.gtache.fxml.compiler.GenerationException;
|
import ch.gtache.fxml.compiler.GenerationException;
|
||||||
import com.github.gtache.fxml.compiler.ResourceBundleInjectionType;
|
import ch.gtache.fxml.compiler.ResourceBundleInjectionType;
|
||||||
import com.github.gtache.fxml.compiler.impl.GeneratorImpl;
|
import ch.gtache.fxml.compiler.impl.GeneratorImpl;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedDefine;
|
import ch.gtache.fxml.compiler.parsing.ParsedDefine;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedObject;
|
import ch.gtache.fxml.compiler.parsing.ParsedObject;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedProperty;
|
import ch.gtache.fxml.compiler.parsing.ParsedProperty;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedText;
|
import ch.gtache.fxml.compiler.parsing.ParsedText;
|
||||||
import com.github.gtache.fxml.compiler.parsing.impl.ParsedPropertyImpl;
|
import ch.gtache.fxml.compiler.parsing.impl.ParsedPropertyImpl;
|
||||||
import javafx.event.EventHandler;
|
import javafx.event.EventHandler;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -16,7 +16,7 @@ import java.util.List;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.SequencedCollection;
|
import java.util.SequencedCollection;
|
||||||
|
|
||||||
import static com.github.gtache.fxml.compiler.impl.internal.GenerationHelper.*;
|
import static ch.gtache.fxml.compiler.impl.internal.GenerationHelper.*;
|
||||||
import static java.util.Objects.requireNonNull;
|
import static java.util.Objects.requireNonNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl.internal;
|
package ch.gtache.fxml.compiler.impl.internal;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.ControllerInfo;
|
import ch.gtache.fxml.compiler.ControllerInfo;
|
||||||
import com.github.gtache.fxml.compiler.GenerationException;
|
import ch.gtache.fxml.compiler.GenerationException;
|
||||||
import com.github.gtache.fxml.compiler.GenericTypes;
|
import ch.gtache.fxml.compiler.GenericTypes;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedObject;
|
import ch.gtache.fxml.compiler.parsing.ParsedObject;
|
||||||
import javafx.beans.DefaultProperty;
|
import javafx.beans.DefaultProperty;
|
||||||
import javafx.beans.NamedArg;
|
import javafx.beans.NamedArg;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
@@ -21,7 +21,7 @@ import java.util.Objects;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
import static com.github.gtache.fxml.compiler.impl.internal.GenerationHelper.FX_ID;
|
import static ch.gtache.fxml.compiler.impl.internal.GenerationHelper.FX_ID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper methods for reflection
|
* Helper methods for reflection
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl.internal;
|
package ch.gtache.fxml.compiler.impl.internal;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.GenerationException;
|
import ch.gtache.fxml.compiler.GenerationException;
|
||||||
import com.github.gtache.fxml.compiler.impl.GeneratorImpl;
|
import ch.gtache.fxml.compiler.impl.GeneratorImpl;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedDefine;
|
import ch.gtache.fxml.compiler.parsing.ParsedDefine;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedObject;
|
import ch.gtache.fxml.compiler.parsing.ParsedObject;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedProperty;
|
import ch.gtache.fxml.compiler.parsing.ParsedProperty;
|
||||||
import com.github.gtache.fxml.compiler.parsing.impl.ParsedPropertyImpl;
|
import ch.gtache.fxml.compiler.parsing.impl.ParsedPropertyImpl;
|
||||||
import javafx.scene.paint.Color;
|
import javafx.scene.paint.Color;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -13,8 +13,8 @@ import java.util.Collection;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
import static com.github.gtache.fxml.compiler.impl.internal.GenerationHelper.FX_ID;
|
import static ch.gtache.fxml.compiler.impl.internal.GenerationHelper.FX_ID;
|
||||||
import static com.github.gtache.fxml.compiler.impl.internal.GenerationHelper.getSortedAttributes;
|
import static ch.gtache.fxml.compiler.impl.internal.GenerationHelper.getSortedAttributes;
|
||||||
import static java.util.Objects.requireNonNull;
|
import static java.util.Objects.requireNonNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -46,7 +46,7 @@ final class SceneFormatter {
|
|||||||
for (final var property : sortedAttributes) {
|
for (final var property : sortedAttributes) {
|
||||||
switch (property.name()) {
|
switch (property.name()) {
|
||||||
case FX_ID -> {
|
case FX_ID -> {
|
||||||
//Do nothing
|
//Do nothing, handled in ObjectFormatter
|
||||||
}
|
}
|
||||||
case "width" -> width = Double.parseDouble(property.value());
|
case "width" -> width = Double.parseDouble(property.value());
|
||||||
case "height" -> height = Double.parseDouble(property.value());
|
case "height" -> height = Double.parseDouble(property.value());
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl.internal;
|
package ch.gtache.fxml.compiler.impl.internal;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.GenerationException;
|
import ch.gtache.fxml.compiler.GenerationException;
|
||||||
import com.github.gtache.fxml.compiler.impl.GeneratorImpl;
|
import ch.gtache.fxml.compiler.impl.GeneratorImpl;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedObject;
|
import ch.gtache.fxml.compiler.parsing.ParsedObject;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedProperty;
|
import ch.gtache.fxml.compiler.parsing.ParsedProperty;
|
||||||
import javafx.scene.shape.VertexFormat;
|
import javafx.scene.shape.VertexFormat;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -14,7 +14,7 @@ import java.util.function.Function;
|
|||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import static com.github.gtache.fxml.compiler.impl.internal.GenerationHelper.*;
|
import static ch.gtache.fxml.compiler.impl.internal.GenerationHelper.*;
|
||||||
import static java.util.Objects.requireNonNull;
|
import static java.util.Objects.requireNonNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -42,7 +42,7 @@ final class TriangleMeshFormatter {
|
|||||||
for (final var property : sortedAttributes) {
|
for (final var property : sortedAttributes) {
|
||||||
switch (property.name().toLowerCase()) {
|
switch (property.name().toLowerCase()) {
|
||||||
case FX_ID -> {
|
case FX_ID -> {
|
||||||
//Do nothing
|
//Do nothing, handled in ObjectFormatter
|
||||||
}
|
}
|
||||||
case "points" -> {
|
case "points" -> {
|
||||||
points.clear();
|
points.clear();
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl.internal;
|
package ch.gtache.fxml.compiler.impl.internal;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.GenerationException;
|
import ch.gtache.fxml.compiler.GenerationException;
|
||||||
import com.github.gtache.fxml.compiler.impl.GeneratorImpl;
|
import ch.gtache.fxml.compiler.impl.GeneratorImpl;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedObject;
|
import ch.gtache.fxml.compiler.parsing.ParsedObject;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static com.github.gtache.fxml.compiler.impl.internal.GenerationHelper.*;
|
import static ch.gtache.fxml.compiler.impl.internal.GenerationHelper.*;
|
||||||
import static java.util.Objects.requireNonNull;
|
import static java.util.Objects.requireNonNull;
|
||||||
|
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ final class URLFormatter {
|
|||||||
for (final var property : sortedAttributes) {
|
for (final var property : sortedAttributes) {
|
||||||
switch (property.name()) {
|
switch (property.name()) {
|
||||||
case FX_ID -> {
|
case FX_ID -> {
|
||||||
//Do nothing
|
//Do nothing, handled in ObjectFormatter
|
||||||
}
|
}
|
||||||
case "value" -> value = property.value();
|
case "value" -> value = property.value();
|
||||||
default -> throw new GenerationException("Unknown URL attribute : " + property.name());
|
default -> throw new GenerationException("Unknown URL attribute : " + property.name());
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl.internal;
|
package ch.gtache.fxml.compiler.impl.internal;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.GenerationException;
|
import ch.gtache.fxml.compiler.GenerationException;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl.internal;
|
package ch.gtache.fxml.compiler.impl.internal;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.GenerationException;
|
import ch.gtache.fxml.compiler.GenerationException;
|
||||||
import com.github.gtache.fxml.compiler.ResourceBundleInjectionType;
|
import ch.gtache.fxml.compiler.ResourceBundleInjectionType;
|
||||||
import com.github.gtache.fxml.compiler.impl.GeneratorImpl;
|
import ch.gtache.fxml.compiler.impl.GeneratorImpl;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import static com.github.gtache.fxml.compiler.impl.internal.GenerationHelper.*;
|
import static ch.gtache.fxml.compiler.impl.internal.GenerationHelper.*;
|
||||||
import static java.util.Objects.requireNonNull;
|
import static java.util.Objects.requireNonNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl.internal;
|
package ch.gtache.fxml.compiler.impl.internal;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedObject;
|
import ch.gtache.fxml.compiler.parsing.ParsedObject;
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl.internal;
|
package ch.gtache.fxml.compiler.impl.internal;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl.internal;
|
package ch.gtache.fxml.compiler.impl.internal;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.GenerationException;
|
import ch.gtache.fxml.compiler.GenerationException;
|
||||||
import com.github.gtache.fxml.compiler.impl.GeneratorImpl;
|
import ch.gtache.fxml.compiler.impl.GeneratorImpl;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedObject;
|
import ch.gtache.fxml.compiler.parsing.ParsedObject;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedProperty;
|
import ch.gtache.fxml.compiler.parsing.ParsedProperty;
|
||||||
|
|
||||||
import static com.github.gtache.fxml.compiler.impl.internal.GenerationHelper.FX_ID;
|
import static ch.gtache.fxml.compiler.impl.internal.GenerationHelper.FX_ID;
|
||||||
import static com.github.gtache.fxml.compiler.impl.internal.GenerationHelper.getSortedAttributes;
|
import static ch.gtache.fxml.compiler.impl.internal.GenerationHelper.getSortedAttributes;
|
||||||
import static java.util.Objects.requireNonNull;
|
import static java.util.Objects.requireNonNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -48,7 +48,7 @@ final class WebViewFormatter {
|
|||||||
final String variableName, final String engineVariable) throws GenerationException {
|
final String variableName, final String engineVariable) throws GenerationException {
|
||||||
switch (value.name()) {
|
switch (value.name()) {
|
||||||
case FX_ID -> {
|
case FX_ID -> {
|
||||||
//Do nothing
|
//Do nothing, handled in ObjectFormatter
|
||||||
}
|
}
|
||||||
case "confirmHandler" -> injectConfirmHandler(value, engineVariable);
|
case "confirmHandler" -> injectConfirmHandler(value, engineVariable);
|
||||||
case "createPopupHandler" -> injectCreatePopupHandler(value, engineVariable);
|
case "createPopupHandler" -> injectCreatePopupHandler(value, engineVariable);
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.github.gtache.fxml.compiler.parsing.impl;
|
package ch.gtache.fxml.compiler.parsing.impl;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedConstant;
|
import ch.gtache.fxml.compiler.parsing.ParsedConstant;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedProperty;
|
import ch.gtache.fxml.compiler.parsing.ParsedProperty;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.github.gtache.fxml.compiler.parsing.impl;
|
package ch.gtache.fxml.compiler.parsing.impl;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedCopy;
|
import ch.gtache.fxml.compiler.parsing.ParsedCopy;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedProperty;
|
import ch.gtache.fxml.compiler.parsing.ParsedProperty;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.github.gtache.fxml.compiler.parsing.impl;
|
package ch.gtache.fxml.compiler.parsing.impl;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedDefine;
|
import ch.gtache.fxml.compiler.parsing.ParsedDefine;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedObject;
|
import ch.gtache.fxml.compiler.parsing.ParsedObject;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package com.github.gtache.fxml.compiler.parsing.impl;
|
package ch.gtache.fxml.compiler.parsing.impl;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedFactory;
|
import ch.gtache.fxml.compiler.parsing.ParsedFactory;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedObject;
|
import ch.gtache.fxml.compiler.parsing.ParsedObject;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedProperty;
|
import ch.gtache.fxml.compiler.parsing.ParsedProperty;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.github.gtache.fxml.compiler.parsing.impl;
|
package ch.gtache.fxml.compiler.parsing.impl;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedInclude;
|
import ch.gtache.fxml.compiler.parsing.ParsedInclude;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedProperty;
|
import ch.gtache.fxml.compiler.parsing.ParsedProperty;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.github.gtache.fxml.compiler.parsing.impl;
|
package ch.gtache.fxml.compiler.parsing.impl;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedObject;
|
import ch.gtache.fxml.compiler.parsing.ParsedObject;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedProperty;
|
import ch.gtache.fxml.compiler.parsing.ParsedProperty;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.github.gtache.fxml.compiler.parsing.impl;
|
package ch.gtache.fxml.compiler.parsing.impl;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedProperty;
|
import ch.gtache.fxml.compiler.parsing.ParsedProperty;
|
||||||
|
|
||||||
import static java.util.Objects.requireNonNull;
|
import static java.util.Objects.requireNonNull;
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.github.gtache.fxml.compiler.parsing.impl;
|
package ch.gtache.fxml.compiler.parsing.impl;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedProperty;
|
import ch.gtache.fxml.compiler.parsing.ParsedProperty;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedReference;
|
import ch.gtache.fxml.compiler.parsing.ParsedReference;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.github.gtache.fxml.compiler.parsing.impl;
|
package ch.gtache.fxml.compiler.parsing.impl;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedText;
|
import ch.gtache.fxml.compiler.parsing.ParsedText;
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.github.gtache.fxml.compiler.parsing.impl;
|
package ch.gtache.fxml.compiler.parsing.impl;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedProperty;
|
import ch.gtache.fxml.compiler.parsing.ParsedProperty;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedValue;
|
import ch.gtache.fxml.compiler.parsing.ParsedValue;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
/**
|
/**
|
||||||
* Core module for FXML compiler
|
* Core module for FXML compiler
|
||||||
*/
|
*/
|
||||||
module com.github.gtache.fxml.compiler.core {
|
module ch.gtache.fxml.compiler.core {
|
||||||
requires transitive com.github.gtache.fxml.compiler.api;
|
requires transitive ch.gtache.fxml.compiler.api;
|
||||||
requires transitive javafx.graphics;
|
requires transitive javafx.graphics;
|
||||||
requires org.apache.logging.log4j;
|
requires org.apache.logging.log4j;
|
||||||
requires java.sql;
|
requires java.sql;
|
||||||
|
|
||||||
exports com.github.gtache.fxml.compiler.impl;
|
exports ch.gtache.fxml.compiler.impl;
|
||||||
exports com.github.gtache.fxml.compiler.parsing.impl;
|
exports ch.gtache.fxml.compiler.compatibility.impl;
|
||||||
exports com.github.gtache.fxml.compiler.compatibility.impl;
|
exports ch.gtache.fxml.compiler.parsing.impl;
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.github.gtache.fxml.compiler.compatibility.impl;
|
package ch.gtache.fxml.compiler.compatibility.impl;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.compatibility.GenerationCompatibility;
|
import ch.gtache.fxml.compiler.compatibility.GenerationCompatibility;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
package ch.gtache.fxml.compiler.impl;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
|
|
||||||
|
class TestClassesFinder {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void testGetClassesCurrent() throws IOException {
|
||||||
|
final var expected = Set.of(
|
||||||
|
"ch.gtache.fxml.compiler.parsing.impl.TestParsedConstantImpl",
|
||||||
|
"ch.gtache.fxml.compiler.parsing.impl.TestParsedCopyImpl",
|
||||||
|
"ch.gtache.fxml.compiler.parsing.impl.TestParsedDefineImpl",
|
||||||
|
"ch.gtache.fxml.compiler.parsing.impl.TestParsedFactoryImpl",
|
||||||
|
"ch.gtache.fxml.compiler.parsing.impl.TestParsedIncludeImpl",
|
||||||
|
"ch.gtache.fxml.compiler.parsing.impl.TestParsedObjectImpl",
|
||||||
|
"ch.gtache.fxml.compiler.parsing.impl.TestParsedPropertyImpl",
|
||||||
|
"ch.gtache.fxml.compiler.parsing.impl.TestParsedReferenceImpl",
|
||||||
|
"ch.gtache.fxml.compiler.parsing.impl.TestParsedTextImpl",
|
||||||
|
"ch.gtache.fxml.compiler.parsing.impl.TestParsedValueImpl");
|
||||||
|
final var actual = ClassesFinder.getClasses("ch.gtache.fxml.compiler.parsing.impl");
|
||||||
|
assertEquals(expected, actual);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void testGetClassesJar() throws IOException {
|
||||||
|
final var expected = Set.of("javafx.beans.DefaultProperty",
|
||||||
|
"javafx.beans.InvalidationListener",
|
||||||
|
"javafx.beans.NamedArg",
|
||||||
|
"javafx.beans.Observable",
|
||||||
|
"javafx.beans.WeakInvalidationListener",
|
||||||
|
"javafx.beans.WeakListener");
|
||||||
|
final var actual = ClassesFinder.getClasses("javafx.beans");
|
||||||
|
assertEquals(expected, actual);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl;
|
package ch.gtache.fxml.compiler.impl;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.ControllerFieldInfo;
|
import ch.gtache.fxml.compiler.ControllerFieldInfo;
|
||||||
import com.github.gtache.fxml.compiler.GenericTypes;
|
import ch.gtache.fxml.compiler.GenericTypes;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl;
|
package ch.gtache.fxml.compiler.impl;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.ControllerFieldInfo;
|
import ch.gtache.fxml.compiler.ControllerFieldInfo;
|
||||||
import com.github.gtache.fxml.compiler.ControllerInfo;
|
import ch.gtache.fxml.compiler.ControllerInfo;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.jupiter.api.extension.ExtendWith;
|
import org.junit.jupiter.api.extension.ExtendWith;
|
||||||
import org.mockito.Mock;
|
import org.mockito.Mock;
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl;
|
package ch.gtache.fxml.compiler.impl;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.ControllerFieldInjectionType;
|
import ch.gtache.fxml.compiler.ControllerFieldInjectionType;
|
||||||
import com.github.gtache.fxml.compiler.ControllerInjectionType;
|
import ch.gtache.fxml.compiler.ControllerInjectionType;
|
||||||
import com.github.gtache.fxml.compiler.ControllerMethodsInjectionType;
|
import ch.gtache.fxml.compiler.ControllerMethodsInjectionType;
|
||||||
import com.github.gtache.fxml.compiler.GenerationParameters;
|
import ch.gtache.fxml.compiler.GenerationParameters;
|
||||||
import com.github.gtache.fxml.compiler.ResourceBundleInjectionType;
|
import ch.gtache.fxml.compiler.ResourceBundleInjectionType;
|
||||||
import com.github.gtache.fxml.compiler.compatibility.GenerationCompatibility;
|
import ch.gtache.fxml.compiler.compatibility.GenerationCompatibility;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.jupiter.api.extension.ExtendWith;
|
import org.junit.jupiter.api.extension.ExtendWith;
|
||||||
import org.mockito.Mock;
|
import org.mockito.Mock;
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl;
|
package ch.gtache.fxml.compiler.impl;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.ControllerInfo;
|
import ch.gtache.fxml.compiler.ControllerInfo;
|
||||||
import com.github.gtache.fxml.compiler.GenerationParameters;
|
import ch.gtache.fxml.compiler.GenerationParameters;
|
||||||
import com.github.gtache.fxml.compiler.GenerationRequest;
|
import ch.gtache.fxml.compiler.GenerationRequest;
|
||||||
import com.github.gtache.fxml.compiler.SourceInfo;
|
import ch.gtache.fxml.compiler.SourceInfo;
|
||||||
import com.github.gtache.fxml.compiler.parsing.ParsedObject;
|
import ch.gtache.fxml.compiler.parsing.ParsedObject;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.jupiter.api.extension.ExtendWith;
|
import org.junit.jupiter.api.extension.ExtendWith;
|
||||||
import org.mockito.Mock;
|
import org.mockito.Mock;
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl;
|
package ch.gtache.fxml.compiler.impl;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.ControllerInfo;
|
import ch.gtache.fxml.compiler.ControllerInfo;
|
||||||
import com.github.gtache.fxml.compiler.GenerationException;
|
import ch.gtache.fxml.compiler.GenerationException;
|
||||||
import com.github.gtache.fxml.compiler.GenerationRequest;
|
import ch.gtache.fxml.compiler.GenerationRequest;
|
||||||
import com.github.gtache.fxml.compiler.Generator;
|
import ch.gtache.fxml.compiler.Generator;
|
||||||
import com.github.gtache.fxml.compiler.impl.internal.HelperMethodsFormatter;
|
import ch.gtache.fxml.compiler.impl.internal.HelperMethodsFormatter;
|
||||||
import com.github.gtache.fxml.compiler.impl.internal.HelperProvider;
|
import ch.gtache.fxml.compiler.impl.internal.HelperProvider;
|
||||||
import com.github.gtache.fxml.compiler.impl.internal.InitializationFormatter;
|
import ch.gtache.fxml.compiler.impl.internal.InitializationFormatter;
|
||||||
import com.github.gtache.fxml.compiler.impl.internal.LoadMethodFormatter;
|
import ch.gtache.fxml.compiler.impl.internal.LoadMethodFormatter;
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.jupiter.api.extension.ExtendWith;
|
import org.junit.jupiter.api.extension.ExtendWith;
|
||||||
@@ -41,8 +41,8 @@ class TestGeneratorImpl {
|
|||||||
this.helperMethodsFormatter = requireNonNull(helperMethodsFormatter);
|
this.helperMethodsFormatter = requireNonNull(helperMethodsFormatter);
|
||||||
this.request = requireNonNull(request);
|
this.request = requireNonNull(request);
|
||||||
this.controllerInfo = requireNonNull(controllerInfo);
|
this.controllerInfo = requireNonNull(controllerInfo);
|
||||||
this.outputClassName = "com.github.gtache.fxml.compiler.OutputClass";
|
this.outputClassName = "ch.gtache.fxml.compiler.OutputClass";
|
||||||
this.className = "com.github.gtache.fxml.compiler.ControllerClass";
|
this.className = "ch.gtache.fxml.compiler.ControllerClass";
|
||||||
this.generator = new GeneratorImpl(p -> helperProvider);
|
this.generator = new GeneratorImpl(p -> helperProvider);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,7 +59,7 @@ class TestGeneratorImpl {
|
|||||||
@Test
|
@Test
|
||||||
void testGenerate() throws GenerationException {
|
void testGenerate() throws GenerationException {
|
||||||
final var expected = """
|
final var expected = """
|
||||||
package com.github.gtache.fxml.compiler;
|
package ch.gtache.fxml.compiler;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generated code
|
* Generated code
|
||||||
@@ -74,7 +74,7 @@ class TestGeneratorImpl {
|
|||||||
* @return The controller
|
* @return The controller
|
||||||
* @throws IllegalStateException If the view is not loaded
|
* @throws IllegalStateException If the view is not loaded
|
||||||
*/
|
*/
|
||||||
public com.github.gtache.fxml.compiler.ControllerClass controller() {
|
public ch.gtache.fxml.compiler.ControllerClass controller() {
|
||||||
if (loaded) {
|
if (loaded) {
|
||||||
return controller;
|
return controller;
|
||||||
} else {
|
} else {
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.github.gtache.fxml.compiler.impl;
|
package ch.gtache.fxml.compiler.impl;
|
||||||
|
|
||||||
import com.github.gtache.fxml.compiler.GenericTypes;
|
import ch.gtache.fxml.compiler.GenericTypes;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user