Package org.eclipse.jface.text.source

Examples of org.eclipse.jface.text.source.DefaultCharacterPairMatcher


    String[] ids = getConfigurationPoints();
    for (int i = 0; matcher == null && i < ids.length; i++) {
      matcher = (ICharacterPairMatcher) builder.getConfiguration(DocumentRegionEdgeMatcher.ID, ids[i]);
    }
    if (matcher == null) {
      matcher = new DefaultCharacterPairMatcher(new char[]{'(', ')', '{', '}', '[', ']', '<', '>', '"', '"', '\'', '\''});
    }
    return matcher;
  }
View Full Code Here


    String[] ids = getConfigurationPoints();
    for (int i = 0; matcher == null && i < ids.length; i++) {
      matcher = (ICharacterPairMatcher) builder.getConfiguration(DocumentRegionEdgeMatcher.ID, ids[i]);
    }
    if (matcher == null) {
      matcher = new DefaultCharacterPairMatcher(new char[]{'(', ')', '{', '}', '[', ']', '<', '>', '"', '"', '\'', '\''});
    }
    return matcher;
  }
View Full Code Here

public class XMLDocumentRegionEdgeMatcher extends DocumentRegionEdgeMatcher {

  private static final char[] PAIRS = {'{', '}', '(', ')', '[', ']','"','"','\'','\''};

  public XMLDocumentRegionEdgeMatcher() {
    super(new String[]{DOMRegionContext.XML_TAG_NAME, DOMRegionContext.XML_COMMENT_TEXT, DOMRegionContext.XML_CDATA_TEXT, DOMRegionContext.XML_PI_OPEN, DOMRegionContext.XML_PI_CONTENT}, new DefaultCharacterPairMatcher(PAIRS));
  }
View Full Code Here

    // ensure source viewer decoration support has been created and
    // configured
    SourceViewerDecorationSupport support = getSourceViewerDecorationSupport(viewer);
    if (support != null) {
      support.setCharacterPairMatcher(new DefaultCharacterPairMatcher(
          BRACKETS, IDocumentExtension3.DEFAULT_PARTITIONING));
      support.setMatchingCharacterPainterPreferenceKeys(
          PreferenceConstants.EDITOR_MATCHING_BRACKETS,
          PreferenceConstants.EDITOR_MATCHING_BRACKETS_COLOR);
    }
View Full Code Here

    ISourceViewer viewer = new ProjectionViewer(parent, ruler, getOverviewRuler(), isOverviewRulerVisible(), styles);

    // ensure source viewer decoration support has been created and configured
    SourceViewerDecorationSupport support = getSourceViewerDecorationSupport(viewer);
    if (support != null) {
      support.setCharacterPairMatcher(new DefaultCharacterPairMatcher(
          BRACKETS, IDocumentExtension3.DEFAULT_PARTITIONING));
      support.setMatchingCharacterPainterPreferenceKeys(
          PreferenceConstants.EDITOR_MATCHING_BRACKETS,
          PreferenceConstants.EDITOR_MATCHING_BRACKETS_COLOR);
    }
View Full Code Here

   
  public VhdlEditor()
  {
    super();
    char[] chars = new char[] {'(', ')'};
    fParentMatcher = new DefaultCharacterPairMatcher(chars);
    setDocumentProvider(new VhdlDocumentProvider());
    setSourceViewerConfiguration(HdlSourceViewerConfiguration
        .createForVhdl(this));
    OutlineLabelProvider = new VhdlOutlineLabelProvider();
    TreeContentProvider  = new VhdlHierarchyProvider();
View Full Code Here

    protected void configureSourceViewerDecorationSupport(SourceViewerDecorationSupport support) {
        super.configureSourceViewerDecorationSupport(support);

        char[] matchChars = { '(', ')', '[', ']', '{', '}' }; // which brackets
                                                              // to match
        matcher = new DefaultCharacterPairMatcher(matchChars, IDocumentExtension3.DEFAULT_PARTITIONING);
        support.setCharacterPairMatcher(matcher);
        support.setMatchingCharacterPainterPreferenceKeys(EDITOR_MATCHING_BRACKETS, EDITOR_MATCHING_BRACKETS_COLOR);

        // Enable bracket highlighting in the preference store
        IPreferenceStore store = getPreferenceStore();
View Full Code Here

    protected void configureSourceViewerDecorationSupport(SourceViewerDecorationSupport support) {
        super.configureSourceViewerDecorationSupport(support);

        char[] matchChars = { '(', ')', '[', ']', '{', '}', '<', '>' }; // which brackets
                                                              // to match
        matcher = new DefaultCharacterPairMatcher(matchChars, IDocumentExtension3.DEFAULT_PARTITIONING);
        support.setCharacterPairMatcher(matcher);
        support.setMatchingCharacterPainterPreferenceKeys(EDITOR_MATCHING_BRACKETS, EDITOR_MATCHING_BRACKETS_COLOR);

        // Enable bracket highlighting in the preference store
        IPreferenceStore store = getPreferenceStore();
View Full Code Here

    protected void configureSourceViewerDecorationSupport(SourceViewerDecorationSupport support) {
        super.configureSourceViewerDecorationSupport(support);

        char[] matchChars = { '(', ')', '[', ']', '{', '}' }; // which brackets
                                                              // to match
        matcher = new DefaultCharacterPairMatcher(matchChars, IDocumentExtension3.DEFAULT_PARTITIONING);
        support.setCharacterPairMatcher(matcher);
        support.setMatchingCharacterPainterPreferenceKeys(EDITOR_MATCHING_BRACKETS, EDITOR_MATCHING_BRACKETS_COLOR);

        // Enable bracket highlighting in the preference store
        IPreferenceStore store = getPreferenceStore();
View Full Code Here

    protected void configureSourceViewerDecorationSupport(SourceViewerDecorationSupport support) {
        super.configureSourceViewerDecorationSupport(support);

        char[] matchChars = { '(', ')', '[', ']', '{', '}', '<', '>' }; // which brackets
                                                              // to match
        matcher = new DefaultCharacterPairMatcher(matchChars, IDocumentExtension3.DEFAULT_PARTITIONING);
        support.setCharacterPairMatcher(matcher);
        support.setMatchingCharacterPainterPreferenceKeys(EDITOR_MATCHING_BRACKETS, EDITOR_MATCHING_BRACKETS_COLOR);

        // Enable bracket highlighting in the preference store
        IPreferenceStore store = getPreferenceStore();
View Full Code Here

TOP

Related Classes of org.eclipse.jface.text.source.DefaultCharacterPairMatcher

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.