We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I don't know if it's my maven setup, windows, or my JVM, but this block of code leads to errors:
private String _getPackage(Element pElement) { Element element = pElement; while (element != null) { if (element.getKind() == ElementKind.PACKAGE) return element.toString(); Element enclosingElement = element.getEnclosingElement(); if (ENCLOSING_TYPES.contains(enclosingElement.getKind())) element = enclosingElement; else { processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, "Element type not supported", pElement); break; } } return ""; }
In my setup, the element.toString returns "package com.x.y.z" when it sould be "com.x.y.z"
I remedied this with:
private String _getPackage(Element pElement) { Element element = pElement; while (element != null) { if (element.getKind() == ElementKind.PACKAGE) return ((javax.lang.model.element.PackageElement)element).getQualifiedName().toString(); Element enclosingElement = element.getEnclosingElement(); if (ENCLOSING_TYPES.contains(enclosingElement.getKind())) element = enclosingElement; else { processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, "Element type not supported", pElement); break; } } return ""; }
The text was updated successfully, but these errors were encountered:
Thanks for the report. I'll look into it.
Sorry, something went wrong.
Issue #3: added finer package name identification
ab6c8b2
Signed-off-by: j.boesl <[email protected]>
Fix is pushed. Please test it and then I'll release it on maven.
No branches or pull requests
I don't know if it's my maven setup, windows, or my JVM, but this block of code leads to errors:
In my setup, the element.toString returns "package com.x.y.z" when it sould be "com.x.y.z"
I remedied this with:
The text was updated successfully, but these errors were encountered: