-
Notifications
You must be signed in to change notification settings - Fork 19
Eclipse setup
stephanenicolas edited this page Sep 15, 2013
·
11 revisions
You will need to achieve 2 things :
- add BoundBox.jar to your project's classpath ;
- use BoundBox's annotation processor to compile your project.
This will allow you to add the @BoundBox
annotation.
There are many ways to do so depending on your build system :
- add it to your projects build path by clicking in eclipse
- add it as ant/ivvy dependency
- add it as a maven dependency
- add it as a gradle dependency
This will create BoundBoxOfX
classes as soon as you a @BoundBox
annotation is found in your code.
In your project, allow annotation processing to take place during edition. For this Right-click on your project >> properties >> Java Compiler >> Annotation Processing as illustrated below.
You must :
- check all 3 checkboxes to allow annotation processing during edition.
- you must provide a destination path for generated sources. Here we used maven standard path.
Almost at the same place : Right-click on your project >> properties >> Java Compiler >> Annotation Processing >> Factory path
You must :
- check the checkbox to define custom "factories"
- you must provide the path of the annotation processor to use, and all its dependencies. This is boring, but that is the eclipse way. You have to add :
- BoundBox's jar itself
- Commons-lang's jar
- JavaWriter's jar
Here, their path has been taken from a maven repo, but you can place them wherever you want.
*Every time you upgrade BoundBox's version, you have to : *
- go to this menu
- remove the old BoundBox's jar
- click on Apply
- add the new BoundBox's jar
- click on OK