/** * Returns a string representation of the given diagnostic object. * * @param diagnostic * The diagnostic * @return a string representation of the given diagnostic object. */ private static String diagnosticString(Diagnostic diagnostic) { StringBuffer buffer = new StringBuffer(); buffer.append(AcceleoCommonMessages .getString("ModelUtils.DiagnosticMessage", diagnostic.getMessage())); //$NON-NLS-1$ buffer.append('\n'); buffer.append(AcceleoCommonMessages.getString("ModelUtils.DiagnosticLocation", diagnostic //$NON-NLS-1$ .getLocation(), Integer.valueOf(diagnostic.getLine()), Integer .valueOf(diagnostic.getColumn()))); return buffer.toString(); }
/** * Wraps an XSD diagnostic into a WSDL diagnostic. Used to report problems in * inline schemas. * * @param xsdDiagnostic * the XSD diagnostic object to wrap. Must not be null. */ public WSDLDiagnosticImpl(XSDDiagnostic xsdDiagnostic) { this(); setMessage(xsdDiagnostic.getMessage()); setSeverity(getSeverity(xsdDiagnostic.getSeverity())); setLine(xsdDiagnostic.getLine()); setColumn(xsdDiagnostic.getColumn()); setNode(xsdDiagnostic.getNode()); setContainer(xsdDiagnostic.getContainer()); setLocation(xsdDiagnostic.getLocation()); setKey(xsdDiagnostic.getKey()); getSubstitutions().addAll(xsdDiagnostic.getSubstitutions()); }