Package org.eclipse.jface.text

Examples of org.eclipse.jface.text.IDocument.addPositionCategory()


    fContent.clear();

    if (newInput != null) {
      IDocument document= fDocumentProvider.getDocument(newInput);
      if (document != null) {
        document.addPositionCategory(SEGMENTS);
        document.addPositionUpdater(fPositionUpdater);
        (new DjangoOutlineDocumentParser(fContent)).parseDocument(document);
      }
    }
//    if (oldInput != null) {
View Full Code Here


      fContent.clear();

      if (newInput != null) {
        IDocument document= fDocumentProvider.getDocument(newInput);
        if (document != null) {
          document.addPositionCategory(SEGMENTS);
          document.addPositionUpdater(fPositionUpdater);

          parse(document);
        }
      }
View Full Code Here

      fContent.clear();

      if (newInput != null) {
        IDocument document= fDocumentProvider.getDocument(newInput);
        if (document != null) {
          document.addPositionCategory(SEGMENTS);
          document.addPositionUpdater(fPositionUpdater);

          parse(document);
        }
      }
View Full Code Here

    if (newInput != null) {
      IDocument document = fDocumentProvider
      .getDocument(newInput);
      if (document != null) {
        document.addPositionCategory(SEGMENTS);
        document.addPositionUpdater(fPositionUpdater);

        parse(document);
      }
    }
View Full Code Here

      if (newInput != null) {
        IDocument document = fDocumentProvider
        .getDocument(newInput);
        if (document != null) {
          document.addPositionCategory(SEGMENTS);
          document.addPositionUpdater(fPositionUpdater);

          parse(document);
        }
      }
View Full Code Here

    }
   
    if (newInput != null) {
      IDocument document= documentProvider.getDocument(newInput);
      if (document != null) {
        document.addPositionCategory(SEGMENTS);
        document.addPositionUpdater(positionUpdater);

        tree = parser.parse(document.get());
        addAnnotations(document.get());
      }
View Full Code Here

    final IDocument document= getDocument();

    if (fSelections.isEmpty()) {
      fSelectionCategory= _SELECTION_POSITION_CATEGORY + hashCode();
      fSelectionUpdater= new NonDeletingPositionUpdater(fSelectionCategory);
      document.addPositionCategory(fSelectionCategory);
      document.addPositionUpdater(fSelectionUpdater);
    }

    try {
View Full Code Here

 
  @Test
  public void testFile1() {
   
    IDocument doc = FileToDocUtility.getDocument(System.getProperty("user.dir") + "/resources/testfiles/test1.json");
    doc.addPositionCategory(JSON_ELEMENTS);
    JsonTextOutlineParser jtop = new JsonTextOutlineParser(doc);
   
    JsonElement top = (JsonElement) jtop.parse();
   
    Assert.assertEquals(4, top.getChildren().size());
View Full Code Here

 
  @Test
  public void testFile2() {
   
    IDocument doc = FileToDocUtility.getDocument(System.getProperty("user.dir") + "/resources/testfiles/test2.json");
    doc.addPositionCategory(JSON_ELEMENTS);
    JsonTextOutlineParser jtop = new JsonTextOutlineParser(doc);
   
    JsonElement top = (JsonElement) jtop.parse();
   
    Assert.assertEquals(1, top.getChildren().size());
View Full Code Here

  @Test
  public void testFile3() {
   
    IDocument doc = FileToDocUtility.getDocument(System.getProperty("user.dir") + "/resources/testfiles/test3.json");
    doc.addPositionCategory(JSON_ELEMENTS);
    JsonTextOutlineParser jtop = new JsonTextOutlineParser(doc);
   
    JsonElement top = (JsonElement) jtop.parse();
   
    Assert.assertEquals(3, top.getChildren().size());
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.