Skip to content

Commit 987573c

Browse files
committed
support eclipse
1 parent 6beaa0f commit 987573c

File tree

2 files changed

+28
-17
lines changed

2 files changed

+28
-17
lines changed

README.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ An example project can be found in the directory `examples/maven-example`.
7777
* Run `mvn clean install` in that project
7878
* Expand the `examples/maven-example` directory
7979
* Right-click on the file `pom.xml` in that directory and select `Add as a Maven Project`
80-
* Enable annotation processing for this project under `Settings`>`Build, Execution, Deployment`>`Compiler`>`Annotation Processors`>`Maven default annotation processors profile`>`json-parser-maven-example`>Enable Annotation Processing`
80+
* [Make sure you set up your IDE correctly](#ide-specific-configuration)
8181
* Run `TestClass` in `examples/maven-example/src/main/java/io/github/danthe1st/json_compile/test/TestClass`
8282

8383
### Supported types
@@ -90,14 +90,30 @@ An example project can be found in the directory `examples/maven-example`.
9090
* Enums
9191
* Wrapper classes for supported primitive types
9292
* Objects of classes annotated with `@GenerateJSON`
93-
* `Collection`s if they are not part of other collections or arrays
93+
* `Collection`s if they are not part of other collections or arrays, `Collections` of classes annotated with `@GenerateJSON` that contain collections are supported, however
9494
* Arrays
9595

9696
### Limitations
9797
* It is not possible to create an array/collection of collections
9898
* Objects annotated with `@GenerateJSON` need to have a no-args-constructor
9999
* Collections need to be initialized in the constructor
100100
* Generic objects are not supported (except generic collections)
101-
* Eclipse may not detect the annotation processor
102-
* Compile-time JSON-parser is not yet published to maven central so you will have to build it by yourself.
101+
* Compile-time JSON-parser is not yet published to maven central, so you will have to build it by yourself.
103102
* Configuration is not supported
103+
104+
### IDE-specific configuration
105+
106+
### Eclipse
107+
* Install the [m2e-apt plugin](https://marketplace.eclipse.org/content/m2e-apt)
108+
[![Drag to your running Eclipse* workspace. *Requires Eclipse Marketplace Client](https://marketplace.eclipse.org/sites/all/themes/solstice/public/images/marketplace/btn-install.svg)](http://marketplace.eclipse.org/marketplace-client-intro?mpc_install=1216155 "Drag to your running Eclipse* workspace. *Requires Eclipse Marketplace Client")
109+
110+
![m2e-apt](https://user-images.githubusercontent.com/34687786/114560029-9713f280-9c6c-11eb-889d-096ee46b52c0.png)
111+
112+
* Right-click the project, open `Properties`>`Java Compiler`>`Annotation Processing`> and select `Enable Project Specific Settings` and `Enable processing in Editor`
113+
114+
https://user-images.githubusercontent.com/34687786/114566218-56b77300-9c72-11eb-88f0-6c030fe4e8ac.mp4
115+
116+
### IntelliJ
117+
* Enable annotation processing for this project under `Settings`>`Build, Execution, Deployment`>`Compiler`>`Annotation Processors`>`Maven default annotation processors profile`>`json-parser-maven-example`>Enable Annotation Processing`
118+
119+
https://user-images.githubusercontent.com/34687786/114572301-a6e50400-9c77-11eb-9a2d-de3bdac3688a.mp4

examples/maven-example/pom.xml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,15 @@
1919
<version>3.8.1</version>
2020
<configuration>
2121
<release>11</release>
22-
<!--<proc>none</proc>-->
22+
<!--<proc>none</proc>
23+
<annotationProcessorPaths>
24+
<annotationProcessorPath>
25+
<groupId>io.github.danthe1st</groupId>
26+
<artifactId>compile-time-json-parser</artifactId>
27+
<version>0.0.1-SNAPSHOT</version>
28+
</annotationProcessorPath>
29+
</annotationProcessorPaths>-->
2330
</configuration>
24-
<!--<executions>
25-
<execution>
26-
<id>run-annotation-processor</id>
27-
<phase>generate-sources</phase>
28-
<goals>
29-
<goal>compile</goal>
30-
</goals>
31-
<configuration>
32-
<proc>only</proc>
33-
</configuration>
34-
</execution>
35-
</executions>-->
3631
</plugin>
3732
</plugins>
3833
</build>

0 commit comments

Comments
 (0)