eclipse - Eclipse 中的注释模板变量

标签 eclipse eclipse-cdt

我在 Eclipse (CDT) 中有一个注释模板,用于函数调用,如下所示:

//****************************************************************************
//
// Function: ${enclosing_method}
//
// Purpose:  
//
// Parameters:
//
//****************************************************************************

我的问题是 ${enleading_method} 模板变量大多数时候不起作用,但其他时候却起作用,但我还没有弄清楚原因。我尝试过在函数内部和函数定义外部(顶部)使用注释模板,即使在同一头文件中也是如此。我更喜欢它在顶部,并且已经看到它在那个位置上工作,但我再次不知道为什么。

为了使 enclusion_method 变量自动将名称放置在注释中,需要满足哪些先决条件?

预先感谢您提供的任何见解。

最佳答案

您是not the only one使用此模板时遇到问题。
即使在 JDT (Java) 中也存在问题,从 2004 年开始!请参阅bug 76661 .

但是它并不完全可重现。

Looked into this to try and find a reproducible case. I can get it happen consistently if I add a new method to a class and then execute the template inside of the method before saving

到目前为止,还没有看到补丁。

关于eclipse - Eclipse 中的注释模板变量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1874801/

相关文章:

java - 如何解决此错误{无法启动组件[Connector[HTTP/1.1-8080]]}?

c++ - Eclipse项目通过环境变量链接资源

gcc - eclipse cdt 无法解析 <stdint.h>

c++ - 为什么 Eclipse 认为 clang 不支持 std::atomic

Eclipse 在一个文件中查找所有内容

java - 警告 : Activity not started , 它当前的任务已被带到前面

android - Eclipse应用程序包重命名工具报错

java - 自动解决 PMD 违规问题?

java - 是否有开箱即用的 Cassandra 数据库 Java 接口(interface)?

c++ - 当我尝试实例化特定类时 CDT 中的 "Type symbol(s) not found for architecture x86_64"