首页 源代码查看工具SourceNavigator使用心得

源代码查看工具SourceNavigator使用心得

举报
开通vip

源代码查看工具SourceNavigator使用心得源代码查看工具SourceNavigator使用心得 在ubuntu 10.04下试用了Source Navigator,有条件还是装Source insight吧,不是一个 级别的,非常不方便。 Source Navigator 是Red Hat出品的一款查看源代码的工具,非常好用,与Windows下的 Source Insight有一敌。但是它的界面不怎么好看,用的不是GTK图形库,所以界面风格与 Gnome不一致,操作上也有些不同。除了这些,其它功能都非常强大,细数如下。里面的一 些简写约定如下: Co...

源代码查看工具SourceNavigator使用心得
源代码查看工具SourceNavigator使用心得 在ubuntu 10.04下试用了Source Navigator,有条件还是装Source insight吧,不是一个 级别的,非常不方便。 Source Navigator 是Red Hat出品的一款查看源代码的工具,非常好用,与Windows下的 Source Insight有一敌。但是它的界面不怎么好看,用的不是GTK图形库,所以界面风格与 Gnome不一致,操作上也有些不同。除了这些,其它功能都非常强大,细数如下。里面的一 些简写约定如下: Code Area cl Classes con Constants e Enums ec Enum Values fd Function Declarations fr friends fu Functions gv Global Variables iv Instance Variables ma Macros md Method Definitions mi Method Implementations t Typedefs un Unions lv Local variables ud Undefined Cross-Reference r Read w Written p Passed u Unused SNav的代码窗口有6个标签页,它们分别是 “Edit” “Hierarchy” “Class” “Xref” “Retriever” “Grep” 其中, Edit区是代码显示和修改的区域,是工作的主要区域;“Hierarchy”和“Class”是C++代码的组织工具;“Xref”是最强大的一个工具,它会把一个函数中的所有用到的变量,调用的函数,用到的结构全记录并展现出来;“Retriever”也是一个非常有用的工具,用于把一个库代码包中的所有定义的符号列出来,并记录相应的属性;“Grep”用于查找某一个符号,可指定搜索的范围,既可全局查找也可部分文件查找。阅读代码时常用到的一些键值组合: Ctrl+leftarrow | rightarrow | uparrow | downarrow 以词的形式移动光标 Ctrl+Alt+leftarrow | rightarrow | uparrow | downarrow 以词的形式移动光标并选择走过的区域 Ctrl+Shift+D 查看选定符号的声明 Ctrl+Shift+I 查看选定符号的定义代码窗口的工具栏上有7个元素,分别是 “回退跳转” “前进跳转” “光标处所在的函数名或结构名” “选定并要操作(比如查找)的字符串” “在本文件中查找选定的字符串”(比Ctrl+F查找功能好使) “在整个工程中查找与选定字符串匹配的代码” “在整个工程中以Grep的方式查找与选定字符串匹配的代码”(会跳到Grep标签页中显示结果)注意:snavigator在导入目录时,目录名中间不能出现空格。 三、在ubuntu中安装 Source-Navigator及使用手册 2009-09-25 23:19 from : 1 通过apt-get安装(版本较旧) 安装命令:sudo apt-get install sourcenav 启动命令:snavigator 2 手动安装最新版本 1)到官方网站获取软件包 2)解压缩 tar zxvf s ourcenav-6.0.tar.gz ./configure --prefix=/opt/sourcenav (install 文件推荐参数) make make install ps:如果出现权限问题,前面加sudo 3)如果碰到下述错误 /root/tk8.4.16/unix/../generic/tk3d.c:1279: error: ‘TkBorder’ has no member named ‘resourceRefCount’ /root/tk8.4.16/unix/../generic/tk3d.c:1280: error: ‘Tk_FakeWin’ has no member named ‘display’ /root/tk8.4.16/unix/../generic/tk3d.c:1280: error: ‘Tk_FakeWin’ has no member named ‘screenNum’ /root/tk8.4.16/unix/../generic/tk3d.c:1280: error: ‘TkBorder’ has no member named ‘screen’ /root/tk8.4.16/unix/../generic/tk3d.c:1281: error: ‘Tk_FakeWin’ has no member named ‘atts’ /root/tk8.4.16/unix/../generic/tk3d.c:1281: error: ‘TkBorder’ has no member named ‘colormap’ /root/tk8.4.16/unix/../generic/tk3d.c:1301: error: ‘TkDisplay’ has no member named ‘borderTable’ /root/tk8.4.16/unix/../generic/tk3d.c:1301: error: ‘TkDisplay’ has no member named ‘borderTable’ /root/tk8.4.16/unix/../generic/tk3d.c:1306: error: ‘TkBorder’ has no member named ‘nextPtr’ 。。。。。。 则在终端是输入:sudo apt-get install libx11-dev 4) 启动snavigator 在终端直接输入:snavigator 5) 使用手册(user manual) 还有一个 source insight 和source navigator的比较的帖子: ======================================================== 运行source navigator的问题 方法 快递客服问题件处理详细方法山木方法pdf计算方法pdf华与华方法下载八字理论方法下载 一、(转载) 安装完成后运行 snavigator 提示 [root@MagicLinux sourcenav-6.0]# snavigator Can't find a usable tk.tcl in the following directories: /usr/local/share/tk8.3 /usr/local/share/tk8.3/tk.tcl: no event type or button # or keysym no event type or button # or keysym while executing bind Listbox { %W yview scroll [expr {- (%D / 120) * 4}] units } (file /usr/local/share/tk8.3/listbox.tcl line 182) invoked from within source [file join $tk_library listbox.tcl] invoked from within if {[string compare $tcl_platform(platform) macintosh ] \ [string compare {} $tk_library]} { source [file join $tk_library button.tcl] so... (file /usr/local/share/tk8.3/tk.tcl line 30 invoked from within source /usr/local/share/tk8.3/tk.tcl ( uplevel body line 1) invoked from within uplevel \#0 [list source $file] This probably means that tk wasn't installed properly. 不知其所以然,重新安装tk8.3无效,升级到tk8.5无效 后来在网上发现需要给下载的Source-Navigator 6.0打补丁 到找到 tk-8.4-lastevent.patch 补 丁 将补丁粘贴到source navigator 源码目录 sourcenav-6.0/tk目录下,再cd 到 sourcenav-6.0/ tk 的源码目录 patch -p0 -i tk-8.4-lastevent.patch 删除安装,重新安装,可以运行了(我试了一下不行)。 方法二、(转载) 有找到解法: () 注掉 lines 182-184 in the file /opt/sourcenav/share/tk8.3/listbox.tcl 注掉 lines 457-459 in the file /opt/sourcenav/share/tk8.3/text.tcl 在panel中添加Launcher,在Command中添加/opt/sourcenav/bin/snavigator ====== 安装完后在桌面增加捷径的方法 ====== 我要做捷径的目标是/opt/sourcenav/bin/snavigator (这是个sh script) 里面要改一行 #snbindir=`dirname $0` snbindir=/opt/sourcenav/bin 这样再建一个捷径到桌面即可: ln -s /opt/sourcenav/bin/snavigator ~/Desktop/ 本文来自CSDN博客,转载请标明出处:
本文档为【源代码查看工具SourceNavigator使用心得】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
is_477730
暂无简介~
格式:doc
大小:21KB
软件:Word
页数:7
分类:
上传时间:2018-02-18
浏览量:60