Examples of findLine()


Examples of com.google.collide.shared.document.LineFinder.findLine()

    AnchorType topType = AnchorType.create(EditorTests.class, "top");

    Document doc = Document.createFromString("qwerty\nasdfgh\nzxcvbn\n");
    LineFinder lineFinder = doc.getLineFinder();
    AnchorManager anchorManager = doc.getAnchorManager();
    LineInfo lineInfo = lineFinder.findLine(1);

    Editor editor = Editor.create(new MockAppContext());
    editor.setDocument(doc);

    Anchor topAnchor = anchorManager.createAnchor(topType, lineInfo.line(), lineInfo.number(),
View Full Code Here

Examples of com.google.collide.shared.document.LineFinder.findLine()

    DocumentParser documentParser = createDocumentParser(path);
    Autoindenter autoindenter = Autoindenter.create(documentParser, editor);

    LineFinder lineFinder = editor.getDocument().getLineFinder();
    editor.getSelection().setSelection(
        lineFinder.findLine(line1), column1, lineFinder.findLine(line2), column2);

    final JsonArray<Scheduler.ScheduledCommand> scheduled = JsonCollections.createArray();

    TestSchedulerImpl.AngryScheduler scheduler = new TestSchedulerImpl.AngryScheduler() {
      @Override
View Full Code Here

Examples of com.google.collide.shared.document.LineFinder.findLine()

    DocumentParser documentParser = createDocumentParser(path);
    Autoindenter autoindenter = Autoindenter.create(documentParser, editor);

    LineFinder lineFinder = editor.getDocument().getLineFinder();
    editor.getSelection().setSelection(
        lineFinder.findLine(line1), column1, lineFinder.findLine(line2), column2);

    final JsonArray<Scheduler.ScheduledCommand> scheduled = JsonCollections.createArray();

    TestSchedulerImpl.AngryScheduler scheduler = new TestSchedulerImpl.AngryScheduler() {
      @Override
View Full Code Here

Examples of com.google.collide.shared.document.LineFinder.findLine()

        analyzer.onLinesDeleted(deletedLines);
      }
    });

    LineFinder lineFinder = document.getLineFinder();
    LineInfo line2 = lineFinder.findLine(2);
    LineInfo line4 = lineFinder.findLine(4);
    String textToDelete = LineUtils.getText(line2.line(), 0, line4.line(), 0);
    helper.editor.getEditorDocumentMutator().deleteText(line2.line(), 2, 0, textToDelete.length());
    remover.remove();
View Full Code Here

Examples of com.google.collide.shared.document.LineFinder.findLine()

      }
    });

    LineFinder lineFinder = document.getLineFinder();
    LineInfo line2 = lineFinder.findLine(2);
    LineInfo line4 = lineFinder.findLine(4);
    String textToDelete = LineUtils.getText(line2.line(), 0, line4.line(), 0);
    helper.editor.getEditorDocumentMutator().deleteText(line2.line(), 2, 0, textToDelete.length());
    remover.remove();

    JsonArray<IncrementalScheduler.Task> parseRequests = helper.parseScheduler.requests;
View Full Code Here

Examples of com.google.collide.shared.document.LineFinder.findLine()

      DocumentParser documentParser, Document document, final Editor editor) {
    Autoindenter autoindenter = Autoindenter.create(documentParser, editor);

    LineFinder lineFinder = document.getLineFinder();
    editor.getSelection().setSelection(
        lineFinder.findLine(line1), column1,
        lineFinder.findLine(line2), column2);

    Runnable triggerClicker = new Runnable() {
      @Override
      public void run() {
View Full Code Here

Examples of com.google.collide.shared.document.LineFinder.findLine()

    Autoindenter autoindenter = Autoindenter.create(documentParser, editor);

    LineFinder lineFinder = document.getLineFinder();
    editor.getSelection().setSelection(
        lineFinder.findLine(line1), column1,
        lineFinder.findLine(line2), column2);

    Runnable triggerClicker = new Runnable() {
      @Override
      public void run() {
        editor.getInput().processSignalEvent(trigger);
View Full Code Here

Examples of com.google.collide.shared.document.LineFinder.findLine()

    final Editor editor = helper.editor;
    editor.getInput().getActionExecutor().addDelegate(
        LanguageHelperResolver.getHelper(SyntaxType.JS).getActionExecutor());
    LineFinder lineFinder = editor.getDocument().getLineFinder();
    editor.getSelection().setSelection(
        lineFinder.findLine(line1), column1, lineFinder.findLine(line2), column2);

    final JsonArray<Scheduler.ScheduledCommand> scheduled = JsonCollections.createArray();

    TestSchedulerImpl.AngryScheduler scheduler = new TestSchedulerImpl.AngryScheduler() {
      @Override
View Full Code Here

Examples of com.google.collide.shared.document.LineFinder.findLine()

    final Editor editor = helper.editor;
    editor.getInput().getActionExecutor().addDelegate(
        LanguageHelperResolver.getHelper(SyntaxType.JS).getActionExecutor());
    LineFinder lineFinder = editor.getDocument().getLineFinder();
    editor.getSelection().setSelection(
        lineFinder.findLine(line1), column1, lineFinder.findLine(line2), column2);

    final JsonArray<Scheduler.ScheduledCommand> scheduled = JsonCollections.createArray();

    TestSchedulerImpl.AngryScheduler scheduler = new TestSchedulerImpl.AngryScheduler() {
      @Override
View Full Code Here

Examples of com.google.collide.shared.document.LineFinder.findLine()

  }

  private void moveViewportToLineNumber(int topLineNumber, int numLinesToShow) {
    LineFinder lineFinder = buffer.getDocument().getLineFinder();

    LineInfo newTop = lineFinder.findLine(getTop(), topLineNumber);

    int targetBottomLineNumber = newTop.number() + numLinesToShow - 1;
    LineInfo newBottom =
        lineFinder.findLine(getBottom(),
            Math.min(document.getLastLineNumber(), targetBottomLineNumber));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.