/** * Removes the given number of indents from the line. Asserts that the given line * has the requested number of indents. If <code>indentsToRemove <= 0</code> * the line is returned. * * @since 3.1 */ public static String trimIndent(String line, int indentsToRemove, int tabWidth, int indentWidth) { return IndentManipulation.trimIndent(line, indentsToRemove, tabWidth, indentWidth); }
/** * Removes the given number of indents from the line. Asserts that the given line * has the requested number of indents. If <code>indentsToRemove <= 0</code> * the line is returned. * @param line the line * @param indentsToRemove the indents to remove * @param tabWidth the tab width * @param indentWidth the indent width * @return the trimmed line * * @since 3.1 */ public static String trimIndent(String line, int indentsToRemove, int tabWidth, int indentWidth) { return IndentManipulation.trimIndent(line, indentsToRemove, tabWidth, indentWidth); }
/** * Removes the given number of indents from the line. Asserts that the given line * has the requested number of indents. If <code>indentsToRemove <= 0</code> * the line is returned. * @param line the line * @param indentsToRemove the indents to remove * @param tabWidth the tab width * @param indentWidth the indent width * @return the trimmed line * * @since 3.1 */ public static String trimIndent(String line, int indentsToRemove, int tabWidth, int indentWidth) { return IndentManipulation.trimIndent(line, indentsToRemove, tabWidth, indentWidth); }
/** * Removes the given number of indents from the line. Asserts that the given line * has the requested number of indents. If <code>indentsToRemove <= 0</code> * the line is returned. * * @param project the java project from which to get the formatter * preferences, or <code>null</code> for global preferences * @since 3.1 */ public static String trimIndent(String line, int indentsToRemove, IJavaProject project) { return IndentManipulation.trimIndent(line, indentsToRemove, CodeFormatterUtil.getTabWidth(project), CodeFormatterUtil.getIndentWidth(project)); }
/** * Removes the given number of indents from the line. Asserts that the given line * has the requested number of indents. If <code>indentsToRemove <= 0</code> * the line is returned. * @param line the line * @param indentsToRemove the indents to remove * * @param project the java project from which to get the formatter * preferences, or <code>null</code> for global preferences * @return the trimmed line * * @since 3.1 */ public static String trimIndent(String line, int indentsToRemove, IJavaProject project) { return IndentManipulation.trimIndent(line, indentsToRemove, CodeFormatterUtil.getTabWidth(project), CodeFormatterUtil.getIndentWidth(project)); }
/** * Removes the given number of indents from the line. Asserts that the given line * has the requested number of indents. If <code>indentsToRemove <= 0</code> * the line is returned. * @param line the line * @param indentsToRemove the indents to remove * * @param project the java project from which to get the formatter * preferences, or <code>null</code> for global preferences * @return the trimmed line * * @since 3.1 */ public static String trimIndent(String line, int indentsToRemove, IJavaProject project) { return IndentManipulation.trimIndent(line, indentsToRemove, CodeFormatterUtil.getTabWidth(project), CodeFormatterUtil.getIndentWidth(project)); }
buf.append(newIndentString); if(indentWidth != 0) { buf.append(trimIndent(line, indentUnitsToRemove, tabWidth, indentWidth)); } else { buf.append(line);
buf.append(newIndentString); if(indentWidth != 0) { buf.append(trimIndent(line, indentUnitsToRemove, tabWidth, indentWidth)); } else { buf.append(line);
buf.append(newIndentString); if(indentWidth != 0) { buf.append(trimIndent(line, indentUnitsToRemove, tabWidth, indentWidth)); } else { buf.append(line);
buf.append(newIndentString); if(indentWidth != 0) { buf.append(trimIndent(line, indentUnitsToRemove, tabWidth, indentWidth)); } else { buf.append(line);
buf.append(newIndentString); if(indentWidth != 0) { buf.append(trimIndent(line, indentUnitsToRemove, tabWidth, indentWidth)); } else { buf.append(line);
buf.append(newIndentString); if(indentWidth != 0) { buf.append(trimIndent(line, indentUnitsToRemove, tabWidth, indentWidth)); } else { buf.append(line);