/* * Look for missing method @param tags */ private char[][] missingParamTags(Binding paramNameRefBinding, MethodScope methScope) { // Verify if there's some possible param tag AbstractMethodDeclaration md = methScope.referenceMethod(); int paramTagsSize = this.paramReferences == null ? 0 : this.paramReferences.length; if (md == null) return null; int argumentsSize = md.arguments == null ? 0 : md.arguments.length; if (argumentsSize == 0) return null; // Store all method arguments if there's no @param in javadoc if (paramTagsSize == 0) { char[][] missingParams = new char[argumentsSize][]; for (int i = 0; i < argumentsSize; i++) { missingParams[i] = md.arguments[i].name; } return missingParams; } // Look for missing arguments char[][] missingParams = new char[argumentsSize][]; int size = 0; for (int i = 0; i < argumentsSize; i++) { Argument arg = md.arguments[i]; boolean found = false; int paramNameRefCount = 0; for (int j = 0; j < paramTagsSize && !found; j++) { JavadocSingleNameReference param = this.paramReferences[j]; if (arg.binding == param.binding) { if (param.binding == paramNameRefBinding) { // do not count first occurence of param name reference paramNameRefCount++; found = paramNameRefCount > 1; } else { found = true; } } } if (!found) { missingParams[size++] = arg.name; } } if (size > 0) { if (size != argumentsSize) { System.arraycopy(missingParams, 0, missingParams = new char[size][], 0, size); } return missingParams; } return null; }