Problems solved on :
-
org.eclipse.jdt.source.all.xmi
: "Feature name does not exist on TagElement at getAnnotationTypeDeclarationsFromBodyDeclaration#17(analysis.atl[745:5-745:41])" -
avoid-enum-as-identifier.xmi
: "Unable to access visibility on OclUndefined at matchesCommentRequiredProperty#16(documentation.atl[57:48-57:72])" and "Unable to access name on OclUndefined at avoidStringBufferField#32(bestPractices.atl[84:20-84:38])"
Fixes for :
- (1) : Removed totally unecessary method
getAnnotationTypeDeclarationsFromBodyDeclaration()
and simplified the way of getting annotations. This avoids going through other unconcerned elements (source of the error). - (2) : The original
avoid-enum-as-identifier.xmi
seems to have been incorrectly generated, leaving an incomplete generation of theFieldDeclaration
object for "enum" in the model. This caused the following problems :- the error message (2) for the helpers
commentRequired()
andavoidStringBufferField()
- no error message for the helper
AvoidEnumAsIdentifier()
but doesn't produce any measure for violation ofAvoidEnumAsIdentifier
inmetrics.xmi
. -
Fix: Regenerated
avoid-enum-as-identifier.xmi
correctly by setting java version to 1.4 (to allow writtingenum
as identifier) using the same PMD example as the original input file. This gives no more errors, and produces output MeasureAvoidEnumAsIdentifier
inmetrics.xmi
.
- the error message (2) for the helpers