While reading some Android specimens I usually
// BEGIN_INCLUDE (some) // I think they are some type of code area (like // editor-fold desc = "region name" & gt; // some code //
), but such syntax is very similar to many ++ preprocessor instructions. So the question: Should I know something important about these comments (except for the obvious commentary function) which can improve my code in any way?
This is for the purposes of the documentation, which is used to identify the snippet to be included in the target documents Is done for This code is not really useful when editing; It is useful to avoid recurrence by generating a document from the actual code.
{@ sample} and {@ include}
These tags copy the sample text
@ Sample tag
> Copies the text from the given file and strips the main and the following whitespace
- All the & lt; ,>; And & amp;
- Leaves all the lines, none of which can be either natively BEGIN_INCLUDE or END_INCLUDE sample code nested
Four examples:
{@ contains sample / sample code / src / com / google / app / notification1. Java} {@sample samples / SampleCode / src / com / google / app / Notification1.java} {@ contains samples / sample code / src / com / google / app / Notification1.java Bleh} {@sample samples / sample / src / Com / google / app / notification1.java Bleh}
No comments:
Post a Comment