Java 类org.eclipse.jface.text.source.LineRange 实例源码

项目:Eclipse-Postfix-Code-Completion    文件:JavaFormatter.java   
private void indent(IDocument document) throws BadLocationException, MalformedTreeException {
    // first line
    int offset= document.getLineOffset(0);
    document.replace(offset, 0, CodeFormatterUtil.createIndentString(fInitialIndentLevel, fProject));

    // following lines
    int lineCount= document.getNumberOfLines();
    IndentUtil.indentLines(document, new LineRange(1, lineCount - 1), fProject, null);
}
项目:Eclipse-Postfix-Code-Completion    文件:JavaMoveLinesAction.java   
private ILineRange getLineRange(IDocument document, ITextSelection selection) throws BadLocationException {
    final int offset= selection.getOffset();
    int startLine= document.getLineOfOffset(offset);
    int endOffset= offset + selection.getLength();
    int endLine= document.getLineOfOffset(endOffset);
    final int nLines= endLine - startLine + 1;
    return new LineRange(startLine, nLines);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:JavaFormatter.java   
private void indent(IDocument document) throws BadLocationException, MalformedTreeException {
    // first line
    int offset= document.getLineOffset(0);
    document.replace(offset, 0, CodeFormatterUtil.createIndentString(fInitialIndentLevel, fProject));

    // following lines
    int lineCount= document.getNumberOfLines();
    IndentUtil.indentLines(document, new LineRange(1, lineCount - 1), fProject, null);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:JavaMoveLinesAction.java   
private ILineRange getLineRange(IDocument document, ITextSelection selection) throws BadLocationException {
    final int offset= selection.getOffset();
    int startLine= document.getLineOfOffset(offset);
    int endOffset= offset + selection.getLength();
    int endLine= document.getLineOfOffset(endOffset);
    final int nLines= endLine - startLine + 1;
    return new LineRange(startLine, nLines);
}
项目:Pydev    文件:PyMoveLineAction.java   
private ILineRange getLineRange(IDocument document, ITextSelection selection) throws BadLocationException {
    final int offset = selection.getOffset();
    int startLine = document.getLineOfOffset(offset);
    int endOffset = offset + selection.getLength();
    int endLine = document.getLineOfOffset(endOffset);
    final int nLines = endLine - startLine + 1;
    return new LineRange(startLine, nLines);
}
项目:Eclipse-Postfix-Code-Completion    文件:AnnotationExpandHover.java   
public ILineRange getHoverLineRange(ISourceViewer viewer, int lineNumber) {
    return new LineRange(lineNumber, 1);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:AnnotationExpandHover.java   
public ILineRange getHoverLineRange(ISourceViewer viewer, int lineNumber) {
    return new LineRange(lineNumber, 1);
}