简体   繁体   English

xtend quickfixes对元素的访问

[英]xtend quickfixes access to element

Xtend comes with really convenient ways to deal with quickfixes, but when I do Xtend带有处理快捷修复的非常方便的方法,但是当我这样做时

acceptor.accept(issue, "Change to " + correction, 'Replace the parameter.', 'error.png') [ element, context |

        ...
        ]

the element is not the EObject targeted by the issue, but its container. 元素不是问题所针对的EObject,而是其容器。 How can I have access to this specific element? 我如何可以访问此特定元素?

Thank you by advance. 预先谢谢你。

Please make sure that the EObject you report the error for and the one you expect inside the QuickFix are the same 请确保报告错误的EObject与QuickFix中期望的EObject相同

    warning('Name should start with a capital', 
        greeting,
        MyDslPackage.Literals.GREETING__NAME,
        INVALID_NAME)

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

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