Examples of PatternMatcher


Examples of com.sun.star.tool.starjar.regex.PatternMatcher

        catch (MalformedPatternException e) {
            System.out.println("Fehler beim Parsen der Filterdatei :\n" + e);
        }

        PatternCompiler compiler = new Perl5Compiler();
        PatternMatcher matcher = new Perl5Matcher();
       
        while (fileList.hasMoreElements()) {
            FileListElement file = (FileListElement)fileList.nextElement();
            Enumeration filterEnum = filter.elements();
            Pattern pathPattern = null;
            Pattern filenamePattern = null;
           
            while (filterEnum.hasMoreElements()) {
                FilterElement filterElement = (FilterElement)filterEnum.nextElement();
                try {
                    pathPattern = compiler.compile(filterElement.getPathPattern());
                    filenamePattern = compiler.compile(filterElement.getFilenamePattern());
                } catch (MalformedPatternException e) {
                    System.out.println("Fehler im Pattern\n" + e);
                }
                if (matcher.matches(file.getPath(),pathPattern) && matcher.matches(file.getFilename(),filenamePattern))
                    file.setInclude(filterElement.isInclude());
            }
        }
        starJar.zipFiles(fileListVector,"JarDirectoryTest.jar", "");
    }
View Full Code Here

Examples of de.susebox.jtopas.impl.PatternMatcher

      }
      break;
     
    case Token.PATTERN:
      for (int index = 0; index < _patterns.size(); ++index) {
        PatternMatcher    data = (PatternMatcher)_patterns.get(index);

        prop = data.getProperty();
        if (prop.getImages()[0].equals(startImage)) {
          break;
        }
        prop = null;
      }
View Full Code Here

Examples of de.susebox.jtopas.impl.PatternMatcher

      }
      break;

    case Token.PATTERN:
      for (int index = 0; index < _patterns.size(); ++index) {
        PatternMatcher    data = (PatternMatcher)_patterns.get(index);

        prop = data.getProperty();
        if (prop.getImages()[0].equals(image)) {
          _patterns.remove(index);
          break;
        } else {
          prop = null;
View Full Code Here

Examples of de.susebox.jtopas.impl.PatternMatcher

      int                   longestMatch = 0;
      PatternHandler.Result bestResult   = null;
     
      // only get the string if pattern are available
      for (int index = 0; index < _patterns.size(); ++index) {
        PatternMatcher        data = (PatternMatcher)_patterns.get(index);
        PatternHandler.Result result = data.matches(dataProvider);

        if (result != null) {
          if (bestResult == null || bestResult.getLengthOfMatch() < result.getLengthOfMatch()) {
            bestResult = result;
          }
View Full Code Here

Examples of de.susebox.jtopas.impl.PatternMatcher

   * @return  the replaced pattern property or <code>null</code>
   * @throws  IllegalArgumentException if pattern matching is not available
   */
  protected TokenizerProperty addPattern(TokenizerProperty patternProp) throws IllegalArgumentException {
    // construct the pattern
    PatternMatcher  data = null;
    String          pattern = patternProp.getImages()[0];
   
    try {
      data = new PatternMatcher(patternProp, getParseFlags());
    } catch (Throwable ex) {
      throw new ExtIllegalArgumentException(ex, "Pattern matching is not available (use JDK 1.4 or above).");
    }
                                                     
    // Register pattern. First search for existing one
    for (int index = 0; index < _patterns.size(); ++index) {
      PatternMatcher    oldData = (PatternMatcher)_patterns.get(index);
      TokenizerProperty oldProp = oldData.getProperty();

      if (oldProp.getImages()[0].equals(pattern)) {
        _patterns.set(index, data);
        return oldProp;
      }
View Full Code Here

Examples of edu.umd.cs.findbugs.ba.bcp.PatternMatcher

                MethodGen methodGen = classContext.getMethodGen(method);
                if (methodGen == null) {
                    continue;
                }

                PatternMatcher matcher = new PatternMatcher(pattern, classContext, method);
                matcher.execute();

                Iterator<ByteCodePatternMatch> j = matcher.byteCodePatternMatchIterator();
                while (j.hasNext()) {
                    ByteCodePatternMatch match = j.next();

                    if (DEBUG) {
                        System.out.println("Pattern match:");
View Full Code Here

Examples of lupos.engine.operators.tripleoperator.patternmatcher.PatternMatcher

  @Override
  public void prepareForQueryDebugSteps(final DebugStep debugstep) {
    super.prepareForQueryDebugSteps(debugstep);
    if (this.rootNode instanceof PatternMatcher) {
      final PatternMatcher new_pm = PatternMatcher.createDebugInstance(
          (PatternMatcher) this.rootNode, debugstep);
      this.rootNode.replaceWith(new_pm);
      this.rootNode = new_pm;
    } else {
      for (final PatternMatcher zpm : this.patternMatchers) {
View Full Code Here

Examples of org.apache.ivy.plugins.matcher.PatternMatcher

        Ivy ivy = getIvyInstance();
        IvySettings settings = ivy.getSettings();

        SearchEngine searcher = new SearchEngine(settings);
        PatternMatcher patternMatcher = settings.getMatcher(matcher);

        ModuleRevisionId[] mrids;
        if (resolver == null) {
            mrids = searcher.listModules(
                ModuleRevisionId.newInstance(organisation, module, branch, revision),
View Full Code Here

Examples of org.apache.ivy.plugins.matcher.PatternMatcher

            prefix = prefix + ".";
        }

        SearchEngine searcher = new SearchEngine(settings);

        PatternMatcher patternMatcher = new PatternMatcher() {
            private PatternMatcher exact = new ExactPatternMatcher();

            private PatternMatcher regexp = new ExactOrRegexpPatternMatcher();

            public Matcher getMatcher(String expression) {
View Full Code Here

Examples of org.apache.ivy.plugins.matcher.PatternMatcher

        }
        if (toResolver == null) {
            throw new IllegalArgumentException("unknown resolver " + to
                    + ". Available resolvers are: " + settings.getResolverNames());
        }
        PatternMatcher matcher = settings.getMatcher(options.getMatcherName());
        if (matcher == null) {
            throw new IllegalArgumentException("unknown matcher " + options.getMatcherName()
                    + ". Available matchers are: " + settings.getMatcherNames());
        }
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.