Package org.eclipse.jface.text

Examples of org.eclipse.jface.text.IDocumentPartitioner.connect()


    protected IDocument createDocument(Object element) throws CoreException {
        IDocument document = super.createDocument(element);
        if (document != null) {
            IDocumentPartitioner partitioner = new DefaultPartitioner(new XMLPartitionScanner(),
                    new String[] {XMLPartitionScanner.XML_TAG, XMLPartitionScanner.XML_COMMENT});
            partitioner.connect(document);
            document.setDocumentPartitioner(partitioner);
            // document.addDocumentListener(new IDocumentListener() {
            //               
            // public void documentAboutToBeChanged(DocumentEvent event) {
            // }
View Full Code Here


    }
    if (document != null) {
      IDocumentPartitioner partitioner = new FastPartitioner(
          new QVTPartitionScanner(),
          new String[] { QVTPartitionScanner.MM_DECLARATION,QVTPartitionScanner.MM_COMMENT});
      partitioner.connect(document);
      document.setDocumentPartitioner(QVTDocument.QVT_PARTITIONING,partitioner);
    }
    return document;
  }
View Full Code Here

    if (document != null) {
      IDocumentPartitioner partitioner =
        new FastPartitioner(
          new PartitionScanner(),
          PartitionType.PARTITION_TYPES);
      partitioner.connect(document);
      document.setDocumentPartitioner(partitioner);
    }
    return document;
  }
View Full Code Here

        new GherkinPartitioner(
          new GherkinPartitionScanner(),
          new String[] {
            GherkinPartitionScanner.GHERKIN_TAG,
            GherkinPartitionScanner.GHERKIN_COMMENT });
      partitioner.connect(document);
      document.setDocumentPartitioner(partitioner);
    }
    return document;
  }
}
View Full Code Here

          new ParameterFilePartitionScanner(), new String[] {
              ParameterFilePartitionScanner.PARAMETER_COMMENT,
              ParameterFilePartitionScanner.PARAMETER_NAME,
              ParameterFilePartitionScanner.PARAMETER_VALUE,
              ParameterFilePartitionScanner.PARAMETER_EMPTY });
      partitioner.connect(document);
      document.setDocumentPartitioner(partitioner);
     
      // Associate this IDocument with a ParameterTree model object.
      parameterTree = new ParameterTree(document);
    }
View Full Code Here

          new ParameterFilePartitionScanner(), new String[] {
              ParameterFilePartitionScanner.PARAMETER_COMMENT,
              ParameterFilePartitionScanner.PARAMETER_NAME,
              ParameterFilePartitionScanner.PARAMETER_VALUE,
              ParameterFilePartitionScanner.PARAMETER_EMPTY });
      partitioner.connect(document);
      document.setDocumentPartitioner(partitioner);
    }
  }

}
View Full Code Here

    }
    if (document != null) {
      HdlPartitionScanner scanner = document.createPartitionScanner();
      IDocumentPartitioner partitioner = new FastPartitioner(scanner,
          HdlPartitionScanner.getContentTypes());
      partitioner.connect(document);
      document.setDocumentPartitioner(partitioner);
    }
    return document;
  }
 
View Full Code Here

        new FastPartitioner(
            new JavaScriptPartitionScanner(),
            new String[]{
                JavaScriptPartitionScanner.JS_COMMENT
            });
      partitioner.connect(document);
      document.setDocumentPartitioner(partitioner);
    }
    return info;
  }
View Full Code Here

        new FastPartitioner(
          new DTDPartitionScanner(),
          new String[] {
            HTMLPartitionScanner.HTML_TAG,
            HTMLPartitionScanner.HTML_COMMENT});
      partitioner.connect(document);
      document.setDocumentPartitioner(partitioner);
    }
    return document;
  }
 
View Full Code Here

                HTMLPartitionScanner.HTML_SCRIPT,
                HTMLPartitionScanner.HTML_DOCTYPE,
                HTMLPartitionScanner.HTML_DIRECTIVE,
                HTMLPartitionScanner.JAVASCRIPT,
                HTMLPartitionScanner.HTML_CSS});
      partitioner.connect(document);
      document.setDocumentPartitioner(partitioner);
    }
    return document;
  }
 
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.