I wonder how Eclipse detects errors in Java code before compiling it.
I've found this answer from the Eclipse forums which mentions reconciliation. But that doesn't tell me how it works.
Is the error and warning detection done by comparing the code with the Java specification using regular expressions?
When you change something in your code, the changes are represented as deltas. The deltas get analyzed by creating the AST (Abstract Syntax Tree) and JDT looks for errors. If there are any, then the error markers are generated.
Here is a good explanation how CDT parser for C/C++ works. The JDT parser should be working the same way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With