public static String format(int kind, String string, int offset, int length, int indentationLevel, int[] positions, String lineSeparator, Map options) { TextEdit edit= format2(kind, string, offset, length, indentationLevel, lineSeparator, options); if (edit == null) {  return string.substring(offset, offset + length); } String formatted= getOldAPICompatibleResult(string, edit, indentationLevel, positions, lineSeparator, options); return formatted.substring(offset, formatted.length() - (string.length() - (offset + length)));
public static String format(int kind, String string, int indentationLevel, int[] positions, String lineSeparator, Map options) { return format(kind, string, 0, string.length(), indentationLevel, positions, lineSeparator, options);
	public static String format(int kind, String string, int offset, int length, int indentationLevel, int[] positions, String lineSeparator, Map options) {		TextEdit edit= format2(kind, string, offset, length, indentationLevel, lineSeparator, options);		if (edit == null) {			//JavaPlugin.logErrorMessage("formatter failed to format (no edit returned). Will use unformatted text instead. kind: " + kind + ", string: " + string); //$NON-NLS-1$ //$NON-NLS-2$			return string.substring(offset, offset + length);		}		String formatted= getOldAPICompatibleResult(string, edit, indentationLevel, positions, lineSeparator, options);		return formatted.substring(offset, formatted.length() - (string.length() - (offset + length)));	}