java开发 Ultraedit_Java开发网 - 在Ultraedit中使用CTAGS

Posted by:rainman

Posted on:2003-02-05 13:43

Ctags Configuration with in UltraEdit

The Project menu allows the user to change the Ctags option and to create the tag file. The Ctags option dialog allows for the following three items to be defined:

Default Tagfile ?This specifies the tag file to be used if there is not a specific project tagfile active (defined in the project settings). This must be present if there is not a project specific tagfile for UltraEdit to lookup symbols.

CTAG EXE Path/Name ?This specifies the full path and name of the Ctag exe that will be run to create the tag file from within UltraEdit. If this is not present UltraEdit can still reference a tagfile for symbols but it can not create one. The default setting for this is "ctags.exe" in the directory containing UltraEdit.

CTAG Parameters ?This specifies the parameters to be passed to the Ctag exe for it to function correctly. The default settings are set up for "Exuberant Ctags" as described above.

%fi on the parameter line is replaced when the ctag exe is run with the filename/path of a file that contains a list of files that the ctag.exe will use to create it抯 tags from. If a project is loaded in UltraEdit, UltraEdit creates a temporary file with a list of the project files and passes this inplace of %fi.

%fo on the parameter line is replaced with the full filename/path of the tag file to becreated. This would be the tag file specified in the project, or the Default Tagfile defined above.

Creating the Tag File

The tag file can be created directly from the Project Menu with the "Create CTAG file" item, or when a project is opened the tag file can be created automatically if the project settings specify this.

Finding a Symbol/Tag

The whole purpose of Ctags is to be able to quickly find a function or object that is defined elsewhere in the file or another file. Assuming the tag file exists, selecting "Find Symbol" from the Search menu will search the tag file for the symbol and if only one match is found the file will be opened in UltraEdit and the file positioned to the symbol. If multiple matches occur, a dialog box will be shown giving the user the option to position to the appropriate tag.

先到 http://ctags.sourceforge.net/ 下载ctags软件包,把ctags.exe放到ultraedit的安装目录下。然后建立一个project,并选择好一个ctag文件。

然后可以在命令行窗口中用ctags命令来生成ctag索引,参数如下:

E:\Temp\test>e:\tools\UltraEdit\ctags.exe -f testtag.txt --language-force=java -R . 其他参数可以参考帮助ctags.exe --help。

然后在ultraedit中就可以选中某个类名或变量名,方法名后,按F11跳出相关代码。如下图所示。

89362356.gif

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值