|Invalid 'import is never used' warning for annotations [message #1222605]
||Fri, 20 December 2013 22:00
| Michel de Blok
Registered: August 2013
I'm using XText 2.5, extending the XbaseWithAnnotations grammar, and I have a list of annotations on my elements using:
This works fine, and XBase auto-imports the annotations nicely, but the DSL editor always shows the warning "The import 'xxx' is never used." for the imported annotation in my model file. And if I organize the imports, the annotation import is removed and my model contains an error (couldn't resolve reference to the annotation).
How can I tell XBase that the import is actually used and should not be removed? And why isn't this recognized automatically?
I do map the XAnnotation elements to a JvmAnnotationReference in my JvmModelInferrer with:
The organize imports function works properly for other imported JvmTypes, like classes that are imported and extended in my model, but only for annotations it seems that XBase never 'sees' that the annotations are being used.
Does anyone else have this problem and solved it?
Powered by FUDForum
. Page generated in 0.02025 seconds