Java 类org.eclipse.jdt.core.formatter.IndentManipulation 实例源码

项目:eclipse.jdt.ls    文件:JavaDocCommentReader.java   
/**
 * @see java.io.Reader#read()
 */
@Override
public int read() {
    if (fCurrPos < fEndPos) {
        char ch= getChar(fCurrPos++);
        if (fWasNewLine && !IndentManipulation.isLineDelimiterChar(ch)) {
            while (fCurrPos < fEndPos && Character.isWhitespace(ch)) {
                ch= getChar(fCurrPos++);
            }
            if (ch == '*') {
                if (fCurrPos < fEndPos) {
                    do {
                        ch= getChar(fCurrPos++);
                    } while (ch == '*');
                } else {
                    return -1;
                }
            }
        }
        fWasNewLine= IndentManipulation.isLineDelimiterChar(ch);

        return ch;
    }
    return -1;
}
项目:che    文件:JavaDocCommentReader.java   
/** @see java.io.Reader#read() */
@Override
public int read() {
  if (fCurrPos < fEndPos) {
    char ch = fBuffer.getChar(fCurrPos++);
    if (fWasNewLine && !IndentManipulation.isLineDelimiterChar(ch)) {
      while (fCurrPos < fEndPos && Character.isWhitespace(ch)) {
        ch = fBuffer.getChar(fCurrPos++);
      }
      if (ch == '*') {
        if (fCurrPos < fEndPos) {
          do {
            ch = fBuffer.getChar(fCurrPos++);
          } while (ch == '*');
        } else {
          return -1;
        }
      }
    }
    fWasNewLine = IndentManipulation.isLineDelimiterChar(ch);

    return ch;
  }
  return -1;
}
项目:Eclipse-Postfix-Code-Completion    文件:JavaDocCommentReader.java   
/**
 * @see java.io.Reader#read()
 */
@Override
public int read() {
    if (fCurrPos < fEndPos) {
        char ch= fBuffer.getChar(fCurrPos++);
        if (fWasNewLine && !IndentManipulation.isLineDelimiterChar(ch)) {
            while (fCurrPos < fEndPos && Character.isWhitespace(ch)) {
                ch= fBuffer.getChar(fCurrPos++);
            }
            if (ch == '*') {
                if (fCurrPos < fEndPos) {
                    do {
                        ch= fBuffer.getChar(fCurrPos++);
                    } while (ch == '*');
                } else {
                    return -1;
                }
            }
        }
        fWasNewLine= IndentManipulation.isLineDelimiterChar(ch);

        return ch;
    }
    return -1;
}
项目:Eclipse-Postfix-Code-Completion    文件:Strings.java   
/**
 * Removes leading tabs and spaces from the given string. If the string
 * doesn't contain any leading tabs or spaces then the string itself is
 * returned.
 * @param line the line
 * @return the trimmed line
 */
