Examples of MatchType


Examples of edu.zao.fire.filters.GeneralMatchingFilter.MatchType

    checkCaseSensitive.setEnabled(enabled);
    checkRegex.setEnabled(enabled);
  }

  private void updateWidgetStates(GeneralMatchingFilter filter) {
    MatchType matchType = filter.getMatchType();
    boolean affectsFiles = matchType == MatchType.FILE || matchType == MatchType.ALL_ITEMS;
    boolean affectsFolders = matchType == MatchType.FOLDER || matchType == MatchType.ALL_ITEMS;
    checkFiles.setSelection(affectsFiles);
    checkFolders.setSelection(affectsFolders);
View Full Code Here

Examples of edu.zao.fire.filters.GeneralMatchingFilter.MatchType

  }

  private void updateFilterToWidgetStates(GeneralMatchingFilter filter) {
    boolean affectsFiles = checkFiles.getSelection();
    boolean affectsFolders = checkFolders.getSelection();
    MatchType matchType;
    if (affectsFiles && affectsFolders) {
      matchType = MatchType.ALL_ITEMS;
    } else if (affectsFiles) {
      matchType = MatchType.FILE;
    } else {
View Full Code Here

Examples of grammar.model.MatchType

    else if (qName.equals("mood")) {
      enableParsing(ParseMode.MOOD);
    }
    else if (infinitiveContext || auxiliaryOfContext) {
      try {
        MatchType mt = MatchType.valueOf(qName.toUpperCase().replace('-', '_'));
        enableParsing(ParseMode.MATCH_TYPE);
        if (infinitiveContext)
          matchType = mt;
        else // auxiliaryOfContext
          auxiliaryMatchType = mt;
View Full Code Here

Examples of grammar.model.MatchType

    //System.err.println("ModelVerb.getInfinitiveMatcher(S,b):"+new Date());

//    System.out.println("ModelVerb.getInfinitiveMatcher(): "+infinitive);

    for (WordMatcher im : infinitiveMatchers) {
      MatchType matchType = im.getMatchType();
      switch (matchType) {
      case FULL_NAME:
        if (infinitive.equalsIgnoreCase(im.getMatchString()))
          return im;
        break;
View Full Code Here

Examples of grammar.model.MatchType

    }
  }
 
  public WordMatcher getNounMatcher(String noun) {
    for (WordMatcher nm : nounMatchers) {
      MatchType matchType = nm.getMatchType();
      switch (matchType) {
      case FULL_NAME:
        if (noun.equalsIgnoreCase(nm.getMatchString()))
          return nm;
        break;
View Full Code Here

Examples of grammar.model.MatchType

    if (reflexive && isReflexiveAuxiliary())
      return MatchType.REFLEXIVE;

    for (WordMatcher inf : auxiliaryOf) {
      MatchType matchType = inf.getMatchType();
      MatchType match = null;
      switch (matchType) {
      case ALL:
        match = MatchType.ALL;
        break;
      case NONE:
View Full Code Here

Examples of grammar.model.MatchType

  private String getAuxiliaryMatchString(String infinitive) {
    //System.err.println("AuxiliaryVerb.getAuxiliaryMatchString():"+new Date());

    for (WordMatcher inf : auxiliaryOf) {
      MatchType matchType = inf.getMatchType();
      boolean match = false;
      switch (matchType) {
      case FULL_NAME:
        if (infinitive.equals(inf.getMatchString()))
          match = true;
View Full Code Here

Examples of grammar.model.MatchType

  }

  public boolean isCloserMatch(String infinitive, boolean reflexive, AuxiliaryVerb other) {
    //System.err.println("AuxiliaryVerb.isCloserMatch():"+new Date());

    MatchType thisMt = isAuxiliaryOfInternal(infinitive, reflexive);
    MatchType otherMt = other.isAuxiliaryOfInternal(infinitive, reflexive);

    /*if (isReflexiveAuxiliary()) {
      System.out.println("SQUoooo");
      if (reflexive) {
        System.out.println("squOo2");
        return true;
      }
    }*/

    if (thisMt == MatchType.SUFFIX && otherMt == MatchType.SUFFIX) {
      return getAuxiliaryMatchString(infinitive).length() >
        other.getAuxiliaryMatchString(infinitive).length();
    }
    if (thisMt.ordinal() > otherMt.ordinal())
      return true;
    return false;
  }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.filterrow.ParseResult.MatchType

                        filterText, textDelimiter, textMatchingMode);

                EventList<MatcherEditor<T>> stringMatcherEditors = new BasicEventList<MatcherEditor<T>>();
                for (ParseResult parseResult : parseResults) {
                    try {
                        MatchType matchOperation = parseResult
                                .getMatchOperation();
                        if (matchOperation == MatchType.NONE) {
                            stringMatcherEditors.add(getTextMatcherEditor(
                                    columnIndex, textMatchingMode,
                                    displayConverter,
View Full Code Here

Examples of org.nutz.lang.MatchType

    // 先看看有没对应的构造函数
    Mirror<T> mirror = Mirror.me(type);
    for (Constructor<?> cc : type.getConstructors()) {
      Class<?>[] pts = cc.getParameterTypes();
      MatchType mt = Mirror.matchParamTypes(pts, argTypes);
      re.setMatchType(mt);
      // 正好合适
      if (MatchType.YES == mt) {
        return re.setBorning(new ConstructorBorning(cc));
      }
      // 差一个参数,说明这个构造函数有变参数组
      else if (MatchType.LACK == mt) {
        re.setLackArg(Mirror.blankArrayArg(pts));
        return re.setBorning(new ConstructorBorning(cc));
      }
      // 看看整个输入的参数是不是变参
      else if (null != dynaArg && pts.length == 1 && pts[0] == dynaArg.getClass()) {
        return re.setBorning(new DynamicConstructorBorning(cc));
      }
    }

    // 看看有没有对应静态工厂函数
    Method[] sms = mirror.getStaticMethods();
    for (Method m : sms) {
      Class<?>[] pts = m.getParameterTypes();
      MatchType mt = Mirror.matchParamTypes(pts, argTypes);
      re.setMatchType(mt);
      if (MatchType.YES == mt) {
        return re.setBorning(new MethodBorning<T>(m));
      } else if (MatchType.LACK == mt) {
        re.setLackArg(Mirror.blankArrayArg(pts));
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.