/** * @see org.eclipse.jdt.core.formatter.CodeFormatter#format(int, java.lang.String, int, int, int, java.lang.String) */ public TextEdit format(int kind, String source, int offset, int length, int indentationLevel, String lineSeparator) { return format(kind, source, new IRegion[] { new Region(offset, length) }, indentationLevel, lineSeparator); }
/** * @see org.eclipse.jdt.core.formatter.CodeFormatter#format(int, java.lang.String, int, int, int, java.lang.String) */ public TextEdit format(int kind, String source, int offset, int length, int indentationLevel, String lineSeparator) { if (offset < 0 || length < 0 || length > source.length()) { throw new IllegalArgumentException(); } switch(kind & K_MASK) { case K_JAVA_DOC : // https://bugs.eclipse.org/bugs/show_bug.cgi?id=102780 // use the integrated comment formatter to format comment return formatComment(kind & K_MASK, source, indentationLevel, lineSeparator, new IRegion[] {new Region(offset, length)}); // $FALL-THROUGH$ - fall through next case when old comment formatter is activated case K_MULTI_LINE_COMMENT : case K_SINGLE_LINE_COMMENT : return formatComment(kind & K_MASK, source, indentationLevel, lineSeparator, new IRegion[] {new Region(offset, length)}); } return format(kind, source, new IRegion[] {new Region(offset, length)}, indentationLevel, lineSeparator); }
/** * @see org.eclipse.jdt.core.formatter.CodeFormatter#format(int, java.lang.String, int, int, int, java.lang.String) */ @Override public TextEdit format(int kind, String source, int offset, int length, int indentationLevel, String lineSeparator) { return format(kind, source, new IRegion[] { new Region(offset, length) }, indentationLevel, lineSeparator); }
/** * @see org.eclipse.jdt.core.formatter.CodeFormatter#format(int, java.lang.String, int, int, int, java.lang.String) */ public TextEdit format(int kind, String source, int offset, int length, int indentationLevel, String lineSeparator) { if (offset < 0 || length < 0 || length > source.length()) { throw new IllegalArgumentException(); } switch(kind & K_MASK) { case K_JAVA_DOC : // https://bugs.eclipse.org/bugs/show_bug.cgi?id=102780 // use the integrated comment formatter to format comment return formatComment(kind & K_MASK, source, indentationLevel, lineSeparator, new IRegion[] {new Region(offset, length)}); // $FALL-THROUGH$ - fall through next case when old comment formatter is activated case K_MULTI_LINE_COMMENT : case K_SINGLE_LINE_COMMENT : return formatComment(kind & K_MASK, source, indentationLevel, lineSeparator, new IRegion[] {new Region(offset, length)}); } return format(kind, source, new IRegion[] {new Region(offset, length)}, indentationLevel, lineSeparator); }
/** * @see org.eclipse.jdt.core.formatter.CodeFormatter#format(int, java.lang.String, int, int, int, java.lang.String) */ public TextEdit format(int kind, String source, int offset, int length, int indentationLevel, String lineSeparator) { return format(kind, source, new IRegion[] { new Region(offset, length) }, indentationLevel, lineSeparator); }
/** * @see org.eclipse.jdt.core.formatter.CodeFormatter#format(int, java.lang.String, int, int, int, java.lang.String) */ public TextEdit format(int kind, String source, int offset, int length, int indentationLevel, String lineSeparator) { if (offset < 0 || length < 0 || length > source.length()) { throw new IllegalArgumentException(); } switch(kind & K_MASK) { case K_JAVA_DOC : // https://bugs.eclipse.org/bugs/show_bug.cgi?id=102780 // use the integrated comment formatter to format comment return formatComment(kind & K_MASK, source, indentationLevel, lineSeparator, new IRegion[] {new Region(offset, length)}); // $FALL-THROUGH$ - fall through next case when old comment formatter is activated case K_MULTI_LINE_COMMENT : case K_SINGLE_LINE_COMMENT : return formatComment(kind & K_MASK, source, indentationLevel, lineSeparator, new IRegion[] {new Region(offset, length)}); } return format(kind, source, new IRegion[] {new Region(offset, length)}, indentationLevel, lineSeparator); }
TextEdit textEdit = defaultCodeFormatter.format(org.eclipse.jdt.core.formatter.CodeFormatter.K_UNKNOWN, string, 0, string.length(), indentLevel, lineSeparator); if (positions != null && textEdit != null) {
TextEdit textEdit = defaultCodeFormatter.format(org.eclipse.jdt.core.formatter.CodeFormatter.K_UNKNOWN, string, 0, string.length(), indentLevel, lineSeparator); if (positions != null && textEdit != null) {
TextEdit textEdit = defaultCodeFormatter.format(org.eclipse.jdt.core.formatter.CodeFormatter.K_UNKNOWN, string, 0, string.length(), indentLevel, lineSeparator); if (positions != null && textEdit != null) {
TextEdit textEdit = defaultCodeFormatter.format(org.eclipse.jdt.core.formatter.CodeFormatter.K_UNKNOWN, string, 0, string.length(), indentLevel, lineSeparator); if (positions != null && textEdit != null) {
TextEdit textEdit = defaultCodeFormatter.format(org.eclipse.jdt.core.formatter.CodeFormatter.K_UNKNOWN, string, 0, string.length(), indentLevel, lineSeparator); if (positions != null && textEdit != null) {
TextEdit textEdit = defaultCodeFormatter.format(org.eclipse.jdt.core.formatter.CodeFormatter.K_UNKNOWN, string, 0, string.length(), indentLevel, lineSeparator); if (positions != null && textEdit != null) {