Eclipse不可见的枚举

Eclipse不可见的枚举,c,eclipse,C,Eclipse,在我使用的代码中,作者喜欢执行以下操作: // someheader.h typedef enum Something { Something_None, #include "somelist.h" NumElements } Something; 在somelist.h中,它将只有一个枚举值列表: item1, item2, item3, 在第一个枚举之后,恰好有另一个枚举: typedef enum Another { goodItem1, goo

在我使用的代码中,作者喜欢执行以下操作:

// someheader.h
typedef enum Something
{
    Something_None,
    #include "somelist.h"
    NumElements
} Something;
在somelist.h中,它将只有一个枚举值列表:

item1,
item2,
item3,
在第一个枚举之后,恰好有另一个枚举:

typedef enum Another
{
    goodItem1,
    goodItem2,
} Another;
现在,在浏览代码时,eclipse无法解析somelist.h中的项

#include "someheader.h"

SomeFunctionCall(item1); // <-- Can't resolve item1
SomeFunctionCall(goodItem1); // <-- No problem
SomeFunctionCall(Something_None); // <-- Same enum as item1 and yet no problem
#包括“someheader.h”

SomeFunctionCall(项目1);//仅仅因为你可以做一些事情,并不意味着你应该…我不认为有任何理由不应该以这种方式使用include。不是我的代码,不是我的选择。对于超长列表(这里经常出现这种情况),它可能有些有用。尽管如此,它还是完成了,我不能选择:-)。我的ide没有任何抱怨,用其他ide进行测试,并向eclipse开发人员报告。嗯。。。我试过一个单独的例子,它确实工作得很好。也许@alk是对的,也许索引器正在轰炸太多的东西。我可以给它更多的内存吗?