/** * Creates a new {@link IApiProblem} * * @param resourcepath the path to the resource this problem was found in * @param typeName the type name this problem was found in * @param messageargs listing of arguments to pass in to the localized * message. The arguments are passed into the string in the order * they appear in the array. * @param argumentids the ids of arguments passed into the problem * @param arguments the arguments that correspond to the listing of ids * @param linenumber the number of the line the problem occurred on * @param charstart the start of a char selection range * @param charend the end of a char selection range * @param id the composite id of the problem * @return a new {@link IApiProblem} */ public static IApiProblem newApiProblem(String resourcepath, String typeName, String[] messageargs, String[] argumentids, Object[] arguments, int linenumber, int charstart, int charend, int id) { return new ApiProblem(resourcepath, typeName, messageargs, argumentids, arguments, linenumber, charstart, charend, id); }
@Override public void endElement(String uri, String localName, String qName) throws SAXException { if (IApiXmlConstants.ELEMENT_API_PROBLEM.equalsIgnoreCase(qName)) { String[] argumentids = new String[extraargs.size()]; Object[] arguments = new Object[extraargs.size()]; int i = 0; for (Entry<String, String> entry : extraargs.entrySet()) { argumentids[i] = entry.getKey(); arguments[i] = entry.getValue(); } ApiProblem problem = new ApiProblem(null, typename, messageargs.toArray(new String[messageargs.size()]), argumentids, arguments, linenumber, charstart, charend, id); problems.add(problem); } }