yahoo / squidb

SquiDB is a SQLite database library for Android and iOS
https://github.com/yahoo/squidb/wiki
Apache License 2.0
1.31k stars 132 forks source link

Turn single-line comment into doc comment to allow effortless navigation from a table model to its spec #163

Closed joelpet closed 8 years ago

joelpet commented 8 years ago

At com.yahoo.squidb.processor.writers.ModelFileWriter.beginClassDeclaration(ModelFileWriter.java:135), I suggest writing a doc comment instead of a single line comment and adding a Javadoc @link.

So, instead of the following:

// Generated code -- do not modify!
// This class was generated from the model spec at x.y.z.MyTableModel

Consider this:

// Generated code -- do not modify!
/** This class was generated from the model spec at {@link x.y.z.MyTableModel} */

At least that would make the link clickable in Android Studio. I'm not sure whether that would render a broken link in any generated Javadoc, however.

sbosley commented 8 years ago

Yep, it does work -- in fact, we already do this on our dev_3.0 branch, where much of our current development is taking place. I can't remember if we had a good reason for not backporting it to master, but right now I don't see any reason why we couldn't -- so it should be a quick enhancement.

sbosley commented 8 years ago

Ok this change has been merged to master! I'm not 100% sure when we'll next build and release new artifacts to jcenter, but if you want the change right now, you can get it simply by building the squidb-processor jar from source.

joelpet commented 8 years ago

Thanks for that impressively fast change!