One example from an AndroidManifest.xml:
<provider android:name="NotePadProvider"
android:authorities="com.exampl.notepad.provider.NotePad" /
>
This deliberately includes a typo that cannot be flagged by an IDE
because it is just a string.
Instead as an enhancement, why not define "@java/" to be a reference
to the a public static final, then the above becomes:
<provider android:name="NotePadProvider"
android:authorities="@java/
com.example.android.notepad.AUTHORITY" />
Now an IDE can provide completion on these @java variables, and the
IDE can also immediately flag undefined references. Also, the
definition of the authority string can be changed in one place, and
the code does not break.
Is there any reason this would not work -- it seems like the benefits
offered are significant.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en