In Xcode for iOS/OSX.
I want to extract text from API documentation in order to populate automatically my javadoc comments above every method. For example, if I write
- (id)initWithFrame:(CGRect)frame {
}
I want to run a script to obtain this
/**
* Initializes and returns a newly allocated view object with the specified frame rectangle.
*
* @param frame: The frame rectangle for the view, measured in points.
* @return An initialized view object or nil if the object couldn't be created.
*/
- (id)initWithFrame:(CGRect)frame {
}
This data (description, params and return) is obtained when you alt+click on a method and a bubble appears with documentation about it.
Is it possible, via scripting, to access to documentation to extract text and compose the Javadoc? Is that script already written? Any resource, tutorial or manual is welcome to begin learning Xcode scripting.
The only solution I found is to use apps like Dash, to manage code snippets. With it I can paste the signature and documentation of the method. The problem is that is not automatic as I want but it could work.