Package com.google.collide.shared.document

Examples of com.google.collide.shared.document.LineInfo


            mockAnchorManager, mockResources, mockRenderer, stubScheduler, listenerRegistrar);
  }

  public void testMatchDownSameLine() {
    customSetUp(ImmutableList.of("(text {in} between)"));
    LineInfo startLineInfo = document.getFirstLineInfo();

    // should find the match on line 1, at column 16
    expect(
        mockAnchorManager.createAnchor(EasyMock.eq(ParenMatchHighlighter.MATCH_ANCHOR_TYPE),
            EasyMock.eq(startLineInfo.line()), EasyMock.eq(0), EasyMock.eq(18))).andReturn(null);

    replay(mockAnchorManager);

    parenMatchHighlighter.search(SearchDirection.DOWN, ')', '(', startLineInfo, 1);
View Full Code Here


    verify(mockAnchorManager);
  }

  public void testMatchUpSameLine() {
    customSetUp(ImmutableList.of("<img src='img.jpg' name='test'>"));
    LineInfo startLineInfo = document.getFirstLineInfo();

    // should fine the match one line 1, column 0
    expect(
        mockAnchorManager.createAnchor(EasyMock.eq(ParenMatchHighlighter.MATCH_ANCHOR_TYPE),
            EasyMock.eq(startLineInfo.line()), EasyMock.eq(0), EasyMock.eq(0))).andReturn(null);

    replay(mockAnchorManager);

    parenMatchHighlighter.search(SearchDirection.UP, '<', '>', startLineInfo, 31);
View Full Code Here

    expect(
        mockAnchorManager.createAnchor(EasyMock.eq(ParenMatchHighlighter.MATCH_ANCHOR_TYPE),
            EasyMock.eq(matchLine), EasyMock.eq(3), EasyMock.eq(0))).andReturn(null);
    replay(mockAnchorManager);

    parenMatchHighlighter.search(SearchDirection.DOWN, '}', '{', new LineInfo(startLine, 1), 16);

    verify(mockAnchorManager);
  }
View Full Code Here

   */
  public void testMatchUpDifferentLines() {
    final ImmutableList<String> documentText =
        ImmutableList.of("var list = ['str1',", "    'str2',", "    'str3']");
    customSetUp(documentText);
    LineInfo startLineInfo = document.getLastLineInfo();
    Line matchLine = document.getFirstLine();

    // should find the match on line 1, column 11
    expect(
        mockAnchorManager.createAnchor(EasyMock.eq(ParenMatchHighlighter.MATCH_ANCHOR_TYPE),
View Full Code Here

    expect(
        mockAnchorManager.createAnchor(EasyMock.eq(ParenMatchHighlighter.MATCH_ANCHOR_TYPE),
            EasyMock.eq(matchLine), EasyMock.eq(4), EasyMock.eq(9))).andReturn(null);
    replay(mockAnchorManager);

    parenMatchHighlighter.search(SearchDirection.DOWN, ']', '[', new LineInfo(startLine, 1), 12);

    verify(mockAnchorManager);
  }
View Full Code Here

      referenceStore = new ReferenceStore(cubeClient);
      referenceStore.onDocumentChanged(document, null);
      referenceStore.updateReferences(
          new CubeData(filePath.getPathString(), null, null, null, null, fileReferences));

      LineInfo line1 = document.getLineFinder().findLine(1);
      // Check that there's reference at positions 12 to 17 inclusive (line 2).
      assertNotNull(referenceStore.findReference(line1, 12, true));
      assertNotNull(referenceStore.findReference(line1, 17, true));

      // Make some edits. Just insert some whitespaces before reference.
View Full Code Here

TOP

Related Classes of com.google.collide.shared.document.LineInfo

Copyright © 2018 www.massapicom. 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.