简体   繁体   English

使用eclipse进行Frama-C开发:自动完成在某些情况下不起作用

[英]Frama-C development with eclipse: autocompletion not working in some cases

I am developing a Frama-C plugin. 我正在开发一个Frama-C插件。 I use Eclipse for the development. 我使用Eclipse进行开发。 If I write "normal" OCaml-function-calls (of own functions and system-functions), the tooltip shows me available functions. 如果我编写“普通”OCaml函数调用(自己的函数和系统函数),工具提示会显示我可用的函数。 For example: if I type String.i eclipse provides String.iter and other functions as possibilities in a box. 例如:如果我键入String.i eclipse在框中提供String.iter和其他函数作为可能性。

If I want to call a frama-c function, like Ast.g for Ast.get() , or Db.Value. 如果我想调用一个frama-c函数,比如Ast.g表示Ast.get()Db.Value. , this doesn't work that way, no information of matching functions is provided. ,这不起作用,没有提供匹配功能的信息。

Is it possible to activate that? 是否有可能激活它?

I finally found a solution that works for me: 我终于找到了适合我的解决方案:

  1. I downloaded the sources from the Frama-C site. 我从Frama-C网站下载了源代码。

  2. I copied the content of the src-folder to /usr/src/frama-c 我将src-folder的内容复制到/ usr / src / frama-c

  3. I added a folder to my project (in the directory where my own .ml-files are located) 我在我的项目中添加了一个文件夹(在我自己的.ml文件所在的目录中)

  4. When creating -> click on advanced -> "Link to alternate location" 创建时 - >点击高级 - >“链接到备用位置”

  5. Here, I defined /usr/src/frama-c as location 在这里,我将/ usr / src / frama -c定义为位置

  6. After clicking on Finish, the autocompletion for the frama-c-functions are available. 单击Finish后,可以使用frama-c-functions的自动完成功能。

->Goal reached. - >达成目标。

Possible Problems for others: Update of the framework -> The sources will not be updated, because manually added -> Functions may be not provided (not relevant for me, project not big enough that there are lots of framework-changes) 其他可能的问题:框架的更新 - >源不会更新,因为手动添加 - >可能没有提供功能(与我无关,项目不够大,有很多框架更改)

Thanks Lucky J. for the help :) 谢谢Lucky J.的帮助:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM