在iOS/OSX的Xcode中。如何将javadoc自动添加到我的方法中?
我想从API文档中提取文本,以便在每种方法上方自动填充我的javadoc注释。例如,如果我写
- (id)initWithFrame:(CGRect)frame {
}
我想运行一个脚本来获取此
/**
* 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 {
}
此数据(描述,参数和返回)获得,当你ALT +单击的方法和泡沫出现与文件有关。
是否可以通过脚本访问文档以提取文本并组成Javadoc?那个脚本已经写好了吗?欢迎任何资源,教程或手册开始学习Xcode脚本。
Doxygen从源代码创建文档。我想从文档中添加“源代码”,反过程。 – emenegro 2012-03-09 08:41:14
对不起,我没有正确回答你的问题。我是对的,你想为所有重写的方法添加javadoc? – OgreSwamp 2012-03-09 10:02:04