public static String trimLeadingTabsAndSpaces(String line) {
    int size= line.length();
    int start= size;
    for (int i= 0; i < size; i++) {
        char c= line.charAt(i);
        if (!IndentManipulation.isIndentChar(c)) {
            start= i;
            break;
        }
    }
    if (start == 0)
        return line;
    else if (start == size)
        return ""; //$NON-NLS-1$
    else
        return line.substring(start);
}
项目:Eclipse-Postfix-Code-Completion    文件:Strings.java   
public static String trimTrailingTabsAndSpaces(String line) {
    int size= line.length();
    int end= size;
    for (int i= size - 1; i >= 0; i--) {
        char c= line.charAt(i);
        if (IndentManipulation.isIndentChar(c)) {
            end= i;
        } else {
            break;
        }
    }
    if (end == size)
        return line;
    else if (end == 0)
        return ""; //$NON-NLS-1$
    else
        return line.substring(0, end);
}
项目:Eclipse-Postfix-Code-Completion    文件:CreateTypeMemberOperation.java   
private String removeIndentAndNewLines(String code, ICompilationUnit cu) throws JavaModelException {
    IJavaProject project = cu.getJavaProject();
    Map options = project.getOptions(true/*inherit JavaCore options*/);
    int tabWidth = IndentManipulation.getTabWidth(options);
    int indentWidth = IndentManipulation.getIndentWidth(options);
    int indent = IndentManipulation.measureIndentUnits(code, tabWidth, indentWidth);
    int firstNonWhiteSpace = -1;
    int length = code.length();
    while (firstNonWhiteSpace < length-1)
        if (!ScannerHelper.isWhitespace(code.charAt(++firstNonWhiteSpace)))
            break;
    int lastNonWhiteSpace = length;
    while (lastNonWhiteSpace > 0)
        if (!ScannerHelper.isWhitespace(code.charAt(--lastNonWhiteSpace)))
            break;
    String lineDelimiter = cu.findRecommendedLineSeparator();
    return IndentManipulation.changeIndent(code.substring(firstNonWhiteSpace, lastNonWhiteSpace+1), indent, tabWidth, indentWidth, "", lineDelimiter); //$NON-NLS-1$
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:JavaDocCommentReader.java   
/**
 * @see java.io.Reader#read()
 */
@Override
public int read() {
    if (fCurrPos < fEndPos) {
        char ch= fBuffer.getChar(fCurrPos++);
        if (fWasNewLine && !IndentManipulation.isLineDelimiterChar(ch)) {
            while (fCurrPos < fEndPos && Character.isWhitespace(ch)) {
                ch= fBuffer.getChar(fCurrPos++);
            }
            if (ch == '*') {
                if (fCurrPos < fEndPos) {
                    do {
                        ch= fBuffer.getChar(fCurrPos++);
                    } while (ch == '*');
                } else {
                    return -1;
                }
            }
        }
        fWasNewLine= IndentManipulation.isLineDelimiterChar(ch);

        return ch;
    }
    return -1;
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:Strings.java   
/**
 * Removes leading tabs and spaces from the given string. If the string
 * doesn't contain any leading tabs or spaces then the string itself is
 * returned.
 * @param line the line
 * @return the trimmed line
 */
public static String trimLeadingTabsAndSpaces(String line) {
    int size= line.length();
    int start= size;
    for (int i= 0; i < size; i++) {
        char c= line.charAt(i);
        if (!IndentManipulation.isIndentChar(c)) {
            start= i;
            break;
        }
    }
    if (start == 0)
        return line;
    else if (start == size)
        return ""; //$NON-NLS-1$
    else
        return line.substring(start);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:Strings.java   
public static String trimTrailingTabsAndSpaces(String line) {
    int size= line.length();
    int end= size;
    for (int i= size - 1; i >= 0; i--) {
        char c= line.charAt(i);
        if (IndentManipulation.isIndentChar(c)) {
            end= i;
        } else {
            break;
        }
    }
    if (end == size)
        return line;
    else if (end == 0)
        return ""; //$NON-NLS-1$
    else
        return line.substring(0, end);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:CreateTypeMemberOperation.java   
private String removeIndentAndNewLines(String code, ICompilationUnit cu) throws JavaModelException {
    IJavaProject project = cu.getJavaProject();
    Map options = project.getOptions(true/*inherit JavaCore options*/);
    int tabWidth = IndentManipulation.getTabWidth(options);
    int indentWidth = IndentManipulation.getIndentWidth(options);
    int indent = IndentManipulation.measureIndentUnits(code, tabWidth, indentWidth);
    int firstNonWhiteSpace = -1;
    int length = code.length();
    while (firstNonWhiteSpace < length-1)
        if (!ScannerHelper.isWhitespace(code.charAt(++firstNonWhiteSpace)))
            break;
    int lastNonWhiteSpace = length;
    while (lastNonWhiteSpace > 0)
        if (!ScannerHelper.isWhitespace(code.charAt(--lastNonWhiteSpace)))
            break;
    String lineDelimiter = cu.findRecommendedLineSeparator();
    return IndentManipulation.changeIndent(code.substring(firstNonWhiteSpace, lastNonWhiteSpace+1), indent, tabWidth, indentWidth, "", lineDelimiter); //$NON-NLS-1$
}
项目:eclipse.jdt.ls    文件:OverrideCompletionProposal.java   
private static String getIndentAt(IDocument document, int offset, CodeGenerationSettings settings) {
    try {
        IRegion region= document.getLineInformationOfOffset(offset);
        return IndentManipulation.extractIndentString(document.get(region.getOffset(), region.getLength()), settings.tabWidth, settings.indentWidth);
    } catch (BadLocationException e) {
        return ""; //$NON-NLS-1$
    }
}
项目:eclipse.jdt.ls    文件:ASTNodes.java   
private static int getIndentUsed(IBuffer buffer, int offset, IJavaProject project) {
    int i= offset;
    // find beginning of line
    while (i > 0 && !IndentManipulation.isLineDelimiterChar(buffer.getChar(i - 1))) {
        i--;
    }
    return Strings.computeIndentUnits(buffer.getText(i, offset - i), project);
}
项目:che    文件:Strings.java   
/**
 * Removes leading tabs and spaces from the given string. If the string doesn't contain any
 * leading tabs or spaces then the string itself is returned.
 *
 * @param line the line
 * @return the trimmed line
 */
public static String trimLeadingTabsAndSpaces(String line) {
  int size = line.length();
  int start = size;
  for (int i = 0; i < size; i++) {
    char c = line.charAt(i);
    if (!IndentManipulation.isIndentChar(c)) {
      start = i;
      break;
    }
  }
  if (start == 0) return line;
  else if (start == size) return ""; // $NON-NLS-1$
  else return line.substring(start);
}
项目:che    文件:Strings.java   
public static String trimTrailingTabsAndSpaces(String line) {
  int size = line.length();
  int end = size;
  for (int i = size - 1; i >= 0; i--) {
    char c = line.charAt(i);
    if (IndentManipulation.isIndentChar(c)) {
      end = i;
    } else {
      break;
    }
  }
  if (end == size) return line;
  else if (end == 0) return ""; // $NON-NLS-1$
  else return line.substring(0, end);
}
项目:che    文件:StubUtility.java   
public static int getIndentUsed(IBuffer buffer, int offset, IJavaProject project) {
  int i = offset;
  // find beginning of line
  while (i > 0 && !IndentManipulation.isLineDelimiterChar(buffer.getChar(i - 1))) {
    i--;
  }
  return Strings.computeIndentUnits(buffer.getText(i, offset - i), project);
}
项目:che    文件:OverrideCompletionProposal.java   
private static String getIndentAt(
    IDocument document, int offset, CodeGenerationSettings settings) {
  try {
    IRegion region = document.getLineInformationOfOffset(offset);
    return IndentManipulation.extractIndentString(
        document.get(region.getOffset(), region.getLength()),
        settings.tabWidth,
        settings.indentWidth);
  } catch (BadLocationException e) {
    return ""; // $NON-NLS-1$
  }
}
项目:gwt-eclipse-plugin    文件:JsniMethodBodyCompletionProposalComputer.java   
/**
 * Returns the indentation units for a given project, document, line and line
 * offset.
 */
static int measureIndentationUnits(IDocument document,
    int lineOfInvocationOffset, int lineOffset, IJavaProject project)
    throws BadLocationException {
  Map<?, ?> options = project.getOptions(true);
  String lineText = document.get(lineOffset,
      document.getLineLength(lineOfInvocationOffset));
  int indentationUnits = IndentManipulation.measureIndentUnits(lineText,
      IndentManipulation.getTabWidth(options),
      IndentManipulation.getIndentWidth(options));
  return indentationUnits;
}
项目:Eclipse-Postfix-Code-Completion    文件:NLSUtil.java   
private static int findLineEnd(ICompilationUnit cu, int position) throws JavaModelException {
    IBuffer buffer= cu.getBuffer();
    int length= buffer.getLength();
    for (int i= position; i < length; i++) {
        if (IndentManipulation.isLineDelimiterChar(buffer.getChar(i))) {
            return i;
        }
    }
    return length;
}
项目:Eclipse-Postfix-Code-Completion    文件:StubUtility.java   
public static int getIndentUsed(IBuffer buffer, int offset, IJavaProject project) {
    int i= offset;
    // find beginning of line
    while (i > 0 && !IndentManipulation.isLineDelimiterChar(buffer.getChar(i - 1))) {
        i--;
    }
    return Strings.computeIndentUnits(buffer.getText(i, offset - i), project);
}
项目:Eclipse-Postfix-Code-Completion    文件:JavaSearchPage.java   
private SearchPatternData trySimpleTextSelection(ITextSelection selection) {
    String selectedText= selection.getText();
    if (selectedText != null && selectedText.length() > 0) {
        int i= 0;
        while (i < selectedText.length() && !IndentManipulation.isLineDelimiterChar(selectedText.charAt(i))) {
            i++;
        }
        if (i > 0) {
            return new SearchPatternData(TYPE, REFERENCES, 0, fIsCaseSensitive, selectedText.substring(0, i), null, JavaSearchScopeFactory.ALL);
        }
    }
    return null;
}
项目:Eclipse-Postfix-Code-Completion    文件:JavaElementLine.java   
/**
 * @param element either an ICompilationUnit or an IClassFile
 * @param lineNumber the line number, starting at 0
 * @param lineStartOffset the start offset of the line
 * @throws CoreException thrown when accessing of the buffer failed
 */
public JavaElementLine(ITypeRoot element, int lineNumber, int lineStartOffset) throws CoreException {
    fElement= element;
    fFlags= 0;

    IBuffer buffer= element.getBuffer();
    if (buffer == null) {
        throw new CoreException(new Status(IStatus.ERROR, JavaUI.ID_PLUGIN, Messages.format( SearchMessages.JavaElementLine_error_nobuffer, BasicElementLabels.getFileName(element))));
    }

    int length= buffer.getLength();
    int i= lineStartOffset;

    char ch= buffer.getChar(i);
    while (lineStartOffset < length && IndentManipulation.isIndentChar(ch)) {
        ch= buffer.getChar(++i);
    }
    fLineStartOffset= i;

    StringBuffer buf= new StringBuffer();

    while (i < length && !IndentManipulation.isLineDelimiterChar(ch)) {
        if (Character.isISOControl(ch)) {
            buf.append(' ');
        } else {
            buf.append(ch);
        }
        i++;
        if (i < length)
            ch= buffer.getChar(i);
    }
    fLineContents= buf.toString();
    fLineNumber= lineNumber;
}
项目:Eclipse-Postfix-Code-Completion    文件:OverrideCompletionProposal.java   
private static String getIndentAt(IDocument document, int offset, CodeGenerationSettings settings) {
    try {
        IRegion region= document.getLineInformationOfOffset(offset);
        return IndentManipulation.extractIndentString(document.get(region.getOffset(), region.getLength()), settings.tabWidth, settings.indentWidth);
    } catch (BadLocationException e) {
        return ""; //$NON-NLS-1$
    }
}
项目:Eclipse-Postfix-Code-Completion    文件:ASTRewriteAnalyzer.java   
final private String getIndentOfLine(int pos) {
    int line= getLineInformation().getLineOfOffset(pos);
    if (line >= 0) {
        char[] cont= getContent();
        int lineStart= getLineInformation().getLineOffset(line);
        int i= lineStart;
        while (i < cont.length && IndentManipulation.isIndentChar(this.content[i])) {
            i++;
        }
        return new String(cont, lineStart, i - lineStart);
    }
    return Util.EMPTY_STRING;
}
项目:Eclipse-Postfix-Code-Completion    文件:ASTRewriteAnalyzer.java   
private boolean needsNewLineForLineComment(ASTNode node, String formatted, int offset) {
    if (!this.lineCommentEndOffsets.isEndOfLineComment(getExtendedEnd(node), this.content)) {
        return false;
    }
    // copied code ends with a line comment, but doesn't contain the new line
    return offset < formatted.length() && !IndentManipulation.isLineDelimiterChar(formatted.charAt(offset));
}
项目:Eclipse-Postfix-Code-Completion    文件:ASTRewriteAnalyzer.java   
private int getCurrentLineStart(String str, int pos) {
    for (int i= pos - 1; i>= 0; i--) {
        char ch= str.charAt(i);
        if (IndentManipulation.isLineDelimiterChar(ch)) {
            return i+1;
        }
    }
    return 0;
}
项目:Eclipse-Postfix-Code-Completion    文件:ASTRewriteAnalyzer.java   
private int findTagNameEnd(TagElement tagNode) {
    if (tagNode.getTagName() != null) {
        char[] cont= getContent();
        int len= cont.length;
        int i= tagNode.getStartPosition();
        while (i < len && !IndentManipulation.isIndentChar(cont[i])) {
            i++;
        }
        return i;
    }
    return tagNode.getStartPosition();
}
项目:Eclipse-Postfix-Code-Completion    文件:ASTRewriteFormatter.java   
public ASTRewriteFormatter(NodeInfoStore placeholders, RewriteEventStore eventStore, Map options, String lineDelimiter) {
    this.placeholders= placeholders;
    this.eventStore= eventStore;

    this.options= options == null ? JavaCore.getOptions() : (Map) new HashMap(options);
    this.options.put(
            DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_RESOURCES_IN_TRY,
            DefaultCodeFormatterConstants.createAlignmentValue(true, DefaultCodeFormatterConstants.WRAP_NEXT_PER_LINE, DefaultCodeFormatterConstants.INDENT_DEFAULT));

    this.lineDelimiter= lineDelimiter;

    this.tabWidth= IndentManipulation.getTabWidth(options);
    this.indentWidth= IndentManipulation.getIndentWidth(options);
}
项目:Eclipse-Postfix-Code-Completion    文件:SourceModifier.java   
public ReplaceEdit[] getModifications(String source) {
    List result= new ArrayList();
    int destIndentLevel= IndentManipulation.measureIndentUnits(this.destinationIndent, this.tabWidth, this.indentWidth);
    if (destIndentLevel == this.sourceIndentLevel) {
        return (ReplaceEdit[])result.toArray(new ReplaceEdit[result.size()]);
    }
    return IndentManipulation.getChangeIndentEdits(source, this.sourceIndentLevel, this.tabWidth, this.indentWidth, this.destinationIndent);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:NLSUtil.java   
private static int findLineEnd(ICompilationUnit cu, int position) throws JavaModelException {
    IBuffer buffer= cu.getBuffer();
    int length= buffer.getLength();
    for (int i= position; i < length; i++) {
        if (IndentManipulation.isLineDelimiterChar(buffer.getChar(i))) {
            return i;
        }
    }
    return length;
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:StubUtility.java   
public static int getIndentUsed(IBuffer buffer, int offset, IJavaProject project) {
    int i= offset;
    // find beginning of line
    while (i > 0 && !IndentManipulation.isLineDelimiterChar(buffer.getChar(i - 1))) {
        i--;
    }
    return Strings.computeIndentUnits(buffer.getText(i, offset - i), project);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:JavaSearchPage.java   
private SearchPatternData trySimpleTextSelection(ITextSelection selection) {
    String selectedText= selection.getText();
    if (selectedText != null && selectedText.length() > 0) {
        int i= 0;
        while (i < selectedText.length() && !IndentManipulation.isLineDelimiterChar(selectedText.charAt(i))) {
            i++;
        }
        if (i > 0) {
            return new SearchPatternData(TYPE, REFERENCES, 0, fIsCaseSensitive, selectedText.substring(0, i), null, JavaSearchScopeFactory.ALL);
        }
    }
    return null;
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:JavaElementLine.java   
/**
 * @param element either an ICompilationUnit or an IClassFile
 * @param lineNumber the line number
 * @param lineStartOffset the start offset of the line
 * @throws CoreException thrown when accessing of the buffer failed
 */
public JavaElementLine(ITypeRoot element, int lineNumber, int lineStartOffset) throws CoreException {
    fElement= element;
    fFlags= 0;

    IBuffer buffer= element.getBuffer();
    if (buffer == null) {
        throw new CoreException(new Status(IStatus.ERROR, JavaUI.ID_PLUGIN, Messages.format( SearchMessages.JavaElementLine_error_nobuffer, BasicElementLabels.getFileName(element))));
    }

    int length= buffer.getLength();
    int i= lineStartOffset;

    char ch= buffer.getChar(i);
    while (lineStartOffset < length && IndentManipulation.isIndentChar(ch)) {
        ch= buffer.getChar(++i);
    }
    fLineStartOffset= i;

    StringBuffer buf= new StringBuffer();

    while (i < length && !IndentManipulation.isLineDelimiterChar(ch)) {
        if (Character.isISOControl(ch)) {
            buf.append(' ');
        } else {
            buf.append(ch);
        }
        i++;
        if (i < length)
            ch= buffer.getChar(i);
    }
    fLineContents= buf.toString();
    fLineNumber= lineNumber;
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:OverrideCompletionProposal.java   
private static String getIndentAt(IDocument document, int offset, CodeGenerationSettings settings) {
    try {
        IRegion region= document.getLineInformationOfOffset(offset);
        return IndentManipulation.extractIndentString(document.get(region.getOffset(), region.getLength()), settings.tabWidth, settings.indentWidth);
    } catch (BadLocationException e) {
        return ""; //$NON-NLS-1$
    }
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:ASTRewriteAnalyzer.java   
final private String getIndentOfLine(int pos) {
    int line= getLineInformation().getLineOfOffset(pos);
    if (line >= 0) {
        char[] cont= getContent();
        int lineStart= getLineInformation().getLineOffset(line);
        int i= lineStart;
        while (i < cont.length && IndentManipulation.isIndentChar(this.content[i])) {
            i++;
        }
        return new String(cont, lineStart, i - lineStart);
    }
    return Util.EMPTY_STRING;
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:ASTRewriteAnalyzer.java   
private boolean needsNewLineForLineComment(ASTNode node, String formatted, int offset) {
    if (!this.lineCommentEndOffsets.isEndOfLineComment(getExtendedEnd(node), this.content)) {
        return false;
    }
    // copied code ends with a line comment, but doesn't contain the new line
    return offset < formatted.length() && !IndentManipulation.isLineDelimiterChar(formatted.charAt(offset));
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:ASTRewriteAnalyzer.java   
private int getCurrentLineStart(String str, int pos) {
    for (int i= pos - 1; i>= 0; i--) {
        char ch= str.charAt(i);
        if (IndentManipulation.isLineDelimiterChar(ch)) {
            return i+1;
        }
    }
    return 0;
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:ASTRewriteAnalyzer.java   
private int findTagNameEnd(TagElement tagNode) {
    if (tagNode.getTagName() != null) {
        char[] cont= getContent();
        int len= cont.length;
        int i= tagNode.getStartPosition();
        while (i < len && !IndentManipulation.isIndentChar(cont[i])) {
            i++;
        }
        return i;
    }
    return tagNode.getStartPosition();
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:ASTRewriteFormatter.java   
public ASTRewriteFormatter(NodeInfoStore placeholders, RewriteEventStore eventStore, Map options, String lineDelimiter) {
    this.placeholders= placeholders;
    this.eventStore= eventStore;

    this.options= options == null ? JavaCore.getOptions() : (Map) new HashMap(options);
    this.options.put(
            DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_RESOURCES_IN_TRY,
            DefaultCodeFormatterConstants.createAlignmentValue(true, DefaultCodeFormatterConstants.WRAP_NEXT_PER_LINE, DefaultCodeFormatterConstants.INDENT_DEFAULT));

    this.lineDelimiter= lineDelimiter;

    this.tabWidth= IndentManipulation.getTabWidth(options);
    this.indentWidth= IndentManipulation.getIndentWidth(options);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:SourceModifier.java   
public ReplaceEdit[] getModifications(String source) {
    List result= new ArrayList();
    int destIndentLevel= IndentManipulation.measureIndentUnits(this.destinationIndent, this.tabWidth, this.indentWidth);
    if (destIndentLevel == this.sourceIndentLevel) {
        return (ReplaceEdit[])result.toArray(new ReplaceEdit[result.size()]);
    }
    return IndentManipulation.getChangeIndentEdits(source, this.sourceIndentLevel, this.tabWidth, this.indentWidth, this.destinationIndent);
}
项目:eclemma    文件:SessionExporter.java   
public AbstractSourceFileLocator(IPackageFragmentRoot root) {
  this.root = root;
  final Map<?, ?> options = root.getJavaProject().getOptions(true);
  this.tabWidth = IndentManipulation.getTabWidth(options);
}