2012-05-16 30 views
2

看来这个论坛是不是邮件列表更有活力:http://sourceforge.net/mailarchive/forum.php?forum_name=cedet-semantic。 我想从一个星期前从那里转发我的任务:emacs的语义/参议员:自动完成外部LIB的

首先嗨,所有谁为这个伟大的包装贡献作为CEDET:D。

没有太多的拼劲,我能够获得工作大部分CEDET期货,但是当涉及到参议员/语义事情变得更加因子评分:\。

解析本地文件很好。 我不使用EDE不要让事情更复杂。 为了与ECB兼容,我使用1.0.6 git trunk版本。

  1. 首先是关于emacs core/cedet git-trunk hussle的隆隆声。如何检查当前安装是否正在运行后者? (我已经做了一些.emacs修改,见下文)。

  2. 我一般不能得到适当的自动完成外部库的工作 - 在这种情况下OGRE3D项目,而这一切都在/ usr/include目录/ OGRE。我想我已经添加到'搜索路径'包括正确,semantic-describe-c-env。看到他们正确添加。

2.a语义分析器的基本命令是什么? ,那就是我需要强制它解析所需的包含。

一次,我看到语义的“空闲时间”解析OGRE文件。仍然自动完成功能不起作用(OGRE:RAY不会被识别为类型)。 senator-completition-menu-pop给出了一些不匹配的'c ** p'

2.b我知道有定制组语言的选项,他们的描述很难对我说。

从其他职位:

“是的,有一个安装成本可以使用semanticdb.sh预解析您的 代码,但如果你从来没有开文件,你可能会结束。 Emacs 拥有如此庞大的数据结构,因此您的机器可以处理更大的数据结构,如果您的项目很小,这应该不成问题。“

嗯,这可能是,如果将分析OGRE。

,这里是我的.emacs:

.emacs at pastebin.com

回答

0

这里是我的邮件列表上得到的,希望这会帮助别人,thaks埃里克·Ludlam:d:

===== =================

1. First is the rumble about the emacs core/cedet git-trunk hussle. How do I check that current installation is running the latter ? (I have done some .emacs modificaitons see below) . 

后emacs的启动,使用:

M-X CEDET版本RET

,并期待从CEDET/bzr的1.1版本。

我刚试过这个,注意不是所有的版本都有正确的版本号 。有趣。我得看看那个。

无论如何,尝试下一件事情就是:

M-X定位库RET CEDET RET

,并确保它指向哪里你认为它应该。

2. I generally cannot get the proper autocomplete working for external libs - in this case the OGRE3D project, which all are in the /usr/include/OGRE. I suppose I have added to 'search path' include properly, semantic-describe-c-env. sees them added properly. 

如果启用全球语意装饰模式,你可以在 头文件右击,它会给你一些选项,如表示在 这件事标题是,并显示是否已被解析或没有。

2.a What are the basic commands to the semantic parser ? , that is I need to force it to parse the desired includes. 

可以使用包括菜单强制头解析,或访问 说有。如果找不到它,您可以在此处添加OGRE到您的路径 。

如果你访问次数你的头,你可以使用参议员菜单文件强制 重新分析,或使用:

C-U m的-X bovinate RET

做到这一点。

Once I saw semantic parsing the OGRE files in the 'idle time'. Still the autocomplete does not work (OGRE:RAY is not recongized as a type). senator-completition-menu-pop gives some non-matching 'c**p' 

自动完成可能会失败,原因很多。找出最好的办法,为什么:

M-X语义分析调试辅助你想做的事完成的地方RET

。它会告诉你关于你的 头文件,符号等等。它可能是你的预处理器 符号需要一些设置。

对于大型复杂库头,有时它只是一个具有语义正确的预处理器符号的设置使头的 权位都分析为符号的 问题。你必须访问一个 标题你想完成的符号,并看看它是否被解析。 使用:

M-X boviante RET

将转储符号表。

2.b I know there are customize-group options for semantic, tough their description say little to me. 

    From the other post: 

"Yes, there is a setup cost. You can use semanticdb.sh to pre-parse your code, but if you never open *every* file, you might end up with Emacs having such a huge data structure it gets larger that your machine can handle. If your project is small, this shouldn't be a problem." Well this might be, if that would parse OGRE. 

我怀疑解析include是这里的问题。我认为只有 我们必须处理的食人魔头中有新的东西。

埃里克

===================================