开发者

How do I add a warning with Groovy AST transformations?

I see on the SourceUnit object that I can addError(SyntaxException)开发者_如何学Go, but how do I add a warning?

EDIT: Anyone know how I can either get a CSTNode in the CompilePhase.SEMANTIC_ANALYSIS, or how I can simply add a warning with only having to know the line number and column number (just like the addError function works)?

EDIT 2: I tried just creating a CSTNode myself, but it didn't seem to work as eclipse didn't show the warning.


Can you call getErrorCollector() on SourceUnit then add the warnings to that with one of the addWarning(...) methods?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