Package org.eclipse.ui.internal.misc

Examples of org.eclipse.ui.internal.misc.StringMatcher$Position


  public Object extractCategoryTokenData(byte[] buffer, int offset, int length) {
    if (length == 0) {
      return null;
    }
    Integer i = Integer.valueOf(Vint8.decode(buffer, new Position(offset)));
    return i;
  }
View Full Code Here


    if (!super.setdoc(docId)) {
      return false;
    }

    // read header - number of enhancements and their lengths
    Position position = new Position();
    nEnhancements = Vint8.decode(buffer, position);
    for (int i = 0; i < nEnhancements; i++) {
      enhancementLength[i] = Vint8.decode(buffer, position);
    }
View Full Code Here

  public Object extractCategoryTokenData(byte[] buffer, int offset, int length) {
    if (length == 0) {
      return null;
    }
    Integer i = Integer.valueOf(Vint8.decode(buffer, new Position(offset)));
    return i;
  }
View Full Code Here

  private class DefaultFilterMatcher implements FilterMatcher {
    private StringMatcher fMatcher;

    public void setFilter(String pattern, boolean ignoreCase,
        boolean ignoreWildCards) {
      fMatcher = new StringMatcher(pattern + '*', ignoreCase,
          ignoreWildCards);
    }
View Full Code Here

    } else {
      String pattern = patternString + "*"; //$NON-NLS-1$
      if (includeLeadingWildcard) {
        pattern = "*" + pattern; //$NON-NLS-1$
      }
      matcher = new StringMatcher(pattern, true, false);
    }
    }
View Full Code Here

    this.initialPattern = stringPattern;
    this.stringPattern = stringPattern;
    initializePatternAndMatchRule(stringPattern);
    matchRule = matchRule & this.allowedRules;
    if (matchRule == RULE_PATTERN_MATCH) {
      stringMatcher = new StringMatcher(this.stringPattern, true, false);
    }
  }
View Full Code Here

    protected void setMatcherString(String pattern) {
        if (pattern.length() == 0) {
            fStringMatcher = null;
        } else {
            boolean ignoreCase = pattern.toLowerCase().equals(pattern);
            fStringMatcher = new StringMatcher(pattern, ignoreCase, false);
        }
        stringMatcherUpdated();
    }
View Full Code Here

        /*
         * (non-Javadoc) Method declared on ViewerFilter.
         */
        public boolean select(Viewer viewer, Object parentElement,
                Object element) {
            StringMatcher matcher = getMatcher();
            if (matcher == null || !(viewer instanceof TableViewer)) {
        return true;
      }
            TableViewer tableViewer = (TableViewer) viewer;

            String matchName = ((ILabelProvider) tableViewer.getLabelProvider())
                    .getText(element);
           
            if(matchName == null) {
        return false;
      }
            // A dirty editor's label will start with dirty prefix, this prefix
            // should not be taken in consideration when matching with a pattern
            String prefix = DefaultTabItem.DIRTY_PREFIX;
            if (matchName.startsWith(prefix)) {
        matchName = matchName.substring(prefix.length());
      }
            return matchName != null && matcher.match(matchName);
        }
View Full Code Here

                return part;
            }
            // check pattern matching placeholders
            else if (part instanceof PartPlaceholder
                    && ((PartPlaceholder) part).hasWildCard()) {
                StringMatcher sm = new StringMatcher(part.getID(), true, false);
                if (sm.match(id)) {
          matchingParts
                            .add(new MatchingPart(part.getID(), null, part));
        }
            } else if (part instanceof EditorSashContainer) {
                // Skip.
View Full Code Here

                if (phPrimaryId.equals(primaryId)
                        && phSecondaryId.equals(secondaryId)) {
                    return part;
                }
                // check for partial matching pair
                StringMatcher sm = new StringMatcher(phPrimaryId, true, false);
                if (sm.match(primaryId)) {
                    sm = new StringMatcher(phSecondaryId, true, false);
                    if (sm.match(secondaryId)) {
                        matchingParts.add(new MatchingPart(phPrimaryId,
                                phSecondaryId, part));
                    }
                }
            } else if (part instanceof EditorSashContainer) {
View Full Code Here

TOP

Related Classes of org.eclipse.ui.internal.misc.StringMatcher$Position

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.