User:Zolta/annotations
From APIDesign
m (→How to get LiveDB sample work) |
m (→How to get LiveDB sample work) |
||
(3 intermediate revisions not shown.) | |||
Line 1: | Line 1: | ||
+ | =Why I need this= | ||
+ | I design a simple ontology based knowledge management system. I think I'll make good use of [[LiveDB]]. | ||
+ | |||
+ | |||
==How to get LiveDB sample work== | ==How to get LiveDB sample work== | ||
- | I may learn meantime :) | + | Also I may learn in the meantime :) |
+ | |||
+ | I use [[NetBeans]] Development build to try this (I get the sources with hg, i do `hg fetch` then `ant update` daily) I run NB from nbbbuild with `ant tryme` | ||
+ | |||
+ | '''Before testing I created JavaDB database, with APP database schema AGE table and two coulumns AGE,NAME in it also I changed the jdbc URL to point my database and added derbyclient.jar as a library''' | ||
+ | |||
+ | '''I have the `nbbuild/testuserdir/var/index/cache` directory empty''' | ||
+ | |||
+ | |||
+ | scenario 1 | ||
+ | #Start [[NetBeans]] with `ant tryme` | ||
+ | #>NB opens LiveDB project | ||
+ | #!I have 2 Symbol not found errors (this is OK) | ||
+ | #I build LiveDB project | ||
+ | #I connect to my database scheme in Window>Services>Databases>JavaDB> | ||
+ | #I compile Test package `org.apidesign.livedb.example` | ||
+ | #! `List<Age>` is showing Cannot find Symbol | ||
+ | #I Test LiveDB project | ||
+ | #>Test runs without error | ||
+ | #! Still have Cannot find Symbol in `List<Age>` | ||
+ | #I Scan for External changes | ||
+ | # | ||
+ | |||
+ | |||
+ | Scenario 2 | ||
+ | #I: delete directory: nbbuild/var/cache/index | ||
+ | #I: Start [[NetBeans]] with `ant tryme` | ||
+ | #NB: opens LiveDB project | ||
+ | #NB:scanning projects | ||
+ | #NB: indexing project files | ||
+ | #I:clean livedb project | ||
+ | #NB: cannot find symbol Age (3 times: List<Age>, Age.query(),Age age) | ||
+ | #I:connect JavaDB through jdbc | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
- | |||
- | |||
- | |||
- | |||
# Clean and build livedb project | # Clean and build livedb project | ||
Line 37: | Line 74: | ||
But still I get cannot find symbol org.apidesign.livedb.example.Age | But still I get cannot find symbol org.apidesign.livedb.example.Age | ||
+ | Jan Lahoda is working on this: | ||
+ | [[http://netbeans.org/bugzilla/show_bug.cgi?id=111065 Support Annotation Processors in Java Editor]] | ||
+ | Also he provided a module to Support AnnotationProcessors in 6.9 I'm testing it now how it works. | ||
+ | see [[http://kenai.com/projects/pelmel/pages/Home Pelmel]] |
Current revision
Why I need this
I design a simple ontology based knowledge management system. I think I'll make good use of LiveDB.
How to get LiveDB sample work
Also I may learn in the meantime :)
I use NetBeans Development build to try this (I get the sources with hg, i do `hg fetch` then `ant update` daily) I run NB from nbbbuild with `ant tryme`
Before testing I created JavaDB database, with APP database schema AGE table and two coulumns AGE,NAME in it also I changed the jdbc URL to point my database and added derbyclient.jar as a library
I have the `nbbuild/testuserdir/var/index/cache` directory empty
scenario 1
- Start NetBeans with `ant tryme`
- >NB opens LiveDB project
- !I have 2 Symbol not found errors (this is OK)
- I build LiveDB project
- I connect to my database scheme in Window>Services>Databases>JavaDB>
- I compile Test package `org.apidesign.livedb.example`
- ! `List<Age>` is showing Cannot find Symbol
- I Test LiveDB project
- >Test runs without error
- ! Still have Cannot find Symbol in `List<Age>`
- I Scan for External changes
Scenario 2
- I: delete directory: nbbuild/var/cache/index
- I: Start NetBeans with `ant tryme`
- NB: opens LiveDB project
- NB:scanning projects
- NB: indexing project files
- I:clean livedb project
- NB: cannot find symbol Age (3 times: List<Age>, Age.query(),Age age)
- I:connect JavaDB through jdbc
- Clean and build livedb project
- Compile file Test Packages/org.apidesign.livedb.example.package-info.java
Here is the IDE Log I got:
INFO [org.apidesign.livedb.impl.LiveDBProcessor]: method process started annotations:[org.apidesign.livedb.LiveDB] roundEnv:[errorRaised=false, rootElements=[org.apidesign.livedb.example], processingOver=false] FINE [org.apidesign.livedb.impl.LiveDBProcessor]: clsName:org.apidesign.livedb.example.Age md.getColumnCount():2 FINE [org.apidesign.livedb.impl.LiveDBProcessor]: columnName (1):ID FINE [org.apidesign.livedb.impl.LiveDBProcessor]: columnName (2):NAME INFO [org.apidesign.livedb.impl.LiveDBProcessor]: method process finished INFO [org.apidesign.livedb.impl.LiveDBProcessor]: method process started annotations:[] roundEnv:[errorRaised=false, rootElements=[org.apidesign.livedb.example.Age], processingOver=false] INFO [org.apidesign.livedb.impl.LiveDBProcessor]: method process finished INFO [org.apidesign.livedb.impl.LiveDBProcessor]: method process started annotations:[] roundEnv:[errorRaised=false, rootElements=[], processingOver=true] INFO [org.apidesign.livedb.impl.LiveDBProcessor]: method process finished
But still I get cannot find symbol org.apidesign.livedb.example.Age Jan Lahoda is working on this: [Support Annotation Processors in Java Editor] Also he provided a module to Support AnnotationProcessors in 6.9 I'm testing it now how it works. see [Pelmel]